Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring (part 1) #18

Merged
merged 123 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from 120 commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
ac97b17
Add src folder for model code
mjaehn May 15, 2023
53d3106
Use devbuildcosmo and environment for cosmo/icon builds
mjaehn May 16, 2023
a78f84e
Fix cosmo and icon builds
mjaehn May 16, 2023
f581079
Add further jenkins scripts
mjaehn May 16, 2023
41a3673
Fix devbuildcosmo
mjaehn May 16, 2023
53788f2
Update gitignore
mjaehn May 16, 2023
d8751d8
Use c2sm branch for cosmo-ghg
mjaehn May 16, 2023
fdc3c93
Update submodules for icon
mjaehn May 16, 2023
7ae094d
Adapt spack in Jenkinsfile
mjaehn May 17, 2023
7ed2b2e
devbuilds for int2lm and cosmo
mjaehn May 17, 2023
a1a86d6
Merge branch 'main' of github.com:C2SM/processing-chain into spack_v0…
mjaehn May 17, 2023
37b2d69
GitHub Action: Apply Pep8-formatting
invalid-email-address May 17, 2023
e4947b9
Add int2lm to pipeline
mjaehn May 31, 2023
a18b845
Add global icon-art case
mjaehn May 31, 2023
92a9e59
Set own initial file in icon job
mjaehn May 31, 2023
83e73a9
GitHub Action: Apply Pep8-formatting
invalid-email-address May 31, 2023
e82f366
Add new tool scripts
mjaehn May 31, 2023
d70245e
First work on prepare_data job for global simulations
mjaehn May 31, 2023
967bd92
Merge branch 'global_icon-art' of github.com:C2SM/processing-chain in…
mjaehn May 31, 2023
acfc7af
Fix cosmo executable
mjaehn Jun 2, 2023
25c7a71
Add checks for jenkins script
mjaehn Jun 5, 2023
e9af479
Fix icon exe
mjaehn Jun 5, 2023
b7218de
Add check for cosmo case
mjaehn Jun 6, 2023
ff8fbb0
Install icontools with spack
mjaehn Jun 6, 2023
151076f
Fix icontools scripts (new spack)
mjaehn Jun 6, 2023
314a470
Properly initialize conda within jenkins script
mjaehn Jun 6, 2023
1414958
Add dask package to environment
mjaehn Jun 7, 2023
14afc69
Add namelist parameter to fix ICON case
mjaehn Jun 7, 2023
6ab5869
Only clone last commit for int2lm/cosmo/icon
mjaehn Jun 7, 2023
699fa63
Merge branch 'spack_v0.18.1' of github.com:C2SM/processing-chain into…
mjaehn Jun 14, 2023
80a09d5
Convert variable names to lowercase
mjaehn Jun 14, 2023
a500375
Change target and fix errors
mjaehn Jun 14, 2023
37e70f6
GitHub Action: Apply Pep8-formatting
invalid-email-address Jun 14, 2023
9b6d678
Add everything to prepare_data job
mjaehn Jun 14, 2023
953a6f0
Merge branch 'global_icon-art' of github.com:C2SM/processing-chain in…
mjaehn Jun 14, 2023
f821740
GitHub Action: Apply Pep8-formatting
invalid-email-address Jun 14, 2023
5ce75e4
Adapt icon runjob
mjaehn Jun 15, 2023
70a2043
Move data download script to jenkins folder
mjaehn Jun 15, 2023
0ce513b
Adapt Jenkinsfile
mjaehn Jun 15, 2023
3ad183d
Add cdsapi package
mjaehn Jun 15, 2023
edb7e6b
Replace subprocess.call with .run + remove unused imports
mjaehn Jun 15, 2023
a11703f
Update year in license
mjaehn Jun 15, 2023
cfd4d86
Add default jobs
mjaehn Jun 15, 2023
340bb99
Move model info to .yaml file
mjaehn Jun 15, 2023
e7127ce
target -> model; subtarget -> variant
mjaehn Jun 15, 2023
b635d8a
Fix error message
mjaehn Jun 15, 2023
69ff2a5
Merge branch 'main' of github.com:C2SM/processing-chain into global_i…
mjaehn Jun 16, 2023
e1f4015
Fix Jenkinsfile
mjaehn Jun 16, 2023
a5a1684
Merge branch 'main' of github.com:C2SM/processing-chain into refactoring
mjaehn Jun 19, 2023
f573481
Replace (sub)target with model/variant in config files
mjaehn Jun 19, 2023
8ec9d98
GitHub Action: Apply Pep8-formatting
invalid-email-address Jun 19, 2023
a5db63e
Modify variants and add restart
mjaehn Jun 19, 2023
926eb47
Merge branch 'refactoring' of github.com:C2SM/processing-chain into r…
mjaehn Jun 19, 2023
6c3a4fb
Fix run_chain
mjaehn Jun 19, 2023
0aa15ac
GitHub Action: Apply Pep8-formatting
invalid-email-address Jun 19, 2023
e1c0151
run_chain refactoring
mjaehn Jun 19, 2023
2541bed
GitHub Action: Apply Pep8-formatting
invalid-email-address Jun 19, 2023
d46d4f1
Adapt some jobs
mjaehn Jun 19, 2023
0356a61
Merge branch 'refactoring' of github.com:C2SM/processing-chain into r…
mjaehn Jun 19, 2023
ab3f65b
GitHub Action: Apply Pep8-formatting
invalid-email-address Jun 19, 2023
27f121f
Pass model_cfg to job functions
mjaehn Jun 19, 2023
1fac46b
Merge branch 'refactoring' of github.com:C2SM/processing-chain into r…
mjaehn Jun 19, 2023
3abfa14
Fix cosmo job
mjaehn Jun 19, 2023
ae3626e
Fix run_chain for icon
mjaehn Jun 20, 2023
fce4383
GitHub Action: Apply Pep8-formatting
invalid-email-address Jun 20, 2023
73087c3
Generalize copying data in prepare_data
mjaehn Jun 20, 2023
40b0ea2
Fix prepare_data job
mjaehn Jun 21, 2023
4cf99e6
Add lateral grid info to config file
mjaehn Jun 21, 2023
bf22cac
Fix icon job
mjaehn Jun 21, 2023
c5379c9
remove logging and sys from config files
mjaehn Jun 21, 2023
8d3afb2
Remove unnecessary time variables
mjaehn Jun 21, 2023
a8109d1
GitHub Action: Apply Pep8-formatting
invalid-email-address Jun 21, 2023
cde3cb0
Start working on icon-art-test case
mjaehn Jun 22, 2023
814fd01
GitHub Action: Apply Pep8-formatting
invalid-email-address Jun 22, 2023
72c1c62
Fix grid folder for input data and reduce dataset on ftp server
mjaehn Jun 22, 2023
f192745
Merge branch 'refactoring' of github.com:C2SM/processing-chain into r…
mjaehn Jun 22, 2023
4514afb
Use gpu nodes and normal queue for test cases
mjaehn Jun 22, 2023
36fb50e
Load icontools for pre-processing scripts
mjaehn Jun 23, 2023
dc3bc16
Fix prepare_data for icon-art-test
mjaehn Jun 23, 2023
74998c3
Further work on icon-art input data
mjaehn Jun 23, 2023
295d329
Merge remote-tracking branch 'origin/main' into global_icon-art
mjaehn Jun 26, 2023
00cb678
Merge branch 'global_icon-art' into refactoring
mjaehn Jun 26, 2023
1e58242
Further work on icon-art test case
mjaehn Jun 26, 2023
42ea14b
Merge branch 'refactoring' of github.com:C2SM/processing-chain into r…
mjaehn Jun 26, 2023
b004750
Merge branch 'main' into refactoring
mjaehn Jun 29, 2023
956f957
GitHub Action: Apply Pep8-formatting
invalid-email-address Jun 29, 2023
b2a2c13
Only keep test cases
mjaehn Jun 30, 2023
acb5175
Add template for icon-art-global-test
mjaehn Jun 30, 2023
a29c09d
Modify config for icon-art-global
mjaehn Jul 3, 2023
25fc3f3
GitHub Action: Apply Pep8-formatting
invalid-email-address Jul 3, 2023
d8e520f
Fix and unify scripts for icon-art-global
mjaehn Jul 5, 2023
840a407
Add icbc folder for prepare_data job
mjaehn Jul 6, 2023
e329605
Add new tests for Jenkins
mjaehn Jul 6, 2023
4001f52
GitHub Action: Apply Pep8-formatting
invalid-email-address Jul 6, 2023
72fb10a
Add actual test scripts
mjaehn Jul 6, 2023
c4b2d50
Fix check for input data size
mjaehn Jul 6, 2023
1416270
Add Q field to initial file
mjaehn Jul 6, 2023
ac7e45f
GitHub Action: Apply Pep8-formatting
invalid-email-address Jul 6, 2023
f07498f
Add PS field to meteo file
mjaehn Jul 6, 2023
df3dd8d
GitHub Action: Apply Pep8-formatting
invalid-email-address Jul 6, 2023
56b1707
unify config files
mjaehn Jul 7, 2023
fe5cb1f
Add icon-art-global-test to Jenkinsfile
mjaehn Jul 7, 2023
18713e5
GitHub Action: Apply Pep8-formatting
invalid-email-address Jul 7, 2023
598c041
Change input data path
mjaehn Jul 12, 2023
1ce285d
Fix modifying initial file
mjaehn Jul 13, 2023
e7f0d9a
Rename icon-art-test to icon-art-oem-test
mjaehn Jul 14, 2023
9eea2ac
Small fixes and error handling
mjaehn Jul 14, 2023
f3ab535
Fixes for cams chem data
mjaehn Jul 14, 2023
f8a67dc
Fix icontools runjobs
mjaehn Jul 14, 2023
9a46410
Adapt jenkins test for icon-art-oem
mjaehn Jul 14, 2023
76362a6
Use latest spack-c2sm version
mjaehn Jul 26, 2023
15fd6f7
Fix ICON-ART build and tests
mjaehn Jul 26, 2023
d743d89
Replace oae with oem
mjaehn Jul 26, 2023
40f39f5
Replace oae with oem in job
mjaehn Jul 26, 2023
2b7f521
Rename job
mjaehn Jul 26, 2023
d012076
Update models.yaml
mjaehn Jul 26, 2023
c4c6294
Further renaming
mjaehn Jul 26, 2023
6b25629
Update README.md
mjaehn Jul 27, 2023
8bf1df3
Change permissions for jenkins script
mjaehn Jul 27, 2023
d9e0960
Merge branch 'refactoring' of github.com:C2SM/processing-chain into r…
mjaehn Jul 27, 2023
93da1b4
Add string2char function again for emissions
mjaehn Aug 2, 2023
6534a93
Remove ICON part for GHG namelist script
mjaehn Aug 2, 2023
973c0a2
Add argparse for jenkins main script
mjaehn Aug 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021-2022 C2SM and other Processing Chain Developers.
Copyright (c) 2021-2023 C2SM and other Processing Chain Developers.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
93 changes: 31 additions & 62 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,29 @@ instruction for the installation.

### 1\. Install Miniconda

Install as user specific miniconda, e.g. on `/scratch` (enter `cd
$SCRATCH` and `pwd` at the command line to get to your personal scratch
directory on Daint). When the command prompt asks for installation
location, provide the path to your scratch and append `/miniconda3`.
Install as user specific Miniconda, e.g. on your `$HOME` directory,
which is the default location.

> **Note**: The default location would be on your `$HOME` directory, which
> may lead to memory issues.
> **Note**: Only conda itself should be installed in your `$HOME`.
> All environments should be stored in your `$PROJECT` directory,
mjaehn marked this conversation as resolved.
Show resolved Hide resolved
> otherwise you risk filling up your `$HOME` directory. See below for instructions.

To install the latest miniconda, type:
To install the latest Miniconda, type:

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh

Then, export `$PATH` to your conda installation:

export PATH="$SCRATCH/miniconda3/bin:$PATH"
Further deails on Miniconda can be found on the [Miniconda documentation page](https://docs.conda.io/en/latest/miniconda.html).

### 2\. Create the Conda Environment

Create a conda environment `proc-chain` with and install requirements:

conda env create -f env/environment.yml
conda env create --prefix $PROJECT/envs/proc-chain -f env/environment.yml

To be able to activate your conda environment by simply using `conda activate proc-chain` instead of the full path, add the following to your `.bashrc`:

export CONDA_ENVS_PATH=$PROJECT/envs

Activate the environment (use "source activate" in case "conda activate"
does not work):
Expand All @@ -60,7 +61,7 @@ these files within your home directory:

Once everything has been set up correctly according to the above steps,
you just need to execute the following command to activate your
environment:
environment (if not done already):

conda activate proc-chain

Expand All @@ -69,7 +70,7 @@ line help to see the available arguments for the main script:

python run_chain.py -h

To run the example cases with their standard jobs, please ensure
To run the test cases with their standard jobs, please ensure
that you clone the Processing Chain to `$SCRATCH`, as input and
output data are stored in subdirectories of the chain itself.

Expand All @@ -78,62 +79,30 @@ output data are stored in subdirectories of the chain itself.
> adapt the configuration file `config.py` in your case folder in
> a way that output files are written to a specified folder on `$SCRATCH`.

For these test cases, the necessary input data can be obtained via
the following script (this may take some time):

./get_data.sh

Furthermore, executables for COSMO-GHG and ICON are needed. For both COSMO-GHG and ICON,
a spack instance needs to be initialized first. Then, COSMO-GHG can be
installed:
For these test cases, you can use the Jenkins script

source /project/g110/spack/user/daint/spack/share/spack/setup-env.sh
spack installcosmo cosmo@empa-ghg%nvhpc cosmo_target=gpu +cppdycore

For ICON, type:
./jenkins/scripts/jenkins.sh

spack install icon@c2sm-master%[email protected] icon_target=cpu +eccodes +ocean

> **Note**: For further information about building ICON or building software
> with Spack in general, consider the
> [C2SM wiki page](https://wiki.c2sm.ethz.ch/MODELS/ICONIconModel) and the official
> [C2SM Spack Documentation](https://c2sm.github.io/spack-c2sm/QuickStart.html).
This script calls other scripts that are located in `jenkins/scripts/`.
They will
- activate the conda environment (if not done already)
- setup spack-c2sm
- download input data to `input/`
- build `int2lm`, `cosmo-ghg`, `icon` and `icon-art`
- test `cosmo-ghg`, `icon`, `icon-art-oem`, `icon-art-global`

Alternatively, you can use the following scripts:

./jenkins/scripts/build_cosmo-ghg.sh

or

./jenkins/scripts/build_icon.sh

Finally, to run the COSMO-GHG test case, type:
To run the test cases manually, type:

```bash
# COSMO-GHG
python run_chain.py cosmo-ghg-11km-test 2015-01-01 0 24

> **Note**: Be sure to have spack initialized via
> `source /project/g110/spack/user/daint/spack/share/spack/setup-env.sh`
> before you run COSMO or ICON jobs.

For ICON, type:

# ICON
python run_chain.py icon-test 2018-01-01 0 24 -j prepare_data icon

Empa users can perform additional tests:

python run_chain.py cosmo-art-mother-test cosmo-art-nested-test 2015-06-26 0 24

or:

python run_chain.py icon-art-test 2018-01-01 0 24 -j prepare_data icon

or:

# ICON-ART (OEM)
python run_chain.py icon-art-oem-test 2018-01-01 0 24 -j prepare_data oae icon

or:

python run_chain.py icon-art-oem-ensembles-test 2018-01-01 0 24 -j prepare_data oae icon
# ICON-ART (global)
python run_chain.py icon-art-global-test 2018-01-01 0 24 -j prepare_data oae icon
```

## Documentation

Expand Down
160 changes: 0 additions & 160 deletions cases/carbosense/config.py

This file was deleted.

4 changes: 0 additions & 4 deletions cases/carbosense/cosmo_INPUT_AF.cfg

This file was deleted.

55 changes: 0 additions & 55 deletions cases/carbosense/cosmo_INPUT_ASS.cfg

This file was deleted.

8 changes: 0 additions & 8 deletions cases/carbosense/cosmo_INPUT_DIA.cfg

This file was deleted.

Loading