From c62730b5eef5c0323f90d879ddb9a986ec4f5df3 Mon Sep 17 00:00:00 2001 From: Annika Lauber Date: Mon, 9 Oct 2023 09:33:46 +0200 Subject: [PATCH] Add example to run ICON (#42) * small improvements of description * improvements description Euler * add "Run test case with ICON" section --- models/icon.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/models/icon.md b/models/icon.md index 16a0e396..eb1a4c11 100644 --- a/models/icon.md +++ b/models/icon.md @@ -17,17 +17,17 @@ In order to get access to the [ICON repository hosted on the C2SM GitHub organiz ```bash git clone --recurse-submodules git@github.com:C2SM/icon.git ``` - If you don't already have an ssh key set up for GitHub, but would like to do so, follow the [instructions](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent). + If you don't already have an SSH key set up for GitHub, but would like to do so, follow the [instructions](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent). ## Configure and compile The ICON build mechanism is different on Piz Daint and Euler. On Daint, Spack is used, whereas on Euler, ICON is build manually with configuration files. ### Piz Daint -Spack takes care of configuring and building ICON. For detailed instructions, please consider the official spack-c2sm [documentation](https://c2sm.github.io/spack-c2sm/latest/QuickStart.html#icon) +Spack takes care of configuring and building ICON. For detailed instructions, please consider the official spack-c2sm documentation for [setting up a Spack instance](https://c2sm.github.io/spack-c2sm/latest/QuickStart.html#at-cscs-daint-tsa-balfrin) and for [installing ICON](https://c2sm.github.io/spack-c2sm/latest/QuickStart.html#icon). ### Euler (ETHZ) -ICON needs to be configured before compilation. There is a configure script for each compiler and/or machines located in config. The general procedure using configuration files is independent of machines or compilers. +ICON needs to be configured before compilation. There is a configure script for each compiler and/or machine located in the folder *config*. The general procedure using configuration files is independent of machines or compilers. ```bash ./config/[machine_you_want_to_compute_on]/[configuration_filename] @@ -42,7 +42,22 @@ source modules.env # compile make -j 8 -``` +``` + +## Run test case with ICON +In the *run* folder, you find many prepared test cases, which you can convert into run scripts. To generate the runscript of one of the experiment files, e.g. *mch_ch_lowres*, you can use the *make_runscripts* function. + +```bash +./make_runscripts mch_ch_lowres +``` + +To run the created runscript, navigate to the *run* subdirectory and submit the runscript. + +```bash +cd run && sbatch ./exp.mch_ch_lowres.run +``` + +You may need to change the account in the runscript to one that you are allowed to use. Alternatively, you can also add `--account ` to the sbatch command. ## Input files