Skip to content

Commit

Permalink
Add example to run ICON (#42)
Browse files Browse the repository at this point in the history
* small improvements of description

* improvements description Euler

* add "Run test case with ICON" section
  • Loading branch information
AnnikaLau authored Oct 9, 2023
1 parent e278198 commit c62730b
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions models/icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ In order to get access to the [ICON repository hosted on the C2SM GitHub organiz
```bash
git clone --recurse-submodules [email protected]: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]
Expand All @@ -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 <my_account_id>` to the sbatch command.

## Input files

Expand Down

0 comments on commit c62730b

Please sign in to comment.