From ac97b17b4742b20ea19de06e0d45dcb722c36f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Mon, 15 May 2023 14:10:08 +0200 Subject: [PATCH 001/108] Add src folder for model code --- src/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/.gitkeep diff --git a/src/.gitkeep b/src/.gitkeep new file mode 100644 index 00000000..e69de29b From 53d3106aa155f1a62acc853e8413c11530fc496e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Tue, 16 May 2023 11:13:58 +0200 Subject: [PATCH 002/108] Use devbuildcosmo and environment for cosmo/icon builds --- jenkins/scripts/build_cosmo-ghg.sh | 22 ++++++++++++++++++---- jenkins/scripts/build_icon.sh | 20 ++++++++++++++++---- jenkins/scripts/setup-spack.sh | 15 ++++++--------- 3 files changed, 40 insertions(+), 17 deletions(-) diff --git a/jenkins/scripts/build_cosmo-ghg.sh b/jenkins/scripts/build_cosmo-ghg.sh index 5600ffad..633a8d30 100755 --- a/jenkins/scripts/build_cosmo-ghg.sh +++ b/jenkins/scripts/build_cosmo-ghg.sh @@ -10,8 +10,22 @@ function error { # Check if script is called correctly [[ $(git rev-parse --show-toplevel 2>/dev/null) = $(pwd) ]] || error "$0 not launched from toplevel of repository" -# source spack temp instance -. spack-c2sm/spack/share/spack/setup-env.sh - +# Get COSMO spec SPACK_SPEC=$(cat cases/cosmo-ghg-11km-test/cosmo_spec) -spack installcosmo -v ${SPACK_SPEC} + +BRANCH=6.0.2 +GIT_REMOTE=git@github.com:C2SM-RCM/cosmo-ghg.git + +# Remove icon folder (if existing) +rm -fr src/cosmo-ghg + +# Activate spack +. spack-c2sm/setup-env.sh + +pushd src +# Clone cosmo-ghg +git clone -b ${BRANCH} ${GIT_REMOTE} + pushd icon + spack devbuildcosmo ${SPACK_SPEC} + popd +popd diff --git a/jenkins/scripts/build_icon.sh b/jenkins/scripts/build_icon.sh index a12648d2..edd23540 100755 --- a/jenkins/scripts/build_icon.sh +++ b/jenkins/scripts/build_icon.sh @@ -10,8 +10,20 @@ function error { # Check if script is called correctly [[ $(git rev-parse --show-toplevel 2>/dev/null) = $(pwd) ]] || error "$0 not launched from toplevel of repository" -# source spack temp instance -. spack-c2sm/spack/share/spack/setup-env.sh +ICON_BRANCH=main +GIT_REMOTE=git@github.com:C2SM/icon.git -SPACK_SPEC=$(cat cases/icon-test/icon_spec) -spack install -v ${SPACK_SPEC} +# Remove icon folder (if existing) +rm -fr src/icon + +# Activate spack +. spack-c2sm/setup-env.sh + +pushd src +# Clone icon +git clone -b ${ICON_BRANCH} ${GIT_REMOTE} + pushd icon + spack env activate -p -d config/cscs/spack/v0.18.1.4/daint_cpu_nvhpc + spack install -u build + popd +popd diff --git a/jenkins/scripts/setup-spack.sh b/jenkins/scripts/setup-spack.sh index 0cbdc326..0b520c26 100755 --- a/jenkins/scripts/setup-spack.sh +++ b/jenkins/scripts/setup-spack.sh @@ -10,16 +10,13 @@ function error { # Check if script is called correctly [[ $(git rev-parse --show-toplevel 2>/dev/null) = $(pwd) ]] || error "$0 not launched from toplevel of repository" -SPACK_BRANCH='master' -GIT_REMOTE='https://github.com/C2SM/spack-c2sm.git' +BRANCH=v0.18.1.5 +GIT_REMOTE=https://github.com/C2SM/spack-c2sm.git -rm -fr spack-c2sm -git clone -b ${SPACK_BRANCH} ${GIT_REMOTE} +rm -fr src/spack-c2sm -pushd spack-c2sm -# install spack temp instance with branch config files and mch spack packages -./config.py -m daint -i . -r ./spack/etc/spack -p $PWD/spack -s $PWD/spack -u ON -c ./spack-cache -# source spack temp instance -. spack/share/spack/setup-env.sh +pushd src +git clone --depth 1 --recurse-submodules --shallow-submodules -b ${BRANCH} ${GIT_REMOTE} +. spack-c2sm/setup-env.sh popd From a78f84e0200ca93331d774143187ef24fd6e37dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Tue, 16 May 2023 11:40:14 +0200 Subject: [PATCH 003/108] Fix cosmo and icon builds --- jenkins/scripts/build_cosmo-ghg.sh | 10 +++++----- jenkins/scripts/build_icon.sh | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/jenkins/scripts/build_cosmo-ghg.sh b/jenkins/scripts/build_cosmo-ghg.sh index 633a8d30..2b91948e 100755 --- a/jenkins/scripts/build_cosmo-ghg.sh +++ b/jenkins/scripts/build_cosmo-ghg.sh @@ -16,16 +16,16 @@ SPACK_SPEC=$(cat cases/cosmo-ghg-11km-test/cosmo_spec) BRANCH=6.0.2 GIT_REMOTE=git@github.com:C2SM-RCM/cosmo-ghg.git -# Remove icon folder (if existing) -rm -fr src/cosmo-ghg - +pushd src # Activate spack . spack-c2sm/setup-env.sh -pushd src +# Remove cosmo-ghg folder (if existing) +rm -fr cosmo-ghg + # Clone cosmo-ghg git clone -b ${BRANCH} ${GIT_REMOTE} - pushd icon + pushd cosmo-ghg spack devbuildcosmo ${SPACK_SPEC} popd popd diff --git a/jenkins/scripts/build_icon.sh b/jenkins/scripts/build_icon.sh index edd23540..e69ede9f 100755 --- a/jenkins/scripts/build_icon.sh +++ b/jenkins/scripts/build_icon.sh @@ -10,18 +10,18 @@ function error { # Check if script is called correctly [[ $(git rev-parse --show-toplevel 2>/dev/null) = $(pwd) ]] || error "$0 not launched from toplevel of repository" -ICON_BRANCH=main +BRANCH=main GIT_REMOTE=git@github.com:C2SM/icon.git -# Remove icon folder (if existing) -rm -fr src/icon - +pushd src # Activate spack . spack-c2sm/setup-env.sh -pushd src +# Remove icon folder (if existing) +rm -fr icon + # Clone icon -git clone -b ${ICON_BRANCH} ${GIT_REMOTE} +git clone -b ${BRANCH} ${GIT_REMOTE} pushd icon spack env activate -p -d config/cscs/spack/v0.18.1.4/daint_cpu_nvhpc spack install -u build From f581079f619ceeee8f7286358b4018bb03dc03a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Tue, 16 May 2023 13:51:10 +0200 Subject: [PATCH 004/108] Add further jenkins scripts --- jenkins/scripts/jenkins.sh | 27 +++++++++++++++++++++++++++ jenkins/scripts/setup_miniconda.sh | 16 ++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100755 jenkins/scripts/jenkins.sh create mode 100755 jenkins/scripts/setup_miniconda.sh diff --git a/jenkins/scripts/jenkins.sh b/jenkins/scripts/jenkins.sh new file mode 100755 index 00000000..4fbe3638 --- /dev/null +++ b/jenkins/scripts/jenkins.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +set -e -x + +# Activate conda environment +conda activate proc-chain + +# Setup spack +./jenkins/scripts/setup-spack.sh + +# Preparation +./get_data.sh + +# Build COSMO-GHG +./jenkins/scripts/build_cosmo-ghg.sh + +# Build ICON +./jenkins/scripts/build_icon.sh + +# Test COSMO-GHG +python run_chain.py cosmo-ghg-11km-test 2015-01-01 0 24 -f + +# Test ICON +python run_chain.py icon-test 2018-01-01 0 24 -j prepare_data icon -f + +# Print success message +echo "Success!" diff --git a/jenkins/scripts/setup_miniconda.sh b/jenkins/scripts/setup_miniconda.sh new file mode 100755 index 00000000..3cb2264e --- /dev/null +++ b/jenkins/scripts/setup_miniconda.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -e -x + +wget -O miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh +rm -fr miniconda +bash miniconda.sh -b -p "$WORKSPACE/miniconda" +export PATH="$WORKSPACE/miniconda/bin:$PATH" +conda config --set always_yes yes --set changeps1 no +conda config --add channels conda-forge +conda update -n base -c defaults conda +conda env create -f env/environment.yml +source "$WORKSPACE/miniconda/etc/profile.d/conda.sh" +conda activate proc-chain +conda deactivate +rm miniconda.sh \ No newline at end of file From 41a3673600cfd28c675268606a1cea481f66a4b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Tue, 16 May 2023 14:51:56 +0200 Subject: [PATCH 005/108] Fix devbuildcosmo --- jenkins/scripts/build_cosmo-ghg.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jenkins/scripts/build_cosmo-ghg.sh b/jenkins/scripts/build_cosmo-ghg.sh index 2b91948e..21db009f 100755 --- a/jenkins/scripts/build_cosmo-ghg.sh +++ b/jenkins/scripts/build_cosmo-ghg.sh @@ -10,9 +10,6 @@ function error { # Check if script is called correctly [[ $(git rev-parse --show-toplevel 2>/dev/null) = $(pwd) ]] || error "$0 not launched from toplevel of repository" -# Get COSMO spec -SPACK_SPEC=$(cat cases/cosmo-ghg-11km-test/cosmo_spec) - BRANCH=6.0.2 GIT_REMOTE=git@github.com:C2SM-RCM/cosmo-ghg.git @@ -26,6 +23,6 @@ rm -fr cosmo-ghg # Clone cosmo-ghg git clone -b ${BRANCH} ${GIT_REMOTE} pushd cosmo-ghg - spack devbuildcosmo ${SPACK_SPEC} + spack devbuildcosmo cosmo @develop %nvhpc cosmo_target=gpu ^mpich%nvhpc popd popd From 53788f2405ab1bb781b17cdaa540f0ff7ed70547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Tue, 16 May 2023 14:53:48 +0200 Subject: [PATCH 006/108] Update gitignore --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1ef83220..23536aa6 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,4 @@ input_processing-chain.tgz input/ output/ work/ -icon/ -spack-c2sm/ +src/*/ From d8751d86f0cef669729eac0259857c53674f3297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Tue, 16 May 2023 16:41:18 +0200 Subject: [PATCH 007/108] Use c2sm branch for cosmo-ghg --- jenkins/scripts/build_cosmo-ghg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/scripts/build_cosmo-ghg.sh b/jenkins/scripts/build_cosmo-ghg.sh index 21db009f..c79071e8 100755 --- a/jenkins/scripts/build_cosmo-ghg.sh +++ b/jenkins/scripts/build_cosmo-ghg.sh @@ -10,7 +10,7 @@ function error { # Check if script is called correctly [[ $(git rev-parse --show-toplevel 2>/dev/null) = $(pwd) ]] || error "$0 not launched from toplevel of repository" -BRANCH=6.0.2 +BRANCH=c2sm GIT_REMOTE=git@github.com:C2SM-RCM/cosmo-ghg.git pushd src From fdc3c935313d6deff8369ab8178316585f10d3ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Tue, 16 May 2023 16:41:32 +0200 Subject: [PATCH 008/108] Update submodules for icon --- jenkins/scripts/build_icon.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/jenkins/scripts/build_icon.sh b/jenkins/scripts/build_icon.sh index e69ede9f..2370a6bb 100755 --- a/jenkins/scripts/build_icon.sh +++ b/jenkins/scripts/build_icon.sh @@ -23,6 +23,7 @@ rm -fr icon # Clone icon git clone -b ${BRANCH} ${GIT_REMOTE} pushd icon + git submodule update --init --recursive spack env activate -p -d config/cscs/spack/v0.18.1.4/daint_cpu_nvhpc spack install -u build popd From 7ae094d7c5649d88a96419d3e9d31451cd7cbf5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 17 May 2023 10:48:52 +0200 Subject: [PATCH 009/108] Adapt spack in Jenkinsfile --- jenkins/Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index 99707195..2a0a40ff 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -91,7 +91,7 @@ pipeline { steps { sh '''source ${WORKSPACE}/miniconda/etc/profile.d/conda.sh conda activate proc-chain - source ${WORKSPACE}/spack-c2sm/spack/share/spack/setup-env.sh + . ${WORKSPACE}/src/spack-c2sm/setup-env.sh python run_chain.py cosmo-ghg-11km-test 2015-01-01 0 24 -f''' } post { @@ -108,7 +108,7 @@ pipeline { steps { sh '''source ${WORKSPACE}/miniconda/etc/profile.d/conda.sh conda activate proc-chain - source ${WORKSPACE}/spack-c2sm/spack/share/spack/setup-env.sh + . ${WORKSPACE}/src/spack-c2sm/setup-env.sh python run_chain.py icon-test 2018-01-01 0 24 -j prepare_data icon -f''' } post { From 7ed2b2e66cf70e1a83f046c33295da823b6b9d9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 17 May 2023 14:28:59 +0200 Subject: [PATCH 010/108] devbuilds for int2lm and cosmo --- cases/cosmo-ghg-11km-test/config.py | 15 ++------------- jenkins/scripts/build_int2lm.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 13 deletions(-) create mode 100755 jenkins/scripts/build_int2lm.sh diff --git a/cases/cosmo-ghg-11km-test/config.py b/cases/cosmo-ghg-11km-test/config.py index 163dcc24..17ebd171 100644 --- a/cases/cosmo-ghg-11km-test/config.py +++ b/cases/cosmo-ghg-11km-test/config.py @@ -114,14 +114,8 @@ int2lm_extpar_dir = os.path.join(input_root, 'extpar') int2lm_extpar_file = "test_domain.nc" -# Read INT2LM spec -int2lm_spec_file = os.path.join(chain_src_dir, 'cases', casename, - 'int2lm_spec') -with open(int2lm_spec_file, 'r') as file: - int2lm_spec = file.read().rstrip() # Executable -int2lm_bin = os.popen('spack location -i ' + - int2lm_spec).read().strip() + '/bin' +int2lm_bin = os.path.join(chain_src_dir, 'src', 'int2lm', 'test', 'testsuite', 'int2lm') # Namelist and slurm runscript templates int2lm_namelist = '%s/cases/%s/int2lm_INPUT.cfg' % (chain_src_dir, casename) @@ -149,13 +143,8 @@ # SIMULATION ================================================================= # COSMO ---------------------------------------------------------------------- -# Read COSMO spec -cosmo_spec_file = os.path.join(chain_src_dir, 'cases', casename, 'cosmo_spec') -with open(cosmo_spec_file, 'r') as file: - cosmo_spec = file.read().rstrip() # Executable -cosmo_bin = os.popen('spack location -i ' + - cosmo_spec).read().strip() + '/bin/cosmo-ghg_gpu' +cosmo_bin = os.path.join(chain_src_dir, 'src', 'cosmo-ghg', 'bin', 'cosmo-ghg_gpu') # Namelists and slurm runscript templates cosmo_namelist = '%s/cases/%s/cosmo_INPUT_' % (chain_src_dir, casename) diff --git a/jenkins/scripts/build_int2lm.sh b/jenkins/scripts/build_int2lm.sh new file mode 100755 index 00000000..f2512869 --- /dev/null +++ b/jenkins/scripts/build_int2lm.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +set -e -x + +function error { + echo "*** Error: $@" >&2 + exit 1 +} + +# Check if script is called correctly +[[ $(git rev-parse --show-toplevel 2>/dev/null) = $(pwd) ]] || error "$0 not launched from toplevel of repository" + +BRANCH=c2sm-features +GIT_REMOTE=git@github.com:C2SM-RCM/int2lm.git + +pushd src +# Activate spack +. spack-c2sm/setup-env.sh + +# Remove cosmo-ghg folder (if existing) +rm -fr int2lm + +# Clone cosmo-ghg +git clone -b ${BRANCH} ${GIT_REMOTE} + pushd int2lm + spack dev-build int2lm @dev-build %nvhpc + popd +popd From 37b2d69b6ef60636b188c83f1cd20ea2b5779119 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 17 May 2023 12:30:00 +0000 Subject: [PATCH 011/108] GitHub Action: Apply Pep8-formatting --- cases/cosmo-ghg-11km-test/config.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cases/cosmo-ghg-11km-test/config.py b/cases/cosmo-ghg-11km-test/config.py index b9a8ff04..30588c36 100644 --- a/cases/cosmo-ghg-11km-test/config.py +++ b/cases/cosmo-ghg-11km-test/config.py @@ -115,7 +115,8 @@ int2lm_extpar_file = "test_domain.nc" # Executable -int2lm_bin = os.path.join(chain_src_dir, 'src', 'int2lm', 'test', 'testsuite', 'int2lm') +int2lm_bin = os.path.join(chain_src_dir, 'src', 'int2lm', 'test', 'testsuite', + 'int2lm') # Namelist and slurm runscript templates int2lm_namelist = '%s/cases/%s/int2lm_INPUT.cfg' % (chain_src_dir, casename) @@ -147,7 +148,8 @@ # SIMULATION ================================================================= # COSMO ---------------------------------------------------------------------- # Executable -cosmo_bin = os.path.join(chain_src_dir, 'src', 'cosmo-ghg', 'bin', 'cosmo-ghg_gpu') +cosmo_bin = os.path.join(chain_src_dir, 'src', 'cosmo-ghg', 'bin', + 'cosmo-ghg_gpu') # Namelists and slurm runscript templates cosmo_namelist = '%s/cases/%s/cosmo_INPUT_' % (chain_src_dir, casename) From e4947b91c439d27b61205d1fcfb33f821f080d7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 31 May 2023 11:10:09 +0200 Subject: [PATCH 012/108] Add int2lm to pipeline --- jenkins/Jenkinsfile | 13 +++++++++++++ jenkins/scripts/build_int2lm.sh | 4 ++-- jenkins/scripts/jenkins.sh | 3 +++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index 2a0a40ff..0582acd5 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -56,6 +56,19 @@ pipeline { } } } + stage('Build int2lm') { + steps { + sh '''source ${WORKSPACE}/miniconda/etc/profile.d/conda.sh + conda activate proc-chain + ./jenkins/scripts/build_int2lm.sh''' + } + post { + failure { + echo 'Cleaning up workspace' + deleteDir() + } + } + } stage('Build COSMO-GHG') { steps { sh '''source ${WORKSPACE}/miniconda/etc/profile.d/conda.sh diff --git a/jenkins/scripts/build_int2lm.sh b/jenkins/scripts/build_int2lm.sh index f2512869..59b11299 100755 --- a/jenkins/scripts/build_int2lm.sh +++ b/jenkins/scripts/build_int2lm.sh @@ -17,10 +17,10 @@ pushd src # Activate spack . spack-c2sm/setup-env.sh -# Remove cosmo-ghg folder (if existing) +# Remove int2lm folder (if existing) rm -fr int2lm -# Clone cosmo-ghg +# Clone and build int2lm git clone -b ${BRANCH} ${GIT_REMOTE} pushd int2lm spack dev-build int2lm @dev-build %nvhpc diff --git a/jenkins/scripts/jenkins.sh b/jenkins/scripts/jenkins.sh index 4fbe3638..b84992b8 100755 --- a/jenkins/scripts/jenkins.sh +++ b/jenkins/scripts/jenkins.sh @@ -11,6 +11,9 @@ conda activate proc-chain # Preparation ./get_data.sh +# Build int2lm +./jenkins/scripts/build_int2lm.sh + # Build COSMO-GHG ./jenkins/scripts/build_cosmo-ghg.sh From a18b84540989e74446b16b35907d0c6f759825c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 31 May 2023 15:34:07 +0200 Subject: [PATCH 013/108] Add global icon-art case --- cases/icon-art-global/config.py | 157 +++++++ cases/icon-art-global/icon_era5_inicond.sh | 179 ++++++++ cases/icon-art-global/icon_era5_nudging.sh | 64 +++ cases/icon-art-global/icon_runjob.cfg | 415 ++++++++++++++++++ cases/icon-art-global/icon_species_inicond.sh | 75 ++++ cases/icon-art-global/icon_species_nudging.sh | 55 +++ cases/icon-art-global/mypartab | 117 +++++ 7 files changed, 1062 insertions(+) create mode 100644 cases/icon-art-global/config.py create mode 100644 cases/icon-art-global/icon_era5_inicond.sh create mode 100644 cases/icon-art-global/icon_era5_nudging.sh create mode 100644 cases/icon-art-global/icon_runjob.cfg create mode 100644 cases/icon-art-global/icon_species_inicond.sh create mode 100644 cases/icon-art-global/icon_species_nudging.sh create mode 100644 cases/icon-art-global/mypartab diff --git a/cases/icon-art-global/config.py b/cases/icon-art-global/config.py new file mode 100644 index 00000000..4a05e911 --- /dev/null +++ b/cases/icon-art-global/config.py @@ -0,0 +1,157 @@ +import os +import logging +import sys + +""" +Configuration file for the 'icon-art' case with ICON-ART +""" + +# ----------------------------------------------------------- +# GENERAL SETTINGS +# ----------------------------------------------------------- + +USER = os.environ['USER'] +COMPUTE_HOST = 'daint' +COMPUTE_QUEUE = 'debug' # 'normal' / 'debug' +CONSTRAINT = 'mc' # 'mc' / 'gpu' +if os.path.exists(os.environ['HOME'] + '/.acct'): + with open(os.environ['HOME'] + '/.acct', 'r') as file: + COMPUTE_ACCOUNT = file.read().rstrip() +else: + COMPUTE_ACCOUNT = os.popen("id -gn").read().splitlines()[0] + +# -- Model to run +TARGET = 'icon-art' + +# -- Number of tasks per node +NTASKS_PER_NODE = 36 if CONSTRAINT == 'mc' else 12 + +# -- case name = pathname in cases/ +CASENAME = os.path.basename(os.path.dirname(os.path.realpath(__file__))) + +# -- Root directory of the sourcecode of the chain (where run_chain.py is) +CHAIN_SRC_DIR = os.getcwd() + +# -- Case directory +CASE_DIR = os.path.join(CHAIN_SRC_DIR, 'cases', CASENAME) + + +# ----------------------------------------------------------- +# -- SIMULATION +# ----------------------------------------------------------- + +# -- Root directory of the working space of the chain +WORK_DIR = os.path.join(CHAIN_SRC_DIR, 'work') + +# -- Executable +# ICON_BIN = os.path.join('/scratch/snx3000/jthanwer/spack-install/daint/icon/c2sm-master/gcc/qcndg6qwq6e5gfutwoycqmwf2m4lvg7g/', 'bin', 'icon') # -- eccodes, ocean, noart +# ICON_BIN = os.path.join('/scratch/snx3000/jthanwer/spack-install/daint/icon/c2sm-master/gcc/x6pisrz7umszlrpnazse3cuosdxt45kt/', 'bin', 'icon') # -- art +# ICON_BIN = os.path.join('/scratch/snx3000/jthanwer/icon-online-traj/cpu/', 'bin', 'icon') # -- online-traj, cpu+art, dev-build +ICON_BIN = os.path.join('/scratch/snx3000/jthanwer/icon/cpu/', 'bin', 'icon') # + +# -- Paths for namelists and slurm runscript templates +# ICON_RUNJOB = os.path.join(CASE_DIR, 'icon_runjob_withoutart.cfg') +ICON_RUNJOB = os.path.join(CASE_DIR, 'icon_runjob.cfg') +ICON_ERA5_INIJOB = os.path.join(CASE_DIR, 'icon_era5_inicond.sh') +ICON_ERA5_NUDGINGJOB = os.path.join(CASE_DIR, 'icon_era5_nudging.sh') +ICON_SPECIES_INIJOB = os.path.join(CASE_DIR, 'icon_species_inicond.sh') +ICON_SPECIES_NUDGINGJOB = os.path.join(CASE_DIR, 'icon_species_nudging.sh') + +# -- Number of hours simulated by one job / directory +RESTART_STEP = '1MS' # -- hours or Pandas frequency + +# -- Number of hours between two output data +OUTPUT_WRITING_STEP = 12 # -- TO MODIFY + +# -- Initial conditios +ERA5_INICOND = False # -- TO MODIFY +SPECIES_INICOND = True +SPECIES2RESTART = ['TROH'] + +# -- Nudging (meteorological and tracers) +ERA5_GLOBAL_NUDGING = False +SPECIES_GLOBAL_NUDGING = False +SPECIES2NUDGE = [] +NUDGING_STEP = 12 + +# -- Online trajectories +ONLINE_TRAJ = True + +# -- Walltimes and domain decomposition +if COMPUTE_QUEUE == "normal": + ICON_WALLTIME = "00:30:00" + ICON_NP_TOT = 2 + +elif COMPUTE_QUEUE == "debug": + ICON_WALLTIME = "00:30:00" + ICON_NP_TOT = 2 + +else: + logging.error("Unknown queue name: %s" % COMPUTE_QUEUE) + sys.exit(1) + +# ----------------------------------------------------------- +# -- INPUT DATA +# ----------------------------------------------------------- + +INPUT_ROOT = '/scratch/snx3000/jthanwer/DATA/ICON_INPUT/' +INPUT_ROOT_ICBC = os.path.join(INPUT_ROOT, 'ICBC') +INPUT_ROOT_GRID = os.path.join(INPUT_ROOT, 'GRIDS') +INPUT_ROOT_RAD = os.path.join(INPUT_ROOT, 'RAD') +INPUT_ROOT_OEM = os.path.join(INPUT_ROOT, 'OEM', 'SF6') +INPUT_ROOT_CHEMISTRY = os.path.join(INPUT_ROOT, 'CHEMISTRY', 'OH_GCP2022_ORIGINAL') +INPUT_ROOT_TRACERS = os.path.join(INPUT_ROOT, 'XML/examples') +INPUT_ROOT_CONFIGS = os.path.join(INPUT_ROOT, 'CONFIGS') +INPUT_ROOT_ART = os.path.join(INPUT_ROOT, 'ART') + +# -- Initial conditions and boundary conditions +INICOND_FILENAME = '/scratch/snx3000/jthanwer/DATA/ICON_INPUT/ICBC/era2icon_R2B03_2022060200.nc' + +# -- Grid +DYNAMICS_GRID_FILENAME = os.path.join(INPUT_ROOT_GRID, "iconR2B03-DOM01.nc") +EXTPAR_FILENAME = os.path.join(INPUT_ROOT_GRID, "extpar_iconR2B03-DOM01.nc") + +# -- Radiation +CLDOPT_FILENAME = os.path.join(INPUT_ROOT_RAD, 'ECHAM6_CldOptProps.nc') +LRTM_FILENAME = os.path.join(INPUT_ROOT_RAD, 'rrtmg_lw.nc') + +# -- OEM +# OEM_EMIS_FILENAME = os.path.join(INPUT_ROOT_OEM, 'OEM_SF6_{year}.nc') +OEM_VERTPROF_FILENAME = os.path.join(INPUT_ROOT_OEM, 'vertical_profiles.nc') +OEM_HOUROFDAY_FILENAME = os.path.join(INPUT_ROOT_OEM, 'hourofday.nc') +OEM_DAYOFWEEK_FILENAME = os.path.join(INPUT_ROOT_OEM, 'dayofweek.nc') +OEM_MONTHOFYEAR_FILENAME = os.path.join(INPUT_ROOT_OEM, 'monthofyear.nc') + +# -- Chemistry (OH) +OH_MOLEC_FILENAME = os.path.join(INPUT_ROOT_CHEMISTRY, 'oh_gcp2022_icongrid.nc') # -- TO MODIFY + +# -- ART +# PNTSRC_XML_FILENAME = os.path.join(INPUT_ROOT_TRACERS, 'chemistry_lt/point-sources.xml') +# BOUNDCOND_XML_FILENAME = os.path.join(INPUT_ROOT_TRACERS, 'boundary-conditions.xml') +# CHEMTRACER_XML_FILENAME = os.path.join(INPUT_ROOT_TRACERS, 'chemistry_lt/tracers.xml') + +PNTSRC_XML_FILENAME = os.path.join(INPUT_ROOT_CONFIGS, 'CONFIG2/point-sources.xml') # -- TO MODIFY +BOUNDCOND_XML_FILENAME = os.path.join(INPUT_ROOT_TRACERS, 'boundary-conditions.xml') +CHEMTRACER_XML_FILENAME = os.path.join(INPUT_ROOT_CONFIGS, 'CONFIG2/tracers.xml') # -- TO MODIFY + +# -- Nudging +MAP_FILE_NUDGING = os.path.join(INPUT_ROOT_ICBC, 'map_file.nudging') + +# -- Online trajectories +ONLINE_TRAJ_FILENAME = '/scratch/snx3000/jthanwer/DATA/ICON_INPUT/ONLINE_TRAJ/startf_traj_dom1.nc' +ONLINE_TRAJ_TABLE2MOMENT = '/scratch/snx3000/jthanwer/DATA/ICON_INPUT/ONLINE_TRAJ/dmin_wetgrowth_lookup.nc' +# ----------------------------------------------------------- +# -- Additional settings derived from constants +# ----------------------------------------------------------- + +# -- Nudge type (global or nothing) +nudge_type = 2 if ERA5_GLOBAL_NUDGING else 0 + +# -- Time step for global nudging in seconds +nudging_step_seconds = NUDGING_STEP * 3600 + +# -- Prescribed initial conditions for CH4, CO and/or OH +iart_init_gas = 4 if SPECIES_INICOND else 0 + +# -- Online trajectories +online_traj_scratch = '.TRUE.' if ONLINE_TRAJ else '.FALSE' diff --git a/cases/icon-art-global/icon_era5_inicond.sh b/cases/icon-art-global/icon_era5_inicond.sh new file mode 100644 index 00000000..522d4878 --- /dev/null +++ b/cases/icon-art-global/icon_era5_inicond.sh @@ -0,0 +1,179 @@ +#!/bin/bash + +cd {cfg.icon_input_icbc} + +# --------------------------------- +# -- Pre-processing +# --------------------------------- + +rm -f {cfg.inicond_filename_scratch} + +# -- Convert the GRIB files to NetCDF +cdo -t ecmwf -f nc copy era5_ml.grib era5_ml.nc +cdo -t ecmwf -f nc copy era5_surf.grib era5_surf.nc + +# -- Put all variables in the same file +cdo merge era5_ml.nc era5_surf.nc era5_original.nc + +# -- Change variable and coordinates names to be consistent with ICON nomenclature +cdo setpartabn,mypartab,convert era5_original.nc tmp.nc + +# -- Order the variables alphabetically +ncks tmp.nc data_in.nc +rm tmp.nc era5_surf.nc era5_ml.nc era5_original.nc + +# --------------------------------- +# -- Re-mapping +# --------------------------------- + +# -- Retrieve the dynamic horizontal grid +cdo -s selgrid,2 {cfg.dynamics_grid_filename_scratch} triangular-grid.nc + +# -- Create the weights for remapping ERA5 latlon grid onto the triangular grid +cdo gendis,triangular-grid.nc data_in.nc weights.nc + +# -- Extract the land-sea mask variable in input and output files +cdo selname,LSM data_in.nc LSM_in.nc +ncrename -h -v LSM,FR_LAND LSM_in.nc +cdo selname,FR_LAND {cfg.extpar_filename_scratch} LSM_out_tmp.nc + +# -- Add time dimension to LSM_out.nc +ncecat -O -u time LSM_out_tmp.nc LSM_out_tmp.nc +ncks -h -A -v time LSM_in.nc LSM_out_tmp.nc + +# -- Create two different files for land- and sea-mask +cdo -L setctomiss,0. -ltc,0.5 LSM_in.nc oceanmask_in.nc +cdo -L setctomiss,0. -gec,0.5 LSM_in.nc landmask_in.nc +cdo -L setctomiss,0. -ltc,0.5 LSM_out_tmp.nc oceanmask_out.nc +cdo -L setctomiss,0. -gec,0.5 LSM_out_tmp.nc landmask_out.nc +cdo setrtoc2,0.5,1.0,1,0 LSM_out_tmp.nc LSM_out.nc +rm LSM_in.nc LSM_out_tmp.nc + +# -- Select surface sea variables defined only on sea +ncks -h -v SST,CI data_in.nc datasea_in.nc + +# -- Select surface variables defined on both that must be remap differently on sea and on land +ncks -h -v SKT,STL1,STL2,STL3,STL4,ALB_SNOW,W_SNOW,T_SNOW data_in.nc dataland_in.nc + +# ----------------------------------------------------------------------------- +# -- Remap land and ocean area differently for variables +# ----------------------------------------------------------------------------- + +# -- Ocean part +# ----------------- + +# -- Apply the ocean mask (by dividing) +cdo div dataland_in.nc oceanmask_in.nc tmp1_land.nc +cdo div datasea_in.nc oceanmask_in.nc tmp1_sea.nc + +# -- Set missing values to a distance-weighted average +cdo setmisstodis tmp1_land.nc tmp2_land.nc +cdo setmisstodis tmp1_sea.nc tmp2_sea.nc + +# -- Remap +cdo remapdis,triangular-grid.nc tmp2_land.nc tmp3_land.nc +cdo remapdis,triangular-grid.nc tmp2_sea.nc tmp3_sea.nc + +# -- Apply the ocean mask to remapped variables (by dividing) +cdo div tmp3_land.nc oceanmask_out.nc dataland_ocean_out.nc +cdo div tmp3_sea.nc oceanmask_out.nc datasea_ocean_out.nc + +# -- Clean the repository +rm tmp*.nc oceanmask*.nc + +# # -- Land part +# # ----------------- + +cdo div dataland_in.nc landmask_in.nc tmp1.nc +cdo setmisstodis tmp1.nc tmp2.nc +cdo remapdis,triangular-grid.nc tmp2.nc tmp3.nc +cdo div tmp3.nc landmask_out.nc dataland_land_out.nc +rm tmp*.nc landmask*.nc dataland_in.nc datasea_in.nc + +# -- merge remapped land and ocean part +# -------------------------------------- + +cdo ifthenelse LSM_out.nc dataland_land_out.nc dataland_ocean_out.nc dataland_out.nc +rm dataland_ocean_out.nc dataland_land_out.nc + +# remap the rest and merge all files +# -------------------------------------- + +# -- Select all variables apart from these ones +ncks -h -x -v SKT,STL1,STL2,STL3,STL4,SMIL1,SMIL2,SMIL3,SMIL4,ALB_SNOW,W_SNOW,T_SNOW,SST,CI,LSM data_in.nc datarest_in.nc + +# -- Remap +cdo -s remapdis,triangular-grid.nc datarest_in.nc era5_final.nc +rm datarest_in.nc + +# -- Fill NaN values for SST and CI +cdo setmisstodis -selname,SST,CI datasea_ocean_out.nc dataland_ocean_out_filled.nc +rm datasea_ocean_out.nc + +# -- Merge remapped files plus land sea mask from EXTPAR +ncks -h -A dataland_out.nc era5_final.nc +ncks -h -A dataland_ocean_out_filled.nc era5_final.nc +ncks -h -A -v FR_LAND LSM_out.nc era5_final.nc +ncrename -h -v FR_LAND,LSM era5_final.nc +rm LSM_out.nc dataland_out.nc + +# ------------------------------------------------------------------------ +# -- Convert the (former) SWVLi variables to real soil moisture indices +# ------------------------------------------------------------------------ + +# -- Properties of IFS soil types (see Table 1 ERA5 Data documentation +# -- https://confluence.ecmwf.int/display/CKB/ERA5%3A+data+documentation) +# Soil type 1 2 3 4 5 6 7 +wiltingp=(0 0.059 0.151 0.133 0.279 0.335 0.267 0.151) # wilting point +fieldcap=(0 0.244 0.347 0.383 0.448 0.541 0.663 0.347) # field capacity + +ncks -h -v SMIL1,SMIL2,SMIL3,SMIL4,SLT data_in.nc swvl.nc +rm data_in.nc + +# -- Loop over the soil types and apply the right constants +smi_equation="" +for ilev in {{1..4}}; do + + smi_equation="${{smi_equation}}SMIL${{ilev}} = (SMIL${{ilev}} - ${{wiltingp[1]}}) / (${{fieldcap[1]}} - ${{wiltingp[1]}}) * (SLT==1)" + for ist in {{2..7}}; do + smi_equation="${{smi_equation}} + (SMIL${{ilev}} - ${{wiltingp[$ist]}}) / (${{fieldcap[$ist]}} - ${{wiltingp[$ist]}}) * (SLT==${{ist}})" + done + smi_equation="${{smi_equation}};" + +done + +cdo expr,"${{smi_equation}}" swvl.nc smil_in.nc +rm swvl.nc + +# -- Remap SMIL variables +cdo -s remapdis,triangular-grid.nc smil_in.nc smil_out.nc +rm smil_in.nc + +# -- Overwrite the variables SMIL1,SMIL2,SMIL3,SMIL4 +ncks -A -v SMIL1,SMIL2,SMIL3,SMIL4 smil_out.nc era5_final.nc +rm smil_out.nc + +# -------------------------------------- +# -- Create the LNSP variable +# -------------------------------------- + +# -- Apply logarithm to surface pressure +cdo expr,'LNPS=ln(PS);' era5_final.nc tmp.nc + +# -- Put the new variable LNSP in the original file +ncks -A -v LNPS tmp.nc era5_final.nc +rm tmp.nc + +# --------------------------------- +# -- Post-processing +# --------------------------------- + +# -- Rename dimensions and order alphabetically +ncrename -h -d cell,ncells era5_final.nc +ncrename -h -d nv,vertices era5_final.nc +ncks era5_final.nc {cfg.inicond_filename_scratch} +rm era5_final.nc + +# -- Clean the repository +rm weights.nc +rm triangular-grid.nc \ No newline at end of file diff --git a/cases/icon-art-global/icon_era5_nudging.sh b/cases/icon-art-global/icon_era5_nudging.sh new file mode 100644 index 00000000..64c48711 --- /dev/null +++ b/cases/icon-art-global/icon_era5_nudging.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +cd {cfg.icon_input_icbc} + +# --------------------------------- +# -- Pre-processing +# --------------------------------- + +rm -f {filename} + +# -- Convert the GRIB files to NetCDF +cdo -t ecmwf -f nc copy era5_ml_nudging.grib era5_ml_nudging.nc +cdo -t ecmwf -f nc copy era5_surf_nudging.grib era5_surf_nudging.nc + +# -- Put all variables in the same file +cdo merge era5_ml_nudging.nc era5_surf_nudging.nc era5_original_nudging.nc + +# -- Change variable and coordinates names to be consistent with ICON nomenclature +cdo setpartabn,mypartab,convert era5_original_nudging.nc tmp.nc + +# -- Order the variables alphabetically +ncks tmp.nc data_in.nc +rm tmp.nc era5_surf_nudging.nc era5_ml_nudging.nc era5_original_nudging.nc + +# --------------------------------- +# -- Re-mapping +# --------------------------------- + +# -- Retrieve the dynamic horizontal grid +cdo -s selgrid,2 {cfg.dynamics_grid_filename_scratch} triangular-grid.nc + +# -- Create the weights for remapping ERA5 latlon grid onto the triangular grid +cdo gendis,triangular-grid.nc data_in.nc weights.nc + +# -- Remap +cdo -s remapdis,triangular-grid.nc data_in.nc era5_final.nc +rm data_in.nc + +# -------------------------------------- +# -- Create the LNSP variable +# -------------------------------------- + +# -- Apply logarithm to surface pressure +cdo expr,'LNPS=ln(PS);' era5_final.nc tmp.nc + +# -- Put the new variable LNSP in the original file +ncks -A -v LNPS tmp.nc era5_final.nc +rm tmp.nc + +# --------------------------------- +# -- Post-processing +# --------------------------------- + +# -- Rename dimensions and order alphabetically +ncrename -h -d cell,ncells era5_final.nc +ncrename -h -d nv,vertices era5_final.nc +ncks era5_final.nc {filename} +rm era5_final.nc + + +# -- Clean the repository +rm weights.nc +rm triangular-grid.nc + diff --git a/cases/icon-art-global/icon_runjob.cfg b/cases/icon-art-global/icon_runjob.cfg new file mode 100644 index 00000000..5db570b7 --- /dev/null +++ b/cases/icon-art-global/icon_runjob.cfg @@ -0,0 +1,415 @@ +#!/usr/bin/env bash +#SBATCH --job-name="{cfg.CASENAME}_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" +#SBATCH --account={cfg.COMPUTE_ACCOUNT} +#SBATCH --time={cfg.ICON_WALLTIME} +#SBATCH --nodes={cfg.ICON_NP_TOT} +#SBATCH --ntasks-per-core=1 +#SBATCH --ntasks-per-node={cfg.NTASKS_PER_NODE} +#SBATCH --cpus-per-task=1 +#SBATCH --partition={cfg.COMPUTE_QUEUE} +#SBATCH --constraint={cfg.CONSTRAINT} +#SBATCH --hint=nomultithread +#SBATCH --output={logfile} +#SBATCH --open-mode=append +#SBATCH --chdir={cfg.icon_work} + +# -- OpenMP environment variables +export OMP_NUM_THREADS=1 +export ICON_THREADS=1 +export OMP_SCHEDULE=static,12 +export OMP_DYNAMIC="false" +export OMP_STACKSIZE=200M + + +# -- ECCODES path +export ECCODES_DEFINITION_PATH=/store/empa/em05/eccodes_definitions/definitions.edzw-2.12.5-2 +export ECCODES_DEFINITION_PATH=$ECCODES_DEFINITION_PATH:/store/empa/em05/easybuild.backup/software/ecCodes/2.12.5-CrayGNU-20.08/share/eccodes/definitions +export ECCODES_DEFINITION_PATH=$ECCODES_DEFINITION_PATH:/project/g110/spack-install/daint/eccodes/2.19.0/pgi/6skdmw5lsn6mjv4esxkyalf6xogllshi/share/eccodes/definitions/ + +set -x + +# -- Set time step +dtime=900 + +# ---------------------------------------------------------------------------- +# Create ICON master namelist +# ---------------------------------------------------------------------------- + +cat > icon_master.namelist << EOF +! master_nml: ---------------------------------------------------------------- +&master_nml + lrestart = {cfg.lrestart} ! .TRUE.=current experiment is resumed +/ + +! master_time_control_nml: ---------------------------------------------------------------- +&master_time_control_nml + restartTimeIntval = "{cfg.restart_time_interval}" ! Time interval for writing restart files +/ + +! master_model_nml: repeated for each model ---------------------------------- +&master_model_nml + model_type = 1 ! identifies which component to run (atmosphere,ocean,...) + model_name = "ATMO" ! character string for naming this component. + model_namelist_filename = "NAMELIST_NWP" ! file name containing the model namelists + model_min_rank = 1 ! start MPI rank for this model + model_max_rank = 65536 ! end MPI rank for this model + model_inc_rank = 1 ! stride of MPI ranks +/ + +! time_nml: specification of date and time------------------------------------ +&time_nml + ini_datetime_string = "{cfg.ini_datetime_string}" ! initial date and time of the simulation + end_datetime_string = "{cfg.end_datetime_string}" ! end date and time of the simulation + is_relative_time = .TRUE. ! if time loop shall start with step 0 +/ +EOF + +# ---------------------------------------------------------------------- +# Create model namelists +# ---------------------------------------------------------------------- + +cat > NAMELIST_NWP << EOF +! parallel_nml: MPI parallelization ------------------------------------------- +¶llel_nml + nproma = 8 ! optimal setting 8 for CRAY; use 16 or 24 for IBM + num_io_procs = 1 ! up to one PE per output stream is possible + num_prefetch_proc = 1 +/ + + +! grid_nml: horizontal grid -------------------------------------------------- +&grid_nml + dynamics_grid_filename = "{cfg.dynamics_grid_filename_scratch}" ! array of the grid filenames for the dycore + dynamics_parent_grid_id = 0 ! array of the indexes of the parent grid filenames + lredgrid_phys = .TRUE. ! .true.=radiation is calculated on a reduced grid + lfeedback = .TRUE. ! specifies if feedback to parent grid is performed + ifeedback_type = 2 ! feedback type (incremental/relaxation-based) +/ + + +! initicon_nml: specify read-in of initial state ------------------------------ +&initicon_nml + init_mode = 2 ! 2: start from IFS data + ifs2icon_filename = '{cfg.inicond_filename_scratch}' ! initial data filename + zpbl1 = 500. ! bottom height (AGL) of layer used for gradient computation + zpbl2 = 1000. ! top height (AGL) of layer used for gradient computation +/ + +! extpar_nml: external data -------------------------------------------------- +&extpar_nml + extpar_filename = '{cfg.extpar_filename_scratch}' ! filename of external parameter input file + itopo = 1 ! topography (0:analytical) + itype_vegetation_cycle = 2 ! specifics for annual cycle of LAI + n_iter_smooth_topo = 1 ! iterations of topography smoother + heightdiff_threshold = 2250. + hgtdiff_max_smooth_topo = 750. + read_nc_via_cdi = .TRUE. + itype_lwemiss = 2 +/ + +! io_nml: general switches for model I/O ------------------------------------- +&io_nml + itype_pres_msl = 5 ! method for computation of mean sea level pressure + itype_rh = 1 ! method for computation of relative humidity + lnetcdf_flt64_output = .FALSE. ! NetCDF files is written in 64-bit instead of 32-bit accuracy +/ + +! run_nml: general switches --------------------------------------------------- +&run_nml + !ltraj = {cfg.online_traj_scratch} + dtime = ${{dtime}} ! timestep in seconds + iforcing = 3 ! forcing of dynamics and transport by parameterized processes + lart = .TRUE. ! main switch for ART + ldynamics = .TRUE. ! compute adiabatic dynamic tendencies + ltestcase = .FALSE. ! real case run + ltimer = .FALSE. ! timer for monitoring the runtime of specific routines + ltransport = .TRUE. ! compute large-scale tracer transport + lvert_nest = .FALSE. ! vertical nesting + msg_level = 10 ! detailed report during integration + timers_level = 1 ! performance timer granularity + output = "nml" ! main switch for enabling/disabling components of the model output + num_lev = 65 ! number of full levels (atm.) for each domain + restart_filename = '{cfg.icon_restart_out}/restart_.nc' ! restart filename +/ + +! nwp_phy_nml: switches for the physics schemes ------------------------------ +&nwp_phy_nml + lrtm_filename = '{cfg.lrtm_filename_scratch}' ! longwave absorption coefficients for RRTM_LW + cldopt_filename = '{cfg.cldopt_filename_scratch}' ! RRTM cloud optical properties + dt_rad = $(( 4 * dtime)) ! time step for radiation in s + dt_conv = $(( 1 * dtime)) ! time step for convection in s (domain specific) + dt_sso = $(( 2 * dtime)) ! time step for SSO parameterization + dt_gwd = $(( 2 * dtime)) ! time step for gravity wave drag parameterization + efdt_min_raylfric = 7200. ! minimum e-folding time of Rayleigh friction + icapdcycl = 3 ! apply CAPE modification to improve diurnalcycle over tropical land + icpl_aero_conv = 1 ! coupling between autoconversion and Tegen aerosol climatology + icpl_aero_gscp = 0 ! + icpl_o3_tp = 1 ! + inwp_cldcover = 1 ! cloud cover scheme for radiation + inwp_convection = 1 ! convection + inwp_gscp = 4 ! cloud microphysics and precipitation + inwp_gwd = 1 ! non-orographic gravity wave drag + inwp_radiation = 1 ! radiation + inwp_satad = 1 ! saturation adjustment + inwp_sso = 1 ! subgrid scale orographic drag + inwp_surface = 1 ! surface scheme + inwp_turb = 1 ! vertical diffusion and transfer + itype_z0 = 2 ! type of roughness length data + latm_above_top = .TRUE. ! take into account atmosphere above model top for radiation computation + ldetrain_conv_prec = .TRUE. ! Activate detrainment of convective rain and snowl + mu_rain = 0.5 + rain_n0_factor = 0.1 + lshallowconv_only = .FALSE. + lgrayzone_deepconv = .TRUE. ! activates shallow and deep convection but not mid-level convection, +/ + +! nwp_tuning_nml: additional tuning parameters ---------------------------------- +&nwp_tuning_nml + itune_albedo = 1 + tune_box_liq_asy = 4.0 + tune_gfrcrit = 0.333 + tune_gkdrag = 0.0 + tune_gkwake = 0.25 + tune_gust_factor = 7.0 + tune_minsnowfrac = 0.3 + tune_sgsclifac = 1.0 + tune_rcucov = 0.075 + tune_rhebc_land = 0.825 + tune_zvz0i = 0.85 + icpl_turb_clc = 2 + max_calibfac_clcl = 2.0 + tune_box_liq = 0.04 +/ + + +! turbdiff_nml: turbulent diffusion ------------------------------------------- +&turbdiff_nml + a_hshr = 2.0 ! length scale factor for separated horizontal shear mode + frcsmot = 0.2 ! these 2 switches together apply vertical smoothing of the TKE source terms + icldm_turb = 2 ! mode of cloud water representation in turbulence + imode_frcsmot = 2 ! in the tropics (only), which reduces the moist bias in the tropical lower troposphere + imode_tkesso = 2 + itype_sher = 2 + ltkeshs = .TRUE. ! type of shear forcing used in turbulence + ltkesso = .TRUE. + pat_len = 750. ! effective length scale of thermal surface patterns + q_crit = 2.0 + rat_sea = 0.8 + tkhmin = 0.5 + tkmmin = 0.75 + tur_len = 300. + rlam_heat = 10.0 + alpha1 = 0.125 +/ + +&lnd_nml + c_soil = 1.25 + c_soil_urb = 0.5 + cwimax_ml = 5.e-4 + idiag_snowfrac = 20 + itype_evsl = 4 + itype_heatcond = 3 + itype_lndtbl = 4 + itype_root = 2 + itype_snowevap = 3 + itype_trvg = 3 + llake = .TRUE. + lmulti_snow = .FALSE. + lprog_albsi = .TRUE. + itype_canopy = 2 + lseaice = .TRUE. + lsnowtile = .TRUE. + nlev_snow = 3 + ntiles = 3 + sstice_mode = 2 +/ + +! radiation_nml: radiation scheme --------------------------------------------- +&radiation_nml + albedo_type = 2 ! Modis albedo + irad_o3 = 79 ! ozone climatology + irad_aero = 6 + islope_rad = 0 + direct_albedo_water = 3 + albedo_whitecap = 1 + vmr_co2 = 407.e-06 ! values representative for 2012 + vmr_ch4 = 1857.e-09 + vmr_n2o = 330.0e-09 + vmr_o2 = 0.20946 + vmr_cfc11 = 240.e-12 + vmr_cfc12 = 532.e-12 +/ + +! nonhydrostatic_nml: nonhydrostatic model ----------------------------------- +&nonhydrostatic_nml + damp_height = 12250.0 ! height at which Rayleigh damping of vertical wind starts + divdamp_fac = 0.004 ! scaling factor for divergence damping + divdamp_order = 24 ! order of divergence damping + divdamp_type = 32 ! type of divergence damping + exner_expol = 0.6 ! temporal extrapolation of Exner function + hbot_qvsubstep = 22500.0 ! height above which QV is advected with substepping scheme + htop_moist_proc = 22500.0 ! max. height for moist physics + iadv_rhotheta = 2 ! advection method for rho and rhotheta + igradp_method = 3 ! discretization of horizontal pressure gradient + itime_scheme = 4 ! time integration scheme + ivctype = 2 ! type of vertical coordinate + l_open_ubc = .FALSE. ! .TRUE.=use open upper boundary condition + l_zdiffu_t = .TRUE. ! specifies computation of Smagorinsky temperature diffusion + rayleigh_coeff = 5.0 ! Rayleigh damping coefficient + thhgtd_zdiffu = 125.0 ! threshold of height difference (temperature diffusion) + thslp_zdiffu = 0.02 ! slope threshold (temperature diffusion) + vwind_offctr = 0.2 ! off-centering in vertical wind solver +/ + +! sleve_nml: vertical level specification ------------------------------------- +&sleve_nml + decay_exp = 1.2 ! exponent of decay function + decay_scale_1 = 4000.0 ! decay scale of large-scale topography component + decay_scale_2 = 2500.0 ! decay scale of small-scale topography component + flat_height = 16000.0 ! height above which the coordinate surfaces are flat + itype_laydistr = 1 + min_lay_thckn = 20.0 ! minimum layer thickness of lowermost layer + stretch_fac = 0.65 ! stretching factor to vary distribution of model levels + htop_thcknlimit = 15000.0 + top_height = 75000.0 ! height of model top +/ + +! dynamics_nml: dynamical core ----------------------------------------------- +&dynamics_nml + divavg_cntrwgt = 0.50 ! weight of central cell for divergence averaging + idiv_method = 1 ! method for divergence computation + iequations = 3 ! type of equations and prognostic variables + lcoriolis = .TRUE. ! Coriolis force +/ + +! transport_nml: tracer transport --------------------------------------------- +&transport_nml + ctracer_list = '12345' ! kann vermutlich raus + ihadv_tracer = 52,2,2,2,2,2 ! tracer specific method to compute horizontal advection + ivadv_tracer = 3,3,3,3,3,3 ! tracer specific method to compute vertical advection + itype_hlimit = 3,4,4,4,4,4 ! type of limiter for horizontal transport + llsq_svd = .TRUE. + beta_fct = 1.005 +/ + +! diffusion_nml: horizontal (numerical) diffusion ---------------------------- +&diffusion_nml + hdiff_efdt_ratio = 24.0 ! ratio of e-folding time to time step + hdiff_order = 5 ! order of nabla operator for diffusion + hdiff_smag_fac = 0.025 ! scaling factor for Smagorinsky diffusion + itype_t_diffu = 2 ! discretization of temperature diffusion + itype_vn_diffu = 1 ! reconstruction method used for Smagorinsky diffusion + lhdiff_vn = .TRUE. ! diffusion on the horizontal wind field + lhdiff_temp = .TRUE. ! diffusion on the temperature field +/ + +! interpol_nml: settings for internal interpolation methods ------------------ +&interpol_nml + lsq_high_ord = 3 + l_intp_c2l = .TRUE. + l_mono_c2l = .TRUE. +/ + +! nudging_nml: settings for global nudging ----------------------------------- +&nudging_nml +nudge_type = {cfg.nudge_type} ! global nudging +nudge_var = 'vn' ! variables that shall be nudged, default = all (vn,thermdyn,qv) +nudge_start_height = 0. ! Start nudging at the surface +nudge_end_height = 75000.0 ! End nudging at the top +nudge_profile = 2 +/ + +! limarea_nml: settings for global nudging ----------------------------------- +&limarea_nml +itype_latbc = 1 ! time-dependent lateral boundary conditions provided by an external source +dtime_latbc = {cfg.nudging_step_seconds} ! Time difference between two consecutive boundary data +latbc_path = '{cfg.icon_input_icbc}' ! Absolute path to boundary data +latbc_filename = 'era2icon_R2B03__nudging.nc' ! boundary data input filename +latbc_varnames_map_file = '{cfg.map_file_nudging_scratch}' ! Dictionary file which maps internal variable names onto GRIB2 shortnames or NetCDF varnames +latbc_boundary_grid = ' ' ! no boundary grid: driving data have to be available on entire grid (important to let a space) +/ + +! art_nml: Aerosols and Reactive Trace gases extension------------------------------------------------- +&art_nml + lart_diag_out = .TRUE. ! If this switch is set to .TRUE., diagnostic + ! ... output elds are available. Set it to + ! ... .FALSE. when facing memory problems. + lart_pntSrc = .TRUE. ! enables point sources + !lart_bound_cond = .FALSE. ! enables boundary conditions + lart_chem = .TRUE. ! enables chemistry + lart_chemtracer = .TRUE. ! main switch for the treatment of chemical tracer + lart_aerosol = .FALSE. ! main switch for the treatment of atmospheric aerosol + + iart_seasalt = 0 + iart_init_gas = {cfg.iart_init_gas} + cart_cheminit_type = 'EMAC' + cart_cheminit_file = '{cfg.inicond_filename_scratch}' + cart_cheminit_coord = '{cfg.inicond_filename_scratch}' + + cart_chemtracer_xml = '{cfg.chemtracer_xml_filename_scratch}' ! path to xml file for chemical tracers + cart_pntSrc_xml = '{cfg.pntSrc_xml_filename_scratch}' ! path to xml file for point sources + !cart_bound_cond_xml = '{cfg.boundcond_xml_filename_scratch}' ! path to xml file for boundary conditions + cart_input_folder = '{cfg.INPUT_ROOT_ART}' ! absolute Path to ART source code +/ + +! output_nml: specifies an output stream -------------------------------------- +&output_nml + filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2 + dom = -1 ! write all domains + output_bounds = 0.,{cfg.output_writing_max},{cfg.OUTPUT_WRITING_STEP} ! start, end, increment + output_time_unit = 3 ! Unit of bounds is in hours instead of seconds + steps_per_file = {cfg.steps_per_output} ! number of steps per file + steps_per_file_inclfirst = .FALSE. ! First step is not accounted for in steps_per_file + include_last = .FALSE. + mode = 1 ! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis) + output_filename = 'ICON-ART' + filename_format = '{cfg.icon_output}/_latlon_' ! file name base + remap = 1 ! 1: remap to lat-lon grid + reg_lon_def = -179.,2,179 + reg_lat_def = 89.,-2,-89. + ml_varlist = 'z_ifc','pres','qv','rho','temp','u','v','group:ART_CHEMISTRY','OH_Nconc', +/ + +! output_nml: specifies an output stream -------------------------------------- +&output_nml + filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2 + dom = -1 ! write all domains + output_bounds = 0.,{cfg.output_writing_max},{cfg.OUTPUT_WRITING_STEP} ! start, end, increment + output_time_unit = 3 ! Unit of bounds is in hours instead of seconds + steps_per_file = {cfg.steps_per_output} ! number of steps per file + steps_per_file_inclfirst = .FALSE. ! First step is not accounted for in steps_per_file + include_last = .FALSE. + mode = 1 ! 1: forecast mode (mrelative t-axis), 2: climate mode (absolute t-axis) + output_filename = 'ICON-ART' + filename_format = '{cfg.icon_output}/_unstr_' ! file name base + remap = 0 ! 1: remap to lat-lon grid + ml_varlist = 'z_ifc','pres','qv','rho','temp','u','v','group:ART_CHEMISTRY','OH_Nconc', +/ + + +EOF + +# ! ml_varlist = 'z_ifc','z_mc','pres','pres_sfc','qv','rho','temp','u','v','group:ART_CHEMISTRY', + +# ---------------------------------------------------------------------- +# run the model! +# ---------------------------------------------------------------------- + srun ./icon.exe + + + +# ! output_nml: specifies an output stream -------------------------------------- +# &output_nml +# filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2 +# dom = -1 ! write all domains +# output_bounds = 0., 2678400., 3600. ! start, end, increment +# steps_per_file = 1 ! number of steps per file +# mode = 1 ! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis) +# include_last = .TRUE. +# output_filename = 'ICON-ART' +# filename_format = '{cfg.icon_output}/_latlon_' ! file name base +# remap = 1 ! 1: remap to lat-lon grid +# reg_lon_def = -179.,2,179 +# reg_lat_def = 90.,-1,-90. +# ml_varlist = 'z_ifc','z_mc','pres','pres_sfc','qc','rh','rho','temp','u','v','w','group:ART_CHEMISTRY', +# / \ No newline at end of file diff --git a/cases/icon-art-global/icon_species_inicond.sh b/cases/icon-art-global/icon_species_inicond.sh new file mode 100644 index 00000000..8b6a299a --- /dev/null +++ b/cases/icon-art-global/icon_species_inicond.sh @@ -0,0 +1,75 @@ +#!/bin/bash + +cd {cfg.icon_input_icbc} + + +species2restart=($(echo {cfg.SPECIES2RESTART} | tr -d '[],')) + + +if [[ {cfg.lrestart} == '.FALSE.' ]]; then + + # ---------------------------------------------------------- + # -- Replicate Q and GEOSP variables for ICON-ART + # ---------------------------------------------------------- + + cdo expr,'Q=QV;' {filename} tmp.nc + ncks -A -v Q tmp.nc {filename} + rm tmp.nc + + cdo expr,'GEOP_SFC=GEOSP;' {filename} tmp.nc + ncks -A -v GEOP_SFC tmp.nc {filename} + rm tmp.nc + +fi + +# ---------------------------------------------------------- +# -- Create CH4 and CO variables (if CAMS not available) +# ---------------------------------------------------------- +if [[ "${{species2restart[*]}}" =~ "TRCH4" || "${{species2restart[*]}}" =~ "TRCO" ]]; then + + # ---------------------------------------------------------- + # -- Remap CAMS data (if CAMS available...) + # ---------------------------------------------------------- + + # # -- Convert the GRIB files to NetCDF + # cdo -t ecmwf -f nc copy cams.grib cams.nc + + # # -- Retrieve the dynamic horizontal grid + # cdo -s selgrid,2 {cfg.dynamics_grid_filename_scratch} triangular-grid.nc + + # # -- Remap + # cdo -s remapdis,triangular-grid.nc cams.nc cams_final.nc + # rm cams.nc + + # # -- Merge CAMS and ERA5 data + # ncks -h -A cams.nc tmp.nc + # rm cams.nc cams.grib + + # # -- Rename variables + # ncrename -h CH4,TRCH4 tmp.nc + # ncrename -h CO,TRCO tmp.nc + # ncks tmp.nc {filename} + # rm tmp.nc + + # ---------------------------------------------------------- + # -- Or just create basic variables + # ---------------------------------------------------------- + var_tracer="TRCH4{ext_restart}" + cdo expr,"TRCH4=QV / QV * 0.000002;" {filename} tmp.nc + if [ ! -z "{ext_restart}" ] ; then + ncrename -h -v TRCH4,${{var_tracer}} tmp.nc + fi + ncks -A -v ${{var_tracer}} tmp.nc {filename} + rm tmp.nc + + var_tracer="TRCO{ext_restart}" + cdo expr,"TRCO=QV / QV * 0.000002;" {filename} tmp.nc + if [ ! -z "{ext_restart}" ] ; then + ncrename -h -v TRCO,${{var_tracer}} tmp.nc + fi + ncks -A -v ${{var_tracer}} tmp.nc {filename} + rm tmp.nc + + +fi + diff --git a/cases/icon-art-global/icon_species_nudging.sh b/cases/icon-art-global/icon_species_nudging.sh new file mode 100644 index 00000000..6d7f91fd --- /dev/null +++ b/cases/icon-art-global/icon_species_nudging.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +cd {cfg.icon_input_icbc} + +# ---------------------------------------------------------- +# -- Replicate Q and GEOSP variables for ICON-ART +# ---------------------------------------------------------- + +cdo expr,'Q=QV;' {filename} tmp.nc +ncks -A -v Q tmp.nc {filename} +rm tmp.nc + +cdo expr,'GEOP_SFC=GEOSP;' {filename} tmp.nc +ncks -A -v GEOP_SFC tmp.nc {filename} +rm tmp.nc + +# ---------------------------------------------------------- +# -- Remap CAMS data (if CAMS available) +# ---------------------------------------------------------- + +# # -- Convert the GRIB files to NetCDF +# cdo -t ecmwf -f nc copy cams.grib cams.nc + +# # -- Retrieve the dynamic horizontal grid +# cdo -s selgrid,2 {cfg.dynamics_grid_filename_scratch} triangular-grid.nc + +# # -- Remap +# cdo -s remapdis,triangular-grid.nc cams.nc cams_final.nc +# rm cams.nc + +# # -- Merge CAMS and ERA5 data +# ncks -h -A cams.nc tmp.nc +# rm cams.nc cams.grib + +# # -- Rename variables +# ncrename -h CH4,TRCH4 tmp.nc +# ncrename -h CO,TRCO tmp.nc +# ncks tmp.nc {filename} +# rm tmp.nc + +# ---------------------------------------------------------- +# -- Create CH4 and CO variables (if CAMS not available) +# ---------------------------------------------------------- + +cdo expr,'TRCH4=QV / QV * 0.000002;' {filename} tmp.nc +ncks -A -v TRCH4 tmp.nc {filename} +rm tmp.nc + +cdo expr,'TRCO=QV / QV * 0.0000002;' {filename} tmp.nc +ncks -A -v TRCO tmp.nc {filename} +rm tmp.nc + +cdo expr,'TROH=QV / QV * 0.000004;' {filename} tmp.nc +ncks -A -v TROH tmp.nc {filename} +rm tmp.nc diff --git a/cases/icon-art-global/mypartab b/cases/icon-art-global/mypartab new file mode 100644 index 00000000..9552aa1f --- /dev/null +++ b/cases/icon-art-global/mypartab @@ -0,0 +1,117 @@ +¶meter ! temperature +name = "t" +out_name = "T" +/ +¶meter ! horiz. wind comp. u +name = "u" +out_name = "U" +/ +¶meter ! horiz. wind comp. u +name = "v" +out_name = "V" +/ +¶meter ! vertical velocity +name = "w" +out_name = "W" +/ +¶meter ! specific humidity +name = "q" +out_name = "QV" +/ +¶meter ! cloud liquid water content +name = "clwc" +out_name = "QC" +/ +¶meter ! cloud ice water content +name = "ciwc" +out_name = "QI" +/ +¶meter ! rain water content +name = "crwc" +out_name = "QR" +/ +¶meter ! snow water content +name = "cswc" +out_name = "QS" +/ +¶meter ! snow temperature +name = "TSN" +out_name = "T_SNOW" +/ +¶meter ! water content of snow +name = "SD" +out_name = "W_SNOW" +/ +¶meter ! density of snow +name = "RSN" +out_name = "RHO_SNOW" +/ +¶meter ! snow albedo +name = "ASN" +out_name = "ALB_SNOW" +/ +¶meter ! skin temperature +name = "SKT" +out_name = "SKT" +/ +¶meter ! sea surface temperature +name = "SSTK" +out_name = "SST" +/ +¶meter ! soil temperature level 1 +name = "STL1" +out_name = "STL1" +/ +¶meter ! soil temperature level 2 +name = "STL2" +out_name = "STL2" +/ +¶meter ! soil temperature level 3 +name = "STL3" +out_name = "STL3" +/ +¶meter ! soil temperature level 4 +name = "STL4" +out_name = "STL4" +/ +¶meter ! sea-ice cover +name = "CI" +out_name = "CI" +/ +¶meter ! water cont. of interception storage +name = "SRC" +out_name = "W_I" +/ +¶meter ! Land/sea mask +name = "LSM" +out_name = "LSM" +/ +¶meter ! soil moisture index layer 1 +name = "SWVL1" +out_name = "SMIL1" +/ +¶meter ! soil moisture index layer 2 +name = "SWVL2" +out_name = "SMIL2" +/ +¶meter ! soil moisture index layer 3 +name = "SWVL3" +out_name = "SMIL3" +/ +¶meter ! soil moisture index layer 4 +name = "SWVL4" +out_name = "SMIL4" +/ +¶meter ! logarithm of surface pressure +name = "LNSP" +out_name = "LNPS" +/ +¶meter ! logarithm of surface pressure +name = "SP" +out_name = "PS" +/ +¶meter +name = "Z" +out_name = "GEOSP" +/ + From 92a9e5961eaa74dc69254e2347cdb46817956c88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 31 May 2023 15:34:46 +0200 Subject: [PATCH 014/108] Set own initial file in icon job --- jobs/icon.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/jobs/icon.py b/jobs/icon.py index 1324a13f..ebe1b15b 100644 --- a/jobs/icon.py +++ b/jobs/icon.py @@ -61,11 +61,14 @@ def main(starttime, hstart, hstop, cfg): execname = 'icon.exe' tools.copy_file(cfg.icon_bin, os.path.join(cfg.icon_work, execname)) - # Get name if initial file - starttime_real = starttime + timedelta(hours=hstart) - inidata_filename = os.path.join( - cfg.icon_input_icbc, - starttime_real.strftime(cfg.meteo_nameformat) + '.nc') + # Get name of initial file + if hasattr(cfg, 'INICOND_FILENAME'): + inidata_filename = os.path.join(cfg.icon_input_icbc, cfg.INICOND_FILENAME) + else: + starttime_real = starttime + timedelta(hours=hstart) + inidata_filename = os.path.join( + cfg.icon_input_icbc, + starttime_real.strftime(cfg.meteo_nameformat) + '.nc') # Write run script (run_icon.job) with open(cfg.icon_runjob) as input_file: From 83e73a924404a5e67893f50e2b9bc2d2111fad72 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 31 May 2023 13:35:30 +0000 Subject: [PATCH 015/108] GitHub Action: Apply Pep8-formatting --- cases/icon-art-global/config.py | 26 +++++++++++++++----------- jobs/icon.py | 3 ++- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/cases/icon-art-global/config.py b/cases/icon-art-global/config.py index 4a05e911..531ac5fc 100644 --- a/cases/icon-art-global/config.py +++ b/cases/icon-art-global/config.py @@ -1,7 +1,6 @@ import os import logging import sys - """ Configuration file for the 'icon-art' case with ICON-ART """ @@ -35,7 +34,6 @@ # -- Case directory CASE_DIR = os.path.join(CHAIN_SRC_DIR, 'cases', CASENAME) - # ----------------------------------------------------------- # -- SIMULATION # ----------------------------------------------------------- @@ -47,7 +45,8 @@ # ICON_BIN = os.path.join('/scratch/snx3000/jthanwer/spack-install/daint/icon/c2sm-master/gcc/qcndg6qwq6e5gfutwoycqmwf2m4lvg7g/', 'bin', 'icon') # -- eccodes, ocean, noart # ICON_BIN = os.path.join('/scratch/snx3000/jthanwer/spack-install/daint/icon/c2sm-master/gcc/x6pisrz7umszlrpnazse3cuosdxt45kt/', 'bin', 'icon') # -- art # ICON_BIN = os.path.join('/scratch/snx3000/jthanwer/icon-online-traj/cpu/', 'bin', 'icon') # -- online-traj, cpu+art, dev-build -ICON_BIN = os.path.join('/scratch/snx3000/jthanwer/icon/cpu/', 'bin', 'icon') # +ICON_BIN = os.path.join('/scratch/snx3000/jthanwer/icon/cpu/', 'bin', + 'icon') # # -- Paths for namelists and slurm runscript templates # ICON_RUNJOB = os.path.join(CASE_DIR, 'icon_runjob_withoutart.cfg') @@ -58,13 +57,13 @@ ICON_SPECIES_NUDGINGJOB = os.path.join(CASE_DIR, 'icon_species_nudging.sh') # -- Number of hours simulated by one job / directory -RESTART_STEP = '1MS' # -- hours or Pandas frequency +RESTART_STEP = '1MS' # -- hours or Pandas frequency # -- Number of hours between two output data -OUTPUT_WRITING_STEP = 12 # -- TO MODIFY +OUTPUT_WRITING_STEP = 12 # -- TO MODIFY # -- Initial conditios -ERA5_INICOND = False # -- TO MODIFY +ERA5_INICOND = False # -- TO MODIFY SPECIES_INICOND = True SPECIES2RESTART = ['TROH'] @@ -99,7 +98,8 @@ INPUT_ROOT_GRID = os.path.join(INPUT_ROOT, 'GRIDS') INPUT_ROOT_RAD = os.path.join(INPUT_ROOT, 'RAD') INPUT_ROOT_OEM = os.path.join(INPUT_ROOT, 'OEM', 'SF6') -INPUT_ROOT_CHEMISTRY = os.path.join(INPUT_ROOT, 'CHEMISTRY', 'OH_GCP2022_ORIGINAL') +INPUT_ROOT_CHEMISTRY = os.path.join(INPUT_ROOT, 'CHEMISTRY', + 'OH_GCP2022_ORIGINAL') INPUT_ROOT_TRACERS = os.path.join(INPUT_ROOT, 'XML/examples') INPUT_ROOT_CONFIGS = os.path.join(INPUT_ROOT, 'CONFIGS') INPUT_ROOT_ART = os.path.join(INPUT_ROOT, 'ART') @@ -123,16 +123,20 @@ OEM_MONTHOFYEAR_FILENAME = os.path.join(INPUT_ROOT_OEM, 'monthofyear.nc') # -- Chemistry (OH) -OH_MOLEC_FILENAME = os.path.join(INPUT_ROOT_CHEMISTRY, 'oh_gcp2022_icongrid.nc') # -- TO MODIFY +OH_MOLEC_FILENAME = os.path.join(INPUT_ROOT_CHEMISTRY, + 'oh_gcp2022_icongrid.nc') # -- TO MODIFY # -- ART # PNTSRC_XML_FILENAME = os.path.join(INPUT_ROOT_TRACERS, 'chemistry_lt/point-sources.xml') # BOUNDCOND_XML_FILENAME = os.path.join(INPUT_ROOT_TRACERS, 'boundary-conditions.xml') # CHEMTRACER_XML_FILENAME = os.path.join(INPUT_ROOT_TRACERS, 'chemistry_lt/tracers.xml') -PNTSRC_XML_FILENAME = os.path.join(INPUT_ROOT_CONFIGS, 'CONFIG2/point-sources.xml') # -- TO MODIFY -BOUNDCOND_XML_FILENAME = os.path.join(INPUT_ROOT_TRACERS, 'boundary-conditions.xml') -CHEMTRACER_XML_FILENAME = os.path.join(INPUT_ROOT_CONFIGS, 'CONFIG2/tracers.xml') # -- TO MODIFY +PNTSRC_XML_FILENAME = os.path.join(INPUT_ROOT_CONFIGS, + 'CONFIG2/point-sources.xml') # -- TO MODIFY +BOUNDCOND_XML_FILENAME = os.path.join(INPUT_ROOT_TRACERS, + 'boundary-conditions.xml') +CHEMTRACER_XML_FILENAME = os.path.join(INPUT_ROOT_CONFIGS, + 'CONFIG2/tracers.xml') # -- TO MODIFY # -- Nudging MAP_FILE_NUDGING = os.path.join(INPUT_ROOT_ICBC, 'map_file.nudging') diff --git a/jobs/icon.py b/jobs/icon.py index ebe1b15b..c01b7056 100644 --- a/jobs/icon.py +++ b/jobs/icon.py @@ -63,7 +63,8 @@ def main(starttime, hstart, hstop, cfg): # Get name of initial file if hasattr(cfg, 'INICOND_FILENAME'): - inidata_filename = os.path.join(cfg.icon_input_icbc, cfg.INICOND_FILENAME) + inidata_filename = os.path.join(cfg.icon_input_icbc, + cfg.INICOND_FILENAME) else: starttime_real = starttime + timedelta(hours=hstart) inidata_filename = os.path.join( From e82f36615b072ab6479abff8c08532035e5bfed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 31 May 2023 15:47:23 +0200 Subject: [PATCH 016/108] Add new tool scripts --- jobs/tools/constants.py | 6 + jobs/tools/fetch_external_data.py | 111 ++++++++++++++++++ jobs/tools/interpolate_data.py | 189 ++++++++++++++++++++++++++++++ 3 files changed, 306 insertions(+) create mode 100644 jobs/tools/constants.py create mode 100644 jobs/tools/fetch_external_data.py create mode 100644 jobs/tools/interpolate_data.py diff --git a/jobs/tools/constants.py b/jobs/tools/constants.py new file mode 100644 index 00000000..ed292036 --- /dev/null +++ b/jobs/tools/constants.py @@ -0,0 +1,6 @@ + +M_DRYAIR = 28.970e-3 # kg.mol-1 +M_WATER = 18.0154e-3 # kg.mol-1 +M_OH = 17.0080e-3 # kg.mol-1 +N_AVO = 6.022e23 +R_GAS = 8.314 # J.K-1.mol-1 diff --git a/jobs/tools/fetch_external_data.py b/jobs/tools/fetch_external_data.py new file mode 100644 index 00000000..5a5de38c --- /dev/null +++ b/jobs/tools/fetch_external_data.py @@ -0,0 +1,111 @@ +import os +import shutil +import cdsapi + +def fetch_era5(date, dir2move): + """Fetch ERA5 data from ECMWF for initial conditions + + Parameters + ---------- + date : initial date to fetch + + """ + + c = cdsapi.Client() + + # -- CRWC : Specific rain water content - 75 + # -- CSWC : Specific snow water content - 76 + # -- T : Temperature - 130 + # -- U : U component of wind - 131 + # -- V : V component of wind - 132 + # -- Q : Specific humidity - 133 + # -- W : Vertical velocity - 135 + # -- CLWC : Specific cloud liquid water content - 246 + # -- CIWC : Specific cloud ice water content - 247 + + c.retrieve('reanalysis-era5-complete', { + 'class': 'ea', + 'date': date.strftime('%Y-%m-%d'), + 'time': date.strftime('%H:%M:%S'), + 'expver': '1', + 'levelist': '1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/42/43/44/45/46/47/48/49/50/51/52/53/54/55/56/57/58/59/60/61/62/63/64/65/66/67/68/69/70/71/72/73/74/75/76/77/78/79/80/81/82/83/84/85/86/87/88/89/90/91/92/93/94/95/96/97/98/99/100/101/102/103/104/105/106/107/108/109/110/111/112/113/114/115/116/117/118/119/120/121/122/123/124/125/126/127/128/129/130/131/132/133/134/135/136/137', + 'levtype': 'ml', + 'param': '75/76/130/131/132/133/135/246/247', + 'stream': 'oper', + 'type': 'an', + 'grid': '1.0/1.0', + }, 'era5_ml.grib') + + # -- CI : Sea Ice Cover - 31 + # -- ASN : Snow albedo - 32 + # -- RSN : Snow density - 33 + # -- SST : Sea Surface Temperature - 34 + # -- SWV1 : Volumetric soil water layer 1 - 39 + # -- SWV2 : Volumetric soil water layer 2 - 40 + # -- SWV3 : Volumetric soil water layer 3 - 41 + # -- SWV4 : Volumetric soil water layer 4 - 42 + # -- SLT : Soil type - 43 + # -- Z : Geopotential - 129 + # -- SP : Surface pressure - 134 + # -- STL1 : Soil temperature level 1 - 139 + # -- SD : Snow depth - 141 + # -- STL2 : Soil temperature level 2 - 170 + # -- LSM : Land-Sea Mask - 172 + # -- STL3 : Soil temperature level 3 - 183 + # -- SRC : Skin reservoir content - 198 + # -- SKT : Skin Temperature - 235 + # -- STL4 : Soil temperature level 4 - 236 + # -- TSN : Temperature of snow layer - 238 + + c.retrieve( + 'reanalysis-era5-single-levels', + { + 'product_type': 'reanalysis', + 'param': '31/32/33/34/39/40/41/42/43/129/134/139/141/170/172/183/198/235/236/238', + 'date': date.strftime('%Y-%m-%d'), + 'time': date.strftime('%H:%M:%S'), + 'grid': '1.0/1.0', + }, + 'era5_surf.grib') + + shutil.move('era5_ml.grib', os.path.join(dir2move, 'era5_ml.grib')) + shutil.move('era5_surf.grib', os.path.join(dir2move, 'era5_surf.grib')) + + +def fetch_era5_nudging(date, dir2move): + """Fetch ERA5 data from ECMWF for global nudging + + Parameters + ---------- + date : initial date to fetch + + """ + + c = cdsapi.Client() + + c.retrieve('reanalysis-era5-complete', { + 'class': 'ea', + 'date': date.strftime('%Y-%m-%d'), + 'time': date.strftime('%H:%M:%S'), + 'expver': '1', + 'levelist': '1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/42/43/44/45/46/47/48/49/50/51/52/53/54/55/56/57/58/59/60/61/62/63/64/65/66/67/68/69/70/71/72/73/74/75/76/77/78/79/80/81/82/83/84/85/86/87/88/89/90/91/92/93/94/95/96/97/98/99/100/101/102/103/104/105/106/107/108/109/110/111/112/113/114/115/116/117/118/119/120/121/122/123/124/125/126/127/128/129/130/131/132/133/134/135/136/137', + 'levtype': 'ml', + 'param': '75/76/130/131/132/133/135/246/247', + 'stream': 'oper', + 'type': 'an', + 'grid': '1.0/1.0', + }, 'era5_ml_nudging.grib') + + c.retrieve( + 'reanalysis-era5-single-levels', + { + 'product_type': 'reanalysis', + 'param': '129/134', + 'date': date.strftime('%Y-%m-%d'), + 'time': date.strftime('%H:%M:%S'), + 'grid': '1.0/1.0', + }, + 'era5_surf_nudging.grib') + + shutil.move('era5_ml_nudging.grib', os.path.join(dir2move, 'era5_ml_nudging.grib')) + shutil.move('era5_surf_nudging.grib', os.path.join(dir2move, 'era5_surf_nudging.grib')) \ No newline at end of file diff --git a/jobs/tools/interpolate_data.py b/jobs/tools/interpolate_data.py new file mode 100644 index 00000000..77a3e9d8 --- /dev/null +++ b/jobs/tools/interpolate_data.py @@ -0,0 +1,189 @@ +import xarray as xr +import numpy as np +import os +import scipy + +from .constants import * + +def vertical_interp(pres_in, pres_out): + nvertin, nptsin = pres_in.shape + nvertout, nptsout = pres_out.shape + + # Initializing index mesh for scipy.griddata + indexin = np.array((nvertin + 2) * [list(range(nptsin))]) + indexout = np.array(nvertout * [list(range(nptsout))]) + + levmeshin = np.array(nptsin * [list(range(-1, nvertin + 1))]).T + levin = levmeshin.flatten() + + eps = max(np.ptp(pres_in), np.ptp(pres_out)) / min(nvertin, nvertout) / 10 + pin = np.concatenate( + [ + max(pres_in.max(), pres_out.max()) * np.ones((1, nptsin)) + eps, + pres_in, + min(pres_in.min(), pres_out.min()) * np.ones((1, nptsout)) - eps, + ], + axis=0, + ).flatten() + pout = pres_out.flatten() + + # Aggegating points in scipy.griddata format + points_in = np.array([indexin.flatten(), pin]).T + points_out = np.array([indexout.flatten(), pout]).T + + # Retrieving location of ak levels versus model levels + levout = scipy.interpolate.griddata(points_in, levin, points_out) + levout = levout.reshape((-1, nptsout)) + + # Getting interpolation coefficients + xlow = np.floor(levout).astype(int) + xhigh = xlow + 1 + + alphahigh = levout - xlow + alphalow = 1 - alphahigh + + # Cropping outside pres_in + toolow = xlow <= 0 + toohigh = xhigh >= nvertin - 1 + + xlow[toolow] = 0 + xhigh[toohigh] = nvertin - 1 + + alphalow[toolow] = 1 + alphahigh[toolow] = 0 + alphalow[toohigh] = 0 + alphahigh[toohigh] = 1 + + return xlow, xhigh, alphalow, alphahigh + + +def compute_pmid_era5(ds_era): + + temp = ds_era['T'] + psurf = ds_era['PS'] + ap = ds_era['hyai'] + bp = ds_era['hybi'] + skelet = xr.ones_like(temp) + skelet_alt = skelet.isel(time=0, ncells=0) + ap_bot = xr.ones_like(skelet) * (ap[:-1].values * skelet_alt) + bp_bot = xr.ones_like(skelet) * (bp[:-1].values * skelet_alt) + ap_top = xr.ones_like(skelet) * (ap[1:].values * skelet_alt) + bp_top = xr.ones_like(skelet) * (bp[1:].values * skelet_alt) + + pbot = ap_bot + bp_bot * psurf + ptop = ap_top + bp_top * psurf + + pmid = 0.5 * (pbot + ptop) + + return pmid + + +def compute_pmid_transcom(field, ap, bp, psurf): + skelet = xr.DataArray(np.ones(field.shape), + dims=['LEVEL', 'ncells'], + coords=[field['LEVEL'], np.arange(5120)]) + skelet_alt = skelet.isel(ncells=0) + ap_bot = xr.ones_like(skelet) * (ap[:-1].values * skelet_alt) + bp_bot = xr.ones_like(skelet) * (bp[:-1].values * skelet_alt) + ap_top = xr.ones_like(skelet) * (ap[1:].values * skelet_alt) + bp_top = xr.ones_like(skelet) * (bp[1:].values * skelet_alt) + + pbot = ap_bot + bp_bot * psurf + ptop = ap_top + bp_top * psurf + + pmid = 0.5 * (pbot + ptop) + + return pmid + +def create_oh_for_restart(cfg, month, ext_restart): + + ds_restart = xr.open_dataset(cfg.restart_filename_scratch) + nlevels = 65 + + ds = xr.open_dataset(cfg.OH_MOLEC_FILENAME) + oh = ds['OH'][month - 1] + pres_surf = ds['PSURF'][month - 1] + pmid_transcom = compute_pmid_transcom(oh, ds['A'], ds['B'], pres_surf) + + exner_icon = ds_restart['exner' + ext_restart] + rho_icon = ds_restart['rho' + ext_restart] + qv_icon = ds_restart['qv' + ext_restart] + pmid_icon = 100000 * np.power(exner_icon, 3.5) + + oh_regrid = xr.zeros_like(pmid_icon) + oh_regrid['cells'] = np.arange(len(oh_regrid.cells)) + + oh_regrid = oh_regrid.stack(stack=["time", "cells"]) + oh = oh.stack(stack=["ncells"]) + pmid_icon = pmid_icon.stack(stack=["time", "cells"]) + pmid_transcom = pmid_transcom.stack(stack=["ncells"]) + + nchunks = 20 + npixels = pmid_transcom.shape[1] + chunks = np.linspace(0, npixels, num=nchunks, dtype=int) + for i, (k1, k2) in enumerate(zip(chunks[:-1], chunks[1:])): + pres_in = np.log(pmid_transcom[:, k1:k2]) + pres_out = np.log(pmid_icon[:, k1:k2]) + + xlow, xhigh, alphalow, alphahigh = vertical_interp(pres_in.values, pres_out.values) + ycoord = np.array(nlevels * [list(range(k2 - k1))]) + oh_chunk = oh.values[:, k1:k2] + oh_regrid[:, k1:k2] = alphalow * oh_chunk[xlow, ycoord] + alphahigh * oh_chunk[xhigh, ycoord] + + oh_regrid = oh_regrid.unstack() + oh_regrid = oh_regrid.transpose('time', 'layers_{}'.format(nlevels), 'cells') + + M_moistair = M_DRYAIR * M_WATER / (qv_icon * M_DRYAIR + (1 - qv_icon) * M_WATER) + oh_regrid = oh_regrid * M_moistair.data / (N_AVO * 1e-6 * rho_icon.data) + + ds_restart['TROH' + ext_restart] = exner_icon.copy() + ds_restart['TROH' + ext_restart][:] = oh_regrid.data + + os.remove(cfg.restart_filename_scratch) + ds_restart.to_netcdf(cfg.restart_filename_scratch) + + +def create_oh_for_inicond(cfg, month): + + ds_inicond = xr.open_dataset(cfg.inicond_filename_scratch) + pmid_era5 = compute_pmid_era5(ds_inicond) + temp_era5 = ds_inicond['T'] + nlevels = len(temp_era5.lev) + + ds = xr.open_dataset(cfg.OH_MOLEC_FILENAME) + oh = ds['OH'][month - 1] + pres_surf = ds['PSURF'][month - 1] + pmid_transcom = compute_pmid_transcom(oh, ds['A'], ds['B'], pres_surf) + + oh_regrid = xr.zeros_like(pmid_era5) + oh_regrid['ncells'] = np.arange(len(oh_regrid.ncells)) + + oh_regrid = oh_regrid.stack(stack=["time", "ncells"]) + oh = oh.stack(stack=["ncells"]) + pmid_era5 = pmid_era5.stack(stack=["time", "ncells"]) + pmid_transcom = pmid_transcom.stack(stack=["ncells"]) + + nchunks = 20 + npixels = pmid_transcom.shape[1] + chunks = np.linspace(0, npixels, num=nchunks, dtype=int) + for i, (k1, k2) in enumerate(zip(chunks[:-1], chunks[1:])): + pres_in = np.log(pmid_transcom[:, k1:k2]) + pres_out = np.log(pmid_era5[:, k1:k2]) + + xlow, xhigh, alphalow, alphahigh = vertical_interp(pres_in.values, pres_out.values) + ycoord = np.array(nlevels * [list(range(k2 - k1))]) + oh_chunk = oh.values[:, k1:k2] + oh_regrid[:, k1:k2] = alphalow * oh_chunk[xlow, ycoord] + alphahigh * oh_chunk[xhigh, ycoord] + + oh_regrid = oh_regrid.unstack() + oh_regrid = oh_regrid.transpose('time', 'lev', 'ncells') + # oh_regrid = oh_regrid * temp_era5.data * R_GAS / (N_AVO * 1e-6 * pmid_era5.data) + oh_regrid = oh_regrid * temp_era5.data * R_GAS / (N_AVO * 1e-6 * pmid_era5.data) + + pmid_era5 = pmid_era5.unstack() + pmid_era5 = pmid_era5.transpose('time', 'lev', 'ncells') + ds_inicond['TROH'] = pmid_era5.copy() + ds_inicond['TROH'][:] = oh_regrid.data + + os.remove(cfg.inicond_filename_scratch) + ds_inicond.to_netcdf(cfg.inicond_filename_scratch) \ No newline at end of file From d70245ef90b575521b7380da903669d7bdc24cb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 31 May 2023 16:00:29 +0200 Subject: [PATCH 017/108] First work on prepare_data job for global simulations --- jobs/prepare_data.py | 8 ++++++-- jobs/tools/__init__.py | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index 37c86f5d..c3db425e 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -31,7 +31,9 @@ from datetime import timedelta import xarray from . import tools - +from .tools.interpolate_data import create_oh_for_restart, create_oh_for_inicond +from .tools.fetch_external_data import fetch_era5, fetch_era5_nudging +from calendar import monthrange def main(starttime, hstart, hstop, cfg): """ @@ -76,7 +78,7 @@ def main(starttime, hstart, hstop, cfg): """ if cfg.target is tools.Target.ICON or cfg.target is tools.Target.ICONART or \ - cfg.target is tools.Target.ICONARTOEM: + cfg.target is tools.Target.ICONARTOEM or cfg.target is tools.Target.ICONARTGLOBAL: logging.info('ICON input data (IC/BC)') @@ -136,6 +138,8 @@ def main(starttime, hstart, hstop, cfg): cfg.pntSrc_xml_filename_scratch, output_log=True) + if cfg.target is tools.Target.ICONART or cfg.target is tools.Target.ICONARTOEM: + if cfg.target is tools.Target.ICONARTOEM: tools.copy_file( os.path.join(cfg.oae_dir, cfg.oae_gridded_emissions_nc), diff --git a/jobs/tools/__init__.py b/jobs/tools/__init__.py index f44c86ba..14049f06 100644 --- a/jobs/tools/__init__.py +++ b/jobs/tools/__init__.py @@ -269,6 +269,7 @@ class Target(Enum): ICON = auto() ICONART = auto() ICONARTOEM = auto() + ICONARTGLOBAL = auto() class Subtarget(Enum): @@ -283,6 +284,7 @@ class Subtarget(Enum): 'icon': Target.ICON, 'icon-art': Target.ICONART, 'icon-art-oem': Target.ICONARTOEM, + 'icon-art-global': Target.ICONARTGLOBAL, 'none': Subtarget.NONE, 'spinup': Subtarget.SPINUP, } From acfc7af704ebf08fd144caaaef5f5d375eb8ede6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Fri, 2 Jun 2023 13:31:38 +0200 Subject: [PATCH 018/108] Fix cosmo executable --- cases/cosmo-ghg-11km-test/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cases/cosmo-ghg-11km-test/config.py b/cases/cosmo-ghg-11km-test/config.py index 30588c36..938625e6 100644 --- a/cases/cosmo-ghg-11km-test/config.py +++ b/cases/cosmo-ghg-11km-test/config.py @@ -148,8 +148,8 @@ # SIMULATION ================================================================= # COSMO ---------------------------------------------------------------------- # Executable -cosmo_bin = os.path.join(chain_src_dir, 'src', 'cosmo-ghg', 'bin', - 'cosmo-ghg_gpu') +cosmo_bin = os.path.join(chain_src_dir, 'src', 'cosmo-ghg', 'cosmo', 'ACC', + 'cosmo_gpu') # Namelists and slurm runscript templates cosmo_namelist = '%s/cases/%s/cosmo_INPUT_' % (chain_src_dir, casename) From 25c7a719ec88593e5df290b95afce2cf8f615bae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Mon, 5 Jun 2023 09:25:13 +0200 Subject: [PATCH 019/108] Add checks for jenkins script --- jenkins/scripts/jenkins.sh | 42 ++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/jenkins/scripts/jenkins.sh b/jenkins/scripts/jenkins.sh index b84992b8..e6459829 100755 --- a/jenkins/scripts/jenkins.sh +++ b/jenkins/scripts/jenkins.sh @@ -3,27 +3,57 @@ set -e -x # Activate conda environment -conda activate proc-chain +#eval "$(conda shell.bash hook)" +#conda activate proc-chain # Setup spack -./jenkins/scripts/setup-spack.sh +if [[ -d src/spack-c2sm ]]; then + echo spack folder already exists - activating spack... + . src/spack-c2sm/setup-env.sh +else + echo building spack... + ./jenkins/scripts/setup-spack.sh +fi # Preparation -./get_data.sh +size=$(du -sb input | awk '{print $1}') +if [[ $size -gt 40000000000 ]]; then + echo input data already present - skipping download... +else + echo downloading input data... + ./get_data.sh +fi # Build int2lm -./jenkins/scripts/build_int2lm.sh +if [[ -f src/int2lm/test/testsuite/int2lm ]]; then + echo int2lm executable already exists - skipping build... +else + echo building int2lm... + ./jenkins/scripts/build_int2lm.sh +fi # Build COSMO-GHG -./jenkins/scripts/build_cosmo-ghg.sh +if [[ -f src/cosmo-ghg/cosmo/ACC/cosmo_gpu ]]; then + echo cosmo executable already exists - skipping build. +else + echo building cosmo... + ./jenkins/scripts/build_cosmo-ghg.sh +fi # Build ICON -./jenkins/scripts/build_icon.sh +if [[ -f src/icon/bin/icon ]]; then + echo icon executable already exists - skipping build. +else + echo building icon... + ./jenkins/scripts/build_icon.sh +fi # Test COSMO-GHG +echo running cosmo-ghg test case... python run_chain.py cosmo-ghg-11km-test 2015-01-01 0 24 -f # Test ICON +echo running icon test case... python run_chain.py icon-test 2018-01-01 0 24 -j prepare_data icon -f # Print success message From e9af479a9b5905e3385eb500bbef6f17e379a035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Mon, 5 Jun 2023 09:25:27 +0200 Subject: [PATCH 020/108] Fix icon exe --- cases/icon-test/config.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cases/icon-test/config.py b/cases/icon-test/config.py index 97e8380d..23f54730 100644 --- a/cases/icon-test/config.py +++ b/cases/icon-test/config.py @@ -84,8 +84,7 @@ with open(icon_spec_file, 'r') as file: icon_spec = file.read().rstrip() # Executable -icon_bin = os.popen('spack location -i ' + - icon_spec).read().strip() + '/bin/icon' +icon_bin = os.path.join(chain_src_dir, 'src', 'icon', 'bin', 'icon') # eccodes eccodes_dir = os.path.join(chain_src_dir, 'input', 'eccodes_definitions') From b7218deaecabaf099c3c0afda1ca45d19c24263a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Tue, 6 Jun 2023 16:35:45 +0200 Subject: [PATCH 021/108] Add check for cosmo case --- jenkins/scripts/jenkins.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/jenkins/scripts/jenkins.sh b/jenkins/scripts/jenkins.sh index e6459829..991d771b 100755 --- a/jenkins/scripts/jenkins.sh +++ b/jenkins/scripts/jenkins.sh @@ -3,8 +3,7 @@ set -e -x # Activate conda environment -#eval "$(conda shell.bash hook)" -#conda activate proc-chain +conda activate proc-chain # Setup spack if [[ -d src/spack-c2sm ]]; then @@ -49,8 +48,12 @@ else fi # Test COSMO-GHG -echo running cosmo-ghg test case... -python run_chain.py cosmo-ghg-11km-test 2015-01-01 0 24 -f +if [[ -f work/cosmo-ghg-11km-test/2015010112_-6_12/checkpoints/finished/post_cosmo ]]; then + echo cosmo-ghg test case already finished - skipping test. +else + echo running cosmo-ghg test case... + python run_chain.py cosmo-ghg-11km-test 2015-01-01 0 24 -f +fi # Test ICON echo running icon test case... From ff8fbb0a7c811b58310d10a86566424b3ca52ae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Tue, 6 Jun 2023 16:36:04 +0200 Subject: [PATCH 022/108] Install icontools with spack --- jenkins/scripts/setup-spack.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jenkins/scripts/setup-spack.sh b/jenkins/scripts/setup-spack.sh index 0b520c26..a42fec6f 100755 --- a/jenkins/scripts/setup-spack.sh +++ b/jenkins/scripts/setup-spack.sh @@ -20,3 +20,5 @@ git clone --depth 1 --recurse-submodules --shallow-submodules -b ${BRANCH} ${GIT . spack-c2sm/setup-env.sh popd +spack install icontools + From 151076f5ddb84687740cdd1908cf5e5be05ccf7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Tue, 6 Jun 2023 16:39:19 +0200 Subject: [PATCH 023/108] Fix icontools scripts (new spack) --- cases/icon-test/icontools_remap_00_lbc_runjob.cfg | 3 +-- cases/icon-test/icontools_remap_ic_runjob.cfg | 3 +-- cases/icon-test/icontools_remap_lbc_rest_runjob.cfg | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/cases/icon-test/icontools_remap_00_lbc_runjob.cfg b/cases/icon-test/icontools_remap_00_lbc_runjob.cfg index e3b56f76..107f61ea 100755 --- a/cases/icon-test/icontools_remap_00_lbc_runjob.cfg +++ b/cases/icon-test/icontools_remap_00_lbc_runjob.cfg @@ -17,8 +17,7 @@ set -x export ECCODES_DEFINITION_PATH={cfg.eccodes_dir}/definitions.edzw-2.12.5-2:{cfg.eccodes_dir}/definitions -module load cray-python -. /project/g110/spack/user/daint/spack/share/spack/setup-env.sh +. {cfg.chain_src_dir}/src/spack-c2sm/setup-env.sh spack load icontools #----------------------------------------------------------------------------- diff --git a/cases/icon-test/icontools_remap_ic_runjob.cfg b/cases/icon-test/icontools_remap_ic_runjob.cfg index 14f4e1ea..c169ff10 100755 --- a/cases/icon-test/icontools_remap_ic_runjob.cfg +++ b/cases/icon-test/icontools_remap_ic_runjob.cfg @@ -17,8 +17,7 @@ set -x export ECCODES_DEFINITION_PATH={cfg.eccodes_dir}/definitions.edzw-2.12.5-2:{cfg.eccodes_dir}/definitions -module load cray-python -. /project/g110/spack/user/daint/spack/share/spack/setup-env.sh +. {cfg.chain_src_dir}/src/spack-c2sm/setup-env.sh spack load icontools #----------------------------------------------------------------------------- diff --git a/cases/icon-test/icontools_remap_lbc_rest_runjob.cfg b/cases/icon-test/icontools_remap_lbc_rest_runjob.cfg index af38432d..5800e768 100755 --- a/cases/icon-test/icontools_remap_lbc_rest_runjob.cfg +++ b/cases/icon-test/icontools_remap_lbc_rest_runjob.cfg @@ -17,8 +17,7 @@ set -x export ECCODES_DEFINITION_PATH={cfg.eccodes_dir}/definitions.edzw-2.12.5-2:{cfg.eccodes_dir}/definitions -module load cray-python -. /project/g110/spack/user/daint/spack/share/spack/setup-env.sh +. {cfg.chain_src_dir}/src/spack-c2sm/setup-env.sh spack load icontools #----------------------------------------------------------------------------- From 314a47058e8fd5915d51ad12bb4100322a33dd10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Tue, 6 Jun 2023 16:44:27 +0200 Subject: [PATCH 024/108] Properly initialize conda within jenkins script --- jenkins/scripts/jenkins.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/jenkins/scripts/jenkins.sh b/jenkins/scripts/jenkins.sh index 991d771b..8dd9ecb0 100755 --- a/jenkins/scripts/jenkins.sh +++ b/jenkins/scripts/jenkins.sh @@ -3,6 +3,7 @@ set -e -x # Activate conda environment +eval "$(conda shell.bash hook)" conda activate proc-chain # Setup spack From 1414958b7fb205bf24adf84b513d2b5031840fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 7 Jun 2023 13:26:55 +0200 Subject: [PATCH 025/108] Add dask package to environment --- env/environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/env/environment.yml b/env/environment.yml index 0f9d3908..1522d925 100644 --- a/env/environment.yml +++ b/env/environment.yml @@ -16,3 +16,4 @@ dependencies: - sphinx - pillow - xarray + - dask From 14afc699d15c3dec7b0a41cbd01e5f6a8befe7a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 7 Jun 2023 13:33:09 +0200 Subject: [PATCH 026/108] Add namelist parameter to fix ICON case --- cases/icon-test/icon_runjob.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/cases/icon-test/icon_runjob.cfg b/cases/icon-test/icon_runjob.cfg index d18ac9b9..d385d867 100755 --- a/cases/icon-test/icon_runjob.cfg +++ b/cases/icon-test/icon_runjob.cfg @@ -321,6 +321,7 @@ cat > NAMELIST_NWP << EOF pat_len = 750.0 ! effective length scale of thermal surface patterns c_diff = 0.2 ! length scale factor for vertical diffusion of TKE rat_sea = 7.5 ! controls laminar resistance for sea surface + rlam_heat = 1.5 ltkesso = .TRUE. ! consider TKE-production by sub-grid SSO wakes frcsmot = 0.2 ! these 2 switches together apply vertical smoothing of the TKE source terms imode_frcsmot = 2 ! in the tropics (only), which reduces the moist bias in the tropical lower troposphere From 6ab58694d0afddec2ad28982d94e193a2faed9e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 7 Jun 2023 13:36:47 +0200 Subject: [PATCH 027/108] Only clone last commit for int2lm/cosmo/icon --- jenkins/scripts/build_cosmo-ghg.sh | 2 +- jenkins/scripts/build_icon.sh | 3 +-- jenkins/scripts/build_int2lm.sh | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/jenkins/scripts/build_cosmo-ghg.sh b/jenkins/scripts/build_cosmo-ghg.sh index c79071e8..027acc5a 100755 --- a/jenkins/scripts/build_cosmo-ghg.sh +++ b/jenkins/scripts/build_cosmo-ghg.sh @@ -21,7 +21,7 @@ pushd src rm -fr cosmo-ghg # Clone cosmo-ghg -git clone -b ${BRANCH} ${GIT_REMOTE} +git clone --depth 1 -b ${BRANCH} ${GIT_REMOTE} pushd cosmo-ghg spack devbuildcosmo cosmo @develop %nvhpc cosmo_target=gpu ^mpich%nvhpc popd diff --git a/jenkins/scripts/build_icon.sh b/jenkins/scripts/build_icon.sh index 2370a6bb..249d1f1a 100755 --- a/jenkins/scripts/build_icon.sh +++ b/jenkins/scripts/build_icon.sh @@ -21,9 +21,8 @@ pushd src rm -fr icon # Clone icon -git clone -b ${BRANCH} ${GIT_REMOTE} +git clone --depth 1 --recurse-submodules --shallow-submodules -b ${BRANCH} ${GIT_REMOTE} pushd icon - git submodule update --init --recursive spack env activate -p -d config/cscs/spack/v0.18.1.4/daint_cpu_nvhpc spack install -u build popd diff --git a/jenkins/scripts/build_int2lm.sh b/jenkins/scripts/build_int2lm.sh index 59b11299..2af403a3 100755 --- a/jenkins/scripts/build_int2lm.sh +++ b/jenkins/scripts/build_int2lm.sh @@ -21,7 +21,7 @@ pushd src rm -fr int2lm # Clone and build int2lm -git clone -b ${BRANCH} ${GIT_REMOTE} +git clone --depth 1 -b ${BRANCH} ${GIT_REMOTE} pushd int2lm spack dev-build int2lm @dev-build %nvhpc popd From 80a09d538cebc2a0cdda5592835e194dee9a4c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 14 Jun 2023 15:35:41 +0200 Subject: [PATCH 028/108] Convert variable names to lowercase --- cases/icon-art-global/config.py | 160 ++++++++++++++++---------------- 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/cases/icon-art-global/config.py b/cases/icon-art-global/config.py index 531ac5fc..9ad8a740 100644 --- a/cases/icon-art-global/config.py +++ b/cases/icon-art-global/config.py @@ -1,161 +1,161 @@ import os import logging import sys + """ -Configuration file for the 'icon-art' case with ICON-ART +Configuration file for the 'icon-art-global' case with ICON-ART """ # ----------------------------------------------------------- # GENERAL SETTINGS # ----------------------------------------------------------- -USER = os.environ['USER'] -COMPUTE_HOST = 'daint' -COMPUTE_QUEUE = 'debug' # 'normal' / 'debug' -CONSTRAINT = 'mc' # 'mc' / 'gpu' +user = os.environ['USER'] +compute_host = 'daint' +compute_queue = 'debug' # 'normal' / 'debug' +constraint = 'mc' # 'mc' / 'gpu' if os.path.exists(os.environ['HOME'] + '/.acct'): with open(os.environ['HOME'] + '/.acct', 'r') as file: - COMPUTE_ACCOUNT = file.read().rstrip() + compute_account = file.read().rstrip() else: - COMPUTE_ACCOUNT = os.popen("id -gn").read().splitlines()[0] + compute_account = os.popen("id -gn").read().splitlines()[0] # -- Model to run -TARGET = 'icon-art' +target = 'icon-art' # -- Number of tasks per node -NTASKS_PER_NODE = 36 if CONSTRAINT == 'mc' else 12 +ntasks_per_node = 36 if constraint == 'mc' else 12 # -- case name = pathname in cases/ -CASENAME = os.path.basename(os.path.dirname(os.path.realpath(__file__))) +casename = os.path.basename(os.path.dirname(os.path.realpath(__file__))) # -- Root directory of the sourcecode of the chain (where run_chain.py is) -CHAIN_SRC_DIR = os.getcwd() +chain_src_dir = os.getcwd() # -- Case directory -CASE_DIR = os.path.join(CHAIN_SRC_DIR, 'cases', CASENAME) +case_dir = os.path.join(chain_src_dir, 'cases', casename) + # ----------------------------------------------------------- # -- SIMULATION # ----------------------------------------------------------- # -- Root directory of the working space of the chain -WORK_DIR = os.path.join(CHAIN_SRC_DIR, 'work') +work_dir = os.path.join(chain_src_dir, 'work') # -- Executable -# ICON_BIN = os.path.join('/scratch/snx3000/jthanwer/spack-install/daint/icon/c2sm-master/gcc/qcndg6qwq6e5gfutwoycqmwf2m4lvg7g/', 'bin', 'icon') # -- eccodes, ocean, noart -# ICON_BIN = os.path.join('/scratch/snx3000/jthanwer/spack-install/daint/icon/c2sm-master/gcc/x6pisrz7umszlrpnazse3cuosdxt45kt/', 'bin', 'icon') # -- art -# ICON_BIN = os.path.join('/scratch/snx3000/jthanwer/icon-online-traj/cpu/', 'bin', 'icon') # -- online-traj, cpu+art, dev-build -ICON_BIN = os.path.join('/scratch/snx3000/jthanwer/icon/cpu/', 'bin', - 'icon') # +# icon_bin = os.path.join('/scratch/snx3000/jthanwer/spack-install/daint/icon/c2sm-master/gcc/qcndg6qwq6e5gfutwoycqmwf2m4lvg7g/', 'bin', 'icon') # -- eccodes, ocean, noart +# icon_bin = os.path.join('/scratch/snx3000/jthanwer/spack-install/daint/icon/c2sm-master/gcc/x6pisrz7umszlrpnazse3cuosdxt45kt/', 'bin', 'icon') # -- art +# icon_bin = os.path.join('/scratch/snx3000/jthanwer/icon-online-traj/cpu/', 'bin', 'icon') # -- online-traj, cpu+art, dev-build +icon_bin = os.path.join('/scratch/snx3000/jthanwer/icon/cpu/', 'bin', 'icon') # # -- Paths for namelists and slurm runscript templates -# ICON_RUNJOB = os.path.join(CASE_DIR, 'icon_runjob_withoutart.cfg') -ICON_RUNJOB = os.path.join(CASE_DIR, 'icon_runjob.cfg') -ICON_ERA5_INIJOB = os.path.join(CASE_DIR, 'icon_era5_inicond.sh') -ICON_ERA5_NUDGINGJOB = os.path.join(CASE_DIR, 'icon_era5_nudging.sh') -ICON_SPECIES_INIJOB = os.path.join(CASE_DIR, 'icon_species_inicond.sh') -ICON_SPECIES_NUDGINGJOB = os.path.join(CASE_DIR, 'icon_species_nudging.sh') +# icon_runjob = os.path.join(case_dir, 'icon_runjob_withoutart.cfg') +icon_runjob = os.path.join(case_dir, 'icon_runjob.cfg') +icon_era5_inijob = os.path.join(case_dir, 'icon_era5_inicond.sh') +icon_era5_nudgingjob = os.path.join(case_dir, 'icon_era5_nudging.sh') +icon_species_inijob = os.path.join(case_dir, 'icon_species_inicond.sh') +icon_species_nudgingjob = os.path.join(case_dir, 'icon_species_nudging.sh') # -- Number of hours simulated by one job / directory -RESTART_STEP = '1MS' # -- hours or Pandas frequency +restart_step = '1MS' # -- hours or Pandas frequency # -- Number of hours between two output data -OUTPUT_WRITING_STEP = 12 # -- TO MODIFY +output_writing_step = 12 # -- TO MODIFY # -- Initial conditios -ERA5_INICOND = False # -- TO MODIFY -SPECIES_INICOND = True -SPECIES2RESTART = ['TROH'] +era5_inicond = False # -- TO MODIFY +species_inicond = True +species2restart = ['TROH'] # -- Nudging (meteorological and tracers) -ERA5_GLOBAL_NUDGING = False -SPECIES_GLOBAL_NUDGING = False -SPECIES2NUDGE = [] -NUDGING_STEP = 12 +era5_global_nudging = False +species_global_nudging = False +species2nudge = [] +nudging_step = 12 # -- Online trajectories -ONLINE_TRAJ = True +online_traj = True # -- Walltimes and domain decomposition -if COMPUTE_QUEUE == "normal": - ICON_WALLTIME = "00:30:00" - ICON_NP_TOT = 2 +if compute_queue == "normal -elif COMPUTE_QUEUE == "debug": - ICON_WALLTIME = "00:30:00" - ICON_NP_TOT = 2 +": + icon_walltime = "00:30:00" + icon_np_tot = 2 + +elif compute_queue == "debug": + icon_walltime = "00:30:00" + icon_np_tot = 2 else: - logging.error("Unknown queue name: %s" % COMPUTE_QUEUE) + logging.error("Unknown queue name: %s" % compute_queue) sys.exit(1) # ----------------------------------------------------------- # -- INPUT DATA # ----------------------------------------------------------- -INPUT_ROOT = '/scratch/snx3000/jthanwer/DATA/ICON_INPUT/' -INPUT_ROOT_ICBC = os.path.join(INPUT_ROOT, 'ICBC') -INPUT_ROOT_GRID = os.path.join(INPUT_ROOT, 'GRIDS') -INPUT_ROOT_RAD = os.path.join(INPUT_ROOT, 'RAD') -INPUT_ROOT_OEM = os.path.join(INPUT_ROOT, 'OEM', 'SF6') -INPUT_ROOT_CHEMISTRY = os.path.join(INPUT_ROOT, 'CHEMISTRY', - 'OH_GCP2022_ORIGINAL') -INPUT_ROOT_TRACERS = os.path.join(INPUT_ROOT, 'XML/examples') -INPUT_ROOT_CONFIGS = os.path.join(INPUT_ROOT, 'CONFIGS') -INPUT_ROOT_ART = os.path.join(INPUT_ROOT, 'ART') +input_root = '/scratch/snx3000/jthanwer/DATA/ICON_INPUT/' +input_root_icbc = os.path.join(input_root, 'ICBC') +input_root_grid = os.path.join(input_root, 'GRIDS') +input_root_rad = os.path.join(input_root, 'RAD') +input_root_oem = os.path.join(input_root, 'OEM', 'SF6') +input_root_chemistry = os.path.join(input_root, 'CHEMISTRY', 'OH_GCP2022_ORIGINAL') +input_root_tracers = os.path.join(input_root, 'XML/examples') +input_root_configs = os.path.join(input_root, 'CONFIGS') +input_root_art = os.path.join(input_root, 'ART') # -- Initial conditions and boundary conditions -INICOND_FILENAME = '/scratch/snx3000/jthanwer/DATA/ICON_INPUT/ICBC/era2icon_R2B03_2022060200.nc' +inicond_filename = '/scratch/snx3000/jthanwer/DATA/ICON_INPUT/ICBC/era2icon_R2B03_2022060200.nc' # -- Grid -DYNAMICS_GRID_FILENAME = os.path.join(INPUT_ROOT_GRID, "iconR2B03-DOM01.nc") -EXTPAR_FILENAME = os.path.join(INPUT_ROOT_GRID, "extpar_iconR2B03-DOM01.nc") +dynamics_grid_filename = os.path.join(input_root_grid, "iconR2B03-DOM01.nc") +extpar_filename = os.path.join(input_root_grid, "extpar_iconR2B03-DOM01.nc") # -- Radiation -CLDOPT_FILENAME = os.path.join(INPUT_ROOT_RAD, 'ECHAM6_CldOptProps.nc') -LRTM_FILENAME = os.path.join(INPUT_ROOT_RAD, 'rrtmg_lw.nc') +cldopt_filename = os.path.join(input_root_rad, 'ECHAM6_CldOptProps.nc') +lrtm_filename = os.path.join(input_root_rad, 'rrtmg_lw.nc') # -- OEM -# OEM_EMIS_FILENAME = os.path.join(INPUT_ROOT_OEM, 'OEM_SF6_{year}.nc') -OEM_VERTPROF_FILENAME = os.path.join(INPUT_ROOT_OEM, 'vertical_profiles.nc') -OEM_HOUROFDAY_FILENAME = os.path.join(INPUT_ROOT_OEM, 'hourofday.nc') -OEM_DAYOFWEEK_FILENAME = os.path.join(INPUT_ROOT_OEM, 'dayofweek.nc') -OEM_MONTHOFYEAR_FILENAME = os.path.join(INPUT_ROOT_OEM, 'monthofyear.nc') +# oem_emis_filename = os.path.join(input_root_oem, 'OEM_SF6_{year}.nc') +oem_vertprof_filename = os.path.join(input_root_oem, 'vertical_profiles.nc') +oem_hourofday_filename = os.path.join(input_root_oem, 'hourofday.nc') +oem_dayofweek_filename = os.path.join(input_root_oem, 'dayofweek.nc') +oem_monthofyear_filename = os.path.join(input_root_oem, 'monthofyear.nc') # -- Chemistry (OH) -OH_MOLEC_FILENAME = os.path.join(INPUT_ROOT_CHEMISTRY, - 'oh_gcp2022_icongrid.nc') # -- TO MODIFY +oh_molec_filename = os.path.join(input_root_chemistry, 'oh_gcp2022_icongrid.nc') # -- TO MODIFY # -- ART -# PNTSRC_XML_FILENAME = os.path.join(INPUT_ROOT_TRACERS, 'chemistry_lt/point-sources.xml') -# BOUNDCOND_XML_FILENAME = os.path.join(INPUT_ROOT_TRACERS, 'boundary-conditions.xml') -# CHEMTRACER_XML_FILENAME = os.path.join(INPUT_ROOT_TRACERS, 'chemistry_lt/tracers.xml') +# pntsrc_xml_filename = os.path.join(input_root_tracers, 'chemistry_lt/point-sources.xml') +# boundcond_xml_filename = os.path.join(input_root_tracers, 'boundary-conditions.xml') +# chemtracer_xml_filename = os.path.join(input_root_tracers, 'chemistry_lt/tracers.xml') -PNTSRC_XML_FILENAME = os.path.join(INPUT_ROOT_CONFIGS, - 'CONFIG2/point-sources.xml') # -- TO MODIFY -BOUNDCOND_XML_FILENAME = os.path.join(INPUT_ROOT_TRACERS, - 'boundary-conditions.xml') -CHEMTRACER_XML_FILENAME = os.path.join(INPUT_ROOT_CONFIGS, - 'CONFIG2/tracers.xml') # -- TO MODIFY +pntsrc_xml_filename = os.path.join(input_root_configs, 'CONFIG2/point-sources.xml') # -- TO MODIFY +boundcond_xml_filename = os.path.join(input_root_tracers, 'boundary-conditions.xml') +chemtracer_xml_filename = os.path.join(input_root_configs, 'CONFIG2/tracers.xml') # -- TO MODIFY # -- Nudging -MAP_FILE_NUDGING = os.path.join(INPUT_ROOT_ICBC, 'map_file.nudging') +map_file_nudging = os.path.join(input_root_icbc, 'map_file.nudging') # -- Online trajectories -ONLINE_TRAJ_FILENAME = '/scratch/snx3000/jthanwer/DATA/ICON_INPUT/ONLINE_TRAJ/startf_traj_dom1.nc' -ONLINE_TRAJ_TABLE2MOMENT = '/scratch/snx3000/jthanwer/DATA/ICON_INPUT/ONLINE_TRAJ/dmin_wetgrowth_lookup.nc' +online_traj_filename = '/scratch/snx3000/jthanwer/DATA/ICON_INPUT/ONLINE_TRAJ/startf_traj_dom1.nc' +online_traj_table2moment = '/scratch/snx3000/jthanwer/DATA/ICON_INPUT/ONLINE_TRAJ/dmin_wetgrowth_lookup.nc' # ----------------------------------------------------------- # -- Additional settings derived from constants # ----------------------------------------------------------- -# -- Nudge type (global or nothing) -nudge_type = 2 if ERA5_GLOBAL_NUDGING else 0 +# -- Nudge type ( + +global or nothing) +nudge_type = 2 if era5_global_nudging else 0 # -- Time step for global nudging in seconds -nudging_step_seconds = NUDGING_STEP * 3600 +nudging_step_seconds = nudging_step * 3600 # -- Prescribed initial conditions for CH4, CO and/or OH -iart_init_gas = 4 if SPECIES_INICOND else 0 +iart_init_gas = 4 if species_inicond else 0 # -- Online trajectories -online_traj_scratch = '.TRUE.' if ONLINE_TRAJ else '.FALSE' +online_traj_scratch = '.TRUE.' if online_traj else '.FALSE.' \ No newline at end of file From a5003754f57acae0a40f14f2693058b89ecb2123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 14 Jun 2023 15:43:11 +0200 Subject: [PATCH 029/108] Change target and fix errors --- cases/icon-art-global/config.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/cases/icon-art-global/config.py b/cases/icon-art-global/config.py index 9ad8a740..1b063bb4 100644 --- a/cases/icon-art-global/config.py +++ b/cases/icon-art-global/config.py @@ -21,7 +21,7 @@ compute_account = os.popen("id -gn").read().splitlines()[0] # -- Model to run -target = 'icon-art' +target = 'icon-art-global' # -- Number of tasks per node ntasks_per_node = 36 if constraint == 'mc' else 12 @@ -78,9 +78,7 @@ online_traj = True # -- Walltimes and domain decomposition -if compute_queue == "normal - -": +if compute_queue == "normal": icon_walltime = "00:30:00" icon_np_tot = 2 @@ -146,9 +144,7 @@ # -- Additional settings derived from constants # ----------------------------------------------------------- -# -- Nudge type ( - -global or nothing) +# -- Nudge type (global or nothing) nudge_type = 2 if era5_global_nudging else 0 # -- Time step for global nudging in seconds From 37e70f618efa93f57fe0ffde9485436bf3c4ae7a Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 14 Jun 2023 13:43:46 +0000 Subject: [PATCH 030/108] GitHub Action: Apply Pep8-formatting --- cases/icon-art-global/config.py | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/cases/icon-art-global/config.py b/cases/icon-art-global/config.py index 1b063bb4..3489f0dd 100644 --- a/cases/icon-art-global/config.py +++ b/cases/icon-art-global/config.py @@ -1,7 +1,6 @@ import os import logging import sys - """ Configuration file for the 'icon-art-global' case with ICON-ART """ @@ -35,7 +34,6 @@ # -- Case directory case_dir = os.path.join(chain_src_dir, 'cases', casename) - # ----------------------------------------------------------- # -- SIMULATION # ----------------------------------------------------------- @@ -47,7 +45,8 @@ # icon_bin = os.path.join('/scratch/snx3000/jthanwer/spack-install/daint/icon/c2sm-master/gcc/qcndg6qwq6e5gfutwoycqmwf2m4lvg7g/', 'bin', 'icon') # -- eccodes, ocean, noart # icon_bin = os.path.join('/scratch/snx3000/jthanwer/spack-install/daint/icon/c2sm-master/gcc/x6pisrz7umszlrpnazse3cuosdxt45kt/', 'bin', 'icon') # -- art # icon_bin = os.path.join('/scratch/snx3000/jthanwer/icon-online-traj/cpu/', 'bin', 'icon') # -- online-traj, cpu+art, dev-build -icon_bin = os.path.join('/scratch/snx3000/jthanwer/icon/cpu/', 'bin', 'icon') # +icon_bin = os.path.join('/scratch/snx3000/jthanwer/icon/cpu/', 'bin', + 'icon') # # -- Paths for namelists and slurm runscript templates # icon_runjob = os.path.join(case_dir, 'icon_runjob_withoutart.cfg') @@ -58,13 +57,13 @@ icon_species_nudgingjob = os.path.join(case_dir, 'icon_species_nudging.sh') # -- Number of hours simulated by one job / directory -restart_step = '1MS' # -- hours or Pandas frequency +restart_step = '1MS' # -- hours or Pandas frequency # -- Number of hours between two output data -output_writing_step = 12 # -- TO MODIFY +output_writing_step = 12 # -- TO MODIFY # -- Initial conditios -era5_inicond = False # -- TO MODIFY +era5_inicond = False # -- TO MODIFY species_inicond = True species2restart = ['TROH'] @@ -99,7 +98,8 @@ input_root_grid = os.path.join(input_root, 'GRIDS') input_root_rad = os.path.join(input_root, 'RAD') input_root_oem = os.path.join(input_root, 'OEM', 'SF6') -input_root_chemistry = os.path.join(input_root, 'CHEMISTRY', 'OH_GCP2022_ORIGINAL') +input_root_chemistry = os.path.join(input_root, 'CHEMISTRY', + 'OH_GCP2022_ORIGINAL') input_root_tracers = os.path.join(input_root, 'XML/examples') input_root_configs = os.path.join(input_root, 'CONFIGS') input_root_art = os.path.join(input_root, 'ART') @@ -123,16 +123,20 @@ oem_monthofyear_filename = os.path.join(input_root_oem, 'monthofyear.nc') # -- Chemistry (OH) -oh_molec_filename = os.path.join(input_root_chemistry, 'oh_gcp2022_icongrid.nc') # -- TO MODIFY +oh_molec_filename = os.path.join(input_root_chemistry, + 'oh_gcp2022_icongrid.nc') # -- TO MODIFY # -- ART # pntsrc_xml_filename = os.path.join(input_root_tracers, 'chemistry_lt/point-sources.xml') # boundcond_xml_filename = os.path.join(input_root_tracers, 'boundary-conditions.xml') # chemtracer_xml_filename = os.path.join(input_root_tracers, 'chemistry_lt/tracers.xml') -pntsrc_xml_filename = os.path.join(input_root_configs, 'CONFIG2/point-sources.xml') # -- TO MODIFY -boundcond_xml_filename = os.path.join(input_root_tracers, 'boundary-conditions.xml') -chemtracer_xml_filename = os.path.join(input_root_configs, 'CONFIG2/tracers.xml') # -- TO MODIFY +pntsrc_xml_filename = os.path.join(input_root_configs, + 'CONFIG2/point-sources.xml') # -- TO MODIFY +boundcond_xml_filename = os.path.join(input_root_tracers, + 'boundary-conditions.xml') +chemtracer_xml_filename = os.path.join(input_root_configs, + 'CONFIG2/tracers.xml') # -- TO MODIFY # -- Nudging map_file_nudging = os.path.join(input_root_icbc, 'map_file.nudging') @@ -154,4 +158,4 @@ iart_init_gas = 4 if species_inicond else 0 # -- Online trajectories -online_traj_scratch = '.TRUE.' if online_traj else '.FALSE.' \ No newline at end of file +online_traj_scratch = '.TRUE.' if online_traj else '.FALSE.' From 9b6d6781dda4b15e09d10460da0e98af2b4d0e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 14 Jun 2023 16:10:00 +0200 Subject: [PATCH 031/108] Add everything to prepare_data job --- jobs/prepare_data.py | 389 ++++++++++++++++++++++++++++++------------- 1 file changed, 269 insertions(+), 120 deletions(-) diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index c3db425e..3ac8f24d 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -25,11 +25,12 @@ # 2021-11-12 Modified for ICON-ART-simulations (mjaehn) import os +import glob import logging import shutil import subprocess from datetime import timedelta -import xarray +import xarray as xr from . import tools from .tools.interpolate_data import create_oh_for_restart, create_oh_for_inicond from .tools.fetch_external_data import fetch_era5, fetch_era5_nudging @@ -83,6 +84,10 @@ def main(starttime, hstart, hstop, cfg): logging.info('ICON input data (IC/BC)') starttime_real = starttime + timedelta(hours=hstart) + time = starttime + timedelta(hours=hstart) + year = time.year + month = time.month + day = time.day #----------------------------------------------------- # Create directories @@ -127,7 +132,8 @@ def main(starttime, hstart, hstop, cfg): output_log=True) # Copy tracer data in case of ART - if cfg.target is tools.Target.ICONART or cfg.target is tools.Target.ICONARTOEM: + if cfg.target is tools.Target.ICONART or cfg.target is tools.Target.ICONARTOEM or\ + cfg.target is tools.Target.ICONARTGLOBAL: tools.create_dir(cfg.icon_input_xml, "icon_input_xml") if hasattr(cfg, 'chemtracer_xml_filename'): tools.copy_file(cfg.chemtracer_xml_filename, @@ -138,8 +144,150 @@ def main(starttime, hstart, hstop, cfg): cfg.pntSrc_xml_filename_scratch, output_log=True) - if cfg.target is tools.Target.ICONART or cfg.target is tools.Target.ICONARTOEM: + # Copy data for global ICON-ART + if cfg.target is tools.Target.ICONARTGLOBAL: + if hasattr(cfg, 'boundcond_xml_filename'): + tools.copy_file(cfg.boundcond_xml_filename, + cfg.boundcond_xml_filename_scratch, + output_log=True) + + # -- Copy nudging data + if cfg.era5_global_nudging: + tools.copy_file(cfg.map_file_nudging, + cfg.map_file_nudging_scratch, + output_log=True) + + # -- Copy ART files + if hasattr(cfg, 'input_root_art'): + list_files = glob.glob(os.path.join(cfg.input_root_art, '*')) + for file in list_files: + tools.copy_file(file, cfg.icon_work) + + # -- Copy Online-Trajectories files + if cfg.online_traj: + tools.copy_file(cfg.online_traj_filename, + cfg.online_traj_filename_scratch, + output_log=True) + tools.copy_file(cfg.online_traj_table2moment, + cfg.icon_work) + + # -- If not, download ERA5 data and create the inicond file + if cfg.era5_inicond and cfg.lrestart == '.FALSE.': + # -- Fetch ERA5 data + fetch_era5(starttime + timedelta(hours=hstart), cfg.icon_input_icbc) + + # -- Copy ERA5 processing script (icon_era5_inicond.job) in workdir + with open(cfg.icon_era5_inijob) as input_file: + to_write = input_file.read() + output_file = os.path.join(cfg.icon_input_icbc, 'icon_era5_inicond.sh') + with open(output_file, "w") as outf: + outf.write(to_write.format(cfg=cfg)) + + # -- Copy mypartab in workdir + shutil.copy(os.path.join(os.path.dirname(cfg.icon_era5_inijob), 'mypartab'), os.path.join(cfg.icon_input_icbc, 'mypartab')) + + # -- Run ERA5 processing script + process = subprocess.Popen(["bash", os.path.join(cfg.icon_input_icbc, 'icon_era5_inicond.sh')], stdout=subprocess.PIPE) + process.communicate() + + # ----------------------------------------------------- + # Create tracer initial conditions + # ----------------------------------------------------- + + # -- Download and add CAMS data to the inicond file if needed + if cfg.species_inicond: + + if cfg.lrestart == '.FALSE.': + + ext_restart = '' + filename = cfg.inicond_filename_scratch + + # -- Copy the script for processing external tracer data in workdir + with open(cfg.icon_species_inijob) as input_file: + to_write = input_file.read() + output_file = os.path.join(cfg.icon_input_icbc, 'icon_species_inicond.sh') + with open(output_file, "w") as outf: + time = starttime + timedelta(hours=hstart) + outf.write(to_write.format(cfg=cfg, filename=filename, ext_restart=ext_restart, year=year, month=month, day=day)) + + # -- Run ERA5 processing script + process = subprocess.Popen(["bash", os.path.join(cfg.icon_input_icbc, 'icon_species_inicond.sh')], stdout=subprocess.PIPE) + process.communicate() + + # -- Create initial conditions for OH concentrations + if 'TROH' in cfg.species2restart: + create_oh_for_inicond(cfg, month) + + else: + + # -- Check the extension of tracer variables in the restart file + ds_restart = xr.open_dataset(cfg.restart_filename_scratch) + tracer_name = cfg.species2restart[0] + var_restart = [var for var in ds_restart.data_vars.keys() if var.startswith(tracer_name)][0] + ext_restart = var_restart.replace(tracer_name, '') + filename = cfg.restart_filename_scratch + + # -- Change OH concentrations in the restart file + if 'TROH' in cfg.species2restart: + create_oh_for_restart(cfg, month, ext_restart) + + + # ----------------------------------------------------- + # Create meteorological and tracer nudging conditions + # ----------------------------------------------------- + + # -- If global nudging, download and process ERA5 and CAMS data + if cfg.era5_global_nudging: + + for time in tools.iter_hours(starttime, hstart, hstop, step=cfg.nudging_step): + # -- Give a name to the nudging file + timestr = time.strftime('%Y%m%d%H') + filename = 'era2icon_R2B03_{timestr}_nudging.nc'.format(timestr=timestr) + + # -- If initial time, copy the initial conditions to be used as boundary conditions + if time == starttime and cfg.era5_inicond: + shutil.copy(cfg.inicond_filename_scratch, os.path.join(cfg.icon_input_icbc, filename)) + continue + + # -- Fetch ERA5 data + fetch_era5_nudging(time, cfg.icon_input_icbc) + + # -- Copy ERA5 processing script (icon_era5_nudging.job) in workdir + with open(cfg.icon_era5_nudgingjob) as input_file: + to_write = input_file.read() + output_file = os.path.join(cfg.icon_input_icbc, 'icon_era5_nudging_{}.sh'.format(timestr)) + with open(output_file, "w") as outf: + outf.write(to_write.format(cfg=cfg, filename=filename)) + + # -- Copy mypartab in workdir + if not os.path.exists(os.path.join(cfg.icon_input_icbc, 'mypartab')): + shutil.copy(os.path.join(os.path.dirname(cfg.icon_era5_nudgingjob), 'mypartab'), os.path.join(cfg.icon_input_icbc, 'mypartab')) + + # -- Run ERA5 processing script + process = subprocess.Popen(["bash", os.path.join(cfg.icon_input_icbc, 'icon_era5_nudging_{}.sh'.format(timestr))], stdout=subprocess.PIPE) + process.communicate() + + if cfg.species_global_nudging: + + # -- Copy CAMS processing script (icon_cams_nudging.job) in workdir + with open(cfg.icon_species_nudgingjob) as input_file: + to_write = input_file.read() + output_file = os.path.join(cfg.icon_input_icbc, 'icon_cams_nudging_{}.sh'.format(timestr)) + with open(output_file, "w") as outf: + outf.write(to_write.format(cfg=cfg, filename=filename)) + + # -- Run ERA5 processing script + process = subprocess.Popen(["bash", os.path.join(cfg.icon_input_icbc, 'icon_cams_nudging_{}.sh'.format(timestr))], stdout=subprocess.PIPE) + process.communicate() + + # ----------------------------------------------------- + # Create symlink to the restart file if lrestart is True + # ----------------------------------------------------- + if cfg.lrestart == '.TRUE.': + os.symlink(cfg.restart_filename_scratch, os.path.join(cfg.icon_work, 'restart_atm_DOM01.nc')) + + # Copy data for ICON-ART-OEM if cfg.target is tools.Target.ICONARTOEM: tools.copy_file( os.path.join(cfg.oae_dir, cfg.oae_gridded_emissions_nc), @@ -171,108 +319,139 @@ def main(starttime, hstart, hstop, cfg): os.path.join(cfg.oae_dir, cfg.oae_ens_lambda_nc), cfg.oae_ens_lambda_nc_scratch) - #----------------------------------------------------- - # Get datafile lists for LBC (each at 00 UTC and others) - #----------------------------------------------------- - datafile_list = [] - datafile_list_rest = [] - datafile_list_chem = [] - for time in tools.iter_hours(starttime, hstart, hstop, cfg.meteo_inc): - meteo_file = os.path.join(cfg.icon_input_icbc, - time.strftime(cfg.meteo_nameformat)) - if cfg.target is tools.Target.ICONART or cfg.target is tools.Target.ICONARTOEM: - chem_file = os.path.join(cfg.icon_input_icbc, - time.strftime(cfg.chem_nameformat)) - datafile_list_chem.append(chem_file + cfg.chem_suffix) - if meteo_file.endswith('00'): - datafile_list.append(meteo_file + cfg.meteo_suffix) - else: - datafile_list_rest.append(meteo_file + cfg.meteo_suffix) - datafile_list = ' '.join([str(v) for v in datafile_list]) - datafile_list_rest = ' '.join([str(v) for v in datafile_list_rest]) - datafile_list_chem = ' '.join([str(v) for v in datafile_list_chem]) - - #----------------------------------------------------- - # Write and submit runscripts - #----------------------------------------------------- - for runscript in cfg.icontools_runjobs: - logfile = os.path.join(cfg.log_working_dir, 'prepare_data') - logfile_finish = os.path.join(cfg.log_finished_dir, 'prepare_data') - with open(os.path.join(cfg.case_dir, runscript)) as input_file: - to_write = input_file.read() - output_run = os.path.join(cfg.icon_work, "%s.job" % runscript) - with open(output_run, "w") as outf: - outf.write( - to_write.format(cfg=cfg, - logfile=logfile, - logfile_finish=logfile_finish, - datafile_list=datafile_list, - datafile_list_rest=datafile_list_rest, - datafile_list_chem=datafile_list_chem)) - exitcode = subprocess.call([ - "sbatch", "--wait", - os.path.join(cfg.icon_work, "%s.job" % runscript) - ]) - if exitcode != 0: - raise RuntimeError( - "sbatch returned exitcode {}".format(exitcode)) - logging.info("%s successfully executed." % runscript) - - #----------------------------------------------------- - # Add GEOSP to all meteo files - #----------------------------------------------------- - for time in tools.iter_hours(starttime, hstart, hstop, cfg.meteo_inc): - src_file = os.path.join( - cfg.icon_input_icbc, - time.strftime(cfg.meteo_nameformat) + '_lbc.nc') - merged_file = os.path.join( - cfg.icon_input_icbc, - time.strftime(cfg.meteo_nameformat) + '_merged.nc') - ds = xarray.open_dataset(src_file) - # Load GEOSP-dataset as ds_geosp at time 00: - if (time.hour == 0): - da_geosp = ds['GEOSP'] - # Merge GEOSP-dataset with other timesteps - elif (time.hour != 0): - # Change values of time dimension to current time - da_geosp = da_geosp.assign_coords(time=[time]) - # Merge GEOSP into temporary file - ds_merged = xarray.merge([ds, da_geosp]) - ds_merged.attrs = ds.attrs - ds_merged.to_netcdf(merged_file) - # Rename file to get original file name - tools.rename_file(merged_file, src_file) - logging.info("Added GEOSP to file {}".format(merged_file)) + if cfg.target is not tools.Target.ICONARTGLOBAL: + #----------------------------------------------------- + # Get datafile lists for LBC (each at 00 UTC and others) + #----------------------------------------------------- + datafile_list = [] + datafile_list_rest = [] + datafile_list_chem = [] + for time in tools.iter_hours(starttime, hstart, hstop, cfg.meteo_inc): + meteo_file = os.path.join(cfg.icon_input_icbc, + time.strftime(cfg.meteo_nameformat)) + if cfg.target is tools.Target.ICONART or cfg.target is tools.Target.ICONARTOEM: + chem_file = os.path.join(cfg.icon_input_icbc, + time.strftime(cfg.chem_nameformat)) + datafile_list_chem.append(chem_file + cfg.chem_suffix) + if meteo_file.endswith('00'): + datafile_list.append(meteo_file + cfg.meteo_suffix) + else: + datafile_list_rest.append(meteo_file + cfg.meteo_suffix) + datafile_list = ' '.join([str(v) for v in datafile_list]) + datafile_list_rest = ' '.join([str(v) for v in datafile_list_rest]) + datafile_list_chem = ' '.join([str(v) for v in datafile_list_chem]) + + #----------------------------------------------------- + # Write and submit runscripts + #----------------------------------------------------- + for runscript in cfg.icontools_runjobs: + logfile = os.path.join(cfg.log_working_dir, 'prepare_data') + logfile_finish = os.path.join(cfg.log_finished_dir, 'prepare_data') + with open(os.path.join(cfg.case_dir, runscript)) as input_file: + to_write = input_file.read() + output_run = os.path.join(cfg.icon_work, "%s.job" % runscript) + with open(output_run, "w") as outf: + outf.write( + to_write.format(cfg=cfg, + logfile=logfile, + logfile_finish=logfile_finish, + datafile_list=datafile_list, + datafile_list_rest=datafile_list_rest, + datafile_list_chem=datafile_list_chem)) + exitcode = subprocess.call([ + "sbatch", "--wait", + os.path.join(cfg.icon_work, "%s.job" % runscript) + ]) + if exitcode != 0: + raise RuntimeError( + "sbatch returned exitcode {}".format(exitcode)) + logging.info("%s successfully executed." % runscript) + + #----------------------------------------------------- + # Add GEOSP to all meteo files + #----------------------------------------------------- + for time in tools.iter_hours(starttime, hstart, hstop, cfg.meteo_inc): + src_file = os.path.join( + cfg.icon_input_icbc, + time.strftime(cfg.meteo_nameformat) + '_lbc.nc') + merged_file = os.path.join( + cfg.icon_input_icbc, + time.strftime(cfg.meteo_nameformat) + '_merged.nc') + ds = xr.open_dataset(src_file) + # Load GEOSP-dataset as ds_geosp at time 00: + if (time.hour == 0): + da_geosp = ds['GEOSP'] + # Merge GEOSP-dataset with other timesteps + elif (time.hour != 0): + # Change values of time dimension to current time + da_geosp = da_geosp.assign_coords(time=[time]) + # Merge GEOSP into temporary file + ds_merged = xr.merge([ds, da_geosp]) + ds_merged.attrs = ds.attrs + ds_merged.to_netcdf(merged_file) + # Rename file to get original file name + tools.rename_file(merged_file, src_file) + logging.info("Added GEOSP to file {}".format(merged_file)) + + #----------------------------------------------------- + # In case of OEM: merge chem tracers with meteo-files + #----------------------------------------------------- + if cfg.target is tools.Target.ICONARTOEM: + for time in tools.iter_hours(starttime, hstart, hstop, + cfg.meteo_inc): + if time == starttime: + #------------ + # Merge IC: + #------------ + meteo_file = os.path.join( + cfg.icon_input_icbc, + time.strftime(cfg.meteo_nameformat) + '.nc') + chem_file = os.path.join( + cfg.icon_input_icbc, + time.strftime(cfg.chem_nameformat) + '.nc') + merged_file = os.path.join( + cfg.icon_input_icbc, + time.strftime(cfg.meteo_nameformat) + '_merged.nc') + ds_meteo = xr.open_dataset(meteo_file) + ds_chem = xr.open_dataset(chem_file) + # LNPS --> PS + ds_chem['PS'] = ds_chem['LNPS'] + ds_chem['PS'].attrs = ds_chem['LNPS'].attrs + ds_chem['PS'] = ds_chem['PS'].squeeze(dim='lev_2') + ds_chem['PS'].attrs["long_name"] = 'surface pressure' + # merge: + ds_merged = xr.merge([ds_meteo, ds_chem], + compat="override") + #ds_merged.attrs = ds.attrs + ds_merged.to_netcdf(merged_file) + # Rename file to get original file name + tools.rename_file(merged_file, meteo_file) + tools.remove_file(chem_file) + logging.info( + "Added chemical tracer to file {}".format(merged_file)) - #----------------------------------------------------- - # In case of OEM: merge chem tracers with meteo-files - #----------------------------------------------------- - if cfg.target is tools.Target.ICONARTOEM: - for time in tools.iter_hours(starttime, hstart, hstop, - cfg.meteo_inc): - if time == starttime: #------------ - # Merge IC: + # Merge LBC: #------------ meteo_file = os.path.join( cfg.icon_input_icbc, - time.strftime(cfg.meteo_nameformat) + '.nc') + time.strftime(cfg.meteo_nameformat) + '_lbc.nc') chem_file = os.path.join( cfg.icon_input_icbc, - time.strftime(cfg.chem_nameformat) + '.nc') + time.strftime(cfg.chem_nameformat) + '_lbc.nc') merged_file = os.path.join( cfg.icon_input_icbc, time.strftime(cfg.meteo_nameformat) + '_merged.nc') - ds_meteo = xarray.open_dataset(meteo_file) - ds_chem = xarray.open_dataset(chem_file) + ds_meteo = xr.open_dataset(meteo_file) + ds_chem = xr.open_dataset(chem_file) # LNPS --> PS ds_chem['PS'] = ds_chem['LNPS'] ds_chem['PS'].attrs = ds_chem['LNPS'].attrs - ds_chem['PS'] = ds_chem['PS'].squeeze(dim='lev_2') ds_chem['PS'].attrs["long_name"] = 'surface pressure' + ds_chem['TRCH4_chemtr'] = ds_chem['CH4_BG'] # merge: - ds_merged = xarray.merge([ds_meteo, ds_chem], - compat="override") + ds_merged = xr.merge([ds_meteo, ds_chem], + compat="override") #ds_merged.attrs = ds.attrs ds_merged.to_netcdf(merged_file) # Rename file to get original file name @@ -281,36 +460,6 @@ def main(starttime, hstart, hstop, cfg): logging.info( "Added chemical tracer to file {}".format(merged_file)) - #------------ - # Merge LBC: - #------------ - meteo_file = os.path.join( - cfg.icon_input_icbc, - time.strftime(cfg.meteo_nameformat) + '_lbc.nc') - chem_file = os.path.join( - cfg.icon_input_icbc, - time.strftime(cfg.chem_nameformat) + '_lbc.nc') - merged_file = os.path.join( - cfg.icon_input_icbc, - time.strftime(cfg.meteo_nameformat) + '_merged.nc') - ds_meteo = xarray.open_dataset(meteo_file) - ds_chem = xarray.open_dataset(chem_file) - # LNPS --> PS - ds_chem['PS'] = ds_chem['LNPS'] - ds_chem['PS'].attrs = ds_chem['LNPS'].attrs - ds_chem['PS'].attrs["long_name"] = 'surface pressure' - ds_chem['TRCH4_chemtr'] = ds_chem['CH4_BG'] - # merge: - ds_merged = xarray.merge([ds_meteo, ds_chem], - compat="override") - #ds_merged.attrs = ds.attrs - ds_merged.to_netcdf(merged_file) - # Rename file to get original file name - tools.rename_file(merged_file, meteo_file) - tools.remove_file(chem_file) - logging.info( - "Added chemical tracer to file {}".format(merged_file)) - # If COSMO (and not ICON): else: logging.info('COSMO analysis data for IC/BC') From f821740a1d037fed968de0f133ae2d1cadfef285 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 14 Jun 2023 14:11:33 +0000 Subject: [PATCH 032/108] GitHub Action: Apply Pep8-formatting --- jobs/prepare_data.py | 127 ++++++++++++++++------- jobs/tools/constants.py | 7 +- jobs/tools/fetch_external_data.py | 74 ++++++------- jobs/tools/interpolate_data.py | 166 ++++++++++++++++-------------- 4 files changed, 221 insertions(+), 153 deletions(-) diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index 3ac8f24d..f9d54bad 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -36,6 +36,7 @@ from .tools.fetch_external_data import fetch_era5, fetch_era5_nudging from calendar import monthrange + def main(starttime, hstart, hstop, cfg): """ **ICON** (if ``cfg.target`` is ``tools.Target.ICON``) @@ -86,7 +87,7 @@ def main(starttime, hstart, hstop, cfg): starttime_real = starttime + timedelta(hours=hstart) time = starttime + timedelta(hours=hstart) year = time.year - month = time.month + month = time.month day = time.day #----------------------------------------------------- @@ -168,26 +169,34 @@ def main(starttime, hstart, hstop, cfg): tools.copy_file(cfg.online_traj_filename, cfg.online_traj_filename_scratch, output_log=True) - tools.copy_file(cfg.online_traj_table2moment, - cfg.icon_work) - + tools.copy_file(cfg.online_traj_table2moment, cfg.icon_work) + # -- If not, download ERA5 data and create the inicond file if cfg.era5_inicond and cfg.lrestart == '.FALSE.': # -- Fetch ERA5 data - fetch_era5(starttime + timedelta(hours=hstart), cfg.icon_input_icbc) + fetch_era5(starttime + timedelta(hours=hstart), + cfg.icon_input_icbc) # -- Copy ERA5 processing script (icon_era5_inicond.job) in workdir with open(cfg.icon_era5_inijob) as input_file: to_write = input_file.read() - output_file = os.path.join(cfg.icon_input_icbc, 'icon_era5_inicond.sh') + output_file = os.path.join(cfg.icon_input_icbc, + 'icon_era5_inicond.sh') with open(output_file, "w") as outf: outf.write(to_write.format(cfg=cfg)) # -- Copy mypartab in workdir - shutil.copy(os.path.join(os.path.dirname(cfg.icon_era5_inijob), 'mypartab'), os.path.join(cfg.icon_input_icbc, 'mypartab')) + shutil.copy( + os.path.join(os.path.dirname(cfg.icon_era5_inijob), + 'mypartab'), + os.path.join(cfg.icon_input_icbc, 'mypartab')) # -- Run ERA5 processing script - process = subprocess.Popen(["bash", os.path.join(cfg.icon_input_icbc, 'icon_era5_inicond.sh')], stdout=subprocess.PIPE) + process = subprocess.Popen([ + "bash", + os.path.join(cfg.icon_input_icbc, 'icon_era5_inicond.sh') + ], + stdout=subprocess.PIPE) process.communicate() # ----------------------------------------------------- @@ -205,13 +214,25 @@ def main(starttime, hstart, hstop, cfg): # -- Copy the script for processing external tracer data in workdir with open(cfg.icon_species_inijob) as input_file: to_write = input_file.read() - output_file = os.path.join(cfg.icon_input_icbc, 'icon_species_inicond.sh') + output_file = os.path.join(cfg.icon_input_icbc, + 'icon_species_inicond.sh') with open(output_file, "w") as outf: time = starttime + timedelta(hours=hstart) - outf.write(to_write.format(cfg=cfg, filename=filename, ext_restart=ext_restart, year=year, month=month, day=day)) + outf.write( + to_write.format(cfg=cfg, + filename=filename, + ext_restart=ext_restart, + year=year, + month=month, + day=day)) # -- Run ERA5 processing script - process = subprocess.Popen(["bash", os.path.join(cfg.icon_input_icbc, 'icon_species_inicond.sh')], stdout=subprocess.PIPE) + process = subprocess.Popen([ + "bash", + os.path.join(cfg.icon_input_icbc, + 'icon_species_inicond.sh') + ], + stdout=subprocess.PIPE) process.communicate() # -- Create initial conditions for OH concentrations @@ -220,10 +241,13 @@ def main(starttime, hstart, hstop, cfg): else: - # -- Check the extension of tracer variables in the restart file + # -- Check the extension of tracer variables in the restart file ds_restart = xr.open_dataset(cfg.restart_filename_scratch) tracer_name = cfg.species2restart[0] - var_restart = [var for var in ds_restart.data_vars.keys() if var.startswith(tracer_name)][0] + var_restart = [ + var for var in ds_restart.data_vars.keys() + if var.startswith(tracer_name) + ][0] ext_restart = var_restart.replace(tracer_name, '') filename = cfg.restart_filename_scratch @@ -231,7 +255,6 @@ def main(starttime, hstart, hstop, cfg): if 'TROH' in cfg.species2restart: create_oh_for_restart(cfg, month, ext_restart) - # ----------------------------------------------------- # Create meteorological and tracer nudging conditions # ----------------------------------------------------- @@ -239,15 +262,21 @@ def main(starttime, hstart, hstop, cfg): # -- If global nudging, download and process ERA5 and CAMS data if cfg.era5_global_nudging: - for time in tools.iter_hours(starttime, hstart, hstop, step=cfg.nudging_step): + for time in tools.iter_hours(starttime, + hstart, + hstop, + step=cfg.nudging_step): # -- Give a name to the nudging file timestr = time.strftime('%Y%m%d%H') - filename = 'era2icon_R2B03_{timestr}_nudging.nc'.format(timestr=timestr) + filename = 'era2icon_R2B03_{timestr}_nudging.nc'.format( + timestr=timestr) # -- If initial time, copy the initial conditions to be used as boundary conditions if time == starttime and cfg.era5_inicond: - shutil.copy(cfg.inicond_filename_scratch, os.path.join(cfg.icon_input_icbc, filename)) + shutil.copy( + cfg.inicond_filename_scratch, + os.path.join(cfg.icon_input_icbc, filename)) continue # -- Fetch ERA5 data @@ -256,16 +285,28 @@ def main(starttime, hstart, hstop, cfg): # -- Copy ERA5 processing script (icon_era5_nudging.job) in workdir with open(cfg.icon_era5_nudgingjob) as input_file: to_write = input_file.read() - output_file = os.path.join(cfg.icon_input_icbc, 'icon_era5_nudging_{}.sh'.format(timestr)) + output_file = os.path.join( + cfg.icon_input_icbc, + 'icon_era5_nudging_{}.sh'.format(timestr)) with open(output_file, "w") as outf: outf.write(to_write.format(cfg=cfg, filename=filename)) # -- Copy mypartab in workdir - if not os.path.exists(os.path.join(cfg.icon_input_icbc, 'mypartab')): - shutil.copy(os.path.join(os.path.dirname(cfg.icon_era5_nudgingjob), 'mypartab'), os.path.join(cfg.icon_input_icbc, 'mypartab')) + if not os.path.exists( + os.path.join(cfg.icon_input_icbc, 'mypartab')): + shutil.copy( + os.path.join( + os.path.dirname(cfg.icon_era5_nudgingjob), + 'mypartab'), + os.path.join(cfg.icon_input_icbc, 'mypartab')) # -- Run ERA5 processing script - process = subprocess.Popen(["bash", os.path.join(cfg.icon_input_icbc, 'icon_era5_nudging_{}.sh'.format(timestr))], stdout=subprocess.PIPE) + process = subprocess.Popen([ + "bash", + os.path.join(cfg.icon_input_icbc, + 'icon_era5_nudging_{}.sh'.format(timestr)) + ], + stdout=subprocess.PIPE) process.communicate() if cfg.species_global_nudging: @@ -273,19 +314,29 @@ def main(starttime, hstart, hstop, cfg): # -- Copy CAMS processing script (icon_cams_nudging.job) in workdir with open(cfg.icon_species_nudgingjob) as input_file: to_write = input_file.read() - output_file = os.path.join(cfg.icon_input_icbc, 'icon_cams_nudging_{}.sh'.format(timestr)) + output_file = os.path.join( + cfg.icon_input_icbc, + 'icon_cams_nudging_{}.sh'.format(timestr)) with open(output_file, "w") as outf: - outf.write(to_write.format(cfg=cfg, filename=filename)) + outf.write( + to_write.format(cfg=cfg, filename=filename)) # -- Run ERA5 processing script - process = subprocess.Popen(["bash", os.path.join(cfg.icon_input_icbc, 'icon_cams_nudging_{}.sh'.format(timestr))], stdout=subprocess.PIPE) + process = subprocess.Popen([ + "bash", + os.path.join( + cfg.icon_input_icbc, + 'icon_cams_nudging_{}.sh'.format(timestr)) + ], + stdout=subprocess.PIPE) process.communicate() # ----------------------------------------------------- # Create symlink to the restart file if lrestart is True # ----------------------------------------------------- if cfg.lrestart == '.TRUE.': - os.symlink(cfg.restart_filename_scratch, os.path.join(cfg.icon_work, 'restart_atm_DOM01.nc')) + os.symlink(cfg.restart_filename_scratch, + os.path.join(cfg.icon_work, 'restart_atm_DOM01.nc')) # Copy data for ICON-ART-OEM if cfg.target is tools.Target.ICONARTOEM: @@ -326,12 +377,14 @@ def main(starttime, hstart, hstop, cfg): datafile_list = [] datafile_list_rest = [] datafile_list_chem = [] - for time in tools.iter_hours(starttime, hstart, hstop, cfg.meteo_inc): + for time in tools.iter_hours(starttime, hstart, hstop, + cfg.meteo_inc): meteo_file = os.path.join(cfg.icon_input_icbc, - time.strftime(cfg.meteo_nameformat)) + time.strftime(cfg.meteo_nameformat)) if cfg.target is tools.Target.ICONART or cfg.target is tools.Target.ICONARTOEM: - chem_file = os.path.join(cfg.icon_input_icbc, - time.strftime(cfg.chem_nameformat)) + chem_file = os.path.join( + cfg.icon_input_icbc, + time.strftime(cfg.chem_nameformat)) datafile_list_chem.append(chem_file + cfg.chem_suffix) if meteo_file.endswith('00'): datafile_list.append(meteo_file + cfg.meteo_suffix) @@ -346,7 +399,8 @@ def main(starttime, hstart, hstop, cfg): #----------------------------------------------------- for runscript in cfg.icontools_runjobs: logfile = os.path.join(cfg.log_working_dir, 'prepare_data') - logfile_finish = os.path.join(cfg.log_finished_dir, 'prepare_data') + logfile_finish = os.path.join(cfg.log_finished_dir, + 'prepare_data') with open(os.path.join(cfg.case_dir, runscript)) as input_file: to_write = input_file.read() output_run = os.path.join(cfg.icon_work, "%s.job" % runscript) @@ -370,7 +424,8 @@ def main(starttime, hstart, hstop, cfg): #----------------------------------------------------- # Add GEOSP to all meteo files #----------------------------------------------------- - for time in tools.iter_hours(starttime, hstart, hstop, cfg.meteo_inc): + for time in tools.iter_hours(starttime, hstart, hstop, + cfg.meteo_inc): src_file = os.path.join( cfg.icon_input_icbc, time.strftime(cfg.meteo_nameformat) + '_lbc.nc') @@ -398,7 +453,7 @@ def main(starttime, hstart, hstop, cfg): #----------------------------------------------------- if cfg.target is tools.Target.ICONARTOEM: for time in tools.iter_hours(starttime, hstart, hstop, - cfg.meteo_inc): + cfg.meteo_inc): if time == starttime: #------------ # Merge IC: @@ -421,14 +476,14 @@ def main(starttime, hstart, hstop, cfg): ds_chem['PS'].attrs["long_name"] = 'surface pressure' # merge: ds_merged = xr.merge([ds_meteo, ds_chem], - compat="override") + compat="override") #ds_merged.attrs = ds.attrs ds_merged.to_netcdf(merged_file) # Rename file to get original file name tools.rename_file(merged_file, meteo_file) tools.remove_file(chem_file) - logging.info( - "Added chemical tracer to file {}".format(merged_file)) + logging.info("Added chemical tracer to file {}".format( + merged_file)) #------------ # Merge LBC: @@ -451,7 +506,7 @@ def main(starttime, hstart, hstop, cfg): ds_chem['TRCH4_chemtr'] = ds_chem['CH4_BG'] # merge: ds_merged = xr.merge([ds_meteo, ds_chem], - compat="override") + compat="override") #ds_merged.attrs = ds.attrs ds_merged.to_netcdf(merged_file) # Rename file to get original file name diff --git a/jobs/tools/constants.py b/jobs/tools/constants.py index ed292036..3f71060c 100644 --- a/jobs/tools/constants.py +++ b/jobs/tools/constants.py @@ -1,6 +1,5 @@ - -M_DRYAIR = 28.970e-3 # kg.mol-1 -M_WATER = 18.0154e-3 # kg.mol-1 -M_OH = 17.0080e-3 # kg.mol-1 +M_DRYAIR = 28.970e-3 # kg.mol-1 +M_WATER = 18.0154e-3 # kg.mol-1 +M_OH = 17.0080e-3 # kg.mol-1 N_AVO = 6.022e23 R_GAS = 8.314 # J.K-1.mol-1 diff --git a/jobs/tools/fetch_external_data.py b/jobs/tools/fetch_external_data.py index 5a5de38c..b3cfdc41 100644 --- a/jobs/tools/fetch_external_data.py +++ b/jobs/tools/fetch_external_data.py @@ -2,6 +2,7 @@ import shutil import cdsapi + def fetch_era5(date, dir2move): """Fetch ERA5 data from ECMWF for initial conditions @@ -23,18 +24,20 @@ def fetch_era5(date, dir2move): # -- CLWC : Specific cloud liquid water content - 246 # -- CIWC : Specific cloud ice water content - 247 - c.retrieve('reanalysis-era5-complete', { - 'class': 'ea', - 'date': date.strftime('%Y-%m-%d'), - 'time': date.strftime('%H:%M:%S'), - 'expver': '1', - 'levelist': '1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/42/43/44/45/46/47/48/49/50/51/52/53/54/55/56/57/58/59/60/61/62/63/64/65/66/67/68/69/70/71/72/73/74/75/76/77/78/79/80/81/82/83/84/85/86/87/88/89/90/91/92/93/94/95/96/97/98/99/100/101/102/103/104/105/106/107/108/109/110/111/112/113/114/115/116/117/118/119/120/121/122/123/124/125/126/127/128/129/130/131/132/133/134/135/136/137', - 'levtype': 'ml', - 'param': '75/76/130/131/132/133/135/246/247', - 'stream': 'oper', - 'type': 'an', - 'grid': '1.0/1.0', - }, 'era5_ml.grib') + c.retrieve( + 'reanalysis-era5-complete', { + 'class': 'ea', + 'date': date.strftime('%Y-%m-%d'), + 'time': date.strftime('%H:%M:%S'), + 'expver': '1', + 'levelist': + '1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/42/43/44/45/46/47/48/49/50/51/52/53/54/55/56/57/58/59/60/61/62/63/64/65/66/67/68/69/70/71/72/73/74/75/76/77/78/79/80/81/82/83/84/85/86/87/88/89/90/91/92/93/94/95/96/97/98/99/100/101/102/103/104/105/106/107/108/109/110/111/112/113/114/115/116/117/118/119/120/121/122/123/124/125/126/127/128/129/130/131/132/133/134/135/136/137', + 'levtype': 'ml', + 'param': '75/76/130/131/132/133/135/246/247', + 'stream': 'oper', + 'type': 'an', + 'grid': '1.0/1.0', + }, 'era5_ml.grib') # -- CI : Sea Ice Cover - 31 # -- ASN : Snow albedo - 32 @@ -58,15 +61,14 @@ def fetch_era5(date, dir2move): # -- TSN : Temperature of snow layer - 238 c.retrieve( - 'reanalysis-era5-single-levels', - { + 'reanalysis-era5-single-levels', { 'product_type': 'reanalysis', - 'param': '31/32/33/34/39/40/41/42/43/129/134/139/141/170/172/183/198/235/236/238', + 'param': + '31/32/33/34/39/40/41/42/43/129/134/139/141/170/172/183/198/235/236/238', 'date': date.strftime('%Y-%m-%d'), 'time': date.strftime('%H:%M:%S'), 'grid': '1.0/1.0', - }, - 'era5_surf.grib') + }, 'era5_surf.grib') shutil.move('era5_ml.grib', os.path.join(dir2move, 'era5_ml.grib')) shutil.move('era5_surf.grib', os.path.join(dir2move, 'era5_surf.grib')) @@ -83,29 +85,31 @@ def fetch_era5_nudging(date, dir2move): c = cdsapi.Client() - c.retrieve('reanalysis-era5-complete', { - 'class': 'ea', - 'date': date.strftime('%Y-%m-%d'), - 'time': date.strftime('%H:%M:%S'), - 'expver': '1', - 'levelist': '1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/42/43/44/45/46/47/48/49/50/51/52/53/54/55/56/57/58/59/60/61/62/63/64/65/66/67/68/69/70/71/72/73/74/75/76/77/78/79/80/81/82/83/84/85/86/87/88/89/90/91/92/93/94/95/96/97/98/99/100/101/102/103/104/105/106/107/108/109/110/111/112/113/114/115/116/117/118/119/120/121/122/123/124/125/126/127/128/129/130/131/132/133/134/135/136/137', - 'levtype': 'ml', - 'param': '75/76/130/131/132/133/135/246/247', - 'stream': 'oper', - 'type': 'an', - 'grid': '1.0/1.0', - }, 'era5_ml_nudging.grib') + c.retrieve( + 'reanalysis-era5-complete', { + 'class': 'ea', + 'date': date.strftime('%Y-%m-%d'), + 'time': date.strftime('%H:%M:%S'), + 'expver': '1', + 'levelist': + '1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36/37/38/39/40/41/42/43/44/45/46/47/48/49/50/51/52/53/54/55/56/57/58/59/60/61/62/63/64/65/66/67/68/69/70/71/72/73/74/75/76/77/78/79/80/81/82/83/84/85/86/87/88/89/90/91/92/93/94/95/96/97/98/99/100/101/102/103/104/105/106/107/108/109/110/111/112/113/114/115/116/117/118/119/120/121/122/123/124/125/126/127/128/129/130/131/132/133/134/135/136/137', + 'levtype': 'ml', + 'param': '75/76/130/131/132/133/135/246/247', + 'stream': 'oper', + 'type': 'an', + 'grid': '1.0/1.0', + }, 'era5_ml_nudging.grib') c.retrieve( - 'reanalysis-era5-single-levels', - { + 'reanalysis-era5-single-levels', { 'product_type': 'reanalysis', 'param': '129/134', 'date': date.strftime('%Y-%m-%d'), 'time': date.strftime('%H:%M:%S'), 'grid': '1.0/1.0', - }, - 'era5_surf_nudging.grib') + }, 'era5_surf_nudging.grib') - shutil.move('era5_ml_nudging.grib', os.path.join(dir2move, 'era5_ml_nudging.grib')) - shutil.move('era5_surf_nudging.grib', os.path.join(dir2move, 'era5_surf_nudging.grib')) \ No newline at end of file + shutil.move('era5_ml_nudging.grib', + os.path.join(dir2move, 'era5_ml_nudging.grib')) + shutil.move('era5_surf_nudging.grib', + os.path.join(dir2move, 'era5_surf_nudging.grib')) diff --git a/jobs/tools/interpolate_data.py b/jobs/tools/interpolate_data.py index 77a3e9d8..32626b04 100644 --- a/jobs/tools/interpolate_data.py +++ b/jobs/tools/interpolate_data.py @@ -5,6 +5,7 @@ from .constants import * + def vertical_interp(pres_in, pres_out): nvertin, nptsin = pres_in.shape nvertout, nptsout = pres_out.shape @@ -80,8 +81,9 @@ def compute_pmid_era5(ds_era): def compute_pmid_transcom(field, ap, bp, psurf): skelet = xr.DataArray(np.ones(field.shape), - dims=['LEVEL', 'ncells'], - coords=[field['LEVEL'], np.arange(5120)]) + dims=['LEVEL', 'ncells'], + coords=[field['LEVEL'], + np.arange(5120)]) skelet_alt = skelet.isel(ncells=0) ap_bot = xr.ones_like(skelet) * (ap[:-1].values * skelet_alt) bp_bot = xr.ones_like(skelet) * (bp[:-1].values * skelet_alt) @@ -95,95 +97,103 @@ def compute_pmid_transcom(field, ap, bp, psurf): return pmid + def create_oh_for_restart(cfg, month, ext_restart): - ds_restart = xr.open_dataset(cfg.restart_filename_scratch) - nlevels = 65 + ds_restart = xr.open_dataset(cfg.restart_filename_scratch) + nlevels = 65 - ds = xr.open_dataset(cfg.OH_MOLEC_FILENAME) - oh = ds['OH'][month - 1] - pres_surf = ds['PSURF'][month - 1] - pmid_transcom = compute_pmid_transcom(oh, ds['A'], ds['B'], pres_surf) + ds = xr.open_dataset(cfg.OH_MOLEC_FILENAME) + oh = ds['OH'][month - 1] + pres_surf = ds['PSURF'][month - 1] + pmid_transcom = compute_pmid_transcom(oh, ds['A'], ds['B'], pres_surf) - exner_icon = ds_restart['exner' + ext_restart] - rho_icon = ds_restart['rho' + ext_restart] - qv_icon = ds_restart['qv' + ext_restart] - pmid_icon = 100000 * np.power(exner_icon, 3.5) + exner_icon = ds_restart['exner' + ext_restart] + rho_icon = ds_restart['rho' + ext_restart] + qv_icon = ds_restart['qv' + ext_restart] + pmid_icon = 100000 * np.power(exner_icon, 3.5) - oh_regrid = xr.zeros_like(pmid_icon) - oh_regrid['cells'] = np.arange(len(oh_regrid.cells)) + oh_regrid = xr.zeros_like(pmid_icon) + oh_regrid['cells'] = np.arange(len(oh_regrid.cells)) - oh_regrid = oh_regrid.stack(stack=["time", "cells"]) - oh = oh.stack(stack=["ncells"]) - pmid_icon = pmid_icon.stack(stack=["time", "cells"]) - pmid_transcom = pmid_transcom.stack(stack=["ncells"]) + oh_regrid = oh_regrid.stack(stack=["time", "cells"]) + oh = oh.stack(stack=["ncells"]) + pmid_icon = pmid_icon.stack(stack=["time", "cells"]) + pmid_transcom = pmid_transcom.stack(stack=["ncells"]) - nchunks = 20 - npixels = pmid_transcom.shape[1] - chunks = np.linspace(0, npixels, num=nchunks, dtype=int) - for i, (k1, k2) in enumerate(zip(chunks[:-1], chunks[1:])): - pres_in = np.log(pmid_transcom[:, k1:k2]) - pres_out = np.log(pmid_icon[:, k1:k2]) + nchunks = 20 + npixels = pmid_transcom.shape[1] + chunks = np.linspace(0, npixels, num=nchunks, dtype=int) + for i, (k1, k2) in enumerate(zip(chunks[:-1], chunks[1:])): + pres_in = np.log(pmid_transcom[:, k1:k2]) + pres_out = np.log(pmid_icon[:, k1:k2]) - xlow, xhigh, alphalow, alphahigh = vertical_interp(pres_in.values, pres_out.values) - ycoord = np.array(nlevels * [list(range(k2 - k1))]) - oh_chunk = oh.values[:, k1:k2] - oh_regrid[:, k1:k2] = alphalow * oh_chunk[xlow, ycoord] + alphahigh * oh_chunk[xhigh, ycoord] + xlow, xhigh, alphalow, alphahigh = vertical_interp( + pres_in.values, pres_out.values) + ycoord = np.array(nlevels * [list(range(k2 - k1))]) + oh_chunk = oh.values[:, k1:k2] + oh_regrid[:, k1:k2] = alphalow * oh_chunk[ + xlow, ycoord] + alphahigh * oh_chunk[xhigh, ycoord] - oh_regrid = oh_regrid.unstack() - oh_regrid = oh_regrid.transpose('time', 'layers_{}'.format(nlevels), 'cells') + oh_regrid = oh_regrid.unstack() + oh_regrid = oh_regrid.transpose('time', 'layers_{}'.format(nlevels), + 'cells') - M_moistair = M_DRYAIR * M_WATER / (qv_icon * M_DRYAIR + (1 - qv_icon) * M_WATER) - oh_regrid = oh_regrid * M_moistair.data / (N_AVO * 1e-6 * rho_icon.data) + M_moistair = M_DRYAIR * M_WATER / (qv_icon * M_DRYAIR + + (1 - qv_icon) * M_WATER) + oh_regrid = oh_regrid * M_moistair.data / (N_AVO * 1e-6 * rho_icon.data) - ds_restart['TROH' + ext_restart] = exner_icon.copy() - ds_restart['TROH' + ext_restart][:] = oh_regrid.data + ds_restart['TROH' + ext_restart] = exner_icon.copy() + ds_restart['TROH' + ext_restart][:] = oh_regrid.data - os.remove(cfg.restart_filename_scratch) - ds_restart.to_netcdf(cfg.restart_filename_scratch) + os.remove(cfg.restart_filename_scratch) + ds_restart.to_netcdf(cfg.restart_filename_scratch) def create_oh_for_inicond(cfg, month): - ds_inicond = xr.open_dataset(cfg.inicond_filename_scratch) - pmid_era5 = compute_pmid_era5(ds_inicond) - temp_era5 = ds_inicond['T'] - nlevels = len(temp_era5.lev) - - ds = xr.open_dataset(cfg.OH_MOLEC_FILENAME) - oh = ds['OH'][month - 1] - pres_surf = ds['PSURF'][month - 1] - pmid_transcom = compute_pmid_transcom(oh, ds['A'], ds['B'], pres_surf) - - oh_regrid = xr.zeros_like(pmid_era5) - oh_regrid['ncells'] = np.arange(len(oh_regrid.ncells)) - - oh_regrid = oh_regrid.stack(stack=["time", "ncells"]) - oh = oh.stack(stack=["ncells"]) - pmid_era5 = pmid_era5.stack(stack=["time", "ncells"]) - pmid_transcom = pmid_transcom.stack(stack=["ncells"]) - - nchunks = 20 - npixels = pmid_transcom.shape[1] - chunks = np.linspace(0, npixels, num=nchunks, dtype=int) - for i, (k1, k2) in enumerate(zip(chunks[:-1], chunks[1:])): - pres_in = np.log(pmid_transcom[:, k1:k2]) - pres_out = np.log(pmid_era5[:, k1:k2]) - - xlow, xhigh, alphalow, alphahigh = vertical_interp(pres_in.values, pres_out.values) - ycoord = np.array(nlevels * [list(range(k2 - k1))]) - oh_chunk = oh.values[:, k1:k2] - oh_regrid[:, k1:k2] = alphalow * oh_chunk[xlow, ycoord] + alphahigh * oh_chunk[xhigh, ycoord] - - oh_regrid = oh_regrid.unstack() - oh_regrid = oh_regrid.transpose('time', 'lev', 'ncells') - # oh_regrid = oh_regrid * temp_era5.data * R_GAS / (N_AVO * 1e-6 * pmid_era5.data) - oh_regrid = oh_regrid * temp_era5.data * R_GAS / (N_AVO * 1e-6 * pmid_era5.data) - - pmid_era5 = pmid_era5.unstack() - pmid_era5 = pmid_era5.transpose('time', 'lev', 'ncells') - ds_inicond['TROH'] = pmid_era5.copy() - ds_inicond['TROH'][:] = oh_regrid.data - - os.remove(cfg.inicond_filename_scratch) - ds_inicond.to_netcdf(cfg.inicond_filename_scratch) \ No newline at end of file + ds_inicond = xr.open_dataset(cfg.inicond_filename_scratch) + pmid_era5 = compute_pmid_era5(ds_inicond) + temp_era5 = ds_inicond['T'] + nlevels = len(temp_era5.lev) + + ds = xr.open_dataset(cfg.OH_MOLEC_FILENAME) + oh = ds['OH'][month - 1] + pres_surf = ds['PSURF'][month - 1] + pmid_transcom = compute_pmid_transcom(oh, ds['A'], ds['B'], pres_surf) + + oh_regrid = xr.zeros_like(pmid_era5) + oh_regrid['ncells'] = np.arange(len(oh_regrid.ncells)) + + oh_regrid = oh_regrid.stack(stack=["time", "ncells"]) + oh = oh.stack(stack=["ncells"]) + pmid_era5 = pmid_era5.stack(stack=["time", "ncells"]) + pmid_transcom = pmid_transcom.stack(stack=["ncells"]) + + nchunks = 20 + npixels = pmid_transcom.shape[1] + chunks = np.linspace(0, npixels, num=nchunks, dtype=int) + for i, (k1, k2) in enumerate(zip(chunks[:-1], chunks[1:])): + pres_in = np.log(pmid_transcom[:, k1:k2]) + pres_out = np.log(pmid_era5[:, k1:k2]) + + xlow, xhigh, alphalow, alphahigh = vertical_interp( + pres_in.values, pres_out.values) + ycoord = np.array(nlevels * [list(range(k2 - k1))]) + oh_chunk = oh.values[:, k1:k2] + oh_regrid[:, k1:k2] = alphalow * oh_chunk[ + xlow, ycoord] + alphahigh * oh_chunk[xhigh, ycoord] + + oh_regrid = oh_regrid.unstack() + oh_regrid = oh_regrid.transpose('time', 'lev', 'ncells') + # oh_regrid = oh_regrid * temp_era5.data * R_GAS / (N_AVO * 1e-6 * pmid_era5.data) + oh_regrid = oh_regrid * temp_era5.data * R_GAS / (N_AVO * 1e-6 * + pmid_era5.data) + + pmid_era5 = pmid_era5.unstack() + pmid_era5 = pmid_era5.transpose('time', 'lev', 'ncells') + ds_inicond['TROH'] = pmid_era5.copy() + ds_inicond['TROH'][:] = oh_regrid.data + + os.remove(cfg.inicond_filename_scratch) + ds_inicond.to_netcdf(cfg.inicond_filename_scratch) From 5ce75e49c310bf234fd85c04adf171692c1ea2ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 15 Jun 2023 10:54:53 +0200 Subject: [PATCH 033/108] Adapt icon runjob --- jobs/icon.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jobs/icon.py b/jobs/icon.py index c01b7056..c3988835 100644 --- a/jobs/icon.py +++ b/jobs/icon.py @@ -14,7 +14,6 @@ import logging import os import subprocess -from .tools import write_cosmo_input_ghg from . import tools from datetime import datetime, timedelta @@ -62,9 +61,9 @@ def main(starttime, hstart, hstop, cfg): tools.copy_file(cfg.icon_bin, os.path.join(cfg.icon_work, execname)) # Get name of initial file - if hasattr(cfg, 'INICOND_FILENAME'): + if hasattr(cfg, 'inicond_filename'): inidata_filename = os.path.join(cfg.icon_input_icbc, - cfg.INICOND_FILENAME) + cfg.inicond_filename) else: starttime_real = starttime + timedelta(hours=hstart) inidata_filename = os.path.join( @@ -87,7 +86,8 @@ def main(starttime, hstart, hstop, cfg): os.path.join(cfg.icon_work, 'run_icon.job')]) # In case of ICON-ART, ignore the "invalid pointer" error on successful run - if cfg.target is tools.Target.ICONARTOEM or cfg.target is tools.Target.ICONART: + if cfg.target is tools.Target.ICONARTOEM or cfg.target is tools.Target.ICONART or \ + cfg.target is tools.Target.ICONARTGLOBAL: if tools.grep("free(): invalid pointer", logfile)['success'] and \ tools.grep("clean-up finished", logfile)['success']: exitcode = 0 From 70a2043065e5daa3267ead413f912f4bbaf8daff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 15 Jun 2023 11:04:10 +0200 Subject: [PATCH 034/108] Move data download script to jenkins folder --- get_data.sh | 3 --- jenkins/scripts/get_data.sh | 15 +++++++++++++++ jenkins/scripts/jenkins.sh | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) delete mode 100755 get_data.sh create mode 100755 jenkins/scripts/get_data.sh diff --git a/get_data.sh b/get_data.sh deleted file mode 100755 index f32655fe..00000000 --- a/get_data.sh +++ /dev/null @@ -1,3 +0,0 @@ -wget ftp://iacftp.ethz.ch/pub_read/mjaehn/input_processing-chain/input_processing-chain.tgz -tar -xvzf input_processing-chain.tgz -rm -f input_processing-chain.tgz diff --git a/jenkins/scripts/get_data.sh b/jenkins/scripts/get_data.sh new file mode 100755 index 00000000..d014eccd --- /dev/null +++ b/jenkins/scripts/get_data.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e -x + +function error { + echo "*** Error: $@" >&2 + exit 1 +} + +# Check if script is called correctly +[[ $(git rev-parse --show-toplevel 2>/dev/null) = $(pwd) ]] || error "$0 not launched from toplevel of repository" + +wget ftp://iacftp.ethz.ch/pub_read/mjaehn/input_processing-chain/input_processing-chain.tgz +tar -xvzf input_processing-chain.tgz +rm -f input_processing-chain.tgz diff --git a/jenkins/scripts/jenkins.sh b/jenkins/scripts/jenkins.sh index 8dd9ecb0..a416b0b3 100755 --- a/jenkins/scripts/jenkins.sh +++ b/jenkins/scripts/jenkins.sh @@ -21,7 +21,7 @@ if [[ $size -gt 40000000000 ]]; then echo input data already present - skipping download... else echo downloading input data... - ./get_data.sh + ./jenkins/scripts/get_data.sh fi # Build int2lm From 0ce513bf29938a6a942f96576e4dfef2981c5515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 15 Jun 2023 11:38:29 +0200 Subject: [PATCH 035/108] Adapt Jenkinsfile --- jenkins/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index 0582acd5..fcdd0e7e 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -47,7 +47,7 @@ pipeline { parallel { stage('Get data') { steps { - sh './get_data.sh' + sh './jenkins/scripts/get_data.sh' } post { failure { From 3ad183d0d51fd9a3527efbcf6798512d3d57be2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 15 Jun 2023 13:20:18 +0200 Subject: [PATCH 036/108] Add cdsapi package --- env/environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/env/environment.yml b/env/environment.yml index 1522d925..06795923 100644 --- a/env/environment.yml +++ b/env/environment.yml @@ -17,3 +17,4 @@ dependencies: - pillow - xarray - dask + - cdsapi From edb7e6b84c92eda50c48a0cbdc6b8b7ef60c69b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 15 Jun 2023 13:21:25 +0200 Subject: [PATCH 037/108] Replace subprocess.call with .run + remove unused imports --- jobs/check_output.py | 6 ++++-- jobs/cosmo.py | 6 ++++-- jobs/icon.py | 5 +++-- jobs/int2lm.py | 5 ++--- jobs/prepare_data.py | 3 ++- jobs/reduce_output.py | 6 +++--- 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/jobs/check_output.py b/jobs/check_output.py index 6da924f0..21271901 100644 --- a/jobs/check_output.py +++ b/jobs/check_output.py @@ -794,7 +794,8 @@ def main(starttime, hstart, hstop, cfg): with open(output_file, 'w') as outf: outf.write(to_write_fmt) - exitcode = subprocess.call(["sbatch", "--wait", output_file]) + result = subprocess.run(["sbatch", "--wait", output_file]) + exitcode = result.returncode if exitcode != 0: raise RuntimeError("sbatch returned exitcode {}".format(exitcode)) @@ -834,7 +835,8 @@ def main(starttime, hstart, hstop, cfg): with open(output_file, 'w') as outf: outf.write(to_write_fmt) - exitcode = subprocess.call(["sbatch", "--wait", output_file]) + result = subprocess.run(["sbatch", "--wait", output_file]) + exitcode = result.returncode if exitcode != 0: raise RuntimeError("sbatch returned exitcode {}".format(exitcode)) diff --git a/jobs/cosmo.py b/jobs/cosmo.py index afca6c8d..12f8f5ae 100644 --- a/jobs/cosmo.py +++ b/jobs/cosmo.py @@ -127,9 +127,10 @@ def main(starttime, hstart, hstop, cfg): )) # Execute fieldextra with open(logfile, "a+") as log: - exitcode = subprocess.call( + result = subprocess.run( [cfg.fieldextra_bin, output_file_merge], stdout=log) + exitcode = result.returncode if exitcode != 0: raise RuntimeError( "Fieldextra returned exitcode {}".format(exitcode)) @@ -205,8 +206,9 @@ def main(starttime, hstart, hstop, cfg): logfile=logfile, logfile_finish=logfile_finish)) - exitcode = subprocess.call( + result = subprocess.run( ["sbatch", "--wait", os.path.join(cfg.cosmo_work, 'run.job')]) + exitcode = result.returncode if exitcode != 0: raise RuntimeError("sbatch returned exitcode {}".format(exitcode)) diff --git a/jobs/icon.py b/jobs/icon.py index c3988835..290a2093 100644 --- a/jobs/icon.py +++ b/jobs/icon.py @@ -15,7 +15,7 @@ import os import subprocess from . import tools -from datetime import datetime, timedelta +from datetime import timedelta def main(starttime, hstart, hstop, cfg): @@ -81,9 +81,10 @@ def main(starttime, hstart, hstop, cfg): logfile=logfile, logfile_finish=logfile_finish)) - exitcode = subprocess.call( + result = subprocess.run( ["sbatch", "--wait", os.path.join(cfg.icon_work, 'run_icon.job')]) + exitcode = result.returncode # In case of ICON-ART, ignore the "invalid pointer" error on successful run if cfg.target is tools.Target.ICONARTOEM or cfg.target is tools.Target.ICONART or \ diff --git a/jobs/int2lm.py b/jobs/int2lm.py index 0f3ae44c..015d5346 100644 --- a/jobs/int2lm.py +++ b/jobs/int2lm.py @@ -14,8 +14,6 @@ import shutil from . import tools import subprocess -import sys -import importlib from datetime import datetime @@ -140,8 +138,9 @@ def main(starttime, hstart, hstop, cfg): logfile_finish=logfile_finish)) # Submit job - exitcode = subprocess.call( + result = subprocess.run( ["sbatch", "--wait", os.path.join(cfg.int2lm_work, "run.job")]) + exitcode = result.returncode if exitcode != 0: raise RuntimeError("sbatch returned exitcode {}".format(exitcode)) diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index f9d54bad..118b273e 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -412,10 +412,11 @@ def main(starttime, hstart, hstop, cfg): datafile_list=datafile_list, datafile_list_rest=datafile_list_rest, datafile_list_chem=datafile_list_chem)) - exitcode = subprocess.call([ + result = subprocess.run([ "sbatch", "--wait", os.path.join(cfg.icon_work, "%s.job" % runscript) ]) + exitcode = result.returncode if exitcode != 0: raise RuntimeError( "sbatch returned exitcode {}".format(exitcode)) diff --git a/jobs/reduce_output.py b/jobs/reduce_output.py index b7a07356..dcf79f1f 100644 --- a/jobs/reduce_output.py +++ b/jobs/reduce_output.py @@ -3,14 +3,13 @@ import logging import os +import sys import shutil import datetime as dt import glob import netCDF4 as nc import subprocess import numpy as np -import time -import resource from datetime import datetime import math @@ -122,7 +121,7 @@ def main(starttime, hstart, hstop, cfg): logfile = os.path.join(cfg.log_working_dir, 'reduce_output') logging.info('Submitting job to the queue...') - exitcode = subprocess.call([ + result = subprocess.run([ "sbatch", '--output=' + logfile, '--open-mode=append', '--wait', bash_file, py_file, cosmo_output, output_path, str_startdate, str_enddate, @@ -130,6 +129,7 @@ def main(starttime, hstart, hstop, cfg): str(output_step), alternate_csv_file, str(cfg.convert_gas) ]) + exitcode = result.returncode if exitcode != 0: raise RuntimeError("sbatch returned exitcode {}".format(exitcode)) From a11703f11cec41a4264041b3b6a197bdd615f2a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 15 Jun 2023 14:18:49 +0200 Subject: [PATCH 038/108] Update year in license --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 6a4d8bd6..b2c0c6e7 100644 --- a/LICENSE +++ b/LICENSE @@ -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 From cfd4d86cbc4d4132942409bb8adfdf066625f31c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 15 Jun 2023 14:29:17 +0200 Subject: [PATCH 039/108] Add default jobs --- run_chain.py | 1 + 1 file changed, 1 insertion(+) diff --git a/run_chain.py b/run_chain.py index 916bddf6..31bee6c9 100755 --- a/run_chain.py +++ b/run_chain.py @@ -27,6 +27,7 @@ ], tools.Target.ICON: ["prepare_data", "icon"], tools.Target.ICONART: ["prepare_data", "icon"], + tools.Target.ICONARTGLOBAL: ["prepare_data", "icon"], tools.Target.ICONARTOEM: ["prepare_data", "oae", "icon"] } From 340bb99b49747ff248226e4de0768110c8eb4173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 15 Jun 2023 15:08:30 +0200 Subject: [PATCH 040/108] Move model info to .yaml file --- config/models.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 config/models.yaml diff --git a/config/models.yaml b/config/models.yaml new file mode 100644 index 00000000..1617d773 --- /dev/null +++ b/config/models.yaml @@ -0,0 +1,25 @@ +models: + cosmo: + jobs: ['prepare_data', 'int2lm', 'cosmo', 'post_cosmo'] + variants: ['none', 'spinup'] + cosmo-ghg: + jobs: ['prepare_data', 'emissions', 'biofluxes', 'oae', 'online_vprm', + 'int2lm', 'post_int2lm', 'cosmo', 'post_cosmo'] + variants: ['none', 'spinup'] + cosmo-art: + jobs: ['prepare_data', 'emissions', 'obs_nudging', 'photo_rate', + 'int2lm', 'cosmo', 'post_cosmo'] + variants: ['none', 'spinup'] + icon: + jobs: ['prepare_data', 'icon'] + variants: ['none'] + icon-art: + jobs: ['prepare_data', 'icon'] + variants: ['none'] + icon-art-global: + jobs: ['prepare_data', 'icon'] + variants: ['none'] + icon-art-oem: + jobs: ['prepare_data', 'icon'] + variants: ['none'] + From e7127ce09bab330948f8b6fbf7d1dc0ba5723818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 15 Jun 2023 15:09:18 +0200 Subject: [PATCH 041/108] target -> model; subtarget -> variant --- jobs/tools/__init__.py | 46 ----------------- run_chain.py | 114 ++++++++++++++++++----------------------- 2 files changed, 50 insertions(+), 110 deletions(-) diff --git a/jobs/tools/__init__.py b/jobs/tools/__init__.py index 14049f06..22299ba4 100644 --- a/jobs/tools/__init__.py +++ b/jobs/tools/__init__.py @@ -262,52 +262,6 @@ def remove_file(dest_path, output_log=False): logging.info("Removed {}".format(dest_path)) -class Target(Enum): - COSMO = auto() - COSMOART = auto() - COSMOGHG = auto() - ICON = auto() - ICONART = auto() - ICONARTOEM = auto() - ICONARTGLOBAL = auto() - - -class Subtarget(Enum): - NONE = auto() - SPINUP = auto() - - -str_to_enum = { - 'cosmo': Target.COSMO, - 'cosmo-art': Target.COSMOART, - 'cosmo-ghg': Target.COSMOGHG, - 'icon': Target.ICON, - 'icon-art': Target.ICONART, - 'icon-art-oem': Target.ICONARTOEM, - 'icon-art-global': Target.ICONARTGLOBAL, - 'none': Subtarget.NONE, - 'spinup': Subtarget.SPINUP, -} - - -def check_target(cfg, target=Target.COSMO): - """Check that the target specified in cfg matched the prescribed target. - - Check that cfg.target == target. If not, raises a RuntimeError. - - Parameters - ---------- - cfg : config-object - - target : Target enum - Prescribed target - """ - if not cfg.target is target: - raise RuntimeError("The target specified in the configuration file " - "is {}, but the job only applies to {}.".format( - cfg.target.name, target.name)) - - def levenshtein(s1, s2): """Return the levenshtein distance ("edit distance") between s1 and s2. diff --git a/run_chain.py b/run_chain.py index 916bddf6..df97a2f8 100755 --- a/run_chain.py +++ b/run_chain.py @@ -11,25 +11,11 @@ import shutil import argparse import csv +import yaml import jobs from jobs import tools -default_jobs = { - tools.Target.COSMO: ["prepare_data", "int2lm", "cosmo", "post_cosmo"], - tools.Target.COSMOGHG: [ - "prepare_data", "emissions", "biofluxes", "oae", "online_vprm", - "int2lm", "post_int2lm", "cosmo", "post_cosmo" - ], - tools.Target.COSMOART: [ - "prepare_data", "emissions", "obs_nudging", "photo_rate", "int2lm", - "cosmo", "post_cosmo" - ], - tools.Target.ICON: ["prepare_data", "icon"], - tools.Target.ICONART: ["prepare_data", "icon"], - tools.Target.ICONARTOEM: ["prepare_data", "oae", "icon"] -} - def parse_arguments(): """Parse the command line arguments given to this script @@ -160,41 +146,41 @@ def load_config_file(casename, cfg): return cfg -def set_simulation_type(cfg): - """Detect the chain target and if there is a subtarget. +def check_model_variant(cfg): + """Checks the model and if there is a variant. - Check if a target was provided in the config-object. If no target is - provided, set the target to cosmo in the config-object. + Check if a model was provided in the config-object. If no model is + provided, set the model to cosmo in the config-object. - Check if a subtarget was provided in the config-object. Subtargets + Check if a variant was provided in the config-object. Variants provide a way to customize the behaviour of the processing chain for different types of simulations. - Raise a RuntimeError if an unsupported target or subtarget is given in cfg. - You can add targets and subtargets in the jobs/tools/__init__.py file. - - Translates the target and subtarget from string to enum. + Raise a RuntimeError if an unsupported model or variant is given in cfg. + You can add models and variants in the config/models.yaml file. Parameters ---------- cfg : config-object """ - default = 'cosmo' - target_str = getattr(cfg, 'target', default) - try: - target_enum = tools.str_to_enum[target_str.lower()] - except KeyError: - raise ValueError("The target of the chain must be one of {}".format( - list(tools.str_to_enum.keys()))) - setattr(cfg, 'target', target_enum) + if hasattr(cfg, 'model') + model_str = getattr(cfg, 'model') + else: + raise RuntimeError("Variable 'model' not set in config.") + + variant_str = getattr(cfg, 'variant', 'none') - subtarget_str = getattr(cfg, 'subtarget', 'none') - try: - subtarget_enum = tools.str_to_enum[subtarget_str.lower()] - except KeyError: - raise ValueError("The target of the chain must be one of {}".format( - list(tools.str_to_enum.keys()))) - setattr(cfg.target, 'subtarget', subtarget_enum) + with open('config/models.yaml') as file: + model_config = yaml.safe_load(file) + + models = model_config['models'] + if cfg.model not in models: + raise ValueError("Invalid model: {}".format(model_str)) + + model_info = models[cfg.model] + variants = model_info['variants'] + if cfg.variant not in variants: + raise ValueError("Invalid variant for COSMO: {}".format(variant_str)) def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): @@ -258,7 +244,7 @@ def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): inidate_int2lm_yyyymmddhh = (start_time + timedelta(hours=hstart)).strftime('%Y%m%d%H') - if cfg.target.subtarget is tools.Subtarget.SPINUP: + if cfg.model.variant is tools.Submodel.SPINUP: if cfg.first_one: # first run in spinup chain_root_last_run = '' else: # consecutive runs in spinup @@ -325,8 +311,8 @@ def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): setattr(cfg, 'icon_output', os.path.join(chain_root, 'icon', 'output')) setattr(cfg, 'icon_output_reduced', os.path.join(chain_root, 'icon', 'output_reduced')) - if cfg.target is tools.Target.ICON or cfg.target is tools.Target.ICONART \ - or cfg.target is tools.Target.ICONARTOEM: + if cfg.model is tools.Target.ICON or cfg.model is tools.Target.ICONART \ + or cfg.model is tools.Target.ICONARTOEM: setattr( cfg, 'radiation_grid_filename_scratch', os.path.join(cfg.icon_input_grid, @@ -371,7 +357,7 @@ def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): os.path.basename(cfg.pntSrc_xml_filename))) # OEM - if cfg.target is tools.Target.ICONARTOEM: + if cfg.model is tools.Target.ICONARTOEM: setattr( cfg, 'oae_gridded_emissions_nc_scratch', os.path.join(cfg.icon_input_oae, @@ -423,14 +409,14 @@ def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): tracer_csvfile = os.path.join(cfg.chain_src_dir, 'cases', cfg.casename, 'cosmo_tracers.csv') if os.path.isfile(tracer_csvfile): - if cfg.target is tools.Target.COSMOGHG: + if cfg.model is tools.Target.COSMOGHG: with open(tracer_csvfile, 'r') as csv_file: reader = csv.DictReader(csv_file, delimiter=',') reader = [r for r in reader if r[''] != '#'] setattr(cfg, 'in_tracers', len(reader)) # tracer_start namelist paramter for spinup simulation - if cfg.target.subtarget is tools.Subtarget.SPINUP: + if cfg.model.variant is tools.Submodel.SPINUP: if cfg.first_one: setattr(cfg, 'tracer_start', 0) else: @@ -444,7 +430,7 @@ def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): "gpu or mc") else: # set default constraint - if cfg.target is tools.Target.COSMOART: + if cfg.model is tools.Target.COSMOART: setattr(cfg, 'constraint', 'mc') else: setattr(cfg, 'constraint', 'gpu') @@ -458,13 +444,13 @@ def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): setattr(cfg, 'lasync_io', '.TRUE.') setattr(cfg, 'num_iope_percomm', 1) - if cfg.target.subtarget is tools.Subtarget.SPINUP: + if cfg.model.variant is tools.Submodel.SPINUP: setattr(cfg, 'last_cosmo_output', os.path.join(chain_root_last_run, 'cosmo', 'output')) # No restart for spinup simulations (= default values for no restart) setattr(cfg, 'cosmo_restart_out', '') setattr(cfg, 'cosmo_restart_in', '') - elif cfg.target is not tools.Target.COSMOART: + elif cfg.model is not tools.Target.COSMOART: job_id_last_run = '%s_%d_%d' % (inidate_yyyymmddhh, hstart - cfg.restart_step, hstart) chain_root_last_run = os.path.join(work_root, cfg.casename, @@ -475,12 +461,12 @@ def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): setattr(cfg, 'cosmo_restart_in', os.path.join(chain_root_last_run, 'cosmo', 'restart')) - if cfg.target is tools.Target.COSMOART: + if cfg.model is tools.Target.COSMOART: # no restarts in cosmoart setattr(cfg, 'restart_step', hstop - hstart) - if cfg.target is tools.Target.ICON or cfg.target is tools.Target.ICONART or \ - cfg.target is tools.Target.ICONARTOEM: + if cfg.model is tools.Target.ICON or cfg.model is tools.Target.ICONART or \ + cfg.model is tools.Target.ICONARTOEM: ini_datetime_string = ( start_time + timedelta(hours=hstart)).strftime('%Y-%m-%dT%H:00:00Z') @@ -498,7 +484,7 @@ def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): setattr(cfg, 'lrestart', '.FALSE.') # if nested run: use output of mother-simulation - if cfg.target is tools.Target.COSMOART and not os.path.isdir( + if cfg.model is tools.Target.COSMOART and not os.path.isdir( cfg.meteo_dir): # if ifs_hres_dir doesn't point to a directory, # it is the name of the mother run @@ -738,17 +724,17 @@ def restart_runs_spinup(work_root, cfg, start, hstart, hstop, job_names, for casename in args.casenames: cfg = load_config_file(casename=casename, cfg=cfg) start_time = datetime.strptime(args.startdate, '%Y-%m-%d') - set_simulation_type(cfg) + check_model_variant(cfg) if args.job_list is None: - args.job_list = default_jobs[cfg.target] + args.job_list = default_jobs[cfg.model] print("Starting chain for case {}, using {}".format( - casename, cfg.target.name)) + casename, cfg.model.name)) - if cfg.target is tools.Target.COSMO or cfg.target is tools.Target.ICON or \ - cfg.target is tools.Target.ICONART or cfg.target is tools.Target.ICONARTOEM or \ - cfg.target is tools.Target.COSMOGHG: - if cfg.target.subtarget is tools.Subtarget.NONE: + if cfg.model is tools.Target.COSMO or cfg.model is tools.Target.ICON or \ + cfg.model is tools.Target.ICONART or cfg.model is tools.Target.ICONARTOEM or \ + cfg.model is tools.Target.COSMOGHG: + if cfg.model.variant is tools.Submodel.NONE: restart_runs(work_root=cfg.work_root, cfg=cfg, start=start_time, @@ -756,7 +742,7 @@ def restart_runs_spinup(work_root, cfg, start, hstart, hstop, job_names, hstop=args.hstop, job_names=args.job_list, force=args.force) - elif cfg.target.subtarget is tools.Subtarget.SPINUP: + elif cfg.model.variant is tools.Submodel.SPINUP: restart_runs_spinup(work_root=cfg.work_root, cfg=cfg, start=start_time, @@ -765,9 +751,9 @@ def restart_runs_spinup(work_root, cfg, start, hstart, hstop, job_names, job_names=args.job_list, force=args.force) else: - raise RuntimeError("Unknown subtarget: {}".format( - cfg.subtarget)) - elif cfg.target is tools.Target.COSMOART: + raise RuntimeError("Unknown variant: {}".format( + cfg.variant)) + elif cfg.model is tools.Target.COSMOART: # cosmoart can't do restarts run_chain(work_root=cfg.work_root, cfg=cfg, @@ -777,6 +763,6 @@ def restart_runs_spinup(work_root, cfg, start, hstart, hstop, job_names, job_names=args.job_list, force=args.force) else: - raise RuntimeError("Unknown target: {}".format(cfg.target)) + raise RuntimeError("Unknown model: {}".format(cfg.model)) print('>>> finished chain for good or bad! <<<') From b635d8a0874948a258b8ed852545246eff788312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 15 Jun 2023 16:28:27 +0200 Subject: [PATCH 042/108] Fix error message --- run_chain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_chain.py b/run_chain.py index df97a2f8..ffc49836 100755 --- a/run_chain.py +++ b/run_chain.py @@ -180,7 +180,7 @@ def check_model_variant(cfg): model_info = models[cfg.model] variants = model_info['variants'] if cfg.variant not in variants: - raise ValueError("Invalid variant for COSMO: {}".format(variant_str)) + raise ValueError(f"Invalid variant for {cfg.model}: {variant_str}") def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): From e1f401561931cdc967402a77039c69fcb7601f05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Fri, 16 Jun 2023 10:12:33 +0200 Subject: [PATCH 043/108] Fix Jenkinsfile --- jenkins/Jenkinsfile | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index f46e8b95..fcdd0e7e 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -69,19 +69,6 @@ pipeline { } } } - stage('Build int2lm') { - steps { - sh '''source ${WORKSPACE}/miniconda/etc/profile.d/conda.sh - conda activate proc-chain - ./jenkins/scripts/build_int2lm.sh''' - } - post { - failure { - echo 'Cleaning up workspace' - deleteDir() - } - } - } stage('Build COSMO-GHG') { steps { sh '''source ${WORKSPACE}/miniconda/etc/profile.d/conda.sh From f57348132fab6b3f5f41bc9a9dce83272d2b7d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Mon, 19 Jun 2023 10:22:51 +0200 Subject: [PATCH 044/108] Replace (sub)target with model/variant in config files --- cases/carbosense/config.py | 4 ++-- cases/che-wp4/config.py | 4 ++-- cases/cosmo-7/config.py | 4 ++-- cases/cosmo-art-mother-test/config.py | 2 +- cases/cosmo-art-nested-test/config.py | 2 +- cases/cosmo-ghg-11km-test/config.py | 4 ++-- cases/icon-art-global/config.py | 2 +- cases/icon-art-oem-ensembles-test/config.py | 2 +- cases/icon-art-oem-test/config.py | 2 +- cases/icon-art-test/config.py | 2 +- cases/icon-test/config.py | 2 +- run_chain.py | 22 ++++++++++----------- 12 files changed, 26 insertions(+), 26 deletions(-) diff --git a/cases/carbosense/config.py b/cases/carbosense/config.py index b03edae8..4a2459e2 100755 --- a/cases/carbosense/config.py +++ b/cases/carbosense/config.py @@ -2,9 +2,9 @@ # GENERAL SETTINGS =========================================================== user = os.environ['USER'] -target = 'cosmo-ghg' +model = 'cosmo-ghg' restart_step = 24 # hours -#subtarget = 'spinup' +#variant = 'spinup' #spinup = 6 compute_host = 'daint' diff --git a/cases/che-wp4/config.py b/cases/che-wp4/config.py index 718f0250..4dc110bd 100755 --- a/cases/che-wp4/config.py +++ b/cases/che-wp4/config.py @@ -2,9 +2,9 @@ # GENERAL SETTINGS =========================================================== user = os.environ['USER'] -target = 'cosmo-ghg' +model = 'cosmo-ghg' restart_step = 120 # 5 days -#subtarget = 'spinup' +#variant = 'spinup' #spinup = 6 compute_host = 'daint' diff --git a/cases/cosmo-7/config.py b/cases/cosmo-7/config.py index 0f922972..0b49f12e 100644 --- a/cases/cosmo-7/config.py +++ b/cases/cosmo-7/config.py @@ -12,9 +12,9 @@ print(sys.argv) -target = 'cosmo' +model = 'cosmo' restart_step = 24 -subtarget = 'spinup' +variant = 'spinup' spinup = 0 compute_host = 'daint' diff --git a/cases/cosmo-art-mother-test/config.py b/cases/cosmo-art-mother-test/config.py index 0ca9c27f..67051c34 100644 --- a/cases/cosmo-art-mother-test/config.py +++ b/cases/cosmo-art-mother-test/config.py @@ -14,7 +14,7 @@ compute_queue = 'normal' # Controls which flavor of cosmo is used to do the simulation. -target = 'cosmo-art' +model = 'cosmo-art' # case name = pathname in cases/ path = os.path.realpath(__file__) diff --git a/cases/cosmo-art-nested-test/config.py b/cases/cosmo-art-nested-test/config.py index 6db1df82..b4aa8f28 100644 --- a/cases/cosmo-art-nested-test/config.py +++ b/cases/cosmo-art-nested-test/config.py @@ -14,7 +14,7 @@ compute_queue = 'normal' # Controls which flavor of cosmo is used to do the simulation. -target = 'cosmo-art' +model = 'cosmo-art' # case name = pathname in cases/ path = os.path.realpath(__file__) diff --git a/cases/cosmo-ghg-11km-test/config.py b/cases/cosmo-ghg-11km-test/config.py index 938625e6..10dc35eb 100644 --- a/cases/cosmo-ghg-11km-test/config.py +++ b/cases/cosmo-ghg-11km-test/config.py @@ -16,9 +16,9 @@ compute_queue = 'debug' # 'normal' constraint = 'gpu' # 'mc' -target = 'cosmo-ghg' +model = 'cosmo-ghg' restart_step = 12 # hours -subtarget = 'spinup' +variant = 'spinup' spinup = 6 if constraint == 'gpu': diff --git a/cases/icon-art-global/config.py b/cases/icon-art-global/config.py index 3489f0dd..f9ae5870 100644 --- a/cases/icon-art-global/config.py +++ b/cases/icon-art-global/config.py @@ -20,7 +20,7 @@ compute_account = os.popen("id -gn").read().splitlines()[0] # -- Model to run -target = 'icon-art-global' +model = 'icon-art-global' # -- Number of tasks per node ntasks_per_node = 36 if constraint == 'mc' else 12 diff --git a/cases/icon-art-oem-ensembles-test/config.py b/cases/icon-art-oem-ensembles-test/config.py index bef5a54d..33e085ba 100644 --- a/cases/icon-art-oem-ensembles-test/config.py +++ b/cases/icon-art-oem-ensembles-test/config.py @@ -14,7 +14,7 @@ compute_queue = 'debug' # 'normal' / 'debug' constraint = 'mc' # 'mc' / 'gpu' -target = 'icon-art-oem' +model = 'icon-art-oem' restart_step = 24 # hours if constraint == 'gpu': diff --git a/cases/icon-art-oem-test/config.py b/cases/icon-art-oem-test/config.py index 0997dfa3..47906682 100644 --- a/cases/icon-art-oem-test/config.py +++ b/cases/icon-art-oem-test/config.py @@ -14,7 +14,7 @@ compute_queue = 'debug' # 'normal' / 'debug' constraint = 'mc' # 'mc' / 'gpu' -target = 'icon-art-oem' +model = 'icon-art-oem' restart_step = 24 # hours if constraint == 'gpu': diff --git a/cases/icon-art-test/config.py b/cases/icon-art-test/config.py index 66bb4d56..94882fbd 100644 --- a/cases/icon-art-test/config.py +++ b/cases/icon-art-test/config.py @@ -14,7 +14,7 @@ compute_queue = 'debug' # 'normal' / 'debug' constraint = 'mc' # 'mc' / 'gpu' -target = 'icon-art' +model = 'icon-art' restart_step = 24 # hours if constraint == 'gpu': diff --git a/cases/icon-test/config.py b/cases/icon-test/config.py index 23f54730..1e5a814a 100644 --- a/cases/icon-test/config.py +++ b/cases/icon-test/config.py @@ -16,7 +16,7 @@ compute_queue = 'debug' # 'normal' / 'debug' constraint = 'gpu' # 'mc' / 'gpu' -target = 'icon' +model = 'icon' restart_step = 24 # hours if constraint == 'gpu': diff --git a/run_chain.py b/run_chain.py index ffc49836..2d64962c 100755 --- a/run_chain.py +++ b/run_chain.py @@ -54,10 +54,8 @@ def parse_arguments(): "job for int2lm. " "Jobs are executed in the order in which they are " "given here. " - "If no jobs are given, the default that will be " - "executed is: COSMO: {} | COSMOART : {}".format( - default_jobs[tools.Target.COSMO], - default_jobs[tools.Target.COSMOART])) + "If no jobs are given, default jobs will be executed" + "as defined in config/models.yaml.") parser.add_argument("-j", "--jobs", nargs='*', @@ -163,7 +161,7 @@ def check_model_variant(cfg): ---------- cfg : config-object """ - if hasattr(cfg, 'model') + if hasattr(cfg, 'model'): model_str = getattr(cfg, 'model') else: raise RuntimeError("Variable 'model' not set in config.") @@ -244,7 +242,7 @@ def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): inidate_int2lm_yyyymmddhh = (start_time + timedelta(hours=hstart)).strftime('%Y%m%d%H') - if cfg.model.variant is tools.Submodel.SPINUP: + if cfg.model.variant is tools.variant.SPINUP: if cfg.first_one: # first run in spinup chain_root_last_run = '' else: # consecutive runs in spinup @@ -416,7 +414,7 @@ def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): setattr(cfg, 'in_tracers', len(reader)) # tracer_start namelist paramter for spinup simulation - if cfg.model.variant is tools.Submodel.SPINUP: + if cfg.model.variant is tools.variant.SPINUP: if cfg.first_one: setattr(cfg, 'tracer_start', 0) else: @@ -444,7 +442,7 @@ def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): setattr(cfg, 'lasync_io', '.TRUE.') setattr(cfg, 'num_iope_percomm', 1) - if cfg.model.variant is tools.Submodel.SPINUP: + if cfg.model.variant is tools.variant.SPINUP: setattr(cfg, 'last_cosmo_output', os.path.join(chain_root_last_run, 'cosmo', 'output')) # No restart for spinup simulations (= default values for no restart) @@ -726,7 +724,9 @@ def restart_runs_spinup(work_root, cfg, start, hstart, hstop, job_names, start_time = datetime.strptime(args.startdate, '%Y-%m-%d') check_model_variant(cfg) if args.job_list is None: - args.job_list = default_jobs[cfg.model] + with open('config/models.yaml') as file: + model_config = yaml.safe_load(file) + args.job_list = model_config['models'][cfg.model]['variants'] print("Starting chain for case {}, using {}".format( casename, cfg.model.name)) @@ -734,7 +734,7 @@ def restart_runs_spinup(work_root, cfg, start, hstart, hstop, job_names, if cfg.model is tools.Target.COSMO or cfg.model is tools.Target.ICON or \ cfg.model is tools.Target.ICONART or cfg.model is tools.Target.ICONARTOEM or \ cfg.model is tools.Target.COSMOGHG: - if cfg.model.variant is tools.Submodel.NONE: + if cfg.model.variant is tools.variant.NONE: restart_runs(work_root=cfg.work_root, cfg=cfg, start=start_time, @@ -742,7 +742,7 @@ def restart_runs_spinup(work_root, cfg, start, hstart, hstop, job_names, hstop=args.hstop, job_names=args.job_list, force=args.force) - elif cfg.model.variant is tools.Submodel.SPINUP: + elif cfg.model.variant is tools.variant.SPINUP: restart_runs_spinup(work_root=cfg.work_root, cfg=cfg, start=start_time, From 8ec9d98eb81052cef5ac3461cb389dd01394565e Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 19 Jun 2023 08:23:56 +0000 Subject: [PATCH 045/108] GitHub Action: Apply Pep8-formatting --- run_chain.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/run_chain.py b/run_chain.py index 2d64962c..0ca8290f 100755 --- a/run_chain.py +++ b/run_chain.py @@ -165,7 +165,7 @@ def check_model_variant(cfg): model_str = getattr(cfg, 'model') else: raise RuntimeError("Variable 'model' not set in config.") - + variant_str = getattr(cfg, 'variant', 'none') with open('config/models.yaml') as file: @@ -482,8 +482,7 @@ def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): setattr(cfg, 'lrestart', '.FALSE.') # if nested run: use output of mother-simulation - if cfg.model is tools.Target.COSMOART and not os.path.isdir( - cfg.meteo_dir): + if cfg.model is tools.Target.COSMOART and not os.path.isdir(cfg.meteo_dir): # if ifs_hres_dir doesn't point to a directory, # it is the name of the mother run mother_name = cfg.meteo_dir @@ -751,8 +750,7 @@ def restart_runs_spinup(work_root, cfg, start, hstart, hstop, job_names, job_names=args.job_list, force=args.force) else: - raise RuntimeError("Unknown variant: {}".format( - cfg.variant)) + raise RuntimeError("Unknown variant: {}".format(cfg.variant)) elif cfg.model is tools.Target.COSMOART: # cosmoart can't do restarts run_chain(work_root=cfg.work_root, From a5db63e7ff464de747c38db080dce15a9474ac7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Mon, 19 Jun 2023 10:52:24 +0200 Subject: [PATCH 046/108] Modify variants and add restart --- config/models.yaml | 21 ++++++++++++++------- jobs/tools/__init__.py | 3 +++ run_chain.py | 38 +++++++++++++++++--------------------- 3 files changed, 34 insertions(+), 28 deletions(-) diff --git a/config/models.yaml b/config/models.yaml index 1617d773..c9b2a1d6 100644 --- a/config/models.yaml +++ b/config/models.yaml @@ -1,25 +1,32 @@ models: cosmo: jobs: ['prepare_data', 'int2lm', 'cosmo', 'post_cosmo'] - variants: ['none', 'spinup'] + variants: ['spinup'] + restarts: True cosmo-ghg: jobs: ['prepare_data', 'emissions', 'biofluxes', 'oae', 'online_vprm', 'int2lm', 'post_int2lm', 'cosmo', 'post_cosmo'] - variants: ['none', 'spinup'] + variants: ['spinup'] + restarts: True cosmo-art: jobs: ['prepare_data', 'emissions', 'obs_nudging', 'photo_rate', 'int2lm', 'cosmo', 'post_cosmo'] - variants: ['none', 'spinup'] + variants: ['spinup'] + restarts: False icon: jobs: ['prepare_data', 'icon'] - variants: ['none'] + variants: [] + restarts: True icon-art: jobs: ['prepare_data', 'icon'] - variants: ['none'] + variants: [] + restarts: True icon-art-global: jobs: ['prepare_data', 'icon'] - variants: ['none'] + variants: [] + restarts: True icon-art-oem: jobs: ['prepare_data', 'icon'] - variants: ['none'] + variants: [] + restarts: True diff --git a/jobs/tools/__init__.py b/jobs/tools/__init__.py index 22299ba4..12e4594a 100644 --- a/jobs/tools/__init__.py +++ b/jobs/tools/__init__.py @@ -343,3 +343,6 @@ def check_job_completion(log_finished_dir, job, waittime=3000): time.sleep(0.1) else: break + +def check_model(model, model_list): + pass \ No newline at end of file diff --git a/run_chain.py b/run_chain.py index 2d64962c..c2789c8c 100755 --- a/run_chain.py +++ b/run_chain.py @@ -144,8 +144,8 @@ def load_config_file(casename, cfg): return cfg -def check_model_variant(cfg): - """Checks the model and if there is a variant. +def check_model_set_variant(cfg): + """Checks the model and sets its variant. Check if a model was provided in the config-object. If no model is provided, set the model to cosmo in the config-object. @@ -165,8 +165,6 @@ def check_model_variant(cfg): model_str = getattr(cfg, 'model') else: raise RuntimeError("Variable 'model' not set in config.") - - variant_str = getattr(cfg, 'variant', 'none') with open('config/models.yaml') as file: model_config = yaml.safe_load(file) @@ -175,10 +173,14 @@ def check_model_variant(cfg): if cfg.model not in models: raise ValueError("Invalid model: {}".format(model_str)) - model_info = models[cfg.model] - variants = model_info['variants'] - if cfg.variant not in variants: - raise ValueError(f"Invalid variant for {cfg.model}: {variant_str}") + if hasattr(cfg, 'variant'): + variants = models[cfg.model]['variants'] + if cfg.variant not in variants: + raise ValueError(f"Invalid variant for {cfg.model}: {variant}") + else: + setattr(cfg, 'variant', None) + + return cfg def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): @@ -722,19 +724,16 @@ def restart_runs_spinup(work_root, cfg, start, hstart, hstop, job_names, for casename in args.casenames: cfg = load_config_file(casename=casename, cfg=cfg) start_time = datetime.strptime(args.startdate, '%Y-%m-%d') - check_model_variant(cfg) + cfg = check_model_set_variant(cfg) if args.job_list is None: with open('config/models.yaml') as file: model_config = yaml.safe_load(file) args.job_list = model_config['models'][cfg.model]['variants'] - print("Starting chain for case {}, using {}".format( - casename, cfg.model.name)) + print(f"Starting chain for case {casename} and model {cfg.model}") - if cfg.model is tools.Target.COSMO or cfg.model is tools.Target.ICON or \ - cfg.model is tools.Target.ICONART or cfg.model is tools.Target.ICONARTOEM or \ - cfg.model is tools.Target.COSMOGHG: - if cfg.model.variant is tools.variant.NONE: + if model_config['models'][cfg.model]['restarts']: + if cfg.model.variant is None: restart_runs(work_root=cfg.work_root, cfg=cfg, start=start_time, @@ -742,7 +741,7 @@ def restart_runs_spinup(work_root, cfg, start, hstart, hstop, job_names, hstop=args.hstop, job_names=args.job_list, force=args.force) - elif cfg.model.variant is tools.variant.SPINUP: + elif cfg.model.variant == 'spinup': restart_runs_spinup(work_root=cfg.work_root, cfg=cfg, start=start_time, @@ -751,9 +750,8 @@ def restart_runs_spinup(work_root, cfg, start, hstart, hstop, job_names, job_names=args.job_list, force=args.force) else: - raise RuntimeError("Unknown variant: {}".format( - cfg.variant)) - elif cfg.model is tools.Target.COSMOART: + raise RuntimeError(f"Unknown variant: {cfg.variant}") + else: # cosmoart can't do restarts run_chain(work_root=cfg.work_root, cfg=cfg, @@ -762,7 +760,5 @@ def restart_runs_spinup(work_root, cfg, start, hstart, hstop, job_names, hstop=args.hstop, job_names=args.job_list, force=args.force) - else: - raise RuntimeError("Unknown model: {}".format(cfg.model)) print('>>> finished chain for good or bad! <<<') From 6c3a4fbaccf69f632607e019d062662f14b44df0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Mon, 19 Jun 2023 10:54:27 +0200 Subject: [PATCH 047/108] Fix run_chain --- run_chain.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/run_chain.py b/run_chain.py index 72cf89c8..b062fafc 100755 --- a/run_chain.py +++ b/run_chain.py @@ -165,11 +165,6 @@ def check_model_set_variant(cfg): model_str = getattr(cfg, 'model') else: raise RuntimeError("Variable 'model' not set in config.") -<<<<<<< HEAD -======= - - variant_str = getattr(cfg, 'variant', 'none') ->>>>>>> 8ec9d98eb81052cef5ac3461cb389dd01394565e with open('config/models.yaml') as file: model_config = yaml.safe_load(file) From 0aa15acfce4d89d7a6e4dc61750cf65de27b7f2b Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 19 Jun 2023 08:55:07 +0000 Subject: [PATCH 048/108] GitHub Action: Apply Pep8-formatting --- jobs/tools/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jobs/tools/__init__.py b/jobs/tools/__init__.py index 12e4594a..864a246f 100644 --- a/jobs/tools/__init__.py +++ b/jobs/tools/__init__.py @@ -344,5 +344,6 @@ def check_job_completion(log_finished_dir, job, waittime=3000): else: break + def check_model(model, model_list): - pass \ No newline at end of file + pass From e1c0151948cd08846d071cffc3b2b442b4939841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Mon, 19 Jun 2023 14:43:32 +0200 Subject: [PATCH 049/108] run_chain refactoring --- cases/cosmo-art-mother-test/config.py | 2 +- cases/cosmo-art-nested-test/config.py | 4 +- cases/cosmo-ghg-11km-test/config.py | 10 +- cases/icon-test/config.py | 27 +-- config/models.yaml | 15 +- run_chain.py | 329 ++++++++++---------------- 6 files changed, 145 insertions(+), 242 deletions(-) diff --git a/cases/cosmo-art-mother-test/config.py b/cases/cosmo-art-mother-test/config.py index 67051c34..0123e3ef 100644 --- a/cases/cosmo-art-mother-test/config.py +++ b/cases/cosmo-art-mother-test/config.py @@ -30,7 +30,7 @@ # INPUT ====================================================================== # # METEO ---------------------------------------------------------------------- # -# meteo files (either path to intput dir or name of mother run) +# meteo files (either path to input dir or name of mother run) meteo_dir = os.path.join(input_root, 'meteo') meteo_prefix = "eas" meteo_nameformat = meteo_prefix + '%Y%m%d%H' diff --git a/cases/cosmo-art-nested-test/config.py b/cases/cosmo-art-nested-test/config.py index b4aa8f28..e0e895d9 100644 --- a/cases/cosmo-art-nested-test/config.py +++ b/cases/cosmo-art-nested-test/config.py @@ -30,8 +30,8 @@ # INPUT ====================================================================== # # METEO ---------------------------------------------------------------------- # -# meteo files (either path to intput dir or name of mother run) -meteo_dir = "example_cosmoart_mother" +# meteo files (either path to input dir or name of mother run) +meteo_dir = "cosmo-art-mother-test" meteo_prefix = "eas" meteo_nameformat = meteo_prefix + '%Y%m%d%H' diff --git a/cases/cosmo-ghg-11km-test/config.py b/cases/cosmo-ghg-11km-test/config.py index 10dc35eb..ad58753c 100644 --- a/cases/cosmo-ghg-11km-test/config.py +++ b/cases/cosmo-ghg-11km-test/config.py @@ -125,11 +125,8 @@ # Walltimes if compute_queue == "normal": int2lm_walltime = "01:00:00" -elif compute_queue == "debug": - int2lm_walltime = "00:30:00" else: - logging.error("Unset queue name: %s" % compute_queue) - sys.exit(1) + int2lm_walltime = "00:30:00" # Domain decomposition int2lm_nodes = 2 @@ -160,13 +157,10 @@ cosmo_walltime = "00:30:00" cosmo_np_x = 6 cosmo_np_y = 4 -elif compute_queue == "debug": +else: cosmo_walltime = "00:30:00" cosmo_np_x = 4 cosmo_np_y = 3 -else: - logging.error("Unknown queue name: %s" % compute_queue) - sys.exit(1) # Total node count cosmo_np_io = 0 diff --git a/cases/icon-test/config.py b/cases/icon-test/config.py index 1e5a814a..94b815d5 100644 --- a/cases/icon-test/config.py +++ b/cases/icon-test/config.py @@ -56,21 +56,21 @@ # Input data for runscript---------------------------------------------------- # Grid + input_root_grid = os.path.join(input_root, 'grid') -radiation_grid_filename = os.path.join(input_root_grid, - "VERIFY_DOM_DOM01.parent.nc") -dynamics_grid_filename = os.path.join(input_root_grid, "VERIFY_DOM_DOM01.nc") -map_file_latbc = os.path.join(input_root_grid, "map_file.latbc") -extpar_filename = os.path.join( - input_root_grid, "external_parameter_icon_VERIFY_DOM_DOM01_tiles.nc") input_root_rad = os.path.join(input_root, 'rad') -cldopt_filename = os.path.join(input_root_rad, 'rrtm_cldopt.nc') -lrtm_filename = os.path.join(input_root_rad, 'rrtmg_lw.nc') - input_root_mapping = os.path.join(input_root, 'mapping') -map_file_ana = os.path.join(input_root_mapping, "map_file.ana") -# File names ----------------------------------------------------------------- +input_files = { + 'radiation_grid_filename': ['VERIFY_DOM_DOM01.parent.nc', 'grid'], + 'dynamics_grid_filename': ['VERIFY_DOM_DOM01.nc', 'grid'], + 'map_file_latbc': ['map_file.latbc', 'grid'], + 'extpar_filename': ['external_parameter_icon_VERIFY_DOM_DOM01_tiles.nc', 'grid'], + 'cldopt_filename': ['rrtm_cldopt.nc', 'rad'], + 'lrtm_filename': ['rrtmg_lw.nc', 'rad'], + 'map_file_ana': ['map_file.ana', 'mapping'], +} + latbc_filename = "ifs_201801_lbc.nc" inidata_filename = "ifs_init_2018010100.nc" @@ -100,12 +100,9 @@ if compute_queue == "normal": icon_walltime = "00:30:00" icon_np_tot = 12 -elif compute_queue == "debug": +else: icon_walltime = "00:30:00" icon_np_tot = 10 -else: - logging.error("Unknown queue name: %s" % compute_queue) - sys.exit(1) # POST-PROCESSING ============================================================ # REDUCE_OUTPUT -------------------------------------------------------------- diff --git a/config/models.yaml b/config/models.yaml index c9b2a1d6..fa7657e0 100644 --- a/config/models.yaml +++ b/config/models.yaml @@ -2,31 +2,30 @@ models: cosmo: jobs: ['prepare_data', 'int2lm', 'cosmo', 'post_cosmo'] variants: ['spinup'] - restarts: True + features: ['restart'] cosmo-ghg: jobs: ['prepare_data', 'emissions', 'biofluxes', 'oae', 'online_vprm', 'int2lm', 'post_int2lm', 'cosmo', 'post_cosmo'] variants: ['spinup'] - restarts: True + features: ['restart', 'tracers'] cosmo-art: jobs: ['prepare_data', 'emissions', 'obs_nudging', 'photo_rate', 'int2lm', 'cosmo', 'post_cosmo'] variants: ['spinup'] - restarts: False + features: ['nesting'] icon: jobs: ['prepare_data', 'icon'] variants: [] - restarts: True + features: ['restart'] icon-art: jobs: ['prepare_data', 'icon'] variants: [] - restarts: True + features: ['restart'] icon-art-global: jobs: ['prepare_data', 'icon'] variants: [] - restarts: True + features: ['restart'] icon-art-oem: jobs: ['prepare_data', 'icon'] variants: [] - restarts: True - + features: ['restart'] diff --git a/run_chain.py b/run_chain.py index b062fafc..5c2070df 100755 --- a/run_chain.py +++ b/run_chain.py @@ -144,7 +144,7 @@ def load_config_file(casename, cfg): return cfg -def check_model_set_variant(cfg): +def check_model_set_variant(model_cfg, cfg): """Checks the model and sets its variant. Check if a model was provided in the config-object. If no model is @@ -166,24 +166,21 @@ def check_model_set_variant(cfg): else: raise RuntimeError("Variable 'model' not set in config.") - with open('config/models.yaml') as file: - model_config = yaml.safe_load(file) - - models = model_config['models'] + models = model_cfg['models'] if cfg.model not in models: raise ValueError("Invalid model: {}".format(model_str)) if hasattr(cfg, 'variant'): variants = models[cfg.model]['variants'] if cfg.variant not in variants: - raise ValueError(f"Invalid variant for {cfg.model}: {variant}") + raise ValueError(f"Invalid variant for {cfg.model}: {cfg.variant}") else: setattr(cfg, 'variant', None) return cfg -def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): +def run_chain(work_root, model_cfg, cfg, start_time, hstart, hstop, job_names, force): """Run chain ignoring already finished jobs. Sets configuration values derived from user-provided ones, for example the @@ -244,7 +241,7 @@ def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): inidate_int2lm_yyyymmddhh = (start_time + timedelta(hours=hstart)).strftime('%Y%m%d%H') - if cfg.model.variant is tools.variant.SPINUP: + if cfg.variant == 'spinup': if cfg.first_one: # first run in spinup chain_root_last_run = '' else: # consecutive runs in spinup @@ -268,189 +265,120 @@ def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): setattr(cfg, 'forecasttime', forecasttime) - # int2lm processing always starts at hstart=0 and we modify inidate instead - setattr(cfg, 'inidate_int2lm_yyyymmddhh', inidate_int2lm_yyyymmddhh) - setattr(cfg, 'hstart_int2lm', '0') - setattr(cfg, 'hstop_int2lm', forecasttime) - # chain job_id = '%s_%d_%d' % (inidate_yyyymmddhh, hstart, hstop) chain_root = os.path.join(work_root, cfg.casename, job_id) setattr(cfg, 'chain_root', chain_root) - # INT2LM - setattr(cfg, 'int2lm_base', os.path.join(chain_root, 'int2lm')) - setattr(cfg, 'int2lm_input', os.path.join(chain_root, 'int2lm', 'input')) - setattr(cfg, 'int2lm_work', os.path.join(chain_root, 'int2lm', 'run')) - setattr(cfg, 'int2lm_output', os.path.join(chain_root, 'int2lm', 'output')) + if cfg.model.startswith('cosmo'): + # TODO: refactor + # INT2LM + setattr(cfg, 'int2lm_base', os.path.join(chain_root, 'int2lm')) + setattr(cfg, 'int2lm_input', os.path.join(chain_root, 'int2lm', 'input')) + setattr(cfg, 'int2lm_work', os.path.join(chain_root, 'int2lm', 'run')) + setattr(cfg, 'int2lm_output', os.path.join(chain_root, 'int2lm', 'output')) + + # int2lm processing always starts at hstart=0 and we modify inidate instead + setattr(cfg, 'inidate_int2lm_yyyymmddhh', inidate_int2lm_yyyymmddhh) + setattr(cfg, 'hstart_int2lm', '0') + setattr(cfg, 'hstop_int2lm', forecasttime) + + # COSMO + setattr(cfg, 'cosmo_base', os.path.join(chain_root, 'cosmo')) + setattr(cfg, 'cosmo_input', os.path.join(chain_root, 'cosmo', 'input')) + setattr(cfg, 'cosmo_work', os.path.join(chain_root, 'cosmo', 'run')) + setattr(cfg, 'cosmo_output', os.path.join(chain_root, 'cosmo', 'output')) + setattr(cfg, 'cosmo_output_reduced', + os.path.join(chain_root, 'cosmo', 'output_reduced')) + + # Number of tracers + if 'tracers' in model_cfg['models'][cfg.model]['features']: + tracer_csvfile = os.path.join(cfg.chain_src_dir, 'cases', cfg.casename, + 'cosmo_tracers.csv') + if os.path.isfile(tracer_csvfile): + with open(tracer_csvfile, 'r') as csv_file: + reader = csv.DictReader(csv_file, delimiter=',') + reader = [r for r in reader if r[''] != '#'] + setattr(cfg, 'in_tracers', len(reader)) + else: + raise FileNotFoundError(f"File not found: {tracer_csvfile}") + + # tracer_start namelist paramter for spinup simulation + if cfg.variant == 'spinup': + if cfg.first_one: + setattr(cfg, 'tracer_start', 0) + else: + setattr(cfg, 'tracer_start', cfg.spinup) + else: + setattr(cfg, 'tracer_start', 0) - # COSMO - setattr(cfg, 'cosmo_base', os.path.join(chain_root, 'cosmo')) - setattr(cfg, 'cosmo_input', os.path.join(chain_root, 'cosmo', 'input')) - setattr(cfg, 'cosmo_work', os.path.join(chain_root, 'cosmo', 'run')) - setattr(cfg, 'cosmo_output', os.path.join(chain_root, 'cosmo', 'output')) - setattr(cfg, 'cosmo_output_reduced', - os.path.join(chain_root, 'cosmo', 'output_reduced')) + # asynchronous I/O + if hasattr(cfg, 'cfg.cosmo_np_io'): + if cfg.cosmo_np_io == 0: + setattr(cfg, 'lasync_io', '.FALSE.') + setattr(cfg, 'num_iope_percomm', 0) + else: + setattr(cfg, 'lasync_io', '.TRUE.') + setattr(cfg, 'num_iope_percomm', 1) # ICON - setattr(cfg, 'icon_base', os.path.join(chain_root, 'icon')) - setattr(cfg, 'icon_input', os.path.join(chain_root, 'icon', 'input')) - setattr(cfg, 'icon_input_icbc', - os.path.join(chain_root, 'icon', 'input', 'icbc')) - setattr(cfg, 'icon_input_oae', - os.path.join(chain_root, 'icon', 'input', 'oae')) - setattr(cfg, 'icon_input_grid', - os.path.join(chain_root, 'icon', 'input', 'grid')) - setattr(cfg, 'icon_input_mapping', - os.path.join(chain_root, 'icon', 'input', 'mapping')) - setattr(cfg, 'icon_input_rad', - os.path.join(chain_root, 'icon', 'input', 'rad')) - setattr(cfg, 'icon_input_xml', - os.path.join(chain_root, 'icon', 'input', 'xml')) - setattr(cfg, 'icon_work', os.path.join(chain_root, 'icon', 'run')) - setattr(cfg, 'icon_output', os.path.join(chain_root, 'icon', 'output')) - setattr(cfg, 'icon_output_reduced', - os.path.join(chain_root, 'icon', 'output_reduced')) - if cfg.model is tools.Target.ICON or cfg.model is tools.Target.ICONART \ - or cfg.model is tools.Target.ICONARTOEM: - setattr( - cfg, 'radiation_grid_filename_scratch', - os.path.join(cfg.icon_input_grid, - os.path.basename(cfg.radiation_grid_filename))) - setattr( - cfg, 'dynamics_grid_filename_scratch', - os.path.join(cfg.icon_input_grid, - os.path.basename(cfg.dynamics_grid_filename))) - setattr( - cfg, 'map_file_latbc_scratch', - os.path.join(cfg.icon_input_grid, - os.path.basename(cfg.map_file_latbc))) - setattr( - cfg, 'extpar_filename_scratch', - os.path.join(cfg.icon_input_grid, - os.path.basename(cfg.extpar_filename))) - setattr(cfg, 'lateral_boundary_grid_scratch', - os.path.join(cfg.icon_input_grid, 'lateral_boundary.grid.nc')) - setattr(cfg, 'lateral_boundary_grid_order', - os.path.join(cfg.icon_input_grid, 'lateral_boundary')) - setattr( - cfg, 'cldopt_filename_scratch', - os.path.join(cfg.icon_input_rad, - os.path.basename(cfg.cldopt_filename))) - setattr( - cfg, 'lrtm_filename_scratch', - os.path.join(cfg.icon_input_rad, - os.path.basename(cfg.lrtm_filename))) - setattr( - cfg, 'map_file_ana_scratch', - os.path.join(cfg.icon_input_mapping, - os.path.basename(cfg.map_file_ana))) - if hasattr(cfg, 'chemtracer_xml_filename'): - setattr( - cfg, 'chemtracer_xml_filename_scratch', - os.path.join(cfg.icon_input_xml, - os.path.basename(cfg.chemtracer_xml_filename))) - if hasattr(cfg, 'pntSrc_xml_filename'): - setattr( - cfg, 'pntSrc_xml_filename_scratch', - os.path.join(cfg.icon_input_xml, - os.path.basename(cfg.pntSrc_xml_filename))) - - # OEM - if cfg.model is tools.Target.ICONARTOEM: - setattr( - cfg, 'oae_gridded_emissions_nc_scratch', - os.path.join(cfg.icon_input_oae, - os.path.basename(cfg.oae_gridded_emissions_nc))) - setattr( - cfg, 'oae_vertical_profiles_nc_scratch', - os.path.join(cfg.icon_input_oae, - os.path.basename(cfg.oae_vertical_profiles_nc))) - if hasattr(cfg, 'oae_hourofday_nc'): - setattr( - cfg, 'oae_hourofday_nc_scratch', - os.path.join(cfg.icon_input_oae, - os.path.basename(cfg.oae_hourofday_nc))) - else: - setattr(cfg, 'oae_hourofday_nc_scratch', '') - if hasattr(cfg, 'oae_dayofweek_nc'): - setattr( - cfg, 'oae_dayofweek_nc_scratch', - os.path.join(cfg.icon_input_oae, - os.path.basename(cfg.oae_dayofweek_nc))) - else: - setattr(cfg, 'oae_dayofweek_nc_scratch', '') - if hasattr(cfg, 'oae_monthofyear_nc'): - setattr( - cfg, 'oae_monthofyear_nc_scratch', - os.path.join(cfg.icon_input_oae, - os.path.basename(cfg.oae_monthofyear_nc))) - else: - setattr(cfg, 'oae_monthofyear_nc_scratch', '') - if hasattr(cfg, 'oae_hourofyear_nc'): - setattr( - cfg, 'oae_hourofyear_nc_scratch', - os.path.join(cfg.icon_input_oae, - os.path.basename(cfg.oae_hourofyear_nc))) - else: - setattr(cfg, 'oae_hourofyear_nc_scratch', '') - if hasattr(cfg, 'oae_ens_reg_nc'): + # TODO: refactor + if cfg.model.startswith('icon'): + setattr(cfg, 'icon_base', os.path.join(chain_root, 'icon')) + setattr(cfg, 'icon_input', os.path.join(chain_root, 'icon', 'input')) + setattr(cfg, 'icon_input_icbc', + os.path.join(chain_root, 'icon', 'input', 'icbc')) + setattr(cfg, 'icon_input_oae', + os.path.join(chain_root, 'icon', 'input', 'oae')) + setattr(cfg, 'icon_input_grid', + os.path.join(chain_root, 'icon', 'input', 'grid')) + setattr(cfg, 'icon_input_mapping', + os.path.join(chain_root, 'icon', 'input', 'mapping')) + setattr(cfg, 'icon_input_rad', + os.path.join(chain_root, 'icon', 'input', 'rad')) + setattr(cfg, 'icon_input_xml', + os.path.join(chain_root, 'icon', 'input', 'xml')) + setattr(cfg, 'icon_work', os.path.join(chain_root, 'icon', 'run')) + setattr(cfg, 'icon_output', os.path.join(chain_root, 'icon', 'output')) + setattr(cfg, 'icon_output_reduced', + os.path.join(chain_root, 'icon', 'output_reduced')) + + for varname in cfg.input_files: + file_info = input_files[varname] setattr( - cfg, 'oae_ens_reg_nc_scratch', - os.path.join(cfg.icon_input_oae, - os.path.basename(cfg.oae_ens_reg_nc))) - if hasattr(cfg, 'oae_ens_lambda_nc'): - setattr( - cfg, 'oae_ens_lambda_nc_scratch', - os.path.join(cfg.icon_input_oae, - os.path.basename(cfg.oae_ens_lambda_nc))) - - # Number of tracers - tracer_csvfile = os.path.join(cfg.chain_src_dir, 'cases', cfg.casename, - 'cosmo_tracers.csv') - if os.path.isfile(tracer_csvfile): - if cfg.model is tools.Target.COSMOGHG: - with open(tracer_csvfile, 'r') as csv_file: - reader = csv.DictReader(csv_file, delimiter=',') - reader = [r for r in reader if r[''] != '#'] - setattr(cfg, 'in_tracers', len(reader)) - - # tracer_start namelist paramter for spinup simulation - if cfg.model.variant is tools.variant.SPINUP: - if cfg.first_one: - setattr(cfg, 'tracer_start', 0) - else: - setattr(cfg, 'tracer_start', cfg.spinup) - else: - setattr(cfg, 'tracer_start', 0) + cfg, f'{varname}_scratch', + os.path.join(cfg.icon_input_base, file_info[1], file_info[0]) + ) + + ini_datetime_string = ( + start_time + + timedelta(hours=hstart)).strftime('%Y-%m-%dT%H:00:00Z') + end_datetime_string = ( + start_time + timedelta(hours=hstart) + + timedelta(hours=hstop)).strftime('%Y-%m-%dT%H:00:00Z') + setattr(cfg, 'ini_datetime_string', ini_datetime_string) + setattr(cfg, 'end_datetime_string', end_datetime_string) + # Set restart directories + setattr(cfg, 'icon_restart_out', + os.path.join(chain_root, 'icon', 'restart')) + setattr(cfg, 'icon_restart_in', + os.path.join(chain_root_last_run, 'icon', 'restart')) + # TODO: Set correct restart setting + setattr(cfg, 'lrestart', '.FALSE.') # constraint (gpu or mc) if hasattr(cfg, 'constraint'): assert cfg.constraint in ['gpu', 'mc'], ("Unknown constraint, use" "gpu or mc") - else: - # set default constraint - if cfg.model is tools.Target.COSMOART: - setattr(cfg, 'constraint', 'mc') - else: - setattr(cfg, 'constraint', 'gpu') - # asynchronous I/O - if hasattr(cfg, 'cfg.cosmo_np_io'): - if cfg.cosmo_np_io == 0: - setattr(cfg, 'lasync_io', '.FALSE.') - setattr(cfg, 'num_iope_percomm', 0) - else: - setattr(cfg, 'lasync_io', '.TRUE.') - setattr(cfg, 'num_iope_percomm', 1) - - if cfg.model.variant is tools.variant.SPINUP: + # Spinup + if cfg.variant == 'spinup': setattr(cfg, 'last_cosmo_output', os.path.join(chain_root_last_run, 'cosmo', 'output')) # No restart for spinup simulations (= default values for no restart) setattr(cfg, 'cosmo_restart_out', '') setattr(cfg, 'cosmo_restart_in', '') - elif cfg.model is not tools.Target.COSMOART: + elif 'restart' in model_cfg['models'][cfg.model]['features']: job_id_last_run = '%s_%d_%d' % (inidate_yyyymmddhh, hstart - cfg.restart_step, hstart) chain_root_last_run = os.path.join(work_root, cfg.casename, @@ -461,30 +389,12 @@ def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): setattr(cfg, 'cosmo_restart_in', os.path.join(chain_root_last_run, 'cosmo', 'restart')) - if cfg.model is tools.Target.COSMOART: - # no restarts in cosmoart + # Restart step + if 'restart' in model_cfg['models'][cfg.model]['features']: setattr(cfg, 'restart_step', hstop - hstart) - if cfg.model is tools.Target.ICON or cfg.model is tools.Target.ICONART or \ - cfg.model is tools.Target.ICONARTOEM: - ini_datetime_string = ( - start_time + - timedelta(hours=hstart)).strftime('%Y-%m-%dT%H:00:00Z') - end_datetime_string = ( - start_time + timedelta(hours=hstart) + - timedelta(hours=hstop)).strftime('%Y-%m-%dT%H:00:00Z') - setattr(cfg, 'ini_datetime_string', ini_datetime_string) - setattr(cfg, 'end_datetime_string', end_datetime_string) - # Set restart directories - setattr(cfg, 'icon_restart_out', - os.path.join(chain_root, 'icon', 'restart')) - setattr(cfg, 'icon_restart_in', - os.path.join(chain_root_last_run, 'icon', 'restart')) - # TODO: Set correct restart setting - setattr(cfg, 'lrestart', '.FALSE.') - # if nested run: use output of mother-simulation - if cfg.model is tools.Target.COSMOART and not os.path.isdir(cfg.meteo_dir): + if model_cfg['models'][cfg.model]['jobs'] and not os.path.isdir(cfg.meteo_dir): # if ifs_hres_dir doesn't point to a directory, # it is the name of the mother run mother_name = cfg.meteo_dir @@ -513,13 +423,6 @@ def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): # run jobs (if required) for job in job_names: - - # mapping of scripts in jobs with their arguments - - # if job == 'meteo': - # job.meteo.main(start_time, hstart, hstop, cfg) - # continue - skip = False # if exists job is currently worked on or has been finished @@ -587,7 +490,7 @@ def run_chain(work_root, cfg, start_time, hstart, hstop, job_names, force): raise RuntimeError(subject) -def restart_runs(work_root, cfg, start, hstart, hstop, job_names, force): +def restart_runs(work_root, model_cfg, cfg, start, hstart, hstop, job_names, force): """Starts the subchains in the specified intervals. Slices the total runtime of the chain according to ``cfg.restart_step``. @@ -633,7 +536,7 @@ def restart_runs(work_root, cfg, start, hstart, hstop, job_names, force): force=force) -def restart_runs_spinup(work_root, cfg, start, hstart, hstop, job_names, +def restart_runs_spinup(work_root, model_cfg, cfg, start, hstart, hstop, job_names, force): """Starts the subchains in the specified intervals. @@ -699,6 +602,7 @@ def restart_runs_spinup(work_root, cfg, start, hstart, hstop, job_names, if cfg.first_one: run_chain(work_root=work_root, + model_cfg=model_cfg, cfg=cfg, start_time=time, hstart=0, @@ -707,6 +611,7 @@ def restart_runs_spinup(work_root, cfg, start, hstart, hstop, job_names, force=force) else: run_chain(work_root=work_root, + model_cfg=model_cfg, cfg=cfg, start_time=time, hstart=-cfg.spinup, @@ -715,33 +620,41 @@ def restart_runs_spinup(work_root, cfg, start, hstart, hstop, job_names, force=force) +def load_model_config_yaml(yamlfile): + with open(yamlfile) as file: + model_cfg = yaml.safe_load(file) + return model_cfg + + if __name__ == '__main__': args = parse_arguments() # 'empty' config object to be overwritten by load_config_file cfg = None for casename in args.casenames: + model_cfg = load_model_config_yaml('config/models.yaml') cfg = load_config_file(casename=casename, cfg=cfg) start_time = datetime.strptime(args.startdate, '%Y-%m-%d') - cfg = check_model_set_variant(cfg) + cfg = check_model_set_variant(model_cfg, cfg) if args.job_list is None: - with open('config/models.yaml') as file: - model_config = yaml.safe_load(file) - args.job_list = model_config['models'][cfg.model]['variants'] + args.job_list = model_cfg['models'][cfg.model]['jobs'] print(f"Starting chain for case {casename} and model {cfg.model}") - if model_config['models'][cfg.model]['restarts']: - if cfg.model.variant is None: + if 'restart' in model_cfg['models'][cfg.model]['features']: + if cfg.variant is None: restart_runs(work_root=cfg.work_root, + model_cfg=model_cfg, cfg=cfg, start=start_time, hstart=args.hstart, hstop=args.hstop, job_names=args.job_list, force=args.force) - elif cfg.model.variant == 'spinup': + elif cfg.variant == 'spinup': + print(f"Model variant is {cfg.variant}") restart_runs_spinup(work_root=cfg.work_root, + model_cfg=model_cfg, cfg=cfg, start=start_time, hstart=args.hstart, From 2541bed4a95d429c4dfbd234d5b36f75725f7b30 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 19 Jun 2023 12:44:16 +0000 Subject: [PATCH 050/108] GitHub Action: Apply Pep8-formatting --- cases/icon-test/config.py | 3 ++- run_chain.py | 33 +++++++++++++++++++-------------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/cases/icon-test/config.py b/cases/icon-test/config.py index 94b815d5..fc3f0389 100644 --- a/cases/icon-test/config.py +++ b/cases/icon-test/config.py @@ -65,7 +65,8 @@ 'radiation_grid_filename': ['VERIFY_DOM_DOM01.parent.nc', 'grid'], 'dynamics_grid_filename': ['VERIFY_DOM_DOM01.nc', 'grid'], 'map_file_latbc': ['map_file.latbc', 'grid'], - 'extpar_filename': ['external_parameter_icon_VERIFY_DOM_DOM01_tiles.nc', 'grid'], + 'extpar_filename': + ['external_parameter_icon_VERIFY_DOM_DOM01_tiles.nc', 'grid'], 'cldopt_filename': ['rrtm_cldopt.nc', 'rad'], 'lrtm_filename': ['rrtmg_lw.nc', 'rad'], 'map_file_ana': ['map_file.ana', 'mapping'], diff --git a/run_chain.py b/run_chain.py index 5c2070df..804a641d 100755 --- a/run_chain.py +++ b/run_chain.py @@ -180,7 +180,8 @@ def check_model_set_variant(model_cfg, cfg): return cfg -def run_chain(work_root, model_cfg, cfg, start_time, hstart, hstop, job_names, force): +def run_chain(work_root, model_cfg, cfg, start_time, hstart, hstop, job_names, + force): """Run chain ignoring already finished jobs. Sets configuration values derived from user-provided ones, for example the @@ -270,13 +271,15 @@ def run_chain(work_root, model_cfg, cfg, start_time, hstart, hstop, job_names, f chain_root = os.path.join(work_root, cfg.casename, job_id) setattr(cfg, 'chain_root', chain_root) - if cfg.model.startswith('cosmo'): + if cfg.model.startswith('cosmo'): # TODO: refactor # INT2LM setattr(cfg, 'int2lm_base', os.path.join(chain_root, 'int2lm')) - setattr(cfg, 'int2lm_input', os.path.join(chain_root, 'int2lm', 'input')) + setattr(cfg, 'int2lm_input', os.path.join(chain_root, 'int2lm', + 'input')) setattr(cfg, 'int2lm_work', os.path.join(chain_root, 'int2lm', 'run')) - setattr(cfg, 'int2lm_output', os.path.join(chain_root, 'int2lm', 'output')) + setattr(cfg, 'int2lm_output', + os.path.join(chain_root, 'int2lm', 'output')) # int2lm processing always starts at hstart=0 and we modify inidate instead setattr(cfg, 'inidate_int2lm_yyyymmddhh', inidate_int2lm_yyyymmddhh) @@ -287,14 +290,15 @@ def run_chain(work_root, model_cfg, cfg, start_time, hstart, hstop, job_names, f setattr(cfg, 'cosmo_base', os.path.join(chain_root, 'cosmo')) setattr(cfg, 'cosmo_input', os.path.join(chain_root, 'cosmo', 'input')) setattr(cfg, 'cosmo_work', os.path.join(chain_root, 'cosmo', 'run')) - setattr(cfg, 'cosmo_output', os.path.join(chain_root, 'cosmo', 'output')) + setattr(cfg, 'cosmo_output', os.path.join(chain_root, 'cosmo', + 'output')) setattr(cfg, 'cosmo_output_reduced', os.path.join(chain_root, 'cosmo', 'output_reduced')) # Number of tracers if 'tracers' in model_cfg['models'][cfg.model]['features']: - tracer_csvfile = os.path.join(cfg.chain_src_dir, 'cases', cfg.casename, - 'cosmo_tracers.csv') + tracer_csvfile = os.path.join(cfg.chain_src_dir, 'cases', + cfg.casename, 'cosmo_tracers.csv') if os.path.isfile(tracer_csvfile): with open(tracer_csvfile, 'r') as csv_file: reader = csv.DictReader(csv_file, delimiter=',') @@ -323,7 +327,7 @@ def run_chain(work_root, model_cfg, cfg, start_time, hstart, hstop, job_names, f # ICON # TODO: refactor - if cfg.model.startswith('icon'): + if cfg.model.startswith('icon'): setattr(cfg, 'icon_base', os.path.join(chain_root, 'icon')) setattr(cfg, 'icon_input', os.path.join(chain_root, 'icon', 'input')) setattr(cfg, 'icon_input_icbc', @@ -347,8 +351,7 @@ def run_chain(work_root, model_cfg, cfg, start_time, hstart, hstop, job_names, f file_info = input_files[varname] setattr( cfg, f'{varname}_scratch', - os.path.join(cfg.icon_input_base, file_info[1], file_info[0]) - ) + os.path.join(cfg.icon_input_base, file_info[1], file_info[0])) ini_datetime_string = ( start_time + @@ -394,7 +397,8 @@ def run_chain(work_root, model_cfg, cfg, start_time, hstart, hstop, job_names, f setattr(cfg, 'restart_step', hstop - hstart) # if nested run: use output of mother-simulation - if model_cfg['models'][cfg.model]['jobs'] and not os.path.isdir(cfg.meteo_dir): + if model_cfg['models'][cfg.model]['jobs'] and not os.path.isdir( + cfg.meteo_dir): # if ifs_hres_dir doesn't point to a directory, # it is the name of the mother run mother_name = cfg.meteo_dir @@ -490,7 +494,8 @@ def run_chain(work_root, model_cfg, cfg, start_time, hstart, hstop, job_names, f raise RuntimeError(subject) -def restart_runs(work_root, model_cfg, cfg, start, hstart, hstop, job_names, force): +def restart_runs(work_root, model_cfg, cfg, start, hstart, hstop, job_names, + force): """Starts the subchains in the specified intervals. Slices the total runtime of the chain according to ``cfg.restart_step``. @@ -536,8 +541,8 @@ def restart_runs(work_root, model_cfg, cfg, start, hstart, hstop, job_names, for force=force) -def restart_runs_spinup(work_root, model_cfg, cfg, start, hstart, hstop, job_names, - force): +def restart_runs_spinup(work_root, model_cfg, cfg, start, hstart, hstop, + job_names, force): """Starts the subchains in the specified intervals. Slices the total runtime of the chain according to ``cfg.restart_step``. From d46d4f179ee7fce5368c8c66675d1b5bfac059c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Mon, 19 Jun 2023 15:24:51 +0200 Subject: [PATCH 051/108] Adapt some jobs --- jobs/biofluxes.py | 2 +- jobs/emissions.py | 5 -- jobs/photo_rate.py | 2 +- jobs/post_int2lm.py | 2 +- jobs/prepare_data.py | 95 ++++++++++++++++++-------------------- jobs/tools/__init__.py | 2 +- jobs/tools/check_model.py | 22 +++++++++ jobs/tools/check_target.py | 22 --------- run_chain.py | 3 +- 9 files changed, 73 insertions(+), 82 deletions(-) create mode 100644 jobs/tools/check_model.py delete mode 100644 jobs/tools/check_target.py diff --git a/jobs/biofluxes.py b/jobs/biofluxes.py index 2ed99e62..c8047eba 100644 --- a/jobs/biofluxes.py +++ b/jobs/biofluxes.py @@ -39,7 +39,7 @@ def main(starttime, hstart, hstop, cfg): cfg : config-object Object holding all user-configuration parameters as attributes """ - tools.check_target(cfg, tools.Target.COSMOGHG) + tools.check_model(cfg, 'cosmo-ghg') scratch_path = os.path.join(cfg.int2lm_input, 'vprm') diff --git a/jobs/emissions.py b/jobs/emissions.py index 3f6950ad..9991b14b 100644 --- a/jobs/emissions.py +++ b/jobs/emissions.py @@ -80,8 +80,3 @@ def main(starttime, hstart, hstop, cfg): source_path = os.path.join(emis_dir, emis_prefix + filename_ending) dest_path = os.path.join(target_dir, dest_prefix + filename_ending) tools.copy_file(source_path, dest_path) - - # convert grid_mapping_name from string (NF90_STRING) to char - # (NF90_CHAR) (needed for int2lm to work) - if cfg.target is tools.Target.COSMO: - tools.string2char.main(dest_path) diff --git a/jobs/photo_rate.py b/jobs/photo_rate.py index 8c3235fd..b30e3eb9 100644 --- a/jobs/photo_rate.py +++ b/jobs/photo_rate.py @@ -27,7 +27,7 @@ def main(starttime, hstart, hstop, cfg): cfg : config-object Object holding all user-configuration parameters as attributes """ - tools.check_target(cfg, tools.Target.COSMOART) + tools.check_model(cfg, 'cosmo-art') logging.info("Copying photolysis-rate file from {} to {}".format( cfg.photo_rate_file, diff --git a/jobs/post_int2lm.py b/jobs/post_int2lm.py index 8a7a58b1..f6be1c1f 100644 --- a/jobs/post_int2lm.py +++ b/jobs/post_int2lm.py @@ -40,7 +40,7 @@ def main(start_time, hstart, hstop, cfg): cfg : config-object Object holding all user-configuration parameters as attributes """ - tools.check_target(cfg, tools.Target.COSMOGHG) + tools.check_model(cfg, 'cosmo-ghg') int2lm_output = cfg.int2lm_output inidate_int2lm_yyyymmddhh = cfg.inidate_int2lm_yyyymmddhh diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index 118b273e..0734e725 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -39,7 +39,7 @@ def main(starttime, hstart, hstop, cfg): """ - **ICON** (if ``cfg.target`` is ``tools.Target.ICON``) + **ICON** (if ``cfg.model`` is ``tools.Target.ICON``) Create necessary directories ``cfg.icon_input_icbc`` and ''cfg.icon_work'' @@ -79,9 +79,7 @@ def main(starttime, hstart, hstop, cfg): Object holding all user-configuration parameters as attributes """ - if cfg.target is tools.Target.ICON or cfg.target is tools.Target.ICONART or \ - cfg.target is tools.Target.ICONARTOEM or cfg.target is tools.Target.ICONARTGLOBAL: - + if cfg.model.startswith('icon'): logging.info('ICON input data (IC/BC)') starttime_real = starttime + timedelta(hours=hstart) @@ -133,8 +131,7 @@ def main(starttime, hstart, hstop, cfg): output_log=True) # Copy tracer data in case of ART - if cfg.target is tools.Target.ICONART or cfg.target is tools.Target.ICONARTOEM or\ - cfg.target is tools.Target.ICONARTGLOBAL: + if cfg.model.startswith('icon-art'): tools.create_dir(cfg.icon_input_xml, "icon_input_xml") if hasattr(cfg, 'chemtracer_xml_filename'): tools.copy_file(cfg.chemtracer_xml_filename, @@ -146,7 +143,7 @@ def main(starttime, hstart, hstop, cfg): output_log=True) # Copy data for global ICON-ART - if cfg.target is tools.Target.ICONARTGLOBAL: + if cfg.model == 'icon-art-global': if hasattr(cfg, 'boundcond_xml_filename'): tools.copy_file(cfg.boundcond_xml_filename, cfg.boundcond_xml_filename_scratch, @@ -338,39 +335,39 @@ def main(starttime, hstart, hstop, cfg): os.symlink(cfg.restart_filename_scratch, os.path.join(cfg.icon_work, 'restart_atm_DOM01.nc')) - # Copy data for ICON-ART-OEM - if cfg.target is tools.Target.ICONARTOEM: - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_gridded_emissions_nc), - cfg.oae_gridded_emissions_nc_scratch) - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_vertical_profiles_nc), - cfg.oae_vertical_profiles_nc_scratch) - if hasattr(cfg, 'oae_hourofday_nc'): - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_hourofday_nc), - cfg.oae_hourofday_nc_scratch) - if hasattr(cfg, 'oae_dayofweek_nc'): - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_dayofweek_nc), - cfg.oae_dayofweek_nc_scratch) - if hasattr(cfg, 'oae_monthofyear_nc'): - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_monthofyear_nc), - cfg.oae_monthofyear_nc_scratch) - if hasattr(cfg, 'oae_hourofyear_nc'): + else: # non-global ICON-ART + # Copy data for ICON-ART-OEM + if cfg.model == 'icon-art-oem': tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_hourofyear_nc), - cfg.oae_hourofyear_nc_scratch) - if hasattr(cfg, 'oae_ens_reg_nc'): - tools.copy_file(os.path.join(cfg.oae_dir, cfg.oae_ens_reg_nc), - cfg.oae_ens_reg_nc_scratch) - if hasattr(cfg, 'oae_ens_lambda_nc'): + os.path.join(cfg.oae_dir, cfg.oae_gridded_emissions_nc), + cfg.oae_gridded_emissions_nc_scratch) tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_ens_lambda_nc), - cfg.oae_ens_lambda_nc_scratch) + os.path.join(cfg.oae_dir, cfg.oae_vertical_profiles_nc), + cfg.oae_vertical_profiles_nc_scratch) + if hasattr(cfg, 'oae_hourofday_nc'): + tools.copy_file( + os.path.join(cfg.oae_dir, cfg.oae_hourofday_nc), + cfg.oae_hourofday_nc_scratch) + if hasattr(cfg, 'oae_dayofweek_nc'): + tools.copy_file( + os.path.join(cfg.oae_dir, cfg.oae_dayofweek_nc), + cfg.oae_dayofweek_nc_scratch) + if hasattr(cfg, 'oae_monthofyear_nc'): + tools.copy_file( + os.path.join(cfg.oae_dir, cfg.oae_monthofyear_nc), + cfg.oae_monthofyear_nc_scratch) + if hasattr(cfg, 'oae_hourofyear_nc'): + tools.copy_file( + os.path.join(cfg.oae_dir, cfg.oae_hourofyear_nc), + cfg.oae_hourofyear_nc_scratch) + if hasattr(cfg, 'oae_ens_reg_nc'): + tools.copy_file(os.path.join(cfg.oae_dir, cfg.oae_ens_reg_nc), + cfg.oae_ens_reg_nc_scratch) + if hasattr(cfg, 'oae_ens_lambda_nc'): + tools.copy_file( + os.path.join(cfg.oae_dir, cfg.oae_ens_lambda_nc), + cfg.oae_ens_lambda_nc_scratch) - if cfg.target is not tools.Target.ICONARTGLOBAL: #----------------------------------------------------- # Get datafile lists for LBC (each at 00 UTC and others) #----------------------------------------------------- @@ -378,10 +375,10 @@ def main(starttime, hstart, hstop, cfg): datafile_list_rest = [] datafile_list_chem = [] for time in tools.iter_hours(starttime, hstart, hstop, - cfg.meteo_inc): + cfg.meteo_inc): meteo_file = os.path.join(cfg.icon_input_icbc, - time.strftime(cfg.meteo_nameformat)) - if cfg.target is tools.Target.ICONART or cfg.target is tools.Target.ICONARTOEM: + time.strftime(cfg.meteo_nameformat)) + if cfg.model == 'icon-art' or cfg.model == 'icon-art-oem': chem_file = os.path.join( cfg.icon_input_icbc, time.strftime(cfg.chem_nameformat)) @@ -400,7 +397,7 @@ def main(starttime, hstart, hstop, cfg): for runscript in cfg.icontools_runjobs: logfile = os.path.join(cfg.log_working_dir, 'prepare_data') logfile_finish = os.path.join(cfg.log_finished_dir, - 'prepare_data') + 'prepare_data') with open(os.path.join(cfg.case_dir, runscript)) as input_file: to_write = input_file.read() output_run = os.path.join(cfg.icon_work, "%s.job" % runscript) @@ -426,7 +423,7 @@ def main(starttime, hstart, hstop, cfg): # Add GEOSP to all meteo files #----------------------------------------------------- for time in tools.iter_hours(starttime, hstart, hstop, - cfg.meteo_inc): + cfg.meteo_inc): src_file = os.path.join( cfg.icon_input_icbc, time.strftime(cfg.meteo_nameformat) + '_lbc.nc') @@ -452,9 +449,9 @@ def main(starttime, hstart, hstop, cfg): #----------------------------------------------------- # In case of OEM: merge chem tracers with meteo-files #----------------------------------------------------- - if cfg.target is tools.Target.ICONARTOEM: + if cfg.model == 'icon-art-oem': for time in tools.iter_hours(starttime, hstart, hstop, - cfg.meteo_inc): + cfg.meteo_inc): if time == starttime: #------------ # Merge IC: @@ -477,7 +474,7 @@ def main(starttime, hstart, hstop, cfg): ds_chem['PS'].attrs["long_name"] = 'surface pressure' # merge: ds_merged = xr.merge([ds_meteo, ds_chem], - compat="override") + compat="override") #ds_merged.attrs = ds.attrs ds_merged.to_netcdf(merged_file) # Rename file to get original file name @@ -507,7 +504,7 @@ def main(starttime, hstart, hstop, cfg): ds_chem['TRCH4_chemtr'] = ds_chem['CH4_BG'] # merge: ds_merged = xr.merge([ds_meteo, ds_chem], - compat="override") + compat="override") #ds_merged.attrs = ds.attrs ds_merged.to_netcdf(merged_file) # Rename file to get original file name @@ -609,7 +606,7 @@ def main(starttime, hstart, hstop, cfg): # Other IC/BC data inv_to_process = [] - if cfg.target is tools.Target.COSMOGHG: + if cfg.model == 'cosmo-ghg': try: CAMS = dict(fullname="CAMS", nickname="cams", @@ -630,7 +627,7 @@ def main(starttime, hstart, hstop, cfg): inv_to_process.append(CT) except AttributeError: pass - elif cfg.target is tools.Target.COSMOART: + elif cfg.model == 'cosmo-art': try: MOZART = dict(fullname='MOZART', nickname='mozart', @@ -645,7 +642,7 @@ def main(starttime, hstart, hstop, cfg): except AttributeError: pass - if cfg.target is tools.Target.COSMOGHG or cfg.target is tools.Target.COSMOART: + if cfg.model == 'cosmo-ghg' or cfg.model == 'cosmo-art': logging.info("Processing " + ", ".join([i["fullname"] for i in inv_to_process]) + " data") diff --git a/jobs/tools/__init__.py b/jobs/tools/__init__.py index 864a246f..c300d936 100644 --- a/jobs/tools/__init__.py +++ b/jobs/tools/__init__.py @@ -18,7 +18,7 @@ from . import write_int2lm_input_art #from . import write_cosmo_input_ghg from . import mozart2int2lm -from .check_target import check_target +from .check_model import check_model from . import comp_nc from . import helper diff --git a/jobs/tools/check_model.py b/jobs/tools/check_model.py new file mode 100644 index 00000000..9a1b29c1 --- /dev/null +++ b/jobs/tools/check_model.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + + +def check_model(cfg, model='COSMO'): + """Check that the model specified in cfg matched the prescribed model. + + Check that cfg.model == model. If not, raises a value-error. + Ignores capitalization of the strings + + Parameters + ---------- + cfg : config-object + + model : str + Prescribed model + """ + #don't care about capitalization + if not cfg.model.lower() == model.lower(): + raise ValueError("The model specified in the configuration file is {}" + ", but the job only applies to {}.".format( + cfg.model, model)) diff --git a/jobs/tools/check_target.py b/jobs/tools/check_target.py deleted file mode 100644 index 5b383ffb..00000000 --- a/jobs/tools/check_target.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - - -def check_target(cfg, target='COSMO'): - """Check that the target specified in cfg matched the prescribed target. - - Check that cfg.target == target. If not, raises a value-error. - Ignores capitalization of the strings - - Parameters - ---------- - cfg : config-object - - target : str - Prescribed target - """ - #don't care about capitalization - if not cfg.target.lower() == target.lower(): - raise ValueError("The target specified in the configuration file is {}" - ", but the job only applies to {}.".format( - cfg.target, target)) diff --git a/run_chain.py b/run_chain.py index 5c2070df..9388f50f 100755 --- a/run_chain.py +++ b/run_chain.py @@ -344,7 +344,7 @@ def run_chain(work_root, model_cfg, cfg, start_time, hstart, hstop, job_names, f os.path.join(chain_root, 'icon', 'output_reduced')) for varname in cfg.input_files: - file_info = input_files[varname] + file_info = cfg.input_files[varname] setattr( cfg, f'{varname}_scratch', os.path.join(cfg.icon_input_base, file_info[1], file_info[0]) @@ -400,7 +400,6 @@ def run_chain(work_root, model_cfg, cfg, start_time, hstart, hstop, job_names, f mother_name = cfg.meteo_dir cfg.meteo_dir = os.path.join(work_root, mother_name, job_id, 'cosmo', 'output') - cfg.meteo_inc = 1 cfg.meteo_prefix = 'lffd' From ab3f65b4d0f466ebada447b29cb2ebec249b7031 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 19 Jun 2023 13:25:56 +0000 Subject: [PATCH 052/108] GitHub Action: Apply Pep8-formatting --- jobs/prepare_data.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index 0734e725..06c6341d 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -335,7 +335,7 @@ def main(starttime, hstart, hstop, cfg): os.symlink(cfg.restart_filename_scratch, os.path.join(cfg.icon_work, 'restart_atm_DOM01.nc')) - else: # non-global ICON-ART + else: # non-global ICON-ART # Copy data for ICON-ART-OEM if cfg.model == 'icon-art-oem': tools.copy_file( @@ -361,8 +361,9 @@ def main(starttime, hstart, hstop, cfg): os.path.join(cfg.oae_dir, cfg.oae_hourofyear_nc), cfg.oae_hourofyear_nc_scratch) if hasattr(cfg, 'oae_ens_reg_nc'): - tools.copy_file(os.path.join(cfg.oae_dir, cfg.oae_ens_reg_nc), - cfg.oae_ens_reg_nc_scratch) + tools.copy_file( + os.path.join(cfg.oae_dir, cfg.oae_ens_reg_nc), + cfg.oae_ens_reg_nc_scratch) if hasattr(cfg, 'oae_ens_lambda_nc'): tools.copy_file( os.path.join(cfg.oae_dir, cfg.oae_ens_lambda_nc), @@ -375,9 +376,9 @@ def main(starttime, hstart, hstop, cfg): datafile_list_rest = [] datafile_list_chem = [] for time in tools.iter_hours(starttime, hstart, hstop, - cfg.meteo_inc): + cfg.meteo_inc): meteo_file = os.path.join(cfg.icon_input_icbc, - time.strftime(cfg.meteo_nameformat)) + time.strftime(cfg.meteo_nameformat)) if cfg.model == 'icon-art' or cfg.model == 'icon-art-oem': chem_file = os.path.join( cfg.icon_input_icbc, @@ -397,7 +398,7 @@ def main(starttime, hstart, hstop, cfg): for runscript in cfg.icontools_runjobs: logfile = os.path.join(cfg.log_working_dir, 'prepare_data') logfile_finish = os.path.join(cfg.log_finished_dir, - 'prepare_data') + 'prepare_data') with open(os.path.join(cfg.case_dir, runscript)) as input_file: to_write = input_file.read() output_run = os.path.join(cfg.icon_work, "%s.job" % runscript) @@ -423,7 +424,7 @@ def main(starttime, hstart, hstop, cfg): # Add GEOSP to all meteo files #----------------------------------------------------- for time in tools.iter_hours(starttime, hstart, hstop, - cfg.meteo_inc): + cfg.meteo_inc): src_file = os.path.join( cfg.icon_input_icbc, time.strftime(cfg.meteo_nameformat) + '_lbc.nc') @@ -451,7 +452,7 @@ def main(starttime, hstart, hstop, cfg): #----------------------------------------------------- if cfg.model == 'icon-art-oem': for time in tools.iter_hours(starttime, hstart, hstop, - cfg.meteo_inc): + cfg.meteo_inc): if time == starttime: #------------ # Merge IC: @@ -474,7 +475,7 @@ def main(starttime, hstart, hstop, cfg): ds_chem['PS'].attrs["long_name"] = 'surface pressure' # merge: ds_merged = xr.merge([ds_meteo, ds_chem], - compat="override") + compat="override") #ds_merged.attrs = ds.attrs ds_merged.to_netcdf(merged_file) # Rename file to get original file name @@ -504,7 +505,7 @@ def main(starttime, hstart, hstop, cfg): ds_chem['TRCH4_chemtr'] = ds_chem['CH4_BG'] # merge: ds_merged = xr.merge([ds_meteo, ds_chem], - compat="override") + compat="override") #ds_merged.attrs = ds.attrs ds_merged.to_netcdf(merged_file) # Rename file to get original file name From 27f121fb28be3b26dbab856ce61a26a0fed539d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Mon, 19 Jun 2023 15:57:50 +0200 Subject: [PATCH 053/108] Pass model_cfg to job functions --- jobs/biofluxes.py | 4 ++-- jobs/check_output.py | 2 +- jobs/cosmo.py | 2 +- jobs/emissions.py | 2 +- jobs/icon.py | 2 +- jobs/int2lm.py | 7 +++---- jobs/oae.py | 5 ++--- jobs/obs_nudging.py | 2 +- jobs/octe.py | 2 +- jobs/online_vprm.py | 2 +- jobs/photo_rate.py | 2 +- jobs/post_cosmo.py | 2 +- jobs/post_int2lm.py | 2 +- jobs/prepare_data.py | 2 +- jobs/reduce_output.py | 2 +- jobs/verify_chain.py | 2 +- run_chain.py | 2 +- 17 files changed, 21 insertions(+), 23 deletions(-) diff --git a/jobs/biofluxes.py b/jobs/biofluxes.py index c8047eba..1ff5d1e8 100644 --- a/jobs/biofluxes.py +++ b/jobs/biofluxes.py @@ -20,7 +20,7 @@ from . import tools -def main(starttime, hstart, hstop, cfg): +def main(starttime, hstart, hstop, cfg, model_cfg): """Prepare the biofluxes-files for the simulation. Only necessary for **COSMO** simulations. @@ -62,6 +62,6 @@ def main(starttime, hstart, hstop, cfg): tools.copy_file(filename, scratch_path) if not os.path.isfile(filename_sc): - loggig.error( + logging.error( "Splitting or copying of GPP or/and RA files to scratch failed." ) diff --git a/jobs/check_output.py b/jobs/check_output.py index 21271901..aefe47f4 100644 --- a/jobs/check_output.py +++ b/jobs/check_output.py @@ -699,7 +699,7 @@ def create_animations(cfg): duration=300) -def main(starttime, hstart, hstop, cfg): +def main(starttime, hstart, hstop, cfg, model_cfg): """Checks output variables whether they are in a phyiscally reasonable range. diff --git a/jobs/cosmo.py b/jobs/cosmo.py index 12f8f5ae..7406508e 100644 --- a/jobs/cosmo.py +++ b/jobs/cosmo.py @@ -19,7 +19,7 @@ from datetime import datetime, timedelta -def main(starttime, hstart, hstop, cfg): +def main(starttime, hstart, hstop, cfg, model_cfg): """Setup the namelists for a **COSMO** tracer run and submit the job to the queue diff --git a/jobs/emissions.py b/jobs/emissions.py index 9991b14b..4ca0bf53 100644 --- a/jobs/emissions.py +++ b/jobs/emissions.py @@ -21,7 +21,7 @@ from . import tools -def main(starttime, hstart, hstop, cfg): +def main(starttime, hstart, hstop, cfg, model_cfg): """Copy emission files to the **int2lm** input directory. Necessary for both **COSMO** and **COSMOART** simulations. diff --git a/jobs/icon.py b/jobs/icon.py index 290a2093..c1fa2082 100644 --- a/jobs/icon.py +++ b/jobs/icon.py @@ -18,7 +18,7 @@ from datetime import timedelta -def main(starttime, hstart, hstop, cfg): +def main(starttime, hstart, hstop, cfg, model_cfg): """Setup the namelists for an **ICON** tracer run and submit the job to the queue diff --git a/jobs/int2lm.py b/jobs/int2lm.py index 015d5346..87855b93 100644 --- a/jobs/int2lm.py +++ b/jobs/int2lm.py @@ -17,7 +17,7 @@ from datetime import datetime -def main(starttime, hstart, hstop, cfg): +def main(starttime, hstart, hstop, cfg, model_cfg): """Setup the namelist for **int2lm** and submit the job to the queue. Necessary for both **COSMO** and **COSMOART** simulations. @@ -77,7 +77,7 @@ def main(starttime, hstart, hstop, cfg): tools.copy_file(extpar_file, extpar_dir) # Copy landuse and plant-functional-type files - if cfg.target is tools.Target.COSMOART: + if cfg.model == 'cosmo-art': lu_file_src = os.path.join(cfg.int2lm_lu_dir, cfg.int2lm_lu_file) lu_file_dst = os.path.join(extpar_dir, 'landuse.nc') tools.copy_file(lu_file_src, lu_file_dst) @@ -86,8 +86,7 @@ def main(starttime, hstart, hstop, cfg): pft_file_dst = os.path.join(extpar_dir, 'pft.nc') tools.copy_file(pft_file_src, pft_file_dst) - # Copy libgrib_api - if cfg.target is tools.Target.COSMOART: + # Copy libgrib_api dest = os.path.join(cfg.int2lm_work, 'libgrib_api') try: # delete so no error when forcing this job diff --git a/jobs/oae.py b/jobs/oae.py index 58e8e705..c25209bd 100644 --- a/jobs/oae.py +++ b/jobs/oae.py @@ -8,7 +8,7 @@ from . import tools -def main(starttime, hstart, hstop, cfg): +def main(starttime, hstart, hstop, cfg, model_cfg): """Copy emission and profile files to the **cosmo** or **icon** input directory. @@ -50,8 +50,7 @@ def main(starttime, hstart, hstop, cfg): raise RuntimeError("At least one of (hod/dow/moy) or (hoy) netcdfs " " have to be given for online emissions") - if cfg.target is tools.Target.ICON or cfg.target is tools.Target.ICONART or \ - cfg.target is tools.Target.ICONARTOEM: + if cfg.model.startswith('icon'): input_dir = cfg.icon_input else: input_dir = cfg.cosmo_input diff --git a/jobs/obs_nudging.py b/jobs/obs_nudging.py index 2ea1d90a..7d217daa 100644 --- a/jobs/obs_nudging.py +++ b/jobs/obs_nudging.py @@ -9,7 +9,7 @@ from . import tools -def main(starttime, hstart, hstop, cfg): +def main(starttime, hstart, hstop, cfg, model_cfg): """Copy and rename the obs_nudging files to the **COSMO** input directory. In the folder ``cfg.obs_nudging_dir``, the files are saved in the format diff --git a/jobs/octe.py b/jobs/octe.py index 1057b59f..ed3963c8 100644 --- a/jobs/octe.py +++ b/jobs/octe.py @@ -161,7 +161,7 @@ def perturb_bgs_in_dir(lambdas_nc, directory): entry.name)) -def main(starttime, hstart, hstop, cfg): +def main(starttime, hstart, hstop, cfg, model_cfg): """Copy necessary input files for **COSMO** and perturb BG. Copies the NetCDF-files found at cfg.octe_maps and cfg.octe_lambdas to diff --git a/jobs/online_vprm.py b/jobs/online_vprm.py index 996f9481..fe718043 100644 --- a/jobs/online_vprm.py +++ b/jobs/online_vprm.py @@ -9,7 +9,7 @@ from . import tools -def main(starttime, hstart, hstop, cfg): +def main(starttime, hstart, hstop, cfg, model_cfg): """Copy MODIS surface reflectance data and vegatation class fraction file to the **cosmo** input directory. diff --git a/jobs/photo_rate.py b/jobs/photo_rate.py index b30e3eb9..0d65a4d1 100644 --- a/jobs/photo_rate.py +++ b/jobs/photo_rate.py @@ -8,7 +8,7 @@ from . import tools -def main(starttime, hstart, hstop, cfg): +def main(starttime, hstart, hstop, cfg, model_cfg): """Copy photolysis-rate file to the **COSMOART** input directory. Only necessary for **COSMOART** simulations. diff --git a/jobs/post_cosmo.py b/jobs/post_cosmo.py index b6dcfcea..32a26db2 100644 --- a/jobs/post_cosmo.py +++ b/jobs/post_cosmo.py @@ -51,7 +51,7 @@ def runscript_commands_template(): ]) -def main(starttime, hstart, hstop, cfg): +def main(starttime, hstart, hstop, cfg, model_cfg): """Copy the output of a **COSMO**-run to a user-defined position. Write a runscript to copy all files (**COSMO** settings & output, diff --git a/jobs/post_int2lm.py b/jobs/post_int2lm.py index f6be1c1f..d90a13a5 100644 --- a/jobs/post_int2lm.py +++ b/jobs/post_int2lm.py @@ -15,7 +15,7 @@ from . import tools -def main(start_time, hstart, hstop, cfg): +def main(start_time, hstart, hstop, cfg, model_cfg): """Combine multiple **int2lm** tracer-output files into a single one for **COSMO**. diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index 0734e725..f313da0f 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -37,7 +37,7 @@ from calendar import monthrange -def main(starttime, hstart, hstop, cfg): +def main(starttime, hstart, hstop, cfg, model_cfg): """ **ICON** (if ``cfg.model`` is ``tools.Target.ICON``) diff --git a/jobs/reduce_output.py b/jobs/reduce_output.py index dcf79f1f..f24dcb67 100644 --- a/jobs/reduce_output.py +++ b/jobs/reduce_output.py @@ -16,7 +16,7 @@ from . import tools -def main(starttime, hstart, hstop, cfg): +def main(starttime, hstart, hstop, cfg, model_cfg): """ Calculates 2D column data and writes them into a new netCDF file. Only a fixed number of levels from **COSMO** output are considered. diff --git a/jobs/verify_chain.py b/jobs/verify_chain.py index 2340d30a..056566a3 100644 --- a/jobs/verify_chain.py +++ b/jobs/verify_chain.py @@ -19,7 +19,7 @@ def comp_data(dataset1, dataset2, variables): tools.helper.datasets_equal(dataset1, dataset2, variables, verbose=True) -def main(starttime, hstart, hstop, cfg): +def main(starttime, hstart, hstop, cfg, model_cfg): """Compare outputs of the chain to a reference. Looks for the reference-file in ``cfg.reference_dir``. diff --git a/run_chain.py b/run_chain.py index c5137fe6..74be5639 100755 --- a/run_chain.py +++ b/run_chain.py @@ -463,7 +463,7 @@ def run_chain(work_root, model_cfg, cfg, start_time, hstart, hstop, job_names, # Launch the job to_call = getattr(jobs, job) - to_call.main(start_time, hstart, hstop, cfg) + to_call.main(start_time, hstart, hstop, cfg, model_cfg) shutil.copy(logfile, logfile_finish) From 3abfa1400b70780f51253d0d409411f104bb47a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Mon, 19 Jun 2023 16:43:10 +0200 Subject: [PATCH 054/108] Fix cosmo job --- jobs/cosmo.py | 16 ++++++++-------- jobs/post_int2lm.py | 2 +- jobs/tools/write_cosmo_input_ghg.py | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/jobs/cosmo.py b/jobs/cosmo.py index 7406508e..2190b455 100644 --- a/jobs/cosmo.py +++ b/jobs/cosmo.py @@ -143,23 +143,23 @@ def main(starttime, hstart, hstop, cfg, model_cfg): (str(starttime), str(startfiletime))) # No restarts for COSMO-ART and for simulations with spinup - if cfg.target is not tools.Target.COSMOART and \ - cfg.target.subtarget is not tools.Subtarget.SPINUP: + if 'restart' in model_cfg['models'][cfg.model]['features'] and \ + cfg.variant != 'spinup': tools.create_dir(cfg.cosmo_restart_out, "cosmo_restart_out") # Copy cosmo executable - execname = cfg.target.name.lower() + execname = cfg.model.lower() tools.copy_file(cfg.cosmo_bin, os.path.join(cfg.cosmo_work, execname)) setattr(cfg, "execname", execname) # Prepare namelist and submit job tracer_csvfile = os.path.join(cfg.chain_src_dir, 'cases', cfg.casename, 'cosmo_tracers.csv') - if cfg.target is tools.Target.COSMO: + if cfg.model == 'cosmo': namelist_names = ['ORG', 'IO', 'DYN', 'PHY', 'DIA', 'ASS', 'SAT'] - elif cfg.target is tools.Target.COSMOGHG: + elif cfg.model == 'cosmo-ghg': namelist_names = ['AF', 'ORG', 'IO', 'DYN', 'GHG', 'PHY', 'DIA', 'ASS'] - elif cfg.target is tools.Target.COSMOART: + elif cfg.model == 'cosmo-art': namelist_names = [ 'ART', 'ASS', 'DIA', 'DYN', 'EPS', 'INI', 'IO', 'ORG', 'PHY' ] @@ -174,7 +174,7 @@ def main(starttime, hstart, hstop, cfg, model_cfg): output_file = os.path.join(cfg.cosmo_work, "INPUT_" + section) with open(output_file, "w") as outf: - if cfg.target.subtarget is tools.Subtarget.SPINUP: + if cfg.variant == 'spinup': # no restarts to_write = to_write.format(cfg=cfg, restart_start=12, @@ -190,7 +190,7 @@ def main(starttime, hstart, hstop, cfg, model_cfg): # Append INPUT_GHG namelist with tracer definitions from csv file if os.path.isfile(tracer_csvfile): - if cfg.target is tools.Target.COSMOGHG: + if cfg.model == 'cosmo-ghg': input_ghg_filename = os.path.join(cfg.cosmo_work, 'INPUT_GHG') write_cosmo_input_ghg.main(tracer_csvfile, input_ghg_filename, cfg) diff --git a/jobs/post_int2lm.py b/jobs/post_int2lm.py index d90a13a5..57cffbf6 100644 --- a/jobs/post_int2lm.py +++ b/jobs/post_int2lm.py @@ -90,7 +90,7 @@ def main(start_time, hstart, hstop, cfg, model_cfg): logging.info("OK") # Meteo spinup simulation with tracer recycling - if cfg.target.subtarget is tools.Subtarget.SPINUP and \ + if cfg.variant == 'spinup' and \ hasattr(cfg, 'post_int2lm_species_spinup') and not cfg.first_one: var_list = cfg.post_int2lm_species_spinup logging.info( diff --git a/jobs/tools/write_cosmo_input_ghg.py b/jobs/tools/write_cosmo_input_ghg.py index 3a0ab289..89f3d34e 100644 --- a/jobs/tools/write_cosmo_input_ghg.py +++ b/jobs/tools/write_cosmo_input_ghg.py @@ -107,8 +107,9 @@ def main(csv_filename, namelist_filename, cfg=None): """ #Distinguish between COSMO and ICON - model = "COSMO" - if cfg.target is tools.Target.ICON or cfg.target is tools.Target.ICONART: + if cfg.model.startswith('cosmo'): + model = "COSMO" + if cfg.model.startswith('icon'): model = "ICON" with open(csv_filename, 'r') as csv_file: @@ -118,8 +119,7 @@ def main(csv_filename, namelist_filename, cfg=None): with open(namelist_filename, 'a') as nml_file: for group in reader: - if cfg.target.subtarget is tools.Subtarget.SPINUP \ - and not cfg.first_one: + if cfg.variant == 'spinup' and not cfg.first_one: nml_file.write(group2text(group, model, recycling=True)) else: nml_file.write(group2text(group, model)) From ae3626ebfdeec61c60a29f33227157b94d28c26e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Tue, 20 Jun 2023 17:24:50 +0200 Subject: [PATCH 055/108] Fix run_chain for icon --- run_chain.py | 79 ++++++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 39 deletions(-) diff --git a/run_chain.py b/run_chain.py index 74be5639..ee8af63a 100755 --- a/run_chain.py +++ b/run_chain.py @@ -325,6 +325,44 @@ def run_chain(work_root, model_cfg, cfg, start_time, hstart, hstop, job_names, setattr(cfg, 'lasync_io', '.TRUE.') setattr(cfg, 'num_iope_percomm', 1) + # constraint (gpu or mc) + if hasattr(cfg, 'constraint'): + assert cfg.constraint in ['gpu', 'mc'], ("Unknown constraint, use" + "gpu or mc") + + # Spinup + if cfg.variant == 'spinup': + setattr(cfg, 'last_cosmo_output', + os.path.join(chain_root_last_run, 'cosmo', 'output')) + # No restart for spinup simulations (= default values for no restart) + setattr(cfg, 'cosmo_restart_out', '') + setattr(cfg, 'cosmo_restart_in', '') + elif 'restart' in model_cfg['models'][cfg.model]['features']: + job_id_last_run = '%s_%d_%d' % (inidate_yyyymmddhh, + hstart - cfg.restart_step, hstart) + chain_root_last_run = os.path.join(work_root, cfg.casename, + job_id_last_run) + # Set restart directories + setattr(cfg, 'cosmo_restart_out', + os.path.join(chain_root, 'cosmo', 'restart')) + setattr(cfg, 'cosmo_restart_in', + os.path.join(chain_root_last_run, 'cosmo', 'restart')) + + # Restart step + if 'restart' in model_cfg['models'][cfg.model]['features']: + setattr(cfg, 'restart_step', hstop - hstart) + + # if nested run: use output of mother-simulation + if 'nesting' in model_cfg['models'][cfg.model]['features'] and not os.path.isdir( + cfg.meteo_dir): + # if ifs_hres_dir doesn't point to a directory, + # it is the name of the mother run + mother_name = cfg.meteo_dir + cfg.meteo_dir = os.path.join(work_root, mother_name, job_id, 'cosmo', + 'output') + cfg.meteo_inc = 1 + cfg.meteo_prefix = 'lffd' + # ICON # TODO: refactor if cfg.model.startswith('icon'): @@ -351,7 +389,7 @@ def run_chain(work_root, model_cfg, cfg, start_time, hstart, hstop, job_names, file_info = cfg.input_files[varname] setattr( cfg, f'{varname}_scratch', - os.path.join(cfg.icon_input_base, file_info[1], file_info[0])) + os.path.join(cfg.icon_input, file_info[1], file_info[0])) ini_datetime_string = ( start_time + @@ -369,44 +407,6 @@ def run_chain(work_root, model_cfg, cfg, start_time, hstart, hstop, job_names, # TODO: Set correct restart setting setattr(cfg, 'lrestart', '.FALSE.') - # constraint (gpu or mc) - if hasattr(cfg, 'constraint'): - assert cfg.constraint in ['gpu', 'mc'], ("Unknown constraint, use" - "gpu or mc") - - # Spinup - if cfg.variant == 'spinup': - setattr(cfg, 'last_cosmo_output', - os.path.join(chain_root_last_run, 'cosmo', 'output')) - # No restart for spinup simulations (= default values for no restart) - setattr(cfg, 'cosmo_restart_out', '') - setattr(cfg, 'cosmo_restart_in', '') - elif 'restart' in model_cfg['models'][cfg.model]['features']: - job_id_last_run = '%s_%d_%d' % (inidate_yyyymmddhh, - hstart - cfg.restart_step, hstart) - chain_root_last_run = os.path.join(work_root, cfg.casename, - job_id_last_run) - # Set restart directories - setattr(cfg, 'cosmo_restart_out', - os.path.join(chain_root, 'cosmo', 'restart')) - setattr(cfg, 'cosmo_restart_in', - os.path.join(chain_root_last_run, 'cosmo', 'restart')) - - # Restart step - if 'restart' in model_cfg['models'][cfg.model]['features']: - setattr(cfg, 'restart_step', hstop - hstart) - - # if nested run: use output of mother-simulation - if model_cfg['models'][cfg.model]['jobs'] and not os.path.isdir( - cfg.meteo_dir): - # if ifs_hres_dir doesn't point to a directory, - # it is the name of the mother run - mother_name = cfg.meteo_dir - cfg.meteo_dir = os.path.join(work_root, mother_name, job_id, 'cosmo', - 'output') - cfg.meteo_inc = 1 - cfg.meteo_prefix = 'lffd' - # logging log_working_dir = os.path.join(chain_root, 'checkpoints', 'working') log_finished_dir = os.path.join(chain_root, 'checkpoints', 'finished') @@ -532,6 +532,7 @@ def restart_runs(work_root, model_cfg, cfg, start, hstart, hstop, job_names, print("Starting run with starttime {}".format(time)) run_chain(work_root=work_root, + model_cfg=model_cfg, cfg=cfg, start_time=start, hstart=sub_hstart, From fce43834ad8d76cb74d66924e4888a4c7ad91dbb Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 20 Jun 2023 15:25:31 +0000 Subject: [PATCH 056/108] GitHub Action: Apply Pep8-formatting --- run_chain.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/run_chain.py b/run_chain.py index ee8af63a..dd1f11a3 100755 --- a/run_chain.py +++ b/run_chain.py @@ -353,8 +353,8 @@ def run_chain(work_root, model_cfg, cfg, start_time, hstart, hstop, job_names, setattr(cfg, 'restart_step', hstop - hstart) # if nested run: use output of mother-simulation - if 'nesting' in model_cfg['models'][cfg.model]['features'] and not os.path.isdir( - cfg.meteo_dir): + if 'nesting' in model_cfg['models'][ + cfg.model]['features'] and not os.path.isdir(cfg.meteo_dir): # if ifs_hres_dir doesn't point to a directory, # it is the name of the mother run mother_name = cfg.meteo_dir @@ -387,9 +387,8 @@ def run_chain(work_root, model_cfg, cfg, start_time, hstart, hstop, job_names, for varname in cfg.input_files: file_info = cfg.input_files[varname] - setattr( - cfg, f'{varname}_scratch', - os.path.join(cfg.icon_input, file_info[1], file_info[0])) + setattr(cfg, f'{varname}_scratch', + os.path.join(cfg.icon_input, file_info[1], file_info[0])) ini_datetime_string = ( start_time + From 73087c3204d822869da1e30e30d408080ac1bd09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Tue, 20 Jun 2023 17:58:43 +0200 Subject: [PATCH 057/108] Generalize copying data in prepare_data --- jobs/prepare_data.py | 69 ++++---------------------------------------- 1 file changed, 5 insertions(+), 64 deletions(-) diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index 2b63f050..f9c731f1 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -103,70 +103,11 @@ def main(starttime, hstart, hstop, cfg, model_cfg): #----------------------------------------------------- # Copy files #----------------------------------------------------- - # Copy grid files - tools.copy_file(cfg.radiation_grid_filename, - cfg.radiation_grid_filename_scratch, - output_log=True) - tools.copy_file(cfg.dynamics_grid_filename, - cfg.dynamics_grid_filename_scratch, - output_log=True) - tools.copy_file(cfg.map_file_latbc, - cfg.map_file_latbc_scratch, - output_log=True) - tools.copy_file(cfg.extpar_filename, - cfg.extpar_filename_scratch, - output_log=True) - - # Copy radiation files - tools.copy_file(cfg.cldopt_filename, - cfg.cldopt_filename_scratch, - output_log=True) - tools.copy_file(cfg.lrtm_filename, - cfg.lrtm_filename_scratch, - output_log=True) - - # Copy mapping file - tools.copy_file(cfg.map_file_ana, - cfg.map_file_ana_scratch, - output_log=True) - - # Copy tracer data in case of ART - if cfg.model.startswith('icon-art'): - tools.create_dir(cfg.icon_input_xml, "icon_input_xml") - if hasattr(cfg, 'chemtracer_xml_filename'): - tools.copy_file(cfg.chemtracer_xml_filename, - cfg.chemtracer_xml_filename_scratch, - output_log=True) - if hasattr(cfg, 'pntSrc_xml_filename'): - tools.copy_file(cfg.pntSrc_xml_filename, - cfg.pntSrc_xml_filename_scratch, - output_log=True) - - # Copy data for global ICON-ART - if cfg.model == 'icon-art-global': - if hasattr(cfg, 'boundcond_xml_filename'): - tools.copy_file(cfg.boundcond_xml_filename, - cfg.boundcond_xml_filename_scratch, - output_log=True) - - # -- Copy nudging data - if cfg.era5_global_nudging: - tools.copy_file(cfg.map_file_nudging, - cfg.map_file_nudging_scratch, - output_log=True) - - # -- Copy ART files - if hasattr(cfg, 'input_root_art'): - list_files = glob.glob(os.path.join(cfg.input_root_art, '*')) - for file in list_files: - tools.copy_file(file, cfg.icon_work) - - # -- Copy Online-Trajectories files - if cfg.online_traj: - tools.copy_file(cfg.online_traj_filename, - cfg.online_traj_filename_scratch, - output_log=True) - tools.copy_file(cfg.online_traj_table2moment, cfg.icon_work) + for varname in cfg.input_files: + file_info = cfg.input_files[varname] + tools.copy_file(cfg[varname] + cfg[varname+'_scratch'] + output_log=True) # -- If not, download ERA5 data and create the inicond file if cfg.era5_inicond and cfg.lrestart == '.FALSE.': From 40b0ea216408c9506c186008076ff3e3355b3bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 21 Jun 2023 10:55:12 +0200 Subject: [PATCH 058/108] Fix prepare_data job --- jobs/prepare_data.py | 8 +++++--- run_chain.py | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index f9c731f1..8eb5d2ae 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -105,11 +105,13 @@ def main(starttime, hstart, hstop, cfg, model_cfg): #----------------------------------------------------- for varname in cfg.input_files: file_info = cfg.input_files[varname] - tools.copy_file(cfg[varname] - cfg[varname+'_scratch'] + varname_scratch = varname + '_scratch' + tools.copy_file(getattr(cfg, varname), + getattr(cfg, varname_scratch), output_log=True) - # -- If not, download ERA5 data and create the inicond file + if cfg.model == 'icon-art-global': + # -- Download ERA5 data and create the inicond file if cfg.era5_inicond and cfg.lrestart == '.FALSE.': # -- Fetch ERA5 data fetch_era5(starttime + timedelta(hours=hstart), diff --git a/run_chain.py b/run_chain.py index dd1f11a3..b2d9f2f2 100755 --- a/run_chain.py +++ b/run_chain.py @@ -387,6 +387,8 @@ def run_chain(work_root, model_cfg, cfg, start_time, hstart, hstop, job_names, for varname in cfg.input_files: file_info = cfg.input_files[varname] + setattr(cfg, varname, + os.path.join(cfg.input_root, file_info[1], file_info[0])) setattr(cfg, f'{varname}_scratch', os.path.join(cfg.icon_input, file_info[1], file_info[0])) From 4cf99e634c29e68a9e2da2f17c620567d7ee66d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 21 Jun 2023 11:38:12 +0200 Subject: [PATCH 059/108] Add lateral grid info to config file --- cases/icon-test/config.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cases/icon-test/config.py b/cases/icon-test/config.py index fc3f0389..d4ad5b54 100644 --- a/cases/icon-test/config.py +++ b/cases/icon-test/config.py @@ -65,6 +65,7 @@ 'radiation_grid_filename': ['VERIFY_DOM_DOM01.parent.nc', 'grid'], 'dynamics_grid_filename': ['VERIFY_DOM_DOM01.nc', 'grid'], 'map_file_latbc': ['map_file.latbc', 'grid'], + 'lateral_boundary_grid': ['lateral_boundary.grid.nc', 'grid'], 'extpar_filename': ['external_parameter_icon_VERIFY_DOM_DOM01_tiles.nc', 'grid'], 'cldopt_filename': ['rrtm_cldopt.nc', 'rad'], @@ -78,6 +79,8 @@ output_filename = "NWP_LAM" filename_format = "_DOM_" +lateral_boundary_grid_order = 'lateral_boundary' + # SIMULATION ================================================================= # ICON ----------------------------------------------------------------------- # Read COSMO spec From bf22cacbaf8669c1eacf1a16c25aa48243bf0e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 21 Jun 2023 13:18:55 +0200 Subject: [PATCH 060/108] Fix icon job --- jobs/icon.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jobs/icon.py b/jobs/icon.py index c1fa2082..aa684239 100644 --- a/jobs/icon.py +++ b/jobs/icon.py @@ -87,8 +87,7 @@ def main(starttime, hstart, hstop, cfg, model_cfg): exitcode = result.returncode # In case of ICON-ART, ignore the "invalid pointer" error on successful run - if cfg.target is tools.Target.ICONARTOEM or cfg.target is tools.Target.ICONART or \ - cfg.target is tools.Target.ICONARTGLOBAL: + if cfg.model.startswith('icon-art'): if tools.grep("free(): invalid pointer", logfile)['success'] and \ tools.grep("clean-up finished", logfile)['success']: exitcode = 0 From c5379c9df54167235698f002c2859933f0a3b260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 21 Jun 2023 13:20:11 +0200 Subject: [PATCH 061/108] remove logging and sys from config files --- cases/icon-art-global/config.py | 6 ------ cases/icon-art-oem-ensembles-test/config.py | 3 --- cases/icon-art-oem-test/config.py | 3 --- cases/icon-art-test/config.py | 3 --- 4 files changed, 15 deletions(-) diff --git a/cases/icon-art-global/config.py b/cases/icon-art-global/config.py index f9ae5870..da120ba3 100644 --- a/cases/icon-art-global/config.py +++ b/cases/icon-art-global/config.py @@ -1,6 +1,4 @@ import os -import logging -import sys """ Configuration file for the 'icon-art-global' case with ICON-ART """ @@ -85,10 +83,6 @@ icon_walltime = "00:30:00" icon_np_tot = 2 -else: - logging.error("Unknown queue name: %s" % compute_queue) - sys.exit(1) - # ----------------------------------------------------------- # -- INPUT DATA # ----------------------------------------------------------- diff --git a/cases/icon-art-oem-ensembles-test/config.py b/cases/icon-art-oem-ensembles-test/config.py index 33e085ba..c8547330 100644 --- a/cases/icon-art-oem-ensembles-test/config.py +++ b/cases/icon-art-oem-ensembles-test/config.py @@ -129,9 +129,6 @@ elif compute_queue == "debug": icon_walltime = "00:30:00" icon_np_tot = 10 -else: - logging.error("Unknown queue name: %s" % compute_queue) - sys.exit(1) # POST-PROCESSING ============================================================ # REDUCE_OUTPUT -------------------------------------------------------------- diff --git a/cases/icon-art-oem-test/config.py b/cases/icon-art-oem-test/config.py index 47906682..4095948c 100644 --- a/cases/icon-art-oem-test/config.py +++ b/cases/icon-art-oem-test/config.py @@ -128,9 +128,6 @@ elif compute_queue == "debug": icon_walltime = "00:30:00" icon_np_tot = 10 -else: - logging.error("Unknown queue name: %s" % compute_queue) - sys.exit(1) # POST-PROCESSING ============================================================ # REDUCE_OUTPUT -------------------------------------------------------------- diff --git a/cases/icon-art-test/config.py b/cases/icon-art-test/config.py index 94882fbd..cb9d0f60 100644 --- a/cases/icon-art-test/config.py +++ b/cases/icon-art-test/config.py @@ -113,9 +113,6 @@ elif compute_queue == "debug": icon_walltime = "00:30:00" icon_np_tot = 10 -else: - logging.error("Unknown queue name: %s" % compute_queue) - sys.exit(1) # POST-PROCESSING ============================================================ # REDUCE_OUTPUT -------------------------------------------------------------- From 8d3afb2c95e4bf7b2a01efe54253edb43f215316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 21 Jun 2023 13:53:25 +0200 Subject: [PATCH 062/108] Remove unnecessary time variables --- jobs/prepare_data.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index 118b273e..6793366c 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -85,10 +85,6 @@ def main(starttime, hstart, hstop, cfg): logging.info('ICON input data (IC/BC)') starttime_real = starttime + timedelta(hours=hstart) - time = starttime + timedelta(hours=hstart) - year = time.year - month = time.month - day = time.day #----------------------------------------------------- # Create directories @@ -174,7 +170,7 @@ def main(starttime, hstart, hstop, cfg): # -- If not, download ERA5 data and create the inicond file if cfg.era5_inicond and cfg.lrestart == '.FALSE.': # -- Fetch ERA5 data - fetch_era5(starttime + timedelta(hours=hstart), + fetch_era5(starttime_real, cfg.icon_input_icbc) # -- Copy ERA5 processing script (icon_era5_inicond.job) in workdir @@ -217,14 +213,13 @@ def main(starttime, hstart, hstop, cfg): output_file = os.path.join(cfg.icon_input_icbc, 'icon_species_inicond.sh') with open(output_file, "w") as outf: - time = starttime + timedelta(hours=hstart) outf.write( to_write.format(cfg=cfg, filename=filename, ext_restart=ext_restart, - year=year, - month=month, - day=day)) + year=starttime_real.year, + month=starttime_real.month, + day=starttime_real.day)) # -- Run ERA5 processing script process = subprocess.Popen([ @@ -237,7 +232,7 @@ def main(starttime, hstart, hstop, cfg): # -- Create initial conditions for OH concentrations if 'TROH' in cfg.species2restart: - create_oh_for_inicond(cfg, month) + create_oh_for_inicond(cfg, starttime_real.month) else: @@ -253,7 +248,7 @@ def main(starttime, hstart, hstop, cfg): # -- Change OH concentrations in the restart file if 'TROH' in cfg.species2restart: - create_oh_for_restart(cfg, month, ext_restart) + create_oh_for_restart(cfg, starttime_real.month, ext_restart) # ----------------------------------------------------- # Create meteorological and tracer nudging conditions From a8109d1160862084a2beca935a96c203d4b41f69 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 21 Jun 2023 11:54:03 +0000 Subject: [PATCH 063/108] GitHub Action: Apply Pep8-formatting --- jobs/prepare_data.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index 6793366c..a6ed7c93 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -170,8 +170,7 @@ def main(starttime, hstart, hstop, cfg): # -- If not, download ERA5 data and create the inicond file if cfg.era5_inicond and cfg.lrestart == '.FALSE.': # -- Fetch ERA5 data - fetch_era5(starttime_real, - cfg.icon_input_icbc) + fetch_era5(starttime_real, cfg.icon_input_icbc) # -- Copy ERA5 processing script (icon_era5_inicond.job) in workdir with open(cfg.icon_era5_inijob) as input_file: @@ -248,7 +247,8 @@ def main(starttime, hstart, hstop, cfg): # -- Change OH concentrations in the restart file if 'TROH' in cfg.species2restart: - create_oh_for_restart(cfg, starttime_real.month, ext_restart) + create_oh_for_restart(cfg, starttime_real.month, + ext_restart) # ----------------------------------------------------- # Create meteorological and tracer nudging conditions From cde3cb03e62d276f32f86752bc4d17e989084cd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 22 Jun 2023 11:49:14 +0200 Subject: [PATCH 064/108] Start working on icon-art-test case --- cases/icon-art-test/config.py | 55 ++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/cases/icon-art-test/config.py b/cases/icon-art-test/config.py index cb9d0f60..5b3b8dae 100644 --- a/cases/icon-art-test/config.py +++ b/cases/icon-art-test/config.py @@ -32,16 +32,14 @@ # Root directory of the working space of the chain work_root = os.path.join(chain_src_dir, 'work') -# Directory where executables are stored -exe_dir = "/store/empa/em05/executables" - # Case directory case_dir = os.path.join(chain_src_dir, 'cases', casename) # PREPARE_DATA --------------------------------------------------------------- -input_root = '/store/empa/em05/input_iconart_processing_chain_example/' - -input_root_meteo = '/store/empa/em05/input_iconart_processing_chain_example/meteo' +input_root = os.path.join(chain_src_dir, 'input', 'icon-art') +input_root_icbc = os.path.join(input_root, 'icbc') +# meteo +input_root_meteo = os.path.join(chain_src_dir, 'input', 'meteo') meteo_prefix = 'ifs_' meteo_nameformat = meteo_prefix + '%Y%m%d%H' meteo_suffix = '.grb' @@ -58,27 +56,25 @@ 'icontools_remap_lbc_rest_runjob.cfg', ] -# Icontools executables -#icontools_dir = '/project/s903/mjaehn/spack-install/daint/icontools/master/cce/ldcbgsjjzq2p73xbei7ws4wce5ivzxer/bin/' -icontools_dir = '/scratch/snx3000/msteiner/spack-stages/daint/spack-stage-icontools-master-t524rnfa5sfyn4rbvarypyzwae4jg46d/spack-src/icontools' -iconremap_bin = os.path.join(icontools_dir, "iconremap") -iconsub_bin = os.path.join(icontools_dir, "iconsub") - # Input data for runscript---------------------------------------------------- # Grid -input_root_grid = os.path.join(input_root, 'grids') -radiation_grid_filename = os.path.join(input_root_grid, - "testcase_DOM01.parent.nc") -dynamics_grid_filename = os.path.join(input_root_grid, "testcase_DOM01.nc") -map_file_latbc = os.path.join(input_root_grid, "map_file.latbc") -extpar_filename = os.path.join( - input_root_grid, "external_parameter_icon_testcase_DOM01_tiles.nc") -input_root_rad = os.path.join(input_root, 'rad') -cldopt_filename = os.path.join(input_root_rad, 'rrtm_cldopt.nc') -lrtm_filename = os.path.join(input_root_rad, 'rrtmg_lw.nc') +input_root_grid = os.path.join(input_root, 'grid') +input_root_rad = os.path.join(input_root, 'rad') input_root_mapping = os.path.join(input_root, 'mapping') -map_file_ana = os.path.join(input_root_mapping, "map_file.ana") + +input_files = { + 'radiation_grid_filename': ['testcase_DOM01.parent.nc', 'grids'], + 'dynamics_grid_filename': ['testcase_DOM01.nc', 'grids'], + 'map_file_latbc': ['map_file.latbc', 'grids'], + 'lateral_boundary_grid': ['lateral_boundary.grid.nc', 'grids'], + 'extpar_filename': + ['external_parameter_icon_testcase_DOM01_tiles.nc', 'grids'], + 'cldopt_filename': ['rrtm_cldopt.nc', 'rad'], + 'lrtm_filename': ['rrtmg_lw.nc', 'rad'], + 'map_file_ana': ['map_file.ana', 'mapping'], +} + # File names ----------------------------------------------------------------- latbc_filename = "ifs__lbc.nc" @@ -89,6 +85,8 @@ output_filename = "icon-art-test" filename_format = "_DOM_" +lateral_boundary_grid_order = 'lateral_boundary' + # ART settings---------------------------------------------------------------- input_root_tracers = os.path.join(input_root, 'XML') chemtracer_xml_filename = os.path.join(input_root_tracers, @@ -99,12 +97,17 @@ # SIMULATION ================================================================= # ICON ----------------------------------------------------------------------- # Executable -icon_bin = os.path.join(exe_dir, "icon-kit-art_20211018") +icon_bin = os.path.join(chain_src_dir, 'src', 'icon-art', 'bin', 'icon') + +# eccodes +eccodes_dir = os.path.join(chain_src_dir, 'input', 'eccodes_definitions') + +# Icontools executables +iconremap_bin = 'iconremap' +iconsub_bin = 'iconsub' # Namelists and slurm runscript templates icon_runjob = os.path.join(case_dir, 'icon_runjob.cfg') -icon_namelist_master = os.path.join(case_dir, 'icon_master.namelist.cfg') -icon_namelist_nwp = os.path.join(case_dir, 'icon_NAMELIST_NWP.cfg') # Walltimes and domain decomposition if compute_queue == "normal": From 814fd0189f896888cdecb5d034636988547aa5de Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 22 Jun 2023 09:49:51 +0000 Subject: [PATCH 065/108] GitHub Action: Apply Pep8-formatting --- cases/icon-art-test/config.py | 1 - 1 file changed, 1 deletion(-) diff --git a/cases/icon-art-test/config.py b/cases/icon-art-test/config.py index 5b3b8dae..4919fba5 100644 --- a/cases/icon-art-test/config.py +++ b/cases/icon-art-test/config.py @@ -75,7 +75,6 @@ 'map_file_ana': ['map_file.ana', 'mapping'], } - # File names ----------------------------------------------------------------- latbc_filename = "ifs__lbc.nc" inidata_prefix = "ifs_init_" From 72c1c62821be36a90226a57213b098b3f4582ed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 22 Jun 2023 14:36:44 +0200 Subject: [PATCH 066/108] Fix grid folder for input data and reduce dataset on ftp server --- cases/icon-art-test/config.py | 10 +++++----- jenkins/scripts/get_data.sh | 9 ++++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/cases/icon-art-test/config.py b/cases/icon-art-test/config.py index 5b3b8dae..9df6b087 100644 --- a/cases/icon-art-test/config.py +++ b/cases/icon-art-test/config.py @@ -64,12 +64,12 @@ input_root_mapping = os.path.join(input_root, 'mapping') input_files = { - 'radiation_grid_filename': ['testcase_DOM01.parent.nc', 'grids'], - 'dynamics_grid_filename': ['testcase_DOM01.nc', 'grids'], - 'map_file_latbc': ['map_file.latbc', 'grids'], - 'lateral_boundary_grid': ['lateral_boundary.grid.nc', 'grids'], + 'radiation_grid_filename': ['testcase_DOM01.parent.nc', 'grid'], + 'dynamics_grid_filename': ['testcase_DOM01.nc', 'grid'], + 'map_file_latbc': ['map_file.latbc', 'grid'], + 'lateral_boundary_grid': ['lateral_boundary.grid.nc', 'grid'], 'extpar_filename': - ['external_parameter_icon_testcase_DOM01_tiles.nc', 'grids'], + ['external_parameter_icon_testcase_DOM01_tiles.nc', 'grid'], 'cldopt_filename': ['rrtm_cldopt.nc', 'rad'], 'lrtm_filename': ['rrtmg_lw.nc', 'rad'], 'map_file_ana': ['map_file.ana', 'mapping'], diff --git a/jenkins/scripts/get_data.sh b/jenkins/scripts/get_data.sh index d014eccd..37aa9b27 100755 --- a/jenkins/scripts/get_data.sh +++ b/jenkins/scripts/get_data.sh @@ -10,6 +10,9 @@ function error { # Check if script is called correctly [[ $(git rev-parse --show-toplevel 2>/dev/null) = $(pwd) ]] || error "$0 not launched from toplevel of repository" -wget ftp://iacftp.ethz.ch/pub_read/mjaehn/input_processing-chain/input_processing-chain.tgz -tar -xvzf input_processing-chain.tgz -rm -f input_processing-chain.tgz +mkdir -p input +pushd input + wget ftp://iacftp.ethz.ch/pub_read/mjaehn/input_processing-chain/input_processing-chain.tgz + tar -xvzf input_processing-chain.tgz + rm -f input_processing-chain.tgz +popd \ No newline at end of file From 4514afba9368bfdc27bd895e79b68abb6cbd50e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 22 Jun 2023 14:46:40 +0200 Subject: [PATCH 067/108] Use gpu nodes and normal queue for test cases --- cases/icon-art-test/config.py | 4 ++-- cases/icon-test/config.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cases/icon-art-test/config.py b/cases/icon-art-test/config.py index 87865cc6..beb40691 100644 --- a/cases/icon-art-test/config.py +++ b/cases/icon-art-test/config.py @@ -11,8 +11,8 @@ else: compute_account = os.popen("id -gn").read().splitlines()[0] compute_host = 'daint' -compute_queue = 'debug' # 'normal' / 'debug' -constraint = 'mc' # 'mc' / 'gpu' +compute_queue = 'normal' # 'normal' / 'debug' +constraint = 'gpu' # 'mc' / 'gpu' model = 'icon-art' restart_step = 24 # hours diff --git a/cases/icon-test/config.py b/cases/icon-test/config.py index d4ad5b54..ba2b7256 100644 --- a/cases/icon-test/config.py +++ b/cases/icon-test/config.py @@ -13,7 +13,7 @@ else: compute_account = os.popen("id -gn").read().splitlines()[0] compute_host = 'daint' -compute_queue = 'debug' # 'normal' / 'debug' +compute_queue = 'normal' # 'normal' / 'debug' constraint = 'gpu' # 'mc' / 'gpu' model = 'icon' From 36fb50ec682914cb305b6c399fac4a5d2cf1f80a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Fri, 23 Jun 2023 11:27:54 +0200 Subject: [PATCH 068/108] Load icontools for pre-processing scripts --- cases/icon-art-test/icontools_remap_00_lbc_runjob.cfg | 3 +++ cases/icon-art-test/icontools_remap_ic_runjob.cfg | 3 +++ cases/icon-art-test/icontools_remap_lbc_rest_runjob.cfg | 3 +++ 3 files changed, 9 insertions(+) diff --git a/cases/icon-art-test/icontools_remap_00_lbc_runjob.cfg b/cases/icon-art-test/icontools_remap_00_lbc_runjob.cfg index 4315e042..e0447eb6 100755 --- a/cases/icon-art-test/icontools_remap_00_lbc_runjob.cfg +++ b/cases/icon-art-test/icontools_remap_00_lbc_runjob.cfg @@ -17,6 +17,9 @@ set -x export ECCODES_DEFINITION_PATH=/store/empa/em05/eccodes_definitions/definitions.edzw-2.12.5-2:/store/empa/em05/easybuild/software/ecCodes/2.12.5-CrayGNU-20.08/share/eccodes/definitions +. {cfg.chain_src_dir}/src/spack-c2sm/setup-env.sh +spack load icontools + #----------------------------------------------------------------------------- # PART I: Create auxiliary grid file which contains only the cells of the # boundary zone. diff --git a/cases/icon-art-test/icontools_remap_ic_runjob.cfg b/cases/icon-art-test/icontools_remap_ic_runjob.cfg index e39ef547..518ab045 100755 --- a/cases/icon-art-test/icontools_remap_ic_runjob.cfg +++ b/cases/icon-art-test/icontools_remap_ic_runjob.cfg @@ -17,6 +17,9 @@ set -x export ECCODES_DEFINITION_PATH=/store/empa/em05/eccodes_definitions/definitions.edzw-2.12.5-2:/store/empa/em05/easybuild/software/ecCodes/2.12.5-CrayGNU-20.08/share/eccodes/definitions +. {cfg.chain_src_dir}/src/spack-c2sm/setup-env.sh +spack load icontools + #----------------------------------------------------------------------------- # Remap inital data onto local (limited-area) grid #----------------------------------------------------------------------------- diff --git a/cases/icon-art-test/icontools_remap_lbc_rest_runjob.cfg b/cases/icon-art-test/icontools_remap_lbc_rest_runjob.cfg index 7bbedc54..9869d0f1 100755 --- a/cases/icon-art-test/icontools_remap_lbc_rest_runjob.cfg +++ b/cases/icon-art-test/icontools_remap_lbc_rest_runjob.cfg @@ -17,6 +17,9 @@ set -x export ECCODES_DEFINITION_PATH=/store/empa/em05/eccodes_definitions/definitions.edzw-2.12.5-2:/store/empa/em05/easybuild/software/ecCodes/2.12.5-CrayGNU-20.08/share/eccodes/definitions +. {cfg.chain_src_dir}/src/spack-c2sm/setup-env.sh +spack load icontools + #----------------------------------------------------------------------------- # Extract boundary data #----------------------------------------------------------------------------- From dc3bc16d53f6a016adf7c2b37f3317d3fe4306c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Fri, 23 Jun 2023 13:59:31 +0200 Subject: [PATCH 069/108] Fix prepare_data for icon-art-test --- cases/icon-art-test/config.py | 1 - cases/icon-art-test/icontools_remap_00_lbc_runjob.cfg | 2 +- cases/icon-art-test/icontools_remap_ic_runjob.cfg | 8 +++++++- cases/icon-art-test/icontools_remap_lbc_rest_runjob.cfg | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/cases/icon-art-test/config.py b/cases/icon-art-test/config.py index beb40691..1c1b31e0 100644 --- a/cases/icon-art-test/config.py +++ b/cases/icon-art-test/config.py @@ -37,7 +37,6 @@ # PREPARE_DATA --------------------------------------------------------------- input_root = os.path.join(chain_src_dir, 'input', 'icon-art') -input_root_icbc = os.path.join(input_root, 'icbc') # meteo input_root_meteo = os.path.join(chain_src_dir, 'input', 'meteo') meteo_prefix = 'ifs_' diff --git a/cases/icon-art-test/icontools_remap_00_lbc_runjob.cfg b/cases/icon-art-test/icontools_remap_00_lbc_runjob.cfg index e0447eb6..107f61ea 100755 --- a/cases/icon-art-test/icontools_remap_00_lbc_runjob.cfg +++ b/cases/icon-art-test/icontools_remap_00_lbc_runjob.cfg @@ -15,7 +15,7 @@ ulimit -s unlimited set -x -export ECCODES_DEFINITION_PATH=/store/empa/em05/eccodes_definitions/definitions.edzw-2.12.5-2:/store/empa/em05/easybuild/software/ecCodes/2.12.5-CrayGNU-20.08/share/eccodes/definitions +export ECCODES_DEFINITION_PATH={cfg.eccodes_dir}/definitions.edzw-2.12.5-2:{cfg.eccodes_dir}/definitions . {cfg.chain_src_dir}/src/spack-c2sm/setup-env.sh spack load icontools diff --git a/cases/icon-art-test/icontools_remap_ic_runjob.cfg b/cases/icon-art-test/icontools_remap_ic_runjob.cfg index 518ab045..c169ff10 100755 --- a/cases/icon-art-test/icontools_remap_ic_runjob.cfg +++ b/cases/icon-art-test/icontools_remap_ic_runjob.cfg @@ -15,7 +15,7 @@ ulimit -s unlimited set -x -export ECCODES_DEFINITION_PATH=/store/empa/em05/eccodes_definitions/definitions.edzw-2.12.5-2:/store/empa/em05/easybuild/software/ecCodes/2.12.5-CrayGNU-20.08/share/eccodes/definitions +export ECCODES_DEFINITION_PATH={cfg.eccodes_dir}/definitions.edzw-2.12.5-2:{cfg.eccodes_dir}/definitions . {cfg.chain_src_dir}/src/spack-c2sm/setup-env.sh spack load icontools @@ -59,6 +59,12 @@ cat > NAMELIST_ICONREMAP_FIELDS << EOF code = 129 intp_method = 3 / +&input_field_nml ! geopotential + inputname = "Z" + outputname = "GEOP_SFC" + code = 129 + intp_method = 3 +/ &input_field_nml ! specific humidity inputname = "QV" outputname = "QV" diff --git a/cases/icon-art-test/icontools_remap_lbc_rest_runjob.cfg b/cases/icon-art-test/icontools_remap_lbc_rest_runjob.cfg index 9869d0f1..5800e768 100755 --- a/cases/icon-art-test/icontools_remap_lbc_rest_runjob.cfg +++ b/cases/icon-art-test/icontools_remap_lbc_rest_runjob.cfg @@ -15,7 +15,7 @@ ulimit -s unlimited set -x -export ECCODES_DEFINITION_PATH=/store/empa/em05/eccodes_definitions/definitions.edzw-2.12.5-2:/store/empa/em05/easybuild/software/ecCodes/2.12.5-CrayGNU-20.08/share/eccodes/definitions +export ECCODES_DEFINITION_PATH={cfg.eccodes_dir}/definitions.edzw-2.12.5-2:{cfg.eccodes_dir}/definitions . {cfg.chain_src_dir}/src/spack-c2sm/setup-env.sh spack load icontools From 74998c3943efc72c8ee15a8330a4ff30a2b86230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Fri, 23 Jun 2023 14:22:13 +0200 Subject: [PATCH 070/108] Further work on icon-art input data --- cases/icon-art-test/config.py | 10 ++-------- jobs/prepare_data.py | 3 ++- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/cases/icon-art-test/config.py b/cases/icon-art-test/config.py index 1c1b31e0..0c3f1ff0 100644 --- a/cases/icon-art-test/config.py +++ b/cases/icon-art-test/config.py @@ -58,10 +58,6 @@ # Input data for runscript---------------------------------------------------- # Grid -input_root_grid = os.path.join(input_root, 'grid') -input_root_rad = os.path.join(input_root, 'rad') -input_root_mapping = os.path.join(input_root, 'mapping') - input_files = { 'radiation_grid_filename': ['testcase_DOM01.parent.nc', 'grid'], 'dynamics_grid_filename': ['testcase_DOM01.nc', 'grid'], @@ -72,6 +68,8 @@ 'cldopt_filename': ['rrtm_cldopt.nc', 'rad'], 'lrtm_filename': ['rrtmg_lw.nc', 'rad'], 'map_file_ana': ['map_file.ana', 'mapping'], + 'chemtracer_xml_filename': ['tracers_oh_pntsrc.xml', 'xml'], + 'pntSrc_xml_filename': ['pntSrc_example.xml', 'xml'] } # File names ----------------------------------------------------------------- @@ -86,10 +84,6 @@ lateral_boundary_grid_order = 'lateral_boundary' # ART settings---------------------------------------------------------------- -input_root_tracers = os.path.join(input_root, 'XML') -chemtracer_xml_filename = os.path.join(input_root_tracers, - 'tracers_oh_pntsrc.xml') -pntSrc_xml_filename = os.path.join(input_root_tracers, 'pntSrc_example.xml') art_input_folder = os.path.join(input_root, 'ART') # SIMULATION ================================================================= diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index 8eb5d2ae..7ee2c1cf 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -99,12 +99,13 @@ def main(starttime, hstart, hstop, cfg, model_cfg): tools.create_dir(cfg.icon_input_rad, "icon_input_rad") tools.create_dir(cfg.icon_output, "icon_output") tools.create_dir(cfg.icon_restart_out, "icon_restart_out") + if cfg.model.startswith('icon-art'): + tools.create_dir(cfg.icon_input_xml, "icon_input_xml") #----------------------------------------------------- # Copy files #----------------------------------------------------- for varname in cfg.input_files: - file_info = cfg.input_files[varname] varname_scratch = varname + '_scratch' tools.copy_file(getattr(cfg, varname), getattr(cfg, varname_scratch), From 1e582420f1f6fe1b1419860b7264f6379cc737c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Mon, 26 Jun 2023 15:16:32 +0200 Subject: [PATCH 071/108] Further work on icon-art test case --- cases/icon-art-test/config.py | 4 ++-- cases/icon-art-test/icon_runjob.cfg | 5 +++-- run_chain.py | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cases/icon-art-test/config.py b/cases/icon-art-test/config.py index 0c3f1ff0..fba72acb 100644 --- a/cases/icon-art-test/config.py +++ b/cases/icon-art-test/config.py @@ -68,8 +68,8 @@ 'cldopt_filename': ['rrtm_cldopt.nc', 'rad'], 'lrtm_filename': ['rrtmg_lw.nc', 'rad'], 'map_file_ana': ['map_file.ana', 'mapping'], - 'chemtracer_xml_filename': ['tracers_oh_pntsrc.xml', 'xml'], - 'pntSrc_xml_filename': ['pntSrc_example.xml', 'xml'] + 'chemtracer_xml_filename': ['tracers_oh_pntsrc.xml', 'XML'], + 'pntSrc_xml_filename': ['pntSrc_example.xml', 'XML'] } # File names ----------------------------------------------------------------- diff --git a/cases/icon-art-test/icon_runjob.cfg b/cases/icon-art-test/icon_runjob.cfg index f2bcf112..91f4e3d7 100755 --- a/cases/icon-art-test/icon_runjob.cfg +++ b/cases/icon-art-test/icon_runjob.cfg @@ -33,7 +33,7 @@ nproma=16 set -x -export ECCODES_DEFINITION_PATH=/users/msteiner/eccodes_definitions/definitions.edzw-2.12.5-2:/store/empa/em05/easybuild/software/ecCodes/2.12.5-CrayGNU-19.10/share/eccodes/definitions +export ECCODES_DEFINITION_PATH={cfg.eccodes_dir}/definitions.edzw-2.12.5-2:{cfg.eccodes_dir}/definitions # ---------------------------------------------------------------------------- # Link radiation input files @@ -287,7 +287,7 @@ cat > NAMELIST_NWP << EOF steps_per_file = 1 ! number of steps per file mode = 1 ! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis) include_last = .TRUE. - output_filename = 'ICON-ART-OEM' + output_filename = 'ICON-ART' filename_format = '{cfg.icon_output}/_DOM_' ! file name base steps_per_file_inclfirst = .FALSE. output_grid = .TRUE. @@ -347,6 +347,7 @@ cat > NAMELIST_NWP << EOF pat_len = 750.0 ! effective length scale of thermal surface patterns c_diff = 0.2 ! length scale factor for vertical diffusion of TKE rat_sea = 7.5 ! controls laminar resistance for sea surface + rlam_heat = 1 ltkesso = .TRUE. ! consider TKE-production by sub-grid SSO wakes frcsmot = 0.2 ! these 2 switches together apply vertical smoothing of the TKE source terms imode_frcsmot = 2 ! in the tropics (only), which reduces the moist bias in the tropical lower troposphere diff --git a/run_chain.py b/run_chain.py index b2d9f2f2..b582334a 100755 --- a/run_chain.py +++ b/run_chain.py @@ -379,7 +379,7 @@ def run_chain(work_root, model_cfg, cfg, start_time, hstart, hstop, job_names, setattr(cfg, 'icon_input_rad', os.path.join(chain_root, 'icon', 'input', 'rad')) setattr(cfg, 'icon_input_xml', - os.path.join(chain_root, 'icon', 'input', 'xml')) + os.path.join(chain_root, 'icon', 'input', 'XML')) setattr(cfg, 'icon_work', os.path.join(chain_root, 'icon', 'run')) setattr(cfg, 'icon_output', os.path.join(chain_root, 'icon', 'output')) setattr(cfg, 'icon_output_reduced', From 956f95749239f3805b607ec7dd1bfedf1a46ffad Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 29 Jun 2023 12:20:49 +0000 Subject: [PATCH 072/108] GitHub Action: Apply Pep8-formatting --- cases/icon-art-global/config.py | 1 - jobs/prepare_data.py | 1 - 2 files changed, 2 deletions(-) diff --git a/cases/icon-art-global/config.py b/cases/icon-art-global/config.py index b614d759..5f2dd7f8 100644 --- a/cases/icon-art-global/config.py +++ b/cases/icon-art-global/config.py @@ -47,7 +47,6 @@ icon_bin = os.path.join('/scratch/snx3000/jthanwer/icon/cpu/', 'bin', 'icon') # - # -- Paths for namelists and slurm runscript templates # icon_runjob = os.path.join(case_dir, 'icon_runjob_withoutart.cfg') icon_runjob = os.path.join(case_dir, 'icon_runjob.cfg') diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index 17f5d939..cd7b28b2 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -308,7 +308,6 @@ def main(starttime, hstart, hstop, cfg, model_cfg): os.path.join(cfg.oae_dir, cfg.oae_ens_lambda_nc), cfg.oae_ens_lambda_nc_scratch) - #----------------------------------------------------- # Get datafile lists for LBC (each at 00 UTC and others) #----------------------------------------------------- From b2a2c13fc4d1167169a66993d7b8c43e774bd479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Fri, 30 Jun 2023 15:18:55 +0200 Subject: [PATCH 073/108] Only keep test cases --- cases/carbosense/config.py | 160 ------- cases/carbosense/cosmo_INPUT_AF.cfg | 4 - cases/carbosense/cosmo_INPUT_ASS.cfg | 55 --- cases/carbosense/cosmo_INPUT_DIA.cfg | 8 - cases/carbosense/cosmo_INPUT_DYN.cfg | 45 -- cases/carbosense/cosmo_INPUT_GHG.cfg | 22 - cases/carbosense/cosmo_INPUT_IO.cfg | 146 ------- cases/carbosense/cosmo_INPUT_ORG.cfg | 62 --- cases/carbosense/cosmo_INPUT_PHY.cfg | 46 -- cases/carbosense/cosmo_runjob.cfg | 61 --- cases/carbosense/cosmo_tracers.csv | 15 - cases/carbosense/int2lm_INPUT.cfg | 169 -------- cases/carbosense/int2lm_datasets.csv | 3 - cases/carbosense/int2lm_runjob.cfg | 71 ---- cases/carbosense/int2lm_tracers.csv | 7 - cases/che-wp4/config.py | 160 ------- cases/che-wp4/cosmo_INPUT_AF.cfg | 4 - cases/che-wp4/cosmo_INPUT_ASS.cfg | 55 --- cases/che-wp4/cosmo_INPUT_DIA.cfg | 9 - cases/che-wp4/cosmo_INPUT_DYN.cfg | 38 -- cases/che-wp4/cosmo_INPUT_GHG.cfg | 22 - cases/che-wp4/cosmo_INPUT_IO.cfg | 220 ---------- cases/che-wp4/cosmo_INPUT_ORG.cfg | 60 --- cases/che-wp4/cosmo_INPUT_PHY.cfg | 46 -- cases/che-wp4/cosmo_runjob.cfg | 61 --- cases/che-wp4/cosmo_tracers.csv | 92 ---- cases/che-wp4/cosmo_tracers_full.csv | 92 ---- cases/che-wp4/cosmo_tracers_noohchem.csv | 86 ---- cases/che-wp4/cosmo_tracers_ohchem.csv | 89 ---- cases/che-wp4/cosmo_tracers_reduced.csv | 92 ---- .../cosmo_tracers_reduced_zerograd.csv | 92 ---- cases/che-wp4/int2lm_INPUT.cfg | 203 --------- cases/che-wp4/int2lm_datasets.csv | 12 - cases/che-wp4/int2lm_runjob.cfg | 71 ---- cases/che-wp4/int2lm_tracers.csv | 93 ---- cases/che-wp4/tracerlist.txt | 86 ---- cases/che-wp4/variables.csv | 88 ---- cases/cosmo-7/GLOBAL.dat | 220 ---------- cases/cosmo-7/config.py | 119 ------ cases/cosmo-7/cosmo_INPUT_ASS.cfg | 46 -- cases/cosmo-7/cosmo_INPUT_DIA.cfg | 7 - cases/cosmo-7/cosmo_INPUT_DYN.cfg | 38 -- cases/cosmo-7/cosmo_INPUT_INI.cfg | 5 - cases/cosmo-7/cosmo_INPUT_IO.cfg | 77 ---- cases/cosmo-7/cosmo_INPUT_ORG.cfg | 52 --- cases/cosmo-7/cosmo_INPUT_PHY.cfg | 41 -- cases/cosmo-7/cosmo_INPUT_SAT.cfg | 6 - cases/cosmo-7/cosmo_runjob.cfg | 69 --- cases/cosmo-7/ifs2lm.dat | 144 ------- cases/cosmo-7/int2lm_INPUT.cfg | 114 ----- cases/cosmo-7/int2lm_runjob.cfg | 69 --- cases/cosmo-7/merge.ctl | 64 --- cases/cosmo-art-mother-test/config.py | 152 ------- .../cosmo-art-mother-test/cosmo_INPUT_ART.cfg | 34 -- .../cosmo-art-mother-test/cosmo_INPUT_ASS.cfg | 93 ---- .../cosmo-art-mother-test/cosmo_INPUT_DIA.cfg | 12 - .../cosmo-art-mother-test/cosmo_INPUT_DYN.cfg | 27 -- .../cosmo-art-mother-test/cosmo_INPUT_EPS.cfg | 5 - .../cosmo-art-mother-test/cosmo_INPUT_INI.cfg | 8 - .../cosmo-art-mother-test/cosmo_INPUT_IO.cfg | 95 ----- .../cosmo-art-mother-test/cosmo_INPUT_OAE.cfg | 24 -- .../cosmo-art-mother-test/cosmo_INPUT_ORG.cfg | 58 --- .../cosmo-art-mother-test/cosmo_INPUT_PHY.cfg | 45 -- cases/cosmo-art-mother-test/cosmo_runjob.cfg | 56 --- cases/cosmo-art-mother-test/int2lm_INPUT.cfg | 218 ---------- cases/cosmo-art-mother-test/int2lm_runjob.cfg | 62 --- cases/cosmo-art-nested-test/config.py | 142 ------- .../cosmo-art-nested-test/cosmo_INPUT_ART.cfg | 33 -- .../cosmo-art-nested-test/cosmo_INPUT_ASS.cfg | 94 ---- .../cosmo-art-nested-test/cosmo_INPUT_DIA.cfg | 12 - .../cosmo-art-nested-test/cosmo_INPUT_DYN.cfg | 30 -- .../cosmo-art-nested-test/cosmo_INPUT_EPS.cfg | 5 - .../cosmo-art-nested-test/cosmo_INPUT_INI.cfg | 8 - .../cosmo-art-nested-test/cosmo_INPUT_IO.cfg | 94 ---- .../cosmo-art-nested-test/cosmo_INPUT_ORG.cfg | 57 --- .../cosmo-art-nested-test/cosmo_INPUT_PHY.cfg | 46 -- cases/cosmo-art-nested-test/cosmo_runjob.cfg | 56 --- cases/cosmo-art-nested-test/int2lm_INPUT.cfg | 196 --------- cases/cosmo-art-nested-test/int2lm_runjob.cfg | 62 --- cases/icon-art-global/config.py | 144 ------- cases/icon-art-global/icon_era5_inicond.sh | 179 -------- cases/icon-art-global/icon_era5_nudging.sh | 64 --- cases/icon-art-global/icon_runjob.cfg | 402 ------------------ cases/icon-art-global/icon_species_inicond.sh | 75 ---- cases/icon-art-global/icon_species_nudging.sh | 55 --- cases/icon-art-global/mypartab | 117 ----- cases/icon-art-oem-ensembles-test/config.py | 167 -------- .../icon_runjob.cfg | 379 ----------------- .../icontools_remap_00_lbc_runjob.cfg | 151 ------- .../icontools_remap_ic_chem_runjob.cfg | 88 ---- .../icontools_remap_ic_runjob.cfg | 242 ----------- .../icontools_remap_lbc_chem_runjob.cfg | 90 ---- .../icontools_remap_lbc_rest_runjob.cfg | 125 ------ cases/icon-art-oem-test/config.py | 166 -------- cases/icon-art-oem-test/icon_runjob.cfg | 378 ---------------- .../icontools_remap_00_lbc_runjob.cfg | 151 ------- .../icontools_remap_ic_chem_runjob.cfg | 88 ---- .../icontools_remap_ic_runjob.cfg | 242 ----------- .../icontools_remap_lbc_chem_runjob.cfg | 90 ---- .../icontools_remap_lbc_rest_runjob.cfg | 125 ------ cases/icon-art-test/config.py | 7 +- cases/icon-art-test/icon_runjob.cfg | 14 +- run_chain.py | 2 +- 103 files changed, 20 insertions(+), 8961 deletions(-) delete mode 100755 cases/carbosense/config.py delete mode 100644 cases/carbosense/cosmo_INPUT_AF.cfg delete mode 100644 cases/carbosense/cosmo_INPUT_ASS.cfg delete mode 100644 cases/carbosense/cosmo_INPUT_DIA.cfg delete mode 100644 cases/carbosense/cosmo_INPUT_DYN.cfg delete mode 100644 cases/carbosense/cosmo_INPUT_GHG.cfg delete mode 100644 cases/carbosense/cosmo_INPUT_IO.cfg delete mode 100644 cases/carbosense/cosmo_INPUT_ORG.cfg delete mode 100644 cases/carbosense/cosmo_INPUT_PHY.cfg delete mode 100644 cases/carbosense/cosmo_runjob.cfg delete mode 100644 cases/carbosense/cosmo_tracers.csv delete mode 100644 cases/carbosense/int2lm_INPUT.cfg delete mode 100644 cases/carbosense/int2lm_datasets.csv delete mode 100644 cases/carbosense/int2lm_runjob.cfg delete mode 100644 cases/carbosense/int2lm_tracers.csv delete mode 100755 cases/che-wp4/config.py delete mode 100644 cases/che-wp4/cosmo_INPUT_AF.cfg delete mode 100644 cases/che-wp4/cosmo_INPUT_ASS.cfg delete mode 100644 cases/che-wp4/cosmo_INPUT_DIA.cfg delete mode 100644 cases/che-wp4/cosmo_INPUT_DYN.cfg delete mode 100644 cases/che-wp4/cosmo_INPUT_GHG.cfg delete mode 100644 cases/che-wp4/cosmo_INPUT_IO.cfg delete mode 100644 cases/che-wp4/cosmo_INPUT_ORG.cfg delete mode 100644 cases/che-wp4/cosmo_INPUT_PHY.cfg delete mode 100644 cases/che-wp4/cosmo_runjob.cfg delete mode 100644 cases/che-wp4/cosmo_tracers.csv delete mode 100644 cases/che-wp4/cosmo_tracers_full.csv delete mode 100644 cases/che-wp4/cosmo_tracers_noohchem.csv delete mode 100644 cases/che-wp4/cosmo_tracers_ohchem.csv delete mode 100644 cases/che-wp4/cosmo_tracers_reduced.csv delete mode 100644 cases/che-wp4/cosmo_tracers_reduced_zerograd.csv delete mode 100644 cases/che-wp4/int2lm_INPUT.cfg delete mode 100644 cases/che-wp4/int2lm_datasets.csv delete mode 100644 cases/che-wp4/int2lm_runjob.cfg delete mode 100644 cases/che-wp4/int2lm_tracers.csv delete mode 100644 cases/che-wp4/tracerlist.txt delete mode 100644 cases/che-wp4/variables.csv delete mode 100644 cases/cosmo-7/GLOBAL.dat delete mode 100644 cases/cosmo-7/config.py delete mode 100644 cases/cosmo-7/cosmo_INPUT_ASS.cfg delete mode 100644 cases/cosmo-7/cosmo_INPUT_DIA.cfg delete mode 100644 cases/cosmo-7/cosmo_INPUT_DYN.cfg delete mode 100644 cases/cosmo-7/cosmo_INPUT_INI.cfg delete mode 100644 cases/cosmo-7/cosmo_INPUT_IO.cfg delete mode 100644 cases/cosmo-7/cosmo_INPUT_ORG.cfg delete mode 100644 cases/cosmo-7/cosmo_INPUT_PHY.cfg delete mode 100644 cases/cosmo-7/cosmo_INPUT_SAT.cfg delete mode 100644 cases/cosmo-7/cosmo_runjob.cfg delete mode 100644 cases/cosmo-7/ifs2lm.dat delete mode 100644 cases/cosmo-7/int2lm_INPUT.cfg delete mode 100644 cases/cosmo-7/int2lm_runjob.cfg delete mode 100644 cases/cosmo-7/merge.ctl delete mode 100644 cases/cosmo-art-mother-test/config.py delete mode 100644 cases/cosmo-art-mother-test/cosmo_INPUT_ART.cfg delete mode 100644 cases/cosmo-art-mother-test/cosmo_INPUT_ASS.cfg delete mode 100644 cases/cosmo-art-mother-test/cosmo_INPUT_DIA.cfg delete mode 100644 cases/cosmo-art-mother-test/cosmo_INPUT_DYN.cfg delete mode 100644 cases/cosmo-art-mother-test/cosmo_INPUT_EPS.cfg delete mode 100644 cases/cosmo-art-mother-test/cosmo_INPUT_INI.cfg delete mode 100644 cases/cosmo-art-mother-test/cosmo_INPUT_IO.cfg delete mode 100644 cases/cosmo-art-mother-test/cosmo_INPUT_OAE.cfg delete mode 100644 cases/cosmo-art-mother-test/cosmo_INPUT_ORG.cfg delete mode 100644 cases/cosmo-art-mother-test/cosmo_INPUT_PHY.cfg delete mode 100644 cases/cosmo-art-mother-test/cosmo_runjob.cfg delete mode 100644 cases/cosmo-art-mother-test/int2lm_INPUT.cfg delete mode 100644 cases/cosmo-art-mother-test/int2lm_runjob.cfg delete mode 100644 cases/cosmo-art-nested-test/config.py delete mode 100644 cases/cosmo-art-nested-test/cosmo_INPUT_ART.cfg delete mode 100644 cases/cosmo-art-nested-test/cosmo_INPUT_ASS.cfg delete mode 100644 cases/cosmo-art-nested-test/cosmo_INPUT_DIA.cfg delete mode 100644 cases/cosmo-art-nested-test/cosmo_INPUT_DYN.cfg delete mode 100644 cases/cosmo-art-nested-test/cosmo_INPUT_EPS.cfg delete mode 100644 cases/cosmo-art-nested-test/cosmo_INPUT_INI.cfg delete mode 100644 cases/cosmo-art-nested-test/cosmo_INPUT_IO.cfg delete mode 100644 cases/cosmo-art-nested-test/cosmo_INPUT_ORG.cfg delete mode 100644 cases/cosmo-art-nested-test/cosmo_INPUT_PHY.cfg delete mode 100644 cases/cosmo-art-nested-test/cosmo_runjob.cfg delete mode 100644 cases/cosmo-art-nested-test/int2lm_INPUT.cfg delete mode 100644 cases/cosmo-art-nested-test/int2lm_runjob.cfg delete mode 100644 cases/icon-art-global/config.py delete mode 100644 cases/icon-art-global/icon_era5_inicond.sh delete mode 100644 cases/icon-art-global/icon_era5_nudging.sh delete mode 100644 cases/icon-art-global/icon_runjob.cfg delete mode 100644 cases/icon-art-global/icon_species_inicond.sh delete mode 100644 cases/icon-art-global/icon_species_nudging.sh delete mode 100644 cases/icon-art-global/mypartab delete mode 100644 cases/icon-art-oem-ensembles-test/config.py delete mode 100755 cases/icon-art-oem-ensembles-test/icon_runjob.cfg delete mode 100755 cases/icon-art-oem-ensembles-test/icontools_remap_00_lbc_runjob.cfg delete mode 100755 cases/icon-art-oem-ensembles-test/icontools_remap_ic_chem_runjob.cfg delete mode 100755 cases/icon-art-oem-ensembles-test/icontools_remap_ic_runjob.cfg delete mode 100755 cases/icon-art-oem-ensembles-test/icontools_remap_lbc_chem_runjob.cfg delete mode 100755 cases/icon-art-oem-ensembles-test/icontools_remap_lbc_rest_runjob.cfg delete mode 100644 cases/icon-art-oem-test/config.py delete mode 100755 cases/icon-art-oem-test/icon_runjob.cfg delete mode 100755 cases/icon-art-oem-test/icontools_remap_00_lbc_runjob.cfg delete mode 100755 cases/icon-art-oem-test/icontools_remap_ic_chem_runjob.cfg delete mode 100755 cases/icon-art-oem-test/icontools_remap_ic_runjob.cfg delete mode 100755 cases/icon-art-oem-test/icontools_remap_lbc_chem_runjob.cfg delete mode 100755 cases/icon-art-oem-test/icontools_remap_lbc_rest_runjob.cfg diff --git a/cases/carbosense/config.py b/cases/carbosense/config.py deleted file mode 100755 index 4a2459e2..00000000 --- a/cases/carbosense/config.py +++ /dev/null @@ -1,160 +0,0 @@ -import os - -# GENERAL SETTINGS =========================================================== -user = os.environ['USER'] -model = 'cosmo-ghg' -restart_step = 24 # hours -#variant = 'spinup' -#spinup = 6 - -compute_host = 'daint' -compute_queue = 'normal' # 'debug' -compute_account = 'em05' -constraint = 'gpu' # 'mc' - -if constraint == 'gpu': - ntasks_per_node = 12 - mpich_cuda = ( - 'export MPICH_RDMA_ENABLED_CUDA=1\n' - 'export MPICH_G2G_PIPELINE=256\n' - 'export CRAY_CUDA_MPS=1\n' - 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/cray/nvidia/default/lib64' - ) -elif constraint == 'mc': - ntasks_per_node = 36 - mpich_cuda = '' - -# case name = pathname in cases/ -path = os.path.realpath(__file__) -casename = os.path.basename(os.path.dirname(path)) - -# Root directory of the sourcecode of the chain (where run_chain.py is) -chain_src_dir = os.getcwd() - -# Root directory of the working space of the chain -work_root = os.environ['SCRATCH'] + "/processing_chain" - -# Directory where executables are stored -exe_dir = "/store/empa/em05/executables" - -# PRE-PROCESSING ============================================================= -input_root = '/store/empa/em05/mjaehn/Carbosense/input' - -# METEO ---------------------------------------------------------------------- -meteo_dir = '/store/empa/em05' # will use '/store/mch/msopr/owm/COSMO-7' instead -meteo_prefix = "laf" -meteo_inc = 1 - -# ICBC ----------------------------------------------------------------------- -input_root_cams = '/store/empa/em05/dbrunner/carbosense' -cams_dir_orig = os.path.join(input_root_cams, 'icbc') # Input directory -cams_dir_proc = os.path.join(input_root_cams, 'icbc', - 'processed') # Output directory -year = 2020 -if year >= 2020: - cams_prefix1 = 'cams_h9sp' - cams_prefix2 = 'sfc_h9sp' -elif year == 2019: - cams_prefix1 = 'cams_gznv' - cams_prefix2 = 'sfc_gznv' -else: - cams_prefix1 = 'cams_ghqy' - cams_prefix2 = 'sfc_ghqy' -cams_parameters = [{ - 'suffix': 'cams_co2', - 'species': ['CO2', 'CO', 'CH4'], - 'inc': 3, - 'prefix1': cams_prefix1, - 'prefix2': cams_prefix2, - 'lev': 137, -}] - -# OBS_NUDGING ---------------------------------------------------------------- -obs_nudging_dir = '/store/empa/em05/obs_nudging_cosmo' -obs_nudging_prefixes = [ - 'cdfin_amdar', 'cdfin_ship', 'cdfin_synop', 'cdfin_temp', 'cdfin_wprof' -] -obs_nudging_date_format = "-%Y%m%d000000" - -# OAE ------------------------------------------------------------------------ -# Online anthropogenic emissions -oae_dir = os.path.join(input_root, 'oae') -oae_gridded_emissions_nc = 'emis_merged_CO2_CO_CH4_X_1km.nc' -oae_vertical_profiles_nc = 'vertical_profiles.nc' -oae_hourofday_nc = 'hourofday.nc' -oae_hourofyear_nc = 'hourofyear.nc' -oae_dayofweek_nc = 'dayofweek.nc' -oae_monthofyear_nc = 'monthofyear.nc' - -# ONLINE_VPRM ---------------------------------------------------------------- -# MODIS and vegetation data for online VPRM -online_vprm_dir = os.path.join(input_root, 'online_vprm') -modis_filename = 'MODIS_sur_refl_COSMO_Carbosense_1km_20200401-20200930.nc' -vegetation_filename = 'VPRM_VegClasses_COSMO1_Carbosense.nc' - -# INT2LM --------------------------------------------------------------------- -# Extpar-file -int2lm_extpar_dir = os.path.join(input_root, 'extpar') -int2lm_extpar_file = 'extpar_empa_cosmo1_aster_opt.nc' - -# Executable -int2lm_bin = os.path.join(exe_dir, "int2lm_gnu_208d68e_20201005") - -# Namelist and slurm runscript templates -int2lm_namelist = '%s/cases/%s/int2lm_INPUT.cfg' % (chain_src_dir, casename) -int2lm_runjob = '%s/cases/%s/int2lm_runjob.cfg' % (chain_src_dir, casename) - -# Walltimes -if compute_queue == "normal": - int2lm_walltime = "10:00:00" -elif compute_queue == "debug": - int2lm_walltime = "00:30:00" -else: - logging.error("Unset queue name: %s" % compute_queue) - sys.exit(1) - -# Domain decomposition -int2lm_nodes = 2 -int2lm_ntasks_per_node = 12 -int2lm_np_x = 6 -int2lm_np_y = 4 -int2lm_np_tot = int2lm_np_x * int2lm_np_y - -# POST_INT2LM ---------------------------------------------------------------- -# Fields that are used as initial conditions -post_int2lm_species = ['CO2_BG', 'CO_BG', 'CH4_BG'] - -# SIMULATION ================================================================= -# COSMO ---------------------------------------------------------------------- -# Executable -cosmo_bin = os.path.join(exe_dir, "cosmo-org-ghg_pgi_e5e9e5ae_20201125") - -# Namelists and slurm runscript templates -cosmo_namelist = '%s/cases/%s/cosmo_INPUT_' % (chain_src_dir, casename) -cosmo_runjob = '%s/cases/%s/cosmo_runjob.cfg' % (chain_src_dir, casename) - -# Walltimes and domain decomposition -if compute_queue == "normal": - cosmo_walltime = "03:00:00" - cosmo_np_x = 24 - cosmo_np_y = 18 -elif compute_queue == "debug": - cosmo_walltime = "00:30:00" - cosmo_np_x = 4 - cosmo_np_y = 3 -else: - logging.error("Unknown queue name: %s" % compute_queue) - sys.exit(1) - -# Total node count -cosmo_np_io = 0 -cosmo_np_tot = int(cosmo_np_x * cosmo_np_y / ntasks_per_node) + cosmo_np_io - -# POST-PROCESSING ============================================================ -# REDUCE_OUTPUT -------------------------------------------------------------- -convert_gas = True -output_levels = 20 - -# POST_COSMO ----------------------------------------------------------------- -output_root = os.path.join("/store/empa/em05/", user, - "processing_chain_output", casename) diff --git a/cases/carbosense/cosmo_INPUT_AF.cfg b/cases/carbosense/cosmo_INPUT_AF.cfg deleted file mode 100644 index b5815218..00000000 --- a/cases/carbosense/cosmo_INPUT_AF.cfg +++ /dev/null @@ -1,4 +0,0 @@ -&AFCTL - hinc_e=1.0, !time increment for read of emissions - hinc_f=1.0, !time increment for read of fluxes -/END diff --git a/cases/carbosense/cosmo_INPUT_ASS.cfg b/cases/carbosense/cosmo_INPUT_ASS.cfg deleted file mode 100644 index 5f27ff65..00000000 --- a/cases/carbosense/cosmo_INPUT_ASS.cfg +++ /dev/null @@ -1,55 +0,0 @@ -&NUDGING - lnudge = .TRUE., - lverif = .FALSE., - mruntyp = 2, - lverpas = .TRUE., - ycdfdir = '{cfg.cosmo_input}/obs_nudging', - hnudgsta = {cfg.hstart}, - hnudgend = {cfg.hstop}, - tconbox = 30.0, - hversta = 0.0, - hverend = 0.0, - khumbal = 100, - ntpscor = 1, - ptpstop = 400.0, - luvgcor = .TRUE., - ltipol = .TRUE., tipolmx = 3.0, wtukrsa = 3.0, wtukrse = 1.0, - ltipsu = .TRUE., tipmxsu = 1.0, wtuksua = 1.5, wtuksue = 0.5, - wtukara = 1.5, wtukare = 0.5, - msprpar = 1, - msprpsu = 0, - gnudg = .0006, .0006, .0006, .0006, - gnudgsu = .0006, .0006, .0000, .0006, - gnudgar = .0006, .0000, .0006, .0000, - vcorls = .333 , .333 , .04 , .04 , vcutof = 0.75, 0.75, 1.0 , 1.0 , - vcorlsu = .013 , .013 , .002 , .00001, vcutosu = 0.75, 0.75, 4.0 , 0.001 , - vcsnisu = 2500., 2500., 9. , 9. , - rhvfac = 1.0 , 0.0 , 0.83, 0.83, - rhinfl = 0., 70., 0., 0., rhtfac = 1.3 , 1.43 , 1.3 , 1.3 , - rhiflsu = 70., 70., 100., 70., rhtfsu = 1.0 , 1.43 , 1.0 , 1.0 , - fnondiv = 0.8 , cnondiv = 0.1 , cutofr = 3.5 , 3.5 , 3.5 , 3.5 , - tnondiv = 1.1 , cutofsu = 2.0 , 3.5 , 2.0 , 2.0 , - topobs = 849., 1099., 799., 699., - botmod = 1099., 1099., 1099., 899., - lscadj = .TRUE..TRUE..TRUE.,.FALSE., - dtqc = 720., qcvf = 5.0 , 1.0 ,10.0 , 0.0 , - qcc = 0., 500., 0., .7, - qccsu = 12., 500., 12., .7, - lsynop = .TRUE., - laircf = .TRUE., - ldribu = .TRUE., - ltemp = .TRUE., - lpilot = .TRUE., - lcd137 = .FALSE., - lcd132 = .TRUE., - maxmlo = 600, maxsgo = 10000, maxuso = 3000, nolbc = 5, - altopsu = 100., 5000., 5000., 5000., thairh = 20., - exnlat = 90., exslat = 90., exwlon = -180., exelon = 180., - lsurfa = .FALSE., - lt2m = .TRUE., ht2a = 0., ht2i = 1., - lrh2m = .TRUE., hh2a = 0., hh2i = 1., - lprecp = .TRUE., hprc = 0., raintp = 12., - lprodr =.TRUE. , ldiasa = .FALSE., - ionl = 235, jonl = 151, ionl2 = 221, jonl2 = 131, - /END - diff --git a/cases/carbosense/cosmo_INPUT_DIA.cfg b/cases/carbosense/cosmo_INPUT_DIA.cfg deleted file mode 100644 index 52082818..00000000 --- a/cases/carbosense/cosmo_INPUT_DIA.cfg +++ /dev/null @@ -1,8 +0,0 @@ -&DIACTL - n0meanval = 0, - nincmeanval = 1, - itype_diag_t2m = 1, - itype_diag_gusts=2, - lgplong = .TRUE., - hincgp = 1.0, -/ diff --git a/cases/carbosense/cosmo_INPUT_DYN.cfg b/cases/carbosense/cosmo_INPUT_DYN.cfg deleted file mode 100644 index bb4c79c5..00000000 --- a/cases/carbosense/cosmo_INPUT_DYN.cfg +++ /dev/null @@ -1,45 +0,0 @@ - &DYNCTL - lcpp_dycore=.true., - lspubc=.true., - itype_spubc=3, - rdheight=11000.0, - nrdtau=3, - rlwidth=15000.0, - betasw=0.4, - xkd=0.1, - epsass=0.15, - lcond=.true., - lhordiff=.true., - itype_hdiff=2, - hd_corr_u_bd=0.75, - hd_corr_t_bd=0.75, - hd_corr_trcr_bd=0.0, - hd_corr_p_bd=0.75, - hd_corr_u_in=0.25, - hd_corr_t_in=0.0, - hd_corr_trcr_in=0.0, - hd_corr_p_in=0.0, - hd_dhmax=250., - l_diff_Smag=.true., - l_diff_cold_pools_uv=.true., - l_diff_cold_pools=.true., - thresh_cold_pool=10.0, - l2tls=.true., - irunge_kutta=1, - itype_fast_waves=2, - divdamp_slope=1.0, - irk_order=3, - iadv_order=5, - itheta_adv=0, - ltadv_limiter=.FALSE., - y_scalar_advect='Bott2_Strang', - y_vert_adv_dyn='impl2', - ieva_order=3, - ldyn_bbc=.FALSE., - itype_bbc_w=114, - ldiabf_lh=.false., - itype_outflow_qrsg=2, - itype_lbc_qrsg=1, - l_satad_dyn_iter=.FALSE., - lcori=.true. - /END diff --git a/cases/carbosense/cosmo_INPUT_GHG.cfg b/cases/carbosense/cosmo_INPUT_GHG.cfg deleted file mode 100644 index 97473c33..00000000 --- a/cases/carbosense/cosmo_INPUT_GHG.cfg +++ /dev/null @@ -1,22 +0,0 @@ -&GHGCTL - in_tracers = {cfg.in_tracers}, - tracer_start = {cfg.tracer_start}, - iemiss_interp = 1, - gridded_emissions_nc = '../input/oae/{cfg.oae_gridded_emissions_nc}', - vertical_profile_nc = '../input/oae/{cfg.oae_vertical_profiles_nc}', - hour_of_day_nc = '../input/oae/{cfg.oae_hourofday_nc}', - day_of_week_nc = '../input/oae/{cfg.oae_dayofweek_nc}', - month_of_year_nc = '../input/oae/{cfg.oae_monthofyear_nc}', - modis_reflectances_nc = '../input/vprm/modis.nc', - veg_class_frac_nc = '../input/vprm/vegetation.nc', - octe_maps_nc = '../input/octe/maps.nc', - octe_lambdas_nc = '../input/octe/lambdas.nc', -/ -&VPRMCTL - yvprm_table = 'gerbig', - lcut_area = .TRUE., - lon_cut_start = 8.469, - lon_cut_end = 8.591, - lat_cut_start = 47.334, - lat_cut_end = 47.436, -/ diff --git a/cases/carbosense/cosmo_INPUT_IO.cfg b/cases/carbosense/cosmo_INPUT_IO.cfg deleted file mode 100644 index 2a4e11be..00000000 --- a/cases/carbosense/cosmo_INPUT_IO.cfg +++ /dev/null @@ -1,146 +0,0 @@ - &IOCTL - ldwd_grib_use = .FALSE., - l_ke_in_gds = .TRUE., - lasync_io = {cfg.lasync_io}, - itype_gather = 1, - ymode_read = 'r ', - ymode_write = 'w ', - nincwait = 90, - nmaxwait = 300, - nvers = 570, - ncenter = 215, - ngribout = 1, - num_gribtabs = 17, - yform_read = "ncdf", - nhour_restart = {restart_start:.0f} ,{restart_stop:.0f}, {restart_step:.0f}, ! start, stop and increment in full forecast hours - ydir_restart_in = '{cfg.cosmo_restart_in}', - ydir_restart_out = '{cfg.cosmo_restart_out}', - yform_restart = 'nc-4' - ytunit_restart = 'f', - /END - &GRIBIN - lbdana = .FALSE., - ydirini = '../../int2lm/output/', - ytunitbd = 'd', - lchkini = .TRUE., - hincbound = 1.0, - ydirbd = '../../int2lm/output/', - lchkbd = .TRUE., - lana_qi = .TRUE., - llb_qi = .TRUE., - lana_qg = .FALSE., - llb_qg = .FALSE., - lana_qr_qs = .TRUE., - llb_qr_qs = .TRUE., - lana_rho_snow = .FALSE., - lan_lai = .TRUE., - lan_rootdp = .TRUE., - lan_vio3 = .TRUE., - lan_plcov = .TRUE., - lan_t_cl = .TRUE., - lan_w_cl = .TRUE., - lan_hmo3 = .TRUE., - lan_t_so0 = .TRUE., - lan_t_snow = .TRUE., - lan_w_snow = .TRUE., - lan_w_i = .TRUE., - lan_rho_snow = .TRUE., - newbc = 0, - hnewbcdt = 3.0, -/ -&GRIBOUT - ytunit = 'd', - lanalysis = .FALSE., - yform_write = 'ncdf', ! grb1 or ncdf - hcomb = 0,8761,1, - yvarml = 'U_10M', ! 10m u-wind (m s-1) - 'V_10M', ! 10m v-wind (m s-1) - 'T_2M', ! 2m temperature (K) - 'TD_2M', ! 2m dew point temperature (K) - 'RELHUM_2M', ! 2m relative humidity (%) - 'CLCT', ! total cloud cover (%) - 'CLCH', ! cloud cover of high clouds (%) - 'CLCM', ! cloud cover of medium clouds (%) - 'CLCL', ! cloud cover of low clouds (%) - 'T_S', ! surface temperature (K) - 'QV_S', ! surfrace specific humidity (kg kg-1) - 'PS', ! surface pressure (Pa) - 'PMSL', ! surface pressure reduced to N.N. (Pa) - 'W_SNOW', ! snow cover water content (kg m-2) - 'H_SNOW', ! height of snow covera (m) - 'RAIN_GSP', ! accumulated large scale rainfall amount (kg m-2) - 'SNOW_GSP', ! accumulated large scale snowfall amount (kg m-2) - 'TOT_PREC', ! accumulated total precipitation (kg m-2) - 'PRR_GSP', ! large-scale rain rate (kg s-1 m-2) - 'PRS_GSP', ! large-scale snow rate (kg s-1 m-2) - 'PRG_GSP', ! large-scale graupel rate (kg s-1 m-2) - 'TWATER', ! liquid water path (kg m-2) - 'TQV', ! integrated water vapor (kg m-2) - 'TQC', ! cloud water path (kg m-2) - 'TQI', ! ice water path (kg m-2) - 'TQR', ! rain water path (kg m-2) - 'TQS', ! snow water path (kg m-2) - 'TQG', ! graupel water path (kg m-2) - 'Z0', ! surface roughness length (m) - 'TCM', ! turbulent transfer coefficient for momentum (-) - 'TCH', ! turbulent transfer coefficient for heat/moisture (-) - 'HPBL', ! boundary layer height (m) - 'ALB_RAD', ! surface short-wave albedo (%) - 'AUMFL_S', ! averaged u-component of momentum flux (N m-2) - 'AVMFL_S', ! averaged v-component of momentum flux (N m-2) - 'ALHFL_S', ! averaged latent heat flux (W m-2) - 'ASHFL_S', ! averaged sensible heat flux (W m-2) - 'ASOB_S', ! averaged short-wave radiative budget (W m-2) - 'ATHB_S', ! averaged long-wave radiative budget (W m-2) - 'APAB_S', ! averaged photosynthetic active radiation (W m-2) - 'ASWDIFU_S', ! averaged short wave diffuse upward radiation (W m-2) - 'ATHD_S', ! averaged long wave downward radiation (W m-2) - 'ASWDIR_S', ! averaged short wave direct downward radiation (W m-2) - 'ASWDIFD_S', ! averaged short wave diffuse downward radiation (W m-2) - 'SWDIRS_RAD',! short wave direct downward radiation (W m-2) - 'SWDIFDS_RAD',!short wave diffuse downward radiation (W m-2) - 'PABS_RAD', ! photosynthetic active radiation (W m-2) - 'T_SO', ! soil temperature (K) - 'W_SO', ! soil water content (kg m-2) - 'W_SO_ICE', ! soil ice content (kg m-2) - 'U', ! zonal wind-component (m s-1) - 'V', ! meridional wind-component (m s-1) - 'W', ! vertical wind speed (m s-1) - 'T', ! air temperature (K) - 'P', ! air pressure (Pa) - 'QV', ! specific humidity (kg kg-1) - 'QC', ! specific cloud-water content (kg kg-1) - 'QI', ! specific cloud-ice content (kg kg-1) - 'CLC', ! layer cloud area fraction (%) - 'TKE', ! turbulent kinetic energy (m2 s-2) - 'CO2_BG', ! Background mass fraction of CO2 (kg kg-1) - 'CO2_A', ! Mass fraction of CO2 by anthropogenic emissions (kg kg-1) - 'CO2_GPP', ! Mass fraction of CO2 by gross primary production (kg kg-1) - 'CO2_RA', ! Mass fraction of CO2 by gross respiration (kg kg-1) - !'CO2_A_X', ! Mass fraction of CO2 by anthropogenic emissions outside Zurich (kg kg-1) - !'CO2_GPP_X', ! Mass fraction of CO2 by gross primary production outside Zurich (kg kg-1) - !'CO2_RA_X', ! Mass fraction of CO2 by gross respiration outside Zurich (kg kg-1) - 'CO_BG', ! Background mass fraction of CO (kg kg-1) - 'CO_A', ! Mass fraction of CO by anthropogenic emissions (kg kg-1) - 'CH4_BG', ! Background mass fraction of CH4 (kg kg-1) - 'CH4_A', ! Mass fraction of CH4 by anthropogenic emissions (kg kg-1) - !'CO2_A_E', ! anthropogenic CO2 emissions at surface (kg m-2 s-1) - !'CO_A_E', ! anthropogenic CO emissions at surface (kg m-2 s-1) - !'CH4_A_E', ! anthropogenic CH4 emissions at surface (kg m-2 s-1) - !'CO2_RA_F', ! biospheric CO2 RA flux from VPRM model (kg m-2 s-1) - !'CO2_GPP_F', ! biospheric CO2 GPP flux from VPRM model (kg m-2 s-1) - - l_z_filter = .TRUE., - l_p_filter = .TRUE., - luvmasspoint = .FALSE., - l_fi_pmsl_smooth = .TRUE., - lcheck = .TRUE., - ydir = '../output/', - ysuffix = '', - yvarsl = '', - zlev = 750.,1000.,2000.,3000.,4000.,5000.,8500.,10500., - plev = 100.,150.,200.,250.,300.,350.,400.,450.,500.,550.,600.,650., - 700.,750.,800.,850.,900.,925.,950.,1000., - l_fi_pmsl_smooth = .TRUE., - nunit_of_time = 1 - /END diff --git a/cases/carbosense/cosmo_INPUT_ORG.cfg b/cases/carbosense/cosmo_INPUT_ORG.cfg deleted file mode 100644 index 0457d164..00000000 --- a/cases/carbosense/cosmo_INPUT_ORG.cfg +++ /dev/null @@ -1,62 +0,0 @@ -&LMGRID - ! COSMO-1 Carbosense Switzerland domain - ie_tot = 900, - je_tot = 600, - ke_tot = 60, - pollon = -170, ! origin lon: 10.0 - pollat = 43, ! origin lat: 47.0 - dlon = 0.01, - dlat = 0.01, - startlat_tot = -3.18, - startlon_tot = -4.92, -/ -&RUNCTL - dt = 10.0, - hstart = {cfg.hstart}, - hstop = {cfg.hstop}, - ydate_ini = '{cfg.inidate_yyyymmddhh}', - nprocx = {cfg.cosmo_np_x}, - nprocy = {cfg.cosmo_np_y}, - nprocio = 0, - hincmxt = 1.0, - nblock = 2, - lphys = .TRUE., - luse_rttov = .FALSE., - luseobs = .FALSE., ! turn on/off nudging - leps = .FALSE., - lreorder = .FALSE., - lreproduce = .TRUE., - itype_timing = 1, - ldiagnos = .TRUE., - ldfi = .FALSE., - ldump_ascii = .FALSE., - ldatatypes = .FALSE., - ltime_barrier = .TRUE., - num_asynio_comm = {cfg.cosmo_np_io}, - num_iope_percomm = {cfg.num_iope_percomm}, - idbg_level = 11, - nboundlines = 3, -/ -&TUNING - rlam_mom=0.0, - rlam_heat=1.0, - rat_sea=20.0, - rat_lam=1.0, - rat_can=1.0, - c_lnd=2.0, - c_sea=1.5, - c_soil=1.0, - pat_len=500.0, - z0m_dia=0.2, - crsmin=150.0, - clc_diag=0.5, - tur_len=150.0, - q_crit=1.6, - qc0=0.0002, - tkhmin=0.4, - tkmmin=0.4, - v0snow=20.0, - mu_rain=0.5, - rain_n0_factor=0.1, - a_hshr=0.2, -/END diff --git a/cases/carbosense/cosmo_INPUT_PHY.cfg b/cases/carbosense/cosmo_INPUT_PHY.cfg deleted file mode 100644 index a355452a..00000000 --- a/cases/carbosense/cosmo_INPUT_PHY.cfg +++ /dev/null @@ -1,46 +0,0 @@ - &PHYCTL - lgsp=.true., - lgsp_first=.TRUE., - itype_gscp=4, - ldiniprec=.FALSE., - lrad=.true., - hincrad=0.1, - lradtopo=.FALSE., - lforest=.TRUE., - llake=.FALSE., - ltur=.true., - loldtur=.TRUE., - itype_sher=1, - itype_vdif=-1, - ninctura=1, - lexpcor=.false., - ltmpcor=.false., - lprfcor=.false., - lnonloc=.false., - lcpfluc=.false., - itype_turb=3, - imode_turb=1, - itype_tran=2, - imode_tran=1, - limpltkediff=.true., - ltkesso=.FALSE., - ltkeshs=.TRUE., - itype_wcld=2, - icldm_rad=4, - icldm_turb=2, - icldm_tran=0, - itype_synd=2, - lsoil=.TRUE., - lmelt=.TRUE., - lmelt_var=.TRUE., - itype_evsl=2, - itype_trvg=2, - itype_heatcond=2, - lconv=.FALSE., - nincconv=10, - itype_conv=3, - lcape=.false., - lconf_avg=.false., - lsso=.FALSE., - lseaice=.FALSE., - /END diff --git a/cases/carbosense/cosmo_runjob.cfg b/cases/carbosense/cosmo_runjob.cfg deleted file mode 100644 index b5ab4f1e..00000000 --- a/cases/carbosense/cosmo_runjob.cfg +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash -l -#SBATCH --job-name="cosmo_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" -#SBATCH --account={cfg.compute_account} -#SBATCH --time={cfg.cosmo_walltime} -#SBATCH --nodes={cfg.cosmo_np_tot} -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --hint=nomultithread -#SBATCH --output={logfile} -#SBATCH --open-mode=append -#SBATCH --chdir={cfg.cosmo_work} - -export MALLOC_MMAP_MAX_=0 -export MALLOC_TRIM_THRESHOLD_=536870912 -export OMP_NUM_THREADS=1 - -{cfg.mpich_cuda} - -# Set this to avoid segmentation faults -ulimit -s unlimited -ulimit -a - -# clean up -rm -f YU* -rm -f M_* -rm -f core.* - -echo "=====================================================" -echo "============== JOB OUTPUT BEGINS ====================" -echo "============== StartTime: `date +%s` s" -echo "============== StartTime: `date`" -echo "=====================================================" - -srun -u ./cosmo >> {logfile} 2>&1 -pid=$? - -echo "=====================================================" -echo "============== JOB OUTPUT ENDS ====================" -echo "============== EndTime: `date +%s` s" -echo "============== EndTime: `date` s" -echo "=====================================================" - -[[ $pid == 0 ]] || {{ echo "Executing COSMO failed" >> {logfile}; exit 1; }} - -# check whether COSMO was successful by calculating name of the last -# output file that should have been created - -hoursSim=$(expr {cfg.hstop} % 24) -daysSim=$(expr {cfg.hstop} / 24) # bash does not know floating points, it truncates to integer -hoursSimNice=$(printf "%02d" $hoursSim) -daysSimNice=$(printf "%02d" $daysSim) -lastHourFile="lfff${{daysSimNice}}${{hoursSimNice}}0000.nc" - -[[ ! -f {cfg.cosmo_output}${{lastHourFile}} ]] || {{ echo "COSMO failed" >> {logfile}; exit 1; }} - -# copy log file -cp {logfile} {logfile_finish} - diff --git a/cases/carbosense/cosmo_tracers.csv b/cases/carbosense/cosmo_tracers.csv deleted file mode 100644 index 63bfe44f..00000000 --- a/cases/carbosense/cosmo_tracers.csv +++ /dev/null @@ -1,15 +0,0 @@ -,yshort_name,igribparam,igribtable,itype_emiss,itype_flux,yunits,ystandard_name,ylong_name,ytype_adv,ytype_diff,ytype_turbmix,ytype_passconv,ytype_ini,ytype_lbc,ytype_bbc,ytype_relax,ytype_damp,ytype_clip,ldecay,lifetime,itype_tscale,ycatl,ytpl,yvpl -#,,,,,,,,,,,,,,,,,,,,,,,, -,CO2_BG,10,13,0,0,kg kg-1,CO2_mass_fraction_background,Background mass fraction of CO2,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,, -,CO_BG,11,13,0,0,kg kg-1,CO_mass_fraction_background,Background mass fraction of CO,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,, -,CH4_BG,12,13,0,0,kg kg-1,CH4_mass_fraction_background,Background mass fraction of CH4,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,, -#,,,,,,,,,,,,,,,,,,,,,,,, -,CO2_GPP,20,13,0,2,kg kg-1,CO2_mass_fraction_surface_flux_gpp,Mass fraction of CO2 by gross primary production (GPP),on,off,1D,on,zero,zero,zero_flux,full,off,off,.FALSE.,0,,,, -,CO2_RA,21,13,0,2,kg kg-1,CO2_mass_fraction_surface_flux_ra,Mass fraction of CO2 by gross respiration (RA),on,off,1D,on,zero,zero,zero_flux,full,off,off,.FALSE.,0,,,, -#,CO2_GPP_X,22,13,0,2,kg kg-1,CO2_mass_fraction_surface_flux_gpp_no_ZH,Mass fraction of CO2 by gross primary production (GPP) outside Zurich,on,off,1D,on,file,file,zero_flux,full,off,off,.FALSE.,0,,,, -#,CO2_RA_X,23,13,0,2,kg kg-1,CO2_mass_fraction_surface_flux_ra_no_ZH,Mass fraction of CO2 by gross respiration (RA) outside Zurich,on,off,1D,on,file,file,zero_flux,full,off,off,.FALSE.,0,,,, -#,,,,,,,,,,,,,,,,,,,,,,,, -,CO2_A,30,13,2,0,kg kg-1,CO2_mass_fraction_anthropogenic,Mass fraction of CO2 by anthropogenic emissions,on,off,1D,on,zero,zero,zero_flux,full,off,off,.FALSE.,0,1,"'CO2_A', 'CO2_B', 'CO2_C', 'CO2_D', 'CO2_E', 'CO2_F', 'CO2_G', 'CO2_H', 'CO2_I', 'CO2_J', 'CO2_K', 'CO2_L', 'CO2_M'","'GNFR_A', 'GNFR_B', 'GNFR_C', 'GNFR_D', 'GNFR_E', 'GNFR_F', 'GNFR_G', 'GNFR_H', 'GNFR_I', 'GNFR_J', 'GNFR_K', 'GNFR_L', 'GNFR_I'","'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources'" -#,CO2_A_X,31,13,2,0,kg kg-1,CO2_mass_fraction_anthropogenic,Mass fraction of CO2 by anthropogenic emissions outside Zurich,on,off,1D,on,file,file,zero_flux,full,off,off,.FALSE.,0,1,"'CO2_A_X', 'CO2_B_X', 'CO2_C_X', 'CO2_D_X', 'CO2_E_X', 'CO2_F_X', 'CO2_G_X', 'CO2_H_X', 'CO2_I_X', 'CO2_J_X', 'CO2_K_X', 'CO2_L_X', 'CO2_M_X'","'GNFR_A', 'GNFR_B', 'GNFR_C', 'GNFR_D', 'GNFR_E', 'GNFR_F', 'GNFR_G', 'GNFR_H', 'GNFR_I', 'GNFR_J', 'GNFR_K', 'GNFR_L', 'GNFR_I'","'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources'" -,CO_A,32,13,2,0,kg kg-1,CO_mass_fraction_anthropogenic,Mass fraction of CO by anthropogenic emissions,on,off,1D,on,zero,zero,zero_flux,full,off,off,.FALSE.,0,1,"'CO_A', 'CO_B', 'CO_C', 'CO_D', 'CO_E', 'CO_F', 'CO_G', 'CO_H', 'CO_I', 'CO_J', 'CO_K', 'CO_L', 'CO_M'","'GNFR_A', 'GNFR_B', 'GNFR_C', 'GNFR_D', 'GNFR_E', 'GNFR_F', 'GNFR_G', 'GNFR_H', 'GNFR_I', 'GNFR_J', 'GNFR_K', 'GNFR_L', 'GNFR_I'","'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources', 'area_sources'" -,CH4_A,33,13,2,0,kg kg-1,CH4_mass_fraction_anthropogenic,Mass fraction of CH4 by anthropogenic emissions,on,off,1D,on,zero,zero,zero_flux,full,off,off,.FALSE.,0,1,'CH4','GNFR_I','area_sources' diff --git a/cases/carbosense/int2lm_INPUT.cfg b/cases/carbosense/int2lm_INPUT.cfg deleted file mode 100644 index 8716d05f..00000000 --- a/cases/carbosense/int2lm_INPUT.cfg +++ /dev/null @@ -1,169 +0,0 @@ -&CONTRL - yinput_model = 'COSMO', ! string to identify the input model - ydate_ini = '{cfg.inidate_int2lm_yyyymmddhh}', ! start of the forecast - - hstart = {cfg.hstart_int2lm}, ! first hour to be processed - hstop = {cfg.hstop_int2lm}, ! last hour to be processed - hincbound = 1.0, ! increment in hours for the processing - - nprocx = {cfg.int2lm_np_x}, ! number of processors in east-west direction - nprocy = {cfg.int2lm_np_y}, ! number of processors in north-south direction - nprocio = 0, ! number of extra processors for asynchronous IO - nincwait = 30, ! seconds to wait until next attempt if a ready file is - ! not available - nmaxwait = 300, ! maximum seconds to wait until abort if a ready file is - ! not available - - - itype_w_so_rel = 1, ! type of relative soil moisture input (0,1,2) - idbg_level = 2, ! to control verbosity of debug output - itype_balance_pp = 2, ! To choose the previous (=1) or new (=2) method for - ! hydrostatic pressure calculation in case of - ! non-hydrostatic input models - - luse_t_skin = .TRUE., ! if .TRUE., use ECMWF skin temperature for surface - lpost_0006 = .TRUE., ! if .TRUE., force to use ECMWF dataset after 27 June 2000 - luvcor = .TRUE., ! if .TRUE., correct winds for given surface pres. tendency - lvertwind_ini = .TRUE., ! if .TRUE., compute vertical wind for LM for initial data - lvertwind_bd = .FALSE., ! if .TRUE., compute vertical wind for LM for boundary data - ! (MeteoSwiss uses .FALSE.) - lprog_qi = .TRUE., ! if .TRUE., interpolate qi to LM grid - lprog_qr_qs = .TRUE., ! if .TRUE., interpolate qr,qs to LM grid - lprog_qg = .FALSE., ! if .TRUE., interpolate qg to LM grid - lprog_rho_snow = .TRUE., ! if .TRUE., interpolate rho_snow to LM grid - ! for ICON input - ! (MeteoSwiss uses .TRUE.) - linitial = .TRUE., ! if .TRUE., initial data for LM - lboundaries = .TRUE., ! if .TRUE., lateral boundaries for LM - ltime_mean = .TRUE., ! if .TRUE., mean values of the timings are printed - lmulti_layer_lm = {cfg.multi_layer}, ! compute data for multi-layer soil model - lmulti_layer_in = {cfg.multi_layer}, ! data from multi-layer soil model in the incoming data - -! Settings for GLOBE orography data -! lfilter_oro = .FALSE, ! if extpar orography is already filtered, set to .FALSE. -! ilow_pass_oro = 4, ! type of low-pass filter for orography -! numfilt_oro = 1, ! number of sequential applications of filter -! ilow_pass_xso = 5, ! type of low-pass filter for extra smoothing steep oro. -! lxso_first = .FALSE., ! if .TRUE., do extra smoothing of orography first -! numfilt_xso = 1, ! number of sequential applications of xso-filter -! rxso_mask = 750.0, ! mask for extra smoothing of steep oro.: dh > rxso_mask -! eps_filter = 0.1, ! parameter for orography filtering -! rfill_valley = 0.0, ! mask for valley filling: dh > rfill_valley -! ifill_valley= 7, ! -! norder_filter = 5, ! order of the orography filtering - -! Settings for ASTER orography data - lfilter_oro = .FALSE, ! if extpar orography is already filtered, set to .FALSE. - ilow_pass_oro = 1, ! type of low-pass filter for orography - numfilt_oro = 2, ! number of sequential applications of filter - ilow_pass_xso = 5, ! type of low-pass filter for extra smoothing steep oro. - lxso_first = .FALSE., ! if .TRUE., do extra smoothing of orography first - numfilt_xso = 1, ! number of sequential applications of xso-filter - rxso_mask = 750.0, ! mask for extra smoothing of steep oro.: dh > rxso_mask - eps_filter = 1.7, ! parameter for orography filtering - rfill_valley = 0.0, ! mask for valley filling: dh > rfill_valley - ifill_valley= 7, ! - norder_filter = 5, ! order of the orography filtering - - lfilter_pp = .TRUE., ! if .TRUE., filter the pressure deviation after vertical - ! vertical interpolation in LM2LM - lbdclim = .TRUE., ! if .TRUE., special boundary data for climate mode - lforest = .TRUE., ! if .TRUE., run with forest (evergreen and deciduous) - lsso = .FALSE., ! process parameters for sso scheme - lradtopo = .TRUE., ! process parameters for topographic correction of radiation - llbc_smooth = .TRUE., ! if .TRUE., run with smooth orography transition to LB - l_art = .TRUE., ! switch for additional cosmo-art fields - l_art_nested = .FALSE., ! switch for cosmo-art2cosmo-art - l_art_file = .TRUE., ! if .TRUE., art namelist is read from INPUT_ART - l_smi = .FALSE., ! if .TRUE., interpolate soil moisture with SMI - ! (MeteoSwiss uses .FALSE.) - lmixcld = .FALSE., ! if .TRUE., qi added in grh instead of being directly - ! interp. - ! (MeteoSwiss uses .FALSE.) - lasync_io = .FALSE., ! if .TRUE.: the model runs with extra PEs for asynchr. IO - l_topo_z = .FALSE., ! if .TRUE., additional smoothing of the topography -/ ! for the LM-Z coordinate Version - -&GRID_IN -! COSMO-7 grid - ie_in_tot = 393, ! ie (lon) for input grid (total domain) - je_in_tot = 338, ! je (lat) for input grid (total domain) - ke_in_tot = 60, ! ke (levels) for input grid (total domain) - pcontrol_fi=30000., ! Pressure of control level for geopotential - pollat_in = 43.0, - pollon_in = -170.0, - dlat_in = 0.06, - dlon_in = 0.06, - startlat_in_tot = -9.78, - startlon_in_tot = -16.32, -/ - -&LMGRID -! COSMO-1 Carbosense domain - startlat_tot = -3.18, - startlon_tot = -4.92, - pollat = 43.0, - pollon = -170.0, - dlon = 0.01, - dlat = 0.01, - ielm_tot = 900, - jelm_tot = 600, - kelm_tot = 60, - ivctype = 4, ! used by MeteoSwiss COSMO-7 -> 1 processing - irefatm = 2, ! used by MeteoSwiss - lanalyt_calc_t0p0 = .TRUE., ! used by MeteoSwiss - vcflat = 11357.0, - vcoord_d = 23588.50,22395.93,21304.04, 20307.39, 19399.95, - 18574.03, 17821.88, 17135.64, 16507.79, 15930.60, - 15396.52, 14897.86, 14427.98, 13981.10, 13551.52, - 13133.53, 12721.37, 12312.04, 11900.03, 11485.37, - 11068.19, 10648.54, 10226.48, 9802.09, 9375.43, - 8946.58, 8515.59, 8082.55, 7647.52, 7210.55, - 6771.96, 6332.38, 5896.41, 5468.04, 5050.84, - 4647.96, 4261.91, 3893.26, 3542.15, 3208.52, - 2892.23, 2593.71, 2312.95, 2049.75, 1803.89, - 1575.57, 1364.68, 1170.90, 993.84, 833.44, - 689.53, 561.52, 448.82, 350.95, 267.55, - 197.67, 137.23, 87.33, 48.44, 20.00, 0.00, -/ - -&DATABASE -/ - -&DATA -! General control variables: - ncenter = 215, ! Originating center identification - nprocess_ini = 131, ! Generating process identification for initial values - nprocess_bd = 132, ! Generating process identification for boundary values - ymode_write = 'w b', ! Specify open mode for writing - ytunit_in = 'd', ! Time unit for input data - ytunit_out = 'd', ! Time unit for output data - yinput_type = 'analysis',! Type of input data: - ! 'forecast' forecast data - ! 'analysis' analysis data - ! 'ana_init' initialized analysis data -! ---------------------------------------------------------------- ! -! Variables for external data: - ylmext_lfn='{cfg.int2lm_extpar_file}', - ylmext_cat='../input/extpar/', - ylmext_form_read='ncdf', ! Input format of external data - yinext_lfn='laf{cfg.inidate_int2lm_yyyymmddhh}', ! Name of the file with the external fields - yinext_cat='../input/meteo/', - yinext_form_read="grb1", ! Input format of external data from coarse grid - ie_ext=1801, - je_ext=1801, -! ---------------------------------------------------------------- ! -! Variables for the models: - yin_cat='../input/meteo/', - yin_form_read='grb1', - ylm_cat='../output/', - ylm_form_write = "nc-4", ! Output format of COSMO-Model data -/ - -&PRICTR - igp_tot = 36, 40, 48, 44, 48, 85, 77, - jgp_tot = 30, 94, 38, 26, 26, 96, 12, - lchkin = .TRUE., - lchkout = .TRUE., - lprgp = .FALSE., -/ diff --git a/cases/carbosense/int2lm_datasets.csv b/cases/carbosense/int2lm_datasets.csv deleted file mode 100644 index 98b4b996..00000000 --- a/cases/carbosense/int2lm_datasets.csv +++ /dev/null @@ -1,3 +0,0 @@ -,ie_tot,je_tot,ke_tot,startlon_tot,startlat_tot,dlon,dlat,pollat,pollon,polgam,ninc,hinc,lconst_in_time,lconserve_mass,cvertdist,ydirin,ylfn_prefix,yvertical_axis_type,yvertical_method,yvarlist,yinterp_type,ngrid_refine,ycombine_action -#,,,,,,,,,,,,,,,,,,,,,,, -,121,65,100,2,43,0.125,0.125,,,,,3,.FALSE.,.FALSE.,,../input/icbc/,cams_co2_,hyb_sig_pr,I,"CO2_BG, CO_BG, CH4_BG",L,,O diff --git a/cases/carbosense/int2lm_runjob.cfg b/cases/carbosense/int2lm_runjob.cfg deleted file mode 100644 index 22ecf306..00000000 --- a/cases/carbosense/int2lm_runjob.cfg +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash -l -#SBATCH --job-name=int2lm_carbosense_mch_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime} -#SBATCH --time={cfg.int2lm_walltime} -#SBATCH --nodes={cfg.int2lm_nodes} -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.int2lm_ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --account={cfg.compute_account} -#SBATCH --output={logfile} -#SBATCH --open-mode=append -#SBATCH --chdir={cfg.int2lm_work} - -# Export env variables -export OMP_NUM_THREADS=1 -export CRAY_CUDA_MPS=1 - -export MALLOC_MMAP_MAX_=0 -export MALLOC_TRIM_THRESHOLD_=536870912 - -# Set this to avoid segmentation faults -ulimit -s unlimited -ulimit -a - -# Load modules for post-processing -module load daint-gpu -module load NCO -module list - -unset G2G -export MV2_USE_CUDA=0 -export MV2_USE_GPUDIRECT=0 - -export api_dir="/users/morsier/install/libgrib_api/1.13.1" -export GRIB_DEFINITION_PATH=${{api_dir}}/cosmo_definitions/definitions:${{api_dir}}/share/grib_api/definitions -export GRIB_SAMPLES_PATH=${{api_dir}}/cosmo_definitions/samples -export GRIB_API_DEBUG=0 - -rm -f YU* - -echo "=====================================================" -echo "============== JOB OUTPUT BEGINS ====================" -echo "============== StartTime: `date +%s` s" -echo "============== StartTime: `date`" -echo "=====================================================" - -srun -u -n {cfg.int2lm_np_tot} ./int2lm >> {logfile} 2>&1 -pid=$? - -echo "=====================================================" -echo "============== JOB OUTPUT ENDS ====================" -echo "============== EndTime: `date +%s` s" -echo "============== EndTime: `date` s" -echo "=====================================================" - -[[ $pid == 0 ]] || {{ echo \"Executing INT2LM MPI command failed\" >> job.out; exit 1; }} - -# check whether INT2LM was successful by checking for presence of last -# meteofile that should have been processed -firstsecs=$(date -u --date "{ini_day} {ini_hour}" +%s) - -let lastsecs="firstsecs+{cfg.hstop_int2lm}*3600" -lastyyyymmddhh=$(date -u --date "1970-01-01 UTC +${{lastsecs}} sec" +%Y%m%d%H) -lastHourFile="lbfd${{lastyyyymmddhh}}.nc" - -echo last file processed is $lastHourFile >> {logfile} - -[[ ! -f ../output/${{lastHourFile}} ]] && {{ echo "INT2LM failed" >> {logfile}; exit 1; }} - -cp {logfile} {logfile_finish} diff --git a/cases/carbosense/int2lm_tracers.csv b/cases/carbosense/int2lm_tracers.csv deleted file mode 100644 index 30e330d5..00000000 --- a/cases/carbosense/int2lm_tracers.csv +++ /dev/null @@ -1,7 +0,0 @@ -,yshort_name,igribtable,igribparam,irank,yunits,ystandard_name,ylong_name,yfamily,ylsm,lderived,loutput,lrequired,lnested,lcompress,ldryin -#,,,,,,,,,,,,,,,,,,,,, -,CO2_BG,243,10,3,kg kg-1,CO2_mass_fraction_at_lateral_boundary,CO2_mass_fraction_at_lateral_boundary,t, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE.,.TRUE. -#,,,,,,,,,,,,,,,,,,,,, -,CO_BG,243,11,3,kg kg-1,CO_mass_fraction_at_lateral_boundary,CO_mass_fraction_at_lateral_boundary,t, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE.,.TRUE. -#,,,,,,,,,,,,,,,,,,,,, -,CH4_BG,243,12,3,kg kg-1,CH4_mass_fraction_at_lateral_boundary,CH4_mass_fraction_at_lateral_boundary,t, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE.,.TRUE. diff --git a/cases/che-wp4/config.py b/cases/che-wp4/config.py deleted file mode 100755 index 4dc110bd..00000000 --- a/cases/che-wp4/config.py +++ /dev/null @@ -1,160 +0,0 @@ -import os - -# GENERAL SETTINGS =========================================================== -user = os.environ['USER'] -model = 'cosmo-ghg' -restart_step = 120 # 5 days -#variant = 'spinup' -#spinup = 6 - -compute_host = 'daint' -compute_queue = 'normal' -compute_account = 'em05' -constraint = 'gpu' - -if constraint == 'gpu': - ntasks_per_node = 12 - mpich_cuda = ( - 'export MPICH_RDMA_ENABLED_CUDA=1\n' - 'export MPICH_G2G_PIPELINE=256\n' - 'export CRAY_CUDA_MPS=1\n' - 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/cray/nvidia/default/lib64' - ) -elif constraint == 'mc': - ntasks_per_node = 36 - mpich_cuda = '' - -# case name = pathname in cases/ -path = os.path.realpath(__file__) -casename = os.path.basename(os.path.dirname(path)) - -# Root directory of the sourcecode of the chain (where run_chain.py is) -chain_src_dir = os.getcwd() - -# Root directory of the working space of the chain -work_root = os.environ['SCRATCH'] + "/processing_chain" - -# Directory where executables are stored -exe_dir = "/store/empa/em05/executables" - -# PRE-PROCESSING ============================================================= -input_root = "/store/empa/em05/mjaehn/CHE/input" -input_root_brd = "/store/empa/em05/dbrunner/che" # for meteo and oae - -# METEO ---------------------------------------------------------------------- -meteo_dir = os.path.join(input_root_brd, 'meteo') -meteo_prefix = "eas" -meteo_inc = 3 - -# ICBC ----------------------------------------------------------------------- -cams_dir_orig = os.path.join(input_root_brd, 'icbc') -cams_dir_proc = os.path.join(input_root, 'icbc', 'processed') -cams_parameters = [{ - "suffix": "cams_co2", - "inc": 3, - "species": ["CO2", "CO"], - "prefix1": "cams_gvri", - "prefix2": "sfc_gvri", - "lev": 137, -}, { - "suffix": "LSCE_d14C", - "inc": 3, - "species": ["C14"], -}] - -# OAE ------------------------------------------------------------------------ -# Online anthropogenic emissions -oae_dir = os.path.join(input_root, 'oae') -oae_gridded_emissions_nc = 'emissions_tno_co2_co.nc' -oae_vertical_profiles_nc = 'vertical_profiles.nc' -oae_hourofday_nc = 'hourofday_winter.nc' -oae_hourofyear_nc = 'hourofyear.nc' -oae_dayofweek_nc = 'dayofweek.nc' -oae_monthofyear_nc = 'monthofyear.nc' - -# OBS_NUDGING ---------------------------------------------------------------- -obs_nudging_dir = '/store/empa/em05/obs_nudging_cosmo' -obs_nudging_prefixes = [ - 'cdfin_amdar', 'cdfin_ship', 'cdfin_synop', 'cdfin_temp', 'cdfin_wprof' -] -obs_nudging_date_format = "-%Y%m%d000000" - -# EMISSIONS ------------------------------------------------------------------ -emissions_dir = [ - os.path.join(input_root, 'emissions'), - os.path.join(input_root, 'emissions'), - os.path.join(input_root, 'emissions'), -] -emis_gridname = ["emis_", "npp_", "ocean_"] - -# BIOFLUXES ------------------------------------------------------------------ -vprm_dir = os.path.join(input_root, 'vprm', 'processed') -vprm_prefix = ["vprm_", "dc14__"] - -# INT2LM --------------------------------------------------------------------- -# Extpar-file -int2lm_extpar_dir = os.path.join(input_root, 'extpar') -int2lm_extpar_file = 'external_parameter_hjm_globe.nc' - -# Executable -int2lm_bin = os.path.join(exe_dir, 'int2lm_gnu_208d68e_20201005') - -# Namelist and slurm runscript templates -int2lm_namelist = '%s/cases/%s/int2lm_INPUT.cfg' % (chain_src_dir, casename) -int2lm_runjob = '%s/cases/%s/int2lm_runjob.cfg' % (chain_src_dir, casename) - -# Walltime -if compute_queue == "normal": - int2lm_walltime = "03:30:00" -elif compute_queue == "debug": - int2lm_walltime = "00:30:00" -else: - logging.error("Unset queue name: %s" % compute_queue) - sys.exit(1) - -# Domain decomposition -int2lm_nodes = 4 -int2lm_ntasks_per_node = 12 -int2lm_np_x = 8 -int2lm_np_y = 6 -int2lm_np_tot = int2lm_np_x * int2lm_np_y - -# POST_INT2LM ---------------------------------------------------------------- -# Fields that are used as initial conditions -post_int2lm_species = ['CO2_BG', 'CO_BG', 'C14_BG'] - -# SIMULATION ================================================================= -# COSMO ---------------------------------------------------------------------- -# Executable -cosmo_bin = os.path.join(exe_dir, "cosmo-org-ghg_pgi_e5e9e5ae_20201125") - -# Namelists and slurm runscript templates -cosmo_namelist = '%s/cases/%s/cosmo_INPUT_' % (chain_src_dir, casename) -cosmo_runjob = '%s/cases/%s/cosmo_runjob.cfg' % (chain_src_dir, casename) - -# Walltimes and domain decomposition -if compute_queue == "normal": - cosmo_walltime = "03:00:00" - cosmo_np_x = 32 - cosmo_np_y = 30 -elif compute_queue == "debug": - cosmo_walltime = "00:30:00" - cosmo_np_x = 4 - cosmo_np_y = 3 -else: - logging.error("Unknown queue name: %s" % compute_queue) - sys.exit(1) - -# Total node count -cosmo_np_io = 0 -cosmo_np_tot = int( - cosmo_np_x * cosmo_np_y / ntasks_per_node) + cosmo_np_io # 80 - -# POST-PROCESSING =========================================================== -# REDUCE_OUTPUT -------------------------------------------------------------- -convert_gas = True -#output_levels = 20 # keep all levels - -# POST_COSMO ----------------------------------------------------------------- -output_root = os.path.join("/store/empa/em05/", user, - "processing_chain_output", casename) diff --git a/cases/che-wp4/cosmo_INPUT_AF.cfg b/cases/che-wp4/cosmo_INPUT_AF.cfg deleted file mode 100644 index b5815218..00000000 --- a/cases/che-wp4/cosmo_INPUT_AF.cfg +++ /dev/null @@ -1,4 +0,0 @@ -&AFCTL - hinc_e=1.0, !time increment for read of emissions - hinc_f=1.0, !time increment for read of fluxes -/END diff --git a/cases/che-wp4/cosmo_INPUT_ASS.cfg b/cases/che-wp4/cosmo_INPUT_ASS.cfg deleted file mode 100644 index 3e5febf0..00000000 --- a/cases/che-wp4/cosmo_INPUT_ASS.cfg +++ /dev/null @@ -1,55 +0,0 @@ -&NUDGING - lnudge = .TRUE., - lverif = .FALSE., - mruntyp = 2, - lverpas = .TRUE., - ycdfdir = '{cfg.cosmo_input}/obs_nudging', - hnudgsta = {cfg.hstart}, - hnudgend = {cfg.hstop}, - tconbox = 180.0, ! 3 * dt - hversta = 0.0, - hverend = 0.0, - khumbal = 100, - ntpscor = 1, - ptpstop = 400.0, - luvgcor = .TRUE., - ltipol = .TRUE., tipolmx = 3.0, wtukrsa = 3.0, wtukrse = 1.0, - ltipsu = .TRUE., tipmxsu = 1.0, wtuksua = 1.5, wtuksue = 0.5, - wtukara = 1.5, wtukare = 0.5, - msprpar = 1, - msprpsu = 0, - gnudg = .0006, .0006, .0006, .0006, - gnudgsu = .0006, .0006, .0000, .0006, - gnudgar = .0006, .0000, .0006, .0000, - vcorls = .333 , .333 , .04 , .04 , vcutof = 0.75, 0.75, 1.0 , 1.0 , - vcorlsu = .013 , .013 , .002 , .00001, vcutosu = 0.75, 0.75, 4.0 , 0.001 , - vcsnisu = 2500., 2500., 9. , 9. , - rhvfac = 1.0 , 0.0 , 0.83, 0.83, - rhinfl = 0., 70., 0., 0., rhtfac = 1.3 , 1.43 , 1.3 , 1.3 , - rhiflsu = 70., 70., 100., 70., rhtfsu = 1.0 , 1.43 , 1.0 , 1.0 , - fnondiv = 0.8 , cnondiv = 0.1 , cutofr = 3.5 , 3.5 , 3.5 , 3.5 , - tnondiv = 1.1 , cutofsu = 2.0 , 3.5 , 2.0 , 2.0 , - topobs = 849., 1099., 799., 699., - botmod = 1099., 1099., 1099., 899., - lscadj = .TRUE..TRUE..TRUE.,.FALSE., - dtqc = 720., qcvf = 5.0 , 1.0 ,10.0 , 0.0 , - qcc = 0., 500., 0., .7, - qccsu = 12., 500., 12., .7, - lsynop = .TRUE., - laircf = .TRUE., - ldribu = .TRUE., - ltemp = .TRUE., - lpilot = .TRUE., - lcd137 = .FALSE., - lcd132 = .TRUE., - maxmlo = 600, maxsgo = 10000, maxuso = 3000, nolbc = 5, - altopsu = 100., 5000., 5000., 5000., thairh = 20., - exnlat = 90., exslat = 90., exwlon = -180., exelon = 180., - lsurfa = .FALSE., - lt2m = .TRUE., ht2a = 0., ht2i = 1., - lrh2m = .TRUE., hh2a = 0., hh2i = 1., - lprecp = .TRUE., hprc = 0., raintp = 12., - lprodr =.TRUE. , ldiasa = .FALSE., - ionl = 235, jonl = 151, ionl2 = 221, jonl2 = 131, - /END - diff --git a/cases/che-wp4/cosmo_INPUT_DIA.cfg b/cases/che-wp4/cosmo_INPUT_DIA.cfg deleted file mode 100644 index 5534ac59..00000000 --- a/cases/che-wp4/cosmo_INPUT_DIA.cfg +++ /dev/null @@ -1,9 +0,0 @@ -&DIACTL - n0meanval = 0, - nincmeanval = 1, - itype_diag_t2m = 1, - itype_diag_gusts = 2, - lgplong = .TRUE., - n0gp = 0, - hincgp = 1.0, -/ diff --git a/cases/che-wp4/cosmo_INPUT_DYN.cfg b/cases/che-wp4/cosmo_INPUT_DYN.cfg deleted file mode 100644 index 9af85a81..00000000 --- a/cases/che-wp4/cosmo_INPUT_DYN.cfg +++ /dev/null @@ -1,38 +0,0 @@ - &DYNCTL - lcpp_dycore=.TRUE., - lspubc=.TRUE., - rdheight=11000.0, - nrdtau=10, - rlwidth=75000.0, - ldyn_bbc=.FALSE., - itype_bbc_w=114, - xkd=0.1, - lcond=.TRUE., - l_diff_smag=.TRUE., - lhordiff=.TRUE., - itype_hdiff=2, - hd_corr_u_bd=0.75, - hd_corr_t_bd=0.75, - hd_corr_trcr_bd=0.0, - hd_corr_p_bd=0.75, - hd_corr_u_in=0.25, - hd_corr_t_in=0.0, - hd_corr_trcr_in=0.0, - hd_corr_p_in=0.0, - hd_dhmax=250., - l2tls=.TRUE., - irunge_kutta=1, - irk_order=3, - iadv_order=5, - itheta_adv=0, - ltadv_limiter=.FALSE., - y_scalar_advect = 'BOTT2_STRANG', - y_vert_adv_dyn='impl2', - ldiabf_lh=.FALSE., - itype_outflow_qrsg=2, - itype_lbc_qrsg=1, - itype_fast_waves=2, - divdamp_slope=1.0, - l_satad_dyn_iter=.FALSE. - /END - diff --git a/cases/che-wp4/cosmo_INPUT_GHG.cfg b/cases/che-wp4/cosmo_INPUT_GHG.cfg deleted file mode 100644 index b413b89c..00000000 --- a/cases/che-wp4/cosmo_INPUT_GHG.cfg +++ /dev/null @@ -1,22 +0,0 @@ -&GHGCTL - in_tracers = {cfg.in_tracers}, - tracer_start = {cfg.tracer_start}, - iemiss_interp = 1, - gridded_emissions_nc = '../input/oae/{cfg.oae_gridded_emissions_nc}', - vertical_profile_nc = '../input/oae/{cfg.oae_vertical_profiles_nc}', - hour_of_day_nc = '../input/oae/{cfg.oae_hourofday_nc}', - day_of_week_nc = '../input/oae/{cfg.oae_dayofweek_nc}', - month_of_year_nc = '../input/oae/{cfg.oae_monthofyear_nc}', - modis_reflectances_nc = '../input/vprm/modis.nc', - veg_class_frac_nc = '../input/vprm/vegetation.nc', - octe_maps_nc = '../input/octe/maps.nc', - octe_lambdas_nc = '../input/octe/lambdas.nc', -/ -&VPRMCTL - yvprm_table = 'gerbig', - lcut_area = .FALSE., - lon_cut_start = 0.0, - lon_cut_end = 0.0, - lat_cut_start = 0.0, - lat_cut_end = 0.0, -/ diff --git a/cases/che-wp4/cosmo_INPUT_IO.cfg b/cases/che-wp4/cosmo_INPUT_IO.cfg deleted file mode 100644 index bab2aec5..00000000 --- a/cases/che-wp4/cosmo_INPUT_IO.cfg +++ /dev/null @@ -1,220 +0,0 @@ - &IOCTL - ldwd_grib_use = .FALSE., - l_ke_in_gds = .TRUE., - lasync_io = {cfg.lasync_io}, - itype_gather = 1, - ymode_read = 'r ', - ymode_write = 'w ', - nincwait = 90, - nmaxwait = 300, - nvers = 917, - ncenter = 215, - ngribout = 1, - num_gribtabs = 17, - yform_read = "ncdf", - nhour_restart = {restart_start:.0f} ,{restart_stop:.0f}, {restart_step:.0f}, ! start, stop and increment in full forecast hours - ydir_restart_in = '{cfg.cosmo_restart_in}', - ydir_restart_out = '{cfg.cosmo_restart_out}', - yform_restart = 'nc-4' - ytunit_restart = 'f', - /END - &GRIBIN - lbdana = .FALSE., - ydirini = '../../int2lm/output/', - ytunitbd = 'd', - lchkini = .TRUE., - hincbound = 3.0, - ydirbd = '../../int2lm/output/', - lchkbd = .TRUE., - lana_qi = .TRUE., - llb_qi = .TRUE., - lana_qg = .FALSE., - llb_qg = .FALSE., - lana_qr_qs = .FALSE., - llb_qr_qs = .FALSE., - lana_rho_snow = .FALSE., - lan_lai = .TRUE., - lan_rootdp = .TRUE., - lan_vio3 = .TRUE., - lan_plcov = .TRUE., - lan_t_cl = .TRUE., - lan_w_cl = .TRUE., - lan_hmo3 = .TRUE., - lan_t_so0 = .TRUE., - lan_t_snow = .TRUE., - lan_w_snow = .TRUE., - lan_w_i = .TRUE., - lan_rho_snow = .TRUE., - newbc = 0, - hnewbcdt = 3.0, -/ -&GRIBOUT - ytunit = 'd', - lanalysis = .FALSE., - yform_write = 'ncdf', ! grb1 or ncdf - hcomb = 0,8761,1, - l_z_filter = .FALSE., - l_p_filter = .FALSE., - luvmasspoint = .FALSE., - l_fi_pmsl_smooth = .FALSE., - lcheck = .TRUE., - ydir = '../output/', - ysuffix = '', - yvarsl = '', - zlev = 750.,1000.,2000.,3000.,4000.,5000.,8500.,10500., - plev = 100.,150.,200.,250.,300.,350.,400.,450.,500.,550.,600.,650., - 700.,750.,800.,850.,900.,925.,950.,1000., - nunit_of_time = 1 - yvarml = 'U_10M', ! 10m u-wind (m s-1) - 'V_10M', ! 10m v-wind (m s-1) - 'T_2M', ! 2m temperature (K) - 'TD_2M', ! 2m dew point temperature (K) - 'RELHUM_2M', ! 2m relative humidity (%) - 'CLCT', ! total cloud cover (%) - 'CLCH', ! cloud cover of high clouds (%) - 'CLCM', ! cloud cover of medium clouds (%) - 'CLCL', ! cloud cover of low clouds (%) - 'T_S', ! surface temperature (K) - 'QV_S', ! surfrace specific humidity (kg kg-1) - 'PS', ! surface pressure (Pa) - 'PMSL', ! surface pressure reduced to N.N. (Pa) - 'W_SNOW', ! snow cover water content (kg m-2) - 'H_SNOW', ! height of snow covera (m) - 'RAIN_GSP', ! accumulated large scale rainfall amount (kg m-2) - 'SNOW_GSP', ! accumulated large scale snowfall amount (kg m-2) - 'TOT_PREC', ! accumulated total precipitation (kg m-2) - 'PRR_GSP', ! large-scale rain rate (kg s-1 m-2) - 'PRS_GSP', ! large-scale snow rate (kg s-1 m-2) - 'PRG_GSP', ! large-scale graupel rate (kg s-1 m-2) - 'TWATER', ! liquid water path (kg m-2) - 'TQV', ! integrated water vapor (kg m-2) - 'TQC', ! cloud water path (kg m-2) - 'TQI', ! ice water path (kg m-2) - 'TQR', ! rain water path (kg m-2) - 'TQS', ! snow water path (kg m-2) - 'TQG', ! graupel water path (kg m-2) - 'Z0', ! surface roughness length (m) - 'TCM', ! turbulent transfer coefficient for momentum (-) - 'TCH', ! turbulent transfer coefficient for heat/moisture (-) - 'HPBL', ! boundary layer height (m) - 'ALB_RAD', ! surface short-wave albedo (%) - 'AUMFL_S', ! averaged u-component of momentum flux (N m-2) - 'AVMFL_S', ! averaged v-component of momentum flux (N m-2) - 'ALHFL_S', ! averaged latent heat flux (W m-2) - 'ASHFL_S', ! averaged sensible heat flux (W m-2) - 'ASOB_S', ! averaged short-wave radiative budget (W m-2) - 'ATHB_S', ! averaged long-wave radiative budget (W m-2) - 'APAB_S', ! averaged photosynthetic active radiation (W m-2) - 'ASWDIFU_S', ! averaged short wave diffuse upward radiation (W m-2) - 'ATHD_S', ! averaged long wave downward radiation (W m-2) - 'ASWDIR_S', ! averaged short wave direct downward radiation (W m-2) - 'ASWDIFD_S', ! averaged short wave diffuse downward radiation (W m-2) - 'SWDIRS_RAD',! short wave direct downward radiation (W m-2) - 'SWDIFDS_RAD',!short wave diffuse downward radiation (W m-2 - 'PABS_RAD', ! photosynthetic active radiation (W m-2) - 'T_SO', ! soil temperature (K) - 'W_SO', ! soil water content (kg m-2) - 'W_SO_ICE', ! soil ice content (kg m-2) - 'U', ! zonal wind-component (m s-1) - 'V', ! meridional wind-component (m s-1) - 'W', ! vertical wind speed (m s-1) - 'T', ! air temperature (K) - 'P', ! air pressure (Pa) - 'QV', ! specific humidity (kg kg-1) - 'QC', ! specific cloud-water content (kg kg-1) - 'QI', ! specific cloud-ice content (kg kg-1) - 'QR', ! specific cloud-ice content (kg kg-1) - 'QS', ! specific cloud-ice content (kg kg-1) - 'CLC', ! layer cloud area fraction (%) - 'TKE', ! turbulent kinetic energy (m2 s-2) - 'TKVH', ! atmosphere heat diffusivity (for Arjo) - 'CO2_BG', - 'CO_BG', - 'C14_BG', - 'CO2_FF1', - 'CO2_FF2', - 'CO2_FF3', - 'CO2_FF4', - 'CO2_FF5', - 'CO2_FF6', - 'CO2_BF1', - 'CO2_BF2', - 'CO2_BF3', - 'CO2_BF4', - 'CO2_BF5', - 'CO2_BF6', - 'CO2_NC1', - 'CO2_NC2', - 'CO2_NC3', - 'CO2_NC4', - 'CO2_NC5', - 'CO2_NC6', - 'CO_FF1', - 'CO_FF2', - 'CO_FF3', - 'CO_FF4', - 'CO_FF5', - 'CO_FF6', - 'CO_BF1', - 'CO_BF2', - 'CO_BF3', - 'CO_BF4', - 'CO_BF5', - 'CO_BF6', - 'CO_NC1', - 'CO_NC2', - 'CO_NC3', - 'CO_NC4', - 'CO_NC5', - 'CO_NC6', - 'C14_BF1', - 'C14_BF2', - 'C14_BF3', - 'C14_BF4', - 'C14_BF5', - 'C14_BF6', - 'C14_NUC1', - 'C14_NUC2', - 'C14_NUC3', - 'C14_NUC4', - 'C14_NUC5', - 'C14_NUC6', - 'CO2_GPP1', - 'CO2_GPP2', - 'CO2_GPP3', - 'CO2_GPP4', - 'CO2_GPP5', - 'CO2_GPP6', - 'CO2_RA1', - 'CO2_RA2', - 'CO2_RA3', - 'CO2_RA4', - 'CO2_RA5', - 'CO2_RA6', - 'C14_NPP1', - 'C14_NPP2', - 'C14_NPP3', - 'C14_NPP4', - 'C14_NPP5', - 'C14_NPP6', - 'C14_NPN1', - 'C14_NPN2', - 'C14_NPN3', - 'C14_NPN4', - 'C14_NPN5', - 'C14_NPN6', - 'C14_HR1', - 'C14_HR2', - 'C14_HR3', - 'C14_HR4', - 'C14_HR5', - 'C14_HR6', - 'CO2_O_P', - 'CO2_O_N', - 'CO_O_P', - 'CO_O_N', - 'C14_O_P', - 'C14_O_N', -/END - - diff --git a/cases/che-wp4/cosmo_INPUT_ORG.cfg b/cases/che-wp4/cosmo_INPUT_ORG.cfg deleted file mode 100644 index 704a68d7..00000000 --- a/cases/che-wp4/cosmo_INPUT_ORG.cfg +++ /dev/null @@ -1,60 +0,0 @@ -&LMGRID -! European grid with 0.05 resolution - ie_tot = 760, - je_tot = 610, - ke_tot = 60, - pollon = -170, ! origin lon: 10.0 - pollat = 43, ! origin lat: 47.0 - dlon = 0.05, - dlat = 0.05, - startlat_tot = -11., - startlon_tot = -17., -/ -&RUNCTL - dt = 50.0, - hstart = {cfg.hstart}, - hstop = {cfg.hstop}, - ydate_ini = '{cfg.inidate_yyyymmddhh}', - nprocx = {cfg.cosmo_np_x}, - nprocy = {cfg.cosmo_np_y}, - nprocio = 0, - hincmxt = 1.0, - nblock = 1, - lphys = .TRUE., - luse_rttov = .FALSE., - luseobs = .TRUE., ! turn on/off nudging - leps = .FALSE., - lreorder = .FALSE., - lreproduce = .TRUE., - itype_timing = 1, - ldiagnos = .TRUE., - ldfi = .FALSE., - ldump_ascii = .FALSE., - ldatatypes = .FALSE., - ltime_barrier = .TRUE., - num_asynio_comm = {cfg.cosmo_np_io}, - num_iope_percomm = {cfg.num_iope_percomm}, - idbg_level = 10, - nboundlines = 3, -/ -&TUNING - tkhmin=0.4, - tkmmin=0.4, - rlam_mom=0.0, - rlam_heat=1.0, - rat_sea=20.0, - rat_lam=1.0, - rat_can=1.0, - c_lnd=2.0, - c_sea=1.5, - c_soil=1.0, - pat_len=500.0, - z0m_dia=0.2, - crsmin=150.0, - clc_diag=0.5, - qc0=0.0, - mu_rain=0.0, - rain_n0_factor=1.0, - v0snow=25.0, - a_hshr=1.0, -/END diff --git a/cases/che-wp4/cosmo_INPUT_PHY.cfg b/cases/che-wp4/cosmo_INPUT_PHY.cfg deleted file mode 100644 index 809956ed..00000000 --- a/cases/che-wp4/cosmo_INPUT_PHY.cfg +++ /dev/null @@ -1,46 +0,0 @@ - &PHYCTL - lseaice=.false., - llake=.false., - lgsp = .TRUE., - lgsp_first=.TRUE., - itype_gscp=3, - ldiniprec=.FALSE., - lrad = .TRUE., - hincrad = 1.0, - lradtopo=.FALSE., - lforest =.TRUE., - ltur = .TRUE., - loldtur=.TRUE., - itype_vdif=-1, - ninctura=1, - lexpcor=.false., - ltmpcor=.false., - lprfcor=.false., - lnonloc=.false., - lcpfluc=.false., - itype_turb=3, - imode_turb=1, - itype_tran=2, - imode_tran=1, - ltkesso=.true., - ltkeshs=.FALSE., - limpltkediff=.true., - itype_wcld=2, - icldm_rad=4, - icldm_turb=2, - icldm_tran=0, - itype_synd=2, - itype_sher=0, - lsoil = .TRUE., - lmelt=.TRUE., - lmelt_var=.TRUE., - itype_evsl=2, - itype_trvg=2, - lconv = .FALSE., - itype_conv=0, - nincconv=5, - lcape = .false., - lconf_avg=.false., - lsso = .FALSE., ! FUO TODO this should be .true., but currently is not supported! - /END - diff --git a/cases/che-wp4/cosmo_runjob.cfg b/cases/che-wp4/cosmo_runjob.cfg deleted file mode 100644 index b5ab4f1e..00000000 --- a/cases/che-wp4/cosmo_runjob.cfg +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash -l -#SBATCH --job-name="cosmo_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" -#SBATCH --account={cfg.compute_account} -#SBATCH --time={cfg.cosmo_walltime} -#SBATCH --nodes={cfg.cosmo_np_tot} -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --hint=nomultithread -#SBATCH --output={logfile} -#SBATCH --open-mode=append -#SBATCH --chdir={cfg.cosmo_work} - -export MALLOC_MMAP_MAX_=0 -export MALLOC_TRIM_THRESHOLD_=536870912 -export OMP_NUM_THREADS=1 - -{cfg.mpich_cuda} - -# Set this to avoid segmentation faults -ulimit -s unlimited -ulimit -a - -# clean up -rm -f YU* -rm -f M_* -rm -f core.* - -echo "=====================================================" -echo "============== JOB OUTPUT BEGINS ====================" -echo "============== StartTime: `date +%s` s" -echo "============== StartTime: `date`" -echo "=====================================================" - -srun -u ./cosmo >> {logfile} 2>&1 -pid=$? - -echo "=====================================================" -echo "============== JOB OUTPUT ENDS ====================" -echo "============== EndTime: `date +%s` s" -echo "============== EndTime: `date` s" -echo "=====================================================" - -[[ $pid == 0 ]] || {{ echo "Executing COSMO failed" >> {logfile}; exit 1; }} - -# check whether COSMO was successful by calculating name of the last -# output file that should have been created - -hoursSim=$(expr {cfg.hstop} % 24) -daysSim=$(expr {cfg.hstop} / 24) # bash does not know floating points, it truncates to integer -hoursSimNice=$(printf "%02d" $hoursSim) -daysSimNice=$(printf "%02d" $daysSim) -lastHourFile="lfff${{daysSimNice}}${{hoursSimNice}}0000.nc" - -[[ ! -f {cfg.cosmo_output}${{lastHourFile}} ]] || {{ echo "COSMO failed" >> {logfile}; exit 1; }} - -# copy log file -cp {logfile} {logfile_finish} - diff --git a/cases/che-wp4/cosmo_tracers.csv b/cases/che-wp4/cosmo_tracers.csv deleted file mode 100644 index 96d6b9e5..00000000 --- a/cases/che-wp4/cosmo_tracers.csv +++ /dev/null @@ -1,92 +0,0 @@ -,yshort_name,igribparam,igribtable,itype_emiss,itype_flux,yunits,ystandard_name,ylong_name,ytype_adv,ytype_diff,ytype_turbmix,ytype_passconv,ytype_ini,ytype_lbc,ytype_bbc,ytype_relax,ytype_damp,ytype_clip,ldecay,lifetime,itype_tscale,ycatl,ytpl,yvpl -#,,,,,,,,,,,,,,,,,,,,, -,CO2_BG,101,13,0,0,kg kg-1,time-varying_CO2_mass_fraction_at_lateral_boundary,time-varying_CO2_mass_fraction_at_lateral_boundary,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,, -,CO_BG,102,13,0,0,kg kg-1,time-varying_CO_mass_fraction_at_lateral_boundary,time-varying_CO_mass_fraction_at_lateral_boundary,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,, -,C14_BG,106,13,0,0,kg kg-1,time-varying_14C02_at_lateral_boundary,time-varying_14C02_at_lateral_boundary,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,, -#,,,,,,,,,,,,,,,,,,,,, -,CO2_FF1,110,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_FF2,111,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_FF3,112,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_FF4,113,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_FF5,114,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_FF6,115,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_BF1,116,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_BF2,117,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_BF3,118,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_BF4,119,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_BF5,120,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_BF6,121,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_NC1,122,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_NC2,123,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_NC3,124,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_NC4,125,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_NC5,126,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_NC6,127,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_FF1,128,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_FF2,129,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_FF3,130,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_FF4,131,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_FF5,132,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_FF6,133,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_BF1,134,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_BF2,135,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_BF3,136,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_BF4,137,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_BF5,138,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_BF6,139,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_NC1,190,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_NC2,191,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_NC3,192,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_NC4,193,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_NC5,194,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_NC6,195,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_BF1,140,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_BF2,141,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_BF3,142,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_BF4,143,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_BF5,144,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_BF6,145,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NUC1,146,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NUC2,147,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NUC3,148,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NUC4,149,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NUC5,150,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NUC6,151,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,,,,,,,,,,,,,,,,,,,,, -,CO2_GPP1,152,13,1,0,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_GPP2,153,13,1,0,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_GPP3,154,13,1,0,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_GPP4,155,13,1,0,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_GPP5,156,13,1,0,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_GPP6,157,13,1,0,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_RA1,158,13,1,0,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_RA2,159,13,1,0,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_RA3,160,13,1,0,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_RA4,161,13,1,0,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_RA5,162,13,1,0,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_RA6,163,13,1,0,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPP1,164,13,1,0,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPP2,165,13,1,0,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPP3,166,13,1,0,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPP4,167,13,1,0,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPP5,168,13,1,0,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPP6,169,13,1,0,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPN1,170,13,1,0,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPN2,171,13,1,0,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPN3,172,13,1,0,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPN4,173,13,1,0,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPN5,174,13,1,0,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPN6,175,13,1,0,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_HR1,176,13,1,0,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_HR2,177,13,1,0,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_HR3,178,13,1,0,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_HR4,179,13,1,0,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_HR5,180,13,1,0,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_HR6,181,13,1,0,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,,,,,,,,,,,,,,,,,,,, -,CO2_O_P,182,13,1,0,kg kg-1,Positive_CO2_mass_fraction_by_ocean_processes,Positive_CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_O_N,183,13,1,0,kg kg-1,Negative_CO2_mass_fraction_by_ocean_processes,Negative_CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_O_P,184,13,1,0,kg kg-1,Positive_CO_mass_fraction_by_ocean_processes,Positive_CO_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_O_N,185,13,1,0,kg kg-1,Negative_CO_mass_fraction_by_ocean_processes,Negative_CO_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_O_P,186,13,1,0,kg kg-1,Positive_14CO2_mass_fraction_by_ocean_processes,Positive_14CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_O_N,187,13,1,0,kg kg-1,Negative_14CO2_mass_fraction_by_ocean_processes,Negative_14CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, diff --git a/cases/che-wp4/cosmo_tracers_full.csv b/cases/che-wp4/cosmo_tracers_full.csv deleted file mode 100644 index 80eb17c7..00000000 --- a/cases/che-wp4/cosmo_tracers_full.csv +++ /dev/null @@ -1,92 +0,0 @@ -,yshort_name,igribparam,igribtable,itype_emiss,itype_flux,yunits,ystandard_name,ylong_name,ytype_adv,ytype_diff,ytype_turbmix,ytype_passconv,ytype_ini,ytype_lbc,ytype_bbc,ytype_relax,ytype_damp,ytype_clip,ldecay,lifetime,itype_tscale,ycatl,ytpl,yvpl -#,,,,,,,,,,,,,,,,,,,,, -,CO2_BG,101,13,0,0,kg kg-1,time-varying_CO2_mass_fraction_at_lateral_boundary,time-varying_CO2_mass_fraction_at_lateral_boundary,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,, -,CO_BG,102,13,0,0,kg kg-1,time-varying_CO_mass_fraction_at_lateral_boundary,time-varying_CO_mass_fraction_at_lateral_boundary,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,, -,C14_BG,106,13,0,0,kg kg-1,time-varying_14C02_at_lateral_boundary,time-varying_14C02_at_lateral_boundary,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,, -#,,,,,,,,,,,,,,,,,,,,, -,CO2_FF1,110,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_FF2,111,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_FF3,112,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_FF4,113,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_FF5,114,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_FF6,115,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_BF1,116,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_BF2,117,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_BF3,118,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_BF4,119,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_BF5,120,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_BF6,121,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_NC1,122,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_NC2,123,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_NC3,124,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_NC4,125,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_NC5,126,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_NC6,127,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_FF1,128,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_FF2,129,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_FF3,130,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_FF4,131,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_FF5,132,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_FF6,133,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_BF1,134,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_BF2,135,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_BF3,136,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_BF4,137,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_BF5,138,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_BF6,139,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_NC1,190,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_NC2,191,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_NC3,192,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_NC4,193,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_NC5,194,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_NC6,195,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_BF1,140,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_BF2,141,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_BF3,142,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_BF4,143,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_BF5,144,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_BF6,145,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NUC1,146,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NUC2,147,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NUC3,148,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NUC4,149,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NUC5,150,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NUC6,151,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,,,,,,,,,,,,,,,,,,,,, -,CO2_GPP1,152,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_GPP2,153,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_GPP3,154,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_GPP4,155,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_GPP5,156,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_GPP6,157,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_RA1,158,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_RA2,159,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_RA3,160,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_RA4,161,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_RA5,162,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_RA6,163,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPP1,164,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPP2,165,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPP3,166,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPP4,167,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPP5,168,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPP6,169,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPN1,170,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPN2,171,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPN3,172,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPN4,173,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPN5,174,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPN6,175,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_HR1,176,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_HR2,177,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_HR3,178,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_HR4,179,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_HR5,180,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_HR6,181,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,,,,,,,,,,,,,,,,,,,, -,CO2_O_P,182,13,0,1,kg kg-1,Positive_CO2_mass_fraction_by_ocean_processes,Positive_CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_O_N,183,13,0,1,kg kg-1,Negative_CO2_mass_fraction_by_ocean_processes,Negative_CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_O_P,184,13,0,1,kg kg-1,Positive_CO_mass_fraction_by_ocean_processes,Positive_CO_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_O_N,185,13,0,1,kg kg-1,Negative_CO_mass_fraction_by_ocean_processes,Negative_CO_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_O_P,186,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_ocean_processes,Positive_14CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_O_N,187,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_ocean_processes,Negative_14CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, diff --git a/cases/che-wp4/cosmo_tracers_noohchem.csv b/cases/che-wp4/cosmo_tracers_noohchem.csv deleted file mode 100644 index e7845aad..00000000 --- a/cases/che-wp4/cosmo_tracers_noohchem.csv +++ /dev/null @@ -1,86 +0,0 @@ -,yshort_name,igribparam,igribtable,itype_emiss,itype_flux,yunits,ystandard_name,ylong_name,ytype_adv,ytype_diff,ytype_turbmix,ytype_passconv,ytype_ini,ytype_lbc,ytype_bbc,ytype_relax,ytype_damp,ytype_clip,ldecay,lifetime,itype_tscale,ycatl,ytpl,yvpl -#,,,,,,,,,,,,,,,,,,,,, -,CO2_BG,101,13,0,0,kg kg-1,time-varying_CO2_mass_fraction_at_lateral_boundary,time-varying_CO2_mass_fraction_at_lateral_boundary,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,, -,CO_BG,102,13,0,0,kg kg-1,time-varying_CO_mass_fraction_at_lateral_boundary,time-varying_CO_mass_fraction_at_lateral_boundary,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,, -,C14_BG,106,13,0,0,kg kg-1,time-varying_14C02_at_lateral_boundary,time-varying_14C02_at_lateral_boundary,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,, -#,,,,,,,,,,,,,,,,,,,,, -,CO2_FF1,110,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_FF2,111,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_FF3,112,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_FF4,113,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_FF5,114,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_FF6,115,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_BF1,116,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_BF2,117,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_BF3,118,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_BF4,119,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_BF5,120,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_BF6,121,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_NC1,122,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_NC2,123,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_NC3,124,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_NC4,125,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_NC5,126,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_NC6,127,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_FF1,128,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_FF2,129,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_FF3,130,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_FF4,131,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_FF5,132,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_FF6,133,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_BF1,134,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_BF2,135,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_BF3,136,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_BF4,137,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_BF5,138,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_BF6,139,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_BF1,140,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_BF2,141,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_BF3,142,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_BF4,143,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_BF5,144,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_BF6,145,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NUC1,146,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NUC2,147,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NUC3,148,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NUC4,149,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NUC5,150,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NUC6,151,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,,,,,,,,,,,,,,,,,,,,, -,CO2_GPP1,152,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_GPP2,153,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_GPP3,154,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_GPP4,155,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_GPP5,156,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_GPP6,157,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_RA1,158,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_RA2,159,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_RA3,160,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_RA4,161,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_RA5,162,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_RA6,163,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPP1,164,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPP2,165,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPP3,166,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPP4,167,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPP5,168,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPP6,169,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPN1,170,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPN2,171,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPN3,172,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPN4,173,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPN5,174,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPN6,175,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_HR1,176,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_HR2,177,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_HR3,178,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_HR4,179,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_HR5,180,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_HR6,181,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,,,,,,,,,,,,,,,,,,,, -,CO2_O_P,182,13,0,1,kg kg-1,Positive_CO2_mass_fraction_by_ocean_processes,Positive_CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_O_N,183,13,0,1,kg kg-1,Negative_CO2_mass_fraction_by_ocean_processes,Negative_CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_O_P,184,13,0,1,kg kg-1,Positive_CO_mass_fraction_by_ocean_processes,Positive_CO_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_O_N,185,13,0,1,kg kg-1,Negative_CO_mass_fraction_by_ocean_processes,Negative_CO_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_O_P,186,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_ocean_processes,Positive_14CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_O_N,187,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_ocean_processes,Negative_14CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, diff --git a/cases/che-wp4/cosmo_tracers_ohchem.csv b/cases/che-wp4/cosmo_tracers_ohchem.csv deleted file mode 100644 index 2174cee9..00000000 --- a/cases/che-wp4/cosmo_tracers_ohchem.csv +++ /dev/null @@ -1,89 +0,0 @@ -,yshort_name,igribparam,igribtable,itype_emiss,itype_flux,yunits,ystandard_name,ylong_name,ytype_adv,ytype_diff,ytype_turbmix,ytype_passconv,ytype_ini,ytype_lbc,ytype_bbc,ytype_relax,ytype_damp,ytype_clip,ldecay,lifetime,itype_tscale,ycatl,ytpl,yvpl,loh_chem -#,,,,,,,,,,,,,,,,,,,,, -,CO2_BG,101,13,0,0,kg kg-1,time-varying_CO2_mass_fraction_at_lateral_boundary,time-varying_CO2_mass_fraction_at_lateral_boundary,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,,,.FALSE. -,CO_BG,102,13,0,0,kg kg-1,time-varying_CO_mass_fraction_at_lateral_boundary,time-varying_CO_mass_fraction_at_lateral_boundary,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,,,.FALSE. -,CO_BG_OH,103,13,0,0,kg kg-1,CO_BG_plus_OH_chemistry,CO_BG_plus_OH_chemistry,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,,,.TRUE. -,CO_noBG,104,13,0,0,kg kg-1,CO_mass_fraction_from_initial_condition,CO_mass_fraction_from_initial_condition,on,off,1D,on,file,zero,zero_flux,full,on,off,.FALSE.,0,,,,,.FALSE. -,CO_noBGOH,105,13,0,0,kg kg-1,CO_noBG_plus_OH_chemistry,CO_noBG_plus_OH_chemistry,on,off,1D,on,file,zero,zero_flux,full,on,off,.FALSE.,0,,,,,.TRUE. -,C14_BG,106,13,0,0,kg kg-1,time-varying_14C02_at_lateral_boundary,time-varying_14C02_at_lateral_boundary,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,,,.FALSE. -#,,,,,,,,,,,,,,,,,,,,, -,CO2_FF1,110,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_FF2,111,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_FF3,112,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_FF4,113,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_FF5,114,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_FF6,115,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_BF1,116,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_BF2,117,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_BF3,118,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_BF4,119,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_BF5,120,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_BF6,121,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_NC1,122,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_NC2,123,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_NC3,124,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_NC4,125,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_NC5,126,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_NC6,127,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO_FF1,128,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO_FF2,129,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO_FF3,130,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO_FF4,131,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO_FF5,132,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO_FF6,133,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO_BF1,134,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO_BF2,135,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO_BF3,136,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO_BF4,137,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO_BF5,138,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO_BF6,139,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_BF1,140,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_BF2,141,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_BF3,142,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_BF4,143,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_BF5,144,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_BF6,145,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_NUC1,146,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_NUC2,147,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_NUC3,148,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_NUC4,149,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_NUC5,150,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_NUC6,151,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -#,,,,,,,,,,,,,,,,,,,,, -,CO2_GPP1,152,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_GPP2,153,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_GPP3,154,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_GPP4,155,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_GPP5,156,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_GPP6,157,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_RA1,158,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_RA2,159,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_RA3,160,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_RA4,161,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_RA5,162,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_RA6,163,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_NPP1,164,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_NPP2,165,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_NPP3,166,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_NPP4,167,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_NPP5,168,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_NPP6,169,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_NPN1,170,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_NPN2,171,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_NPN3,172,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_NPN4,173,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_NPN5,174,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_NPN6,175,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_HR1,176,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_HR2,177,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_HR3,178,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_HR4,179,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_HR5,180,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_HR6,181,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -#,,,,,,,,,,,,,,,,,,,, -,CO2_O_P,182,13,0,1,kg kg-1,Positive_CO2_mass_fraction_by_ocean_processes,Positive_CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO2_O_N,183,13,0,1,kg kg-1,Negative_CO2_mass_fraction_by_ocean_processes,Negative_CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO_O_P,184,13,0,1,kg kg-1,Positive_CO_mass_fraction_by_ocean_processes,Positive_CO_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,CO_O_N,185,13,0,1,kg kg-1,Negative_CO_mass_fraction_by_ocean_processes,Negative_CO_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_O_P,186,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_ocean_processes,Positive_14CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. -,C14_O_N,187,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_ocean_processes,Negative_14CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,,,.FALSE. diff --git a/cases/che-wp4/cosmo_tracers_reduced.csv b/cases/che-wp4/cosmo_tracers_reduced.csv deleted file mode 100644 index 799e83f6..00000000 --- a/cases/che-wp4/cosmo_tracers_reduced.csv +++ /dev/null @@ -1,92 +0,0 @@ -,yshort_name,igribparam,igribtable,itype_emiss,itype_flux,yunits,ystandard_name,ylong_name,ytype_adv,ytype_diff,ytype_turbmix,ytype_passconv,ytype_ini,ytype_lbc,ytype_bbc,ytype_relax,ytype_damp,ytype_clip,ldecay,lifetime,itype_tscale,ycatl,ytpl,yvpl -#,,,,,,,,,,,,,,,,,,,,, -,CO2_BG,101,13,0,0,kg kg-1,time-varying_CO2_mass_fraction_at_lateral_boundary,time-varying_CO2_mass_fraction_at_lateral_boundary,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,, -,CO_BG,102,13,0,0,kg kg-1,time-varying_CO_mass_fraction_at_lateral_boundary,time-varying_CO_mass_fraction_at_lateral_boundary,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,, -,C14_BG,106,13,0,0,kg kg-1,time-varying_14C02_at_lateral_boundary,time-varying_14C02_at_lateral_boundary,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,, -#,,,,,,,,,,,,,,,,,,,,, -,CO2_FF1,110,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_FF2,111,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_FF3,112,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_FF4,113,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_FF5,114,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_FF6,115,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_BF1,116,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_BF2,117,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_BF3,118,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_BF4,119,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_BF5,120,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_BF6,121,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_NC1,122,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_NC2,123,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_NC3,124,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_NC4,125,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_NC5,126,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_NC6,127,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_FF1,128,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_FF2,129,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_FF3,130,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_FF4,131,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_FF5,132,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_FF6,133,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_BF1,134,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_BF2,135,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_BF3,136,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_BF4,137,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_BF5,138,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_BF6,139,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_NC1,190,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_NC2,191,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_NC3,192,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_NC4,193,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_NC5,194,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_NC6,195,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_BF1,140,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_BF2,141,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_BF3,142,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_BF4,143,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_BF5,144,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_BF6,145,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NUC1,146,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NUC2,147,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NUC3,148,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NUC4,149,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NUC5,150,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NUC6,151,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,,,,,,,,,,,,,,,,,,,,, -,CO2_GPP1,152,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_GPP2,153,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_GPP3,154,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_GPP4,155,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_GPP5,156,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_GPP6,157,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_RA1,158,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_RA2,159,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_RA3,160,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_RA4,161,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_RA5,162,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_RA6,163,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPP1,164,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NPP2,165,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NPP3,166,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NPP4,167,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NPP5,168,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NPP6,169,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPN1,170,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NPN2,171,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NPN3,172,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NPN4,173,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NPN5,174,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NPN6,175,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_HR1,176,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_HR2,177,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_HR3,178,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_HR4,179,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_HR5,180,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_HR6,181,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -#,,,,,,,,,,,,,,,,,,,, -,CO2_O_P,182,13,0,1,kg kg-1,Positive_CO2_mass_fraction_by_ocean_processes,Positive_CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_O_N,183,13,0,1,kg kg-1,Negative_CO2_mass_fraction_by_ocean_processes,Negative_CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_O_P,184,13,0,1,kg kg-1,Positive_CO_mass_fraction_by_ocean_processes,Positive_CO_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_O_N,185,13,0,1,kg kg-1,Negative_CO_mass_fraction_by_ocean_processes,Negative_CO_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_O_P,186,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_ocean_processes,Positive_14CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_O_N,187,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_ocean_processes,Negative_14CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero,zero_flux,full,off,on,.FALSE.,0,,,, diff --git a/cases/che-wp4/cosmo_tracers_reduced_zerograd.csv b/cases/che-wp4/cosmo_tracers_reduced_zerograd.csv deleted file mode 100644 index 38470581..00000000 --- a/cases/che-wp4/cosmo_tracers_reduced_zerograd.csv +++ /dev/null @@ -1,92 +0,0 @@ -,yshort_name,igribparam,igribtable,itype_emiss,itype_flux,yunits,ystandard_name,ylong_name,ytype_adv,ytype_diff,ytype_turbmix,ytype_passconv,ytype_ini,ytype_lbc,ytype_bbc,ytype_relax,ytype_damp,ytype_clip,ldecay,lifetime,itype_tscale,ycatl,ytpl,yvpl -#,,,,,,,,,,,,,,,,,,,,, -,CO2_BG,101,13,0,0,kg kg-1,time-varying_CO2_mass_fraction_at_lateral_boundary,time-varying_CO2_mass_fraction_at_lateral_boundary,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,, -,CO_BG,102,13,0,0,kg kg-1,time-varying_CO_mass_fraction_at_lateral_boundary,time-varying_CO_mass_fraction_at_lateral_boundary,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,, -,C14_BG,106,13,0,0,kg kg-1,time-varying_14C02_at_lateral_boundary,time-varying_14C02_at_lateral_boundary,on,off,1D,on,file,file,zero_flux,full,on,off,.FALSE.,0,,,, -#,,,,,,,,,,,,,,,,,,,,, -,CO2_FF1,110,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_FF2,111,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_FF3,112,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_FF4,113,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_FF5,114,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_FF6,115,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_BF1,116,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_BF2,117,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_BF3,118,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_BF4,119,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_BF5,120,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_BF6,121,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_NC1,122,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_NC2,123,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_NC3,124,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_NC4,125,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_NC5,126,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_NC6,127,13,1,0,kg kg-1,CO2_mass_fraction_by_non_combustion_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_FF1,128,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_FF2,129,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_FF3,130,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_FF4,131,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_FF5,132,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_FF6,133,13,1,0,kg kg-1,CO2_mass_fraction_by_fossil_fuel_emissions,CO2_mass_fraction_by_fossil_fuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_BF1,134,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_BF2,135,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_BF3,136,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_BF4,137,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_BF5,138,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_BF6,139,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_NC1,190,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_NC2,191,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_NC3,192,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_NC4,193,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_NC5,194,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO_NC6,195,13,1,0,kg kg-1,CO_mass_fraction_by_non_combustion_emissions,CO_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_BF1,140,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_BF2,141,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_BF3,142,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_BF4,143,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_BF5,144,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_BF6,145,13,1,0,kg kg-1,CO2_mass_fraction_by_biofuel_emissions,CO2_mass_fraction_by_biofuel_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NUC1,146,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NUC2,147,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NUC3,148,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NUC4,149,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NUC5,150,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NUC6,151,13,1,0,kg kg-1,CO2_mass_fraction_by_nuclear_emissions,CO2_mass_fraction_by_nuclear_emissions,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,,,,,,,,,,,,,,,,,,,,, -,CO2_GPP1,152,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_GPP2,153,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_GPP3,154,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_GPP4,155,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_GPP5,156,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_GPP6,157,13,0,1,kg kg-1,CO2_mass_fraction_by_GPP,CO2_mass_fraction_by_GPP,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_RA1,158,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_RA2,159,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_RA3,160,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_RA4,161,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_RA5,162,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,CO2_RA6,163,13,0,1,kg kg-1,CO2_mass_fraction_by_RA,CO2_mass_fraction_by_RA,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPP1,164,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NPP2,165,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NPP3,166,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NPP4,167,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NPP5,168,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NPP6,169,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_NPP,Positive_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_NPN1,170,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NPN2,171,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NPN3,172,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NPN4,173,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NPN5,174,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_NPN6,175,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_NPP,Negative_CO2_mass_fraction_by_NPP,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_HR1,176,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_HR2,177,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_HR3,178,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_HR4,179,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_HR5,180,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,C14_HR6,181,13,0,1,kg kg-1,14CO2_mass_fraction_by_HR,CO2_mass_fraction_by_HR,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -#,,,,,,,,,,,,,,,,,,,, -,CO2_O_P,182,13,0,1,kg kg-1,Positive_CO2_mass_fraction_by_ocean_processes,Positive_CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -,CO2_O_N,183,13,0,1,kg kg-1,Negative_CO2_mass_fraction_by_ocean_processes,Negative_CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_O_P,184,13,0,1,kg kg-1,Positive_CO_mass_fraction_by_ocean_processes,Positive_CO_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -,CO_O_N,185,13,0,1,kg kg-1,Negative_CO_mass_fraction_by_ocean_processes,Negative_CO_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_O_P,186,13,0,1,kg kg-1,Positive_14CO2_mass_fraction_by_ocean_processes,Positive_14CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, -,C14_O_N,187,13,0,1,kg kg-1,Negative_14CO2_mass_fraction_by_ocean_processes,Negative_14CO2_mass_fraction_by_ocean_processes,on,off,1D,on,zero,zero_gradient,zero_flux,full,off,on,.FALSE.,0,,,, diff --git a/cases/che-wp4/int2lm_INPUT.cfg b/cases/che-wp4/int2lm_INPUT.cfg deleted file mode 100644 index 999bdf8c..00000000 --- a/cases/che-wp4/int2lm_INPUT.cfg +++ /dev/null @@ -1,203 +0,0 @@ -&CONTRL - yinput_model = 'IFS', ! string to identify the input model - ydate_ini = '{cfg.inidate_int2lm_yyyymmddhh}', ! start of the forecast - - hstart = {cfg.hstart_int2lm}, ! first hour to be processed - hstop = {cfg.hstop_int2lm}, ! last hour to be processed - hincbound = 3.0, ! increment in hours for the processing - - nprocx = {cfg.int2lm_np_x}, ! number of processors in east-west direction - nprocy = {cfg.int2lm_np_y}, ! number of processors in north-south direction - nprocio = {cfg.cosmo_np_io}, ! number of extra processors for asynchronous IO - nincwait = 30, ! seconds to wait until next attempt if a ready file is - ! not available - nmaxwait = 300, ! maximum seconds to wait until abort if a ready file is - ! not available - - - - norder_filter = 5, ! order of the orography filtering - ilow_pass_oro = 4, ! type of low-pass filter for orography - numfilt_oro = 1, ! number of sequential applications of filter - ilow_pass_xso = 5, ! type of low-pass filter for extra smoothing steep oro. - numfilt_xso = 1, ! number of sequential applications of xso-filter - itype_w_so_rel = 1, ! type of relative soil moisture input (0,1,2) - idbg_level = 3, ! to control verbosity of debug output - itype_balance_pp = 2, ! To choose the previous (=1) or new (=2) method for - ! hydrostatic pressure calculation in case of - ! non-hydrostatic input models - - eps_filter = 0.1, ! parameter for orography filtering - rxso_mask = 750.0, ! mask for extra smoothing of steep oro.: dh > rxso_mask - rfill_valley = 0.0, ! mask for valley filling: dh > rfill_valley - - luse_t_skin = .TRUE., ! if .TRUE., use ECMWF skin temperature for surface - lpost_0006 = .TRUE., ! if .TRUE., force to use ECMWF dataset after 27 June 2000 - luvcor = .TRUE., ! if .TRUE., correct winds for given surface pres. tendency - lvertwind_ini = .TRUE., ! if .TRUE., compute vertical wind for LM for initial data - lvertwind_bd = .TRUE., ! if .TRUE., compute vertical wind for LM for boundary data - ! (MeteoSwiss uses .FALSE.) - lprog_qi = .TRUE., ! if .TRUE., interpolate qi to LM grid - lprog_qr_qs = .FALSE., ! if .TRUE., interpolate qr,qs to LM grid - lprog_qg = .FALSE., ! if .TRUE., interpolate qg to LM grid - lprog_rho_snow = .FALSE., ! if .TRUE., interpolate rho_snow to LM grid - ! for ICON input - ! (MeteoSwiss uses .TRUE.) - linitial = .TRUE., ! if .TRUE., initial data for LM - lboundaries = .TRUE., ! if .TRUE., lateral boundaries for LM - ltime_mean = .TRUE., ! if .TRUE., mean values of the timings are printed - lmulti_layer_lm = {cfg.multi_layer}, ! compute data for multi-layer soil model - lmulti_layer_in = .FALSE., ! data from multi-layer soil model in the incoming data - lfilter_oro = .FALSE., ! if .TRUE., filter the orography - lxso_first = .FALSE., ! if .TRUE., do extra smoothing of orography first - lfilter_pp = .TRUE., ! if .TRUE., filter the pressure deviation after vertical - ! vertical interpolation in LM2LM - lbdclim = .FALSE., ! if .TRUE., special boundary data for climate mode - lforest = .TRUE., ! if .TRUE., run with forest (evergreen and deciduous) - lsso = .TRUE., ! process parameters for sso scheme - lradtopo = .FALSE., ! process parameters for topographic correction of radiation - llbc_smooth = .TRUE., ! if .TRUE., run with smooth orography transition to LB - l_art = .TRUE., ! switch for additional cosmo-art fields - l_art_nested = .FALSE., ! switch for cosmo-art2cosmo-art - l_art_file = .TRUE., ! if .TRUE., art namelist is read from INPUT_ART - l_smi = .FALSE., ! if .TRUE., interpolate soil moisture with SMI - ! (MeteoSwiss uses .FALSE.) - lmixcld = .FALSE., ! if .TRUE., qi added in grh instead of being directly - ! interp. - ! (MeteoSwiss uses .FALSE.) - lasync_io = .FALSE., ! if .TRUE.: the model runs with extra PEs for asynchr. IO - l_topo_z = .FALSE., ! if .TRUE., additional smoothing of the topography - ! for the LM-Z coordinate Version - -! Only in COSMO7 -nboundlines=1 -ncomm_type=1 -itype_calendar=0 -nincwait=30 -lante_0006=.FALSE. -qvmin=0.1000E-11 -qcmin=0.1000E-11 -qimin=0.1000E-11 -leps_bc=.FALSE. -ltime_proc=.FALSE. -itype_t_cl=0 -itype_rootdp=0 -itype_ndvi=0 -itype_aerosol=1 -itype_albedo=1 -nhori=24 -lseaice=.FALSE. -llake=.FALSE. -llake_coldstart=.FALSE. -lstomata=.FALSE. -lemiss=.FALSE. -nlbc_smooth=20 -lroutine=.FALSE. -lreorder=.TRUE. -ldatatypes=.FALSE. -lt_cl_corr=.FALSE. -ifill_valley=7 -l_cressman=.FALSE. -l_bicub_spl=.FALSE. -lprintdeb_all=.FALSE. -lurban=.FALSE. - -/ - -&GRID_IN -! IFS grid - ie_in_tot = 871, ! ie (lon) for input grid (total domain) - je_in_tot = 391, ! je (lat) for input grid (total domain) - ke_in_tot = 137, ! ke (levels) for input grid (total domain) I don't know why it's not 100. - - pcontrol_fi=30000., ! Pressure of control level for geopotential - dlat_in = 0.1, - dlon_in = 0.1, - startlat_in_tot = 29.00, - startlon_in_tot = -32., - / - -&LMGRID -! European grid with 0.05 resolution - ielm_tot = 760, - jelm_tot = 610, - kelm_tot = 60, - - ivctype = 2, ! 4 used by MeteoSwiss COSMO-7 -> 1 processing - irefatm = 1, ! used by MeteoSwiss - lanalyt_calc_t0p0 = .TRUE., ! used by MeteoSwiss - vcflat = 11357.0, - vcoord_d = 23588.50,22395.93,21304.04, 20307.39, 19399.95, - 18574.03, 17821.88, 17135.64, 16507.79, 15930.60, - 15396.52, 14897.86, 14427.98, 13981.10, 13551.52, - 13133.53, 12721.37, 12312.04, 11900.03, 11485.37, - 11068.19, 10648.54, 10226.48, 9802.09, 9375.43, - 8946.58, 8515.59, 8082.55, 7647.52, 7210.55, - 6771.96, 6332.38, 5896.41, 5468.04, 5050.84, - 4647.96, 4261.91, 3893.26, 3542.15, 3208.52, - 2892.23, 2593.71, 2312.95, 2049.75, 1803.89, - 1575.57, 1364.68, 1170.90, 993.84, 833.44, - 689.53, 561.52, 448.82, 350.95, 267.55, - 197.67, 137.23, 87.33, 48.44, 20.00, 0.00, - - pollat = 43.0, - pollon = -170.0, - dlon = 0.05, - dlat = 0.05, - startlat_tot = -11., - startlon_tot = -17., - - -lnewVGrid=.FALSE. -irefatm=1 -lanalyt_calc_t0p0=.TRUE. -vcflat=11357.0000 -p0sl=100000.0000 -t0sl=288.1500 -dt0lp=42.0000 -ke_soil_lm=7 - -/ - -&DATABASE -/ - -&DATA - ! General control variables: - ncenter = 98, ! Originating center identification - nprocess_ini = 135, ! Generating process identification for initial values - nprocess_bd = 135, ! Generating process identification for boundary values - ymode_write = 'w b', ! Specify open mode for writing - ytunit_in = 'd', ! Time unit for input data - ytunit_out = 'd', ! Time unit for output data - yinput_type = 'analysis',! Type of input data: - ! ! 'forecast' forecast data - ! ! 'analysis' analysis data - ! ! 'ana_init' initialized analysis data - ! ---------------------------------------------------------------- ! - ! Variables for external data: - ylmext_lfn='{cfg.int2lm_extpar_file}', - ylmext_cat='../input/extpar/', - ylmext_form_read='ncdf', ! Input format of external data - yinext_lfn='eas{cfg.inidate_int2lm_yyyymmddhh}', ! Name of the file with the external fields - yinext_cat='../input/meteo/', - yinext_form_read="apix", ! Input format of external data from coarse grid - ie_ext=800, - je_ext=650, - ! - ! ---------------------------------------------------------------- ! - ! Variables for the models: - yin_cat='../input/meteo/', - yin_form_read='apix', - ylm_cat='../output/', - ylm_form_write = "nc-4", ! Output format of COSMO-Model data -/ - -&PRICTR - igp_tot = 36, 40, 48, 44, 48, 85, 77, - jgp_tot = 30, 94, 38, 26, 26, 96, 12, - lchkin = .TRUE., - lchkout = .TRUE., - lprgp = .FALSE., -/ - diff --git a/cases/che-wp4/int2lm_datasets.csv b/cases/che-wp4/int2lm_datasets.csv deleted file mode 100644 index c2743381..00000000 --- a/cases/che-wp4/int2lm_datasets.csv +++ /dev/null @@ -1,12 +0,0 @@ -,ie_tot,je_tot,ke_tot,startlon_tot,startlat_tot,dlon,dlat,pollat,pollon,polgam,ninc,hinc,lconst_in_time,lconserve_mass,cvertdist,ydirin,ylfn_prefix,yvertical_axis_type,yvertical_method,yvarlist,yinterp_type,ngrid_refine,ycombine_action -#,,,,,,,,,,,,,,,,,,,,,,, -#,360,180,40,-179.5,-89.5,1,1,,,,,3,.TRUE.,.FALSE.,,/store/empa/em05/mjaehn/CHE/input/oh/,OH_07,geometric,I,"OH_FIELD, ",L,,O -,871,391,100,-32,29,0.1,0.1,,,,,3,.FALSE.,.FALSE.,,../input/icbc/,cams_co2_,hyb_sig_pr,I,"CO2_BG,CO_BG",L,,O -,871,391,19,-32,29,0.1,0.1,,,,,3,.FALSE.,.FALSE.,,../input/icbc/,LSCE_d14C_,hyb_sig_pr,I,"C14_BG",L,,O -,764,614,7,-17.1,-11.1,0.05,0.05,43,-170,0,,1,.FALSE.,.FALSE.,,../input/emissions/,emis_,geometric,D,"CO2_FF1_E,CO2_FF2_E,CO2_FF3_E,CO2_FF4_E,CO2_FF5_E,CO2_FF6_E,CO2_BF1_E,CO2_BF2_E,CO2_BF3_E,CO2_BF4_E,CO2_BF5_E,CO2_BF6_E,CO2_NC1_E,CO2_NC2_E,CO2_NC3_E,CO2_NC4_E,CO2_NC5_E,CO2_NC6_E,CO_FF1_E,CO_FF2_E,CO_FF3_E,CO_FF4_E,CO_FF5_E,CO_FF6_E,CO_BF1_E,CO_BF2_E,CO_BF3_E,CO_BF4_E,CO_BF5_E,CO_BF6_E,CO_NC1_E,CO_NC2_E,CO_NC3_E,CO_NC4_E,CO_NC5_E,CO_NC6_E,C14_BF1_E,C14_BF2_E,C14_BF3_E,C14_BF4_E,C14_BF5_E,C14_BF6_E",N,, -,764,614,7,-17.1,-11.1,0.05,0.05,43,-170,0,,1,.FALSE.,.FALSE.,,../input/emissions/,npp_,geometric,D,"C14_NUC1_E,C14_NUC2_E,C14_NUC3_E,C14_NUC4_E,C14_NUC5_E,C14_NUC6_E",N,, -,1440,1080,1,-29.96875,30.020833333333332,0.0625,0.04166666666,,,,,24,.FALSE.,.FALSE.,,../input/emissions/,ocean_,,,"CO2_O_P_E,CO2_O_N_E,CO_O_P_E,CO_O_N_E,C14_O_P_E,C14_O_N_E",N,,A -,764,614,1,-17.1,-11.1,0.05,0.05,43,-170,0,,1,.FALSE.,.FALSE.,,../input/vprm/,vprm_,,,"CO2_GPP1_E,CO2_GPP2_E,CO2_GPP3_E,CO2_GPP4_E,CO2_GPP5_E,CO2_GPP6_E,CO2_RA1_E,CO2_RA2_E,CO2_RA3_E,CO2_RA4_E,CO2_RA5_E,CO2_RA6_E",N,,A -,764,614,1,-17.1,-11.1,0.05,0.05,43,-170,0,,1,.FALSE.,.FALSE.,,../input/vprm/,dc14__,,,"C14_NPP1_E,C14_NPP2_E,C14_NPP3_E,C14_NPP4_E,C14_NPP5_E,C14_NPP6_E",N,,A -,764,614,1,-17.1,-11.1,0.05,0.05,43,-170,0,,1,.FALSE.,.FALSE.,,../input/vprm/,dc14__,,,"C14_NPN1_E,C14_NPN2_E,C14_NPN3_E,C14_NPN4_E,C14_NPN5_E,C14_NPN6_E",N,,A -,764,614,1,-17.1,-11.1,0.05,0.05,43,-170,0,,1,.FALSE.,.FALSE.,,../input/vprm/,dc14__,,,"C14_HR1_E,C14_HR2_E,C14_HR3_E,C14_HR4_E,C14_HR5_E,C14_HR6_E",N,,A diff --git a/cases/che-wp4/int2lm_runjob.cfg b/cases/che-wp4/int2lm_runjob.cfg deleted file mode 100644 index 95ea0c5c..00000000 --- a/cases/che-wp4/int2lm_runjob.cfg +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash -l -#SBATCH --job-name=int2lm_{cfg.casename}_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime} -#SBATCH --time={cfg.int2lm_walltime} -#SBATCH --nodes={cfg.int2lm_nodes} -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.int2lm_ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --account={cfg.compute_account} -#SBATCH --output={logfile} -#SBATCH --open-mode=append -#SBATCH --chdir={cfg.int2lm_work} - -# Export env variables -export OMP_NUM_THREADS=1 -export CRAY_CUDA_MPS=1 - -export MALLOC_MMAP_MAX_=0 -export MALLOC_TRIM_THRESHOLD_=536870912 - -# Set this to avoid segmentation faults -ulimit -s unlimited -ulimit -a - -# Load modules for post-processing -module load daint-gpu -module load NCO -module list - -unset G2G -export MV2_USE_CUDA=0 -export MV2_USE_GPUDIRECT=0 - -export api_dir="/users/morsier/install/libgrib_api/1.20.0p4" -export GRIB_DEFINITION_PATH=${{api_dir}}/cosmo_definitions/definitions:${{api_dir}}/share/grib_api/definitions -export GRIB_SAMPLES_PATH=${{api_dir}}/cosmo_definitions/samples -export GRIB_API_DEBUG=0 - -rm -f YU* - -echo "=====================================================" -echo "============== JOB OUTPUT BEGINS ====================" -echo "============== StartTime: `date +%s` s" -echo "============== StartTime: `date`" -echo "=====================================================" - -srun -u -n {cfg.int2lm_np_tot} ./int2lm >> {logfile} 2>&1 -pid=$? - -echo "=====================================================" -echo "============== JOB OUTPUT ENDS ====================" -echo "============== EndTime: `date +%s` s" -echo "============== EndTime: `date` s" -echo "=====================================================" - -[[ $pid == 0 ]] || {{ echo \"Executing INT2LM MPI command failed\" >> job.out; exit 1; }} - -# check whether INT2LM was successful by checking for presence of last -# meteofile that should have been processed -firstsecs=$(date -u --date "{ini_day} {ini_hour}" +%s) - -let lastsecs="firstsecs+{cfg.hstop_int2lm}*3600" -lastyyyymmddhh=$(date -u --date "1970-01-01 UTC +${{lastsecs}} sec" +%Y%m%d%H) -lastHourFile="lbfd${{lastyyyymmddhh}}.nc" - -echo last file processed is $lastHourFile >> {logfile} - -[[ ! -f ../output/${{lastHourFile}} ]] && {{ echo "INT2LM failed" >> {logfile}; exit 1; }} - -cp {logfile} {logfile_finish} diff --git a/cases/che-wp4/int2lm_tracers.csv b/cases/che-wp4/int2lm_tracers.csv deleted file mode 100644 index 22740a9b..00000000 --- a/cases/che-wp4/int2lm_tracers.csv +++ /dev/null @@ -1,93 +0,0 @@ -,yshort_name,igribtable,igribparam,irank,yunits,ystandard_name,ylong_name,yfamily,ylsm,lderived,loutput,lrequired,lnested,lcompress,ldryin -#,,,,,,,,,,,,,,,,,,,,, -,CO2_BG,243,101,3,kg kg-1,CO2_mass_fraction_at_lateral_boundary,CO2_mass_fraction_at_lateral_boundary,t, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE.,.TRUE. -,C14_BG,243,102,3,kg kg-1,14CO2_at_lateral_boundary,14CO2_at_lateral_boundary,t, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE.,.TRUE. -,CO_BG,243,103,3,kg kg-1,CO_mass_fraction_at_lateral_boundary,CO_mass_fraction_at_lateral_boundary,t, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE.,.TRUE. -#,OH_FIELD,243,104,3,molecules cm-3,Monthly_OH_field,Monthly_OH_field,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE.,.TRUE.,.FALSE. -#,,,,,,,,,,,,,,,,,,,,, -,CO2_FF1_E,243,123,3,kg m-2 s-1,CO2_flux_from_fossil_fuel_emissions,CO2_flux_from_fossil_fuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_FF2_E,243,124,3,kg m-2 s-1,CO2_flux_from_fossil_fuel_emissions,CO2_flux_from_fossil_fuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_FF3_E,243,125,3,kg m-2 s-1,CO2_flux_from_fossil_fuel_emissions,CO2_flux_from_fossil_fuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_FF4_E,243,126,3,kg m-2 s-1,CO2_flux_from_fossil_fuel_emissions,CO2_flux_from_fossil_fuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_FF5_E,243,127,3,kg m-2 s-1,CO2_flux_from_fossil_fuel_emissions,CO2_flux_from_fossil_fuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_FF6_E,243,128,3,kg m-2 s-1,CO2_flux_from_fossil_fuel_emissions,CO2_flux_from_fossil_fuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_BF1_E,243,129,3,kg m-2 s-1,CO2_flux_from_biofuel_emissions,CO2_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_BF2_E,243,130,3,kg m-2 s-1,CO2_flux_from_biofuel_emissions,CO2_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_BF3_E,243,131,3,kg m-2 s-1,CO2_flux_from_biofuel_emissions,CO2_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_BF4_E,243,132,3,kg m-2 s-1,CO2_flux_from_biofuel_emissions,CO2_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_BF5_E,243,133,3,kg m-2 s-1,CO2_flux_from_biofuel_emissions,CO2_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_BF6_E,243,134,3,kg m-2 s-1,CO2_flux_from_biofuel_emissions,CO2_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_NC1_E,243,201,3,kg m-2 s-1,CO2_flux_from_non_combustion_emissions,CO2_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_NC2_E,243,202,3,kg m-2 s-1,CO2_flux_from_non_combustion_emissions,CO2_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_NC3_E,243,203,3,kg m-2 s-1,CO2_flux_from_non_combustion_emissions,CO2_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_NC4_E,243,204,3,kg m-2 s-1,CO2_flux_from_non_combustion_emissions,CO2_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_NC5_E,243,205,3,kg m-2 s-1,CO2_flux_from_non_combustion_emissions,CO2_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_NC6_E,243,206,3,kg m-2 s-1,CO2_flux_from_non_combustion_emissions,CO2_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO_FF1_E,243,141,3,kg m-2 s-1,CO_flux_from_fossil_fuel_emissions,CO_flux_from_fossil_fuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO_FF2_E,243,142,3,kg m-2 s-1,CO_flux_from_fossil_fuel_emissions,CO_flux_from_fossil_fuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO_FF3_E,243,143,3,kg m-2 s-1,CO_flux_from_fossil_fuel_emissions,CO_flux_from_fossil_fuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO_FF4_E,243,144,3,kg m-2 s-1,CO_flux_from_fossil_fuel_emissions,CO_flux_from_fossil_fuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO_FF5_E,243,145,3,kg m-2 s-1,CO_flux_from_fossil_fuel_emissions,CO_flux_from_fossil_fuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO_FF6_E,243,146,3,kg m-2 s-1,CO_flux_from_fossil_fuel_emissions,CO_flux_from_fossil_fuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO_BF1_E,243,147,3,kg m-2 s-1,CO_flux_from_biofuel_emissions,CO_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO_BF2_E,243,148,3,kg m-2 s-1,CO_flux_from_biofuel_emissions,CO_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO_BF3_E,243,149,3,kg m-2 s-1,CO_flux_from_biofuel_emissions,CO_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO_BF4_E,243,150,3,kg m-2 s-1,CO_flux_from_biofuel_emissions,CO_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO_BF5_E,243,151,3,kg m-2 s-1,CO_flux_from_biofuel_emissions,CO_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO_BF6_E,243,152,3,kg m-2 s-1,CO_flux_from_biofuel_emissions,CO_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO_NC1_E,243,153,3,kg m-2 s-1,CO_flux_from_non_combustion_emissions,CO_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO_NC2_E,243,154,3,kg m-2 s-1,CO_flux_from_non_combustion_emissions,CO_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO_NC3_E,243,155,3,kg m-2 s-1,CO_flux_from_non_combustion_emissions,CO_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO_NC4_E,243,156,3,kg m-2 s-1,CO_flux_from_non_combustion_emissions,CO_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO_NC5_E,243,157,3,kg m-2 s-1,CO_flux_from_non_combustion_emissions,CO_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO_NC6_E,243,158,3,kg m-2 s-1,CO_flux_from_non_combustion_emissions,CO_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_BF1_E,243,161,3,kg m-2 s-1,14CO2_flux_from_biofuel_emissions,14CO2_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_BF2_E,243,162,3,kg m-2 s-1,14CO2_flux_from_biofuel_emissions,14CO2_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_BF3_E,243,163,3,kg m-2 s-1,14CO2_flux_from_biofuel_emissions,14CO2_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_BF4_E,243,164,3,kg m-2 s-1,14CO2_flux_from_biofuel_emissions,14CO2_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_BF5_E,243,165,3,kg m-2 s-1,14CO2_flux_from_biofuel_emissions,14CO2_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_BF6_E,243,166,3,kg m-2 s-1,14CO2_flux_from_biofuel_emissions,14CO2_flux_from_biofuel_emissions,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_NUC1_E,243,167,3,kg m-2 s-1,14CO2_flux_from_nuclear_power_plants,14CO2_flux_from_nuclear_power_plants,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_NUC2_E,243,168,3,kg m-2 s-1,14CO2_flux_from_nuclear_power_plants,14CO2_flux_from_nuclear_power_plants,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_NUC3_E,243,169,3,kg m-2 s-1,14CO2_flux_from_nuclear_power_plants,14CO2_flux_from_nuclear_power_plants,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_NUC4_E,243,170,3,kg m-2 s-1,14CO2_flux_from_nuclear_power_plants,14CO2_flux_from_nuclear_power_plants,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_NUC5_E,243,171,3,kg m-2 s-1,14CO2_flux_from_nuclear_power_plants,14CO2_flux_from_nuclear_power_plants,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_NUC6_E,243,172,3,kg m-2 s-1,14CO2_flux_from_nuclear_power_plants,14CO2_flux_from_nuclear_power_plants,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -#,,,,,,,,,,,,,,,,,,,,, -,CO2_O_P_E,243,180,3,kg m-2 s-1,Positive_CO2_flux_from_ocean_processes,Positive_CO2_flux_from_ocean_processes,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_O_N_E,243,181,3,kg m-2 s-1,Negative_CO2_flux_from_ocean_processes,Negative_CO2_flux_from_ocean_processes,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO_O_P_E,243,182,3,kg m-2 s-1,Positive_CO_flux_from_ocean_processes,Positive_CO_flux_from_ocean_processes,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO_O_N_E,243,183,3,kg m-2 s-1,Negative_CO_flux_from_ocean_processes,Negative_CO_flux_from_ocean_processes,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_O_P_E,243,184,3,kg m-2 s-1,Positive_14CO2_flux_from_ocean_processes,Positive_14CO2_flux_from_ocean_processes,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_O_N_E,243,185,3,kg m-2 s-1,Negative_14CO2_flux_from_ocean_processes,Negative_14CO2_flux_from_ocean_processes,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -#,,,,,,,,,,,,,,,,,,,,, -,CO2_GPP1_E,243,194,3,kg m-2 s-1,CO2_flux_from_GPP,CO2_flux_from_GPP,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_GPP2_E,243,195,3,kg m-2 s-1,CO2_flux_from_GPP,CO2_flux_from_GPP,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_GPP3_E,243,196,3,kg m-2 s-1,CO2_flux_from_GPP,CO2_flux_from_GPP,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_GPP4_E,243,197,3,kg m-2 s-1,CO2_flux_from_GPP,CO2_flux_from_GPP,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_GPP5_E,243,198,3,kg m-2 s-1,CO2_flux_from_GPP,CO2_flux_from_GPP,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_GPP6_E,243,199,3,kg m-2 s-1,CO2_flux_from_GPP,CO2_flux_from_GPP,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_RA1_E,243,107,3,kg m-2 s-1,CO2_flux_from_RA,CO2_flux_from_RA,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_RA2_E,243,108,3,kg m-2 s-1,CO2_flux_from_RA,CO2_flux_from_RA,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_RA3_E,243,109,3,kg m-2 s-1,CO2_flux_from_RA,CO2_flux_from_RA,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_RA4_E,243,110,3,kg m-2 s-1,CO2_flux_from_RA,CO2_flux_from_RA,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_RA5_E,243,111,3,kg m-2 s-1,CO2_flux_from_RA,CO2_flux_from_RA,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,CO2_RA6_E,243,112,3,kg m-2 s-1,CO2_flux_from_RA,CO2_flux_from_RA,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_NPP1_E,243,113,3,kg m-2 s-1,Positive_14CO2_flux_from_NPP,Positive_14CO2_flux_from_NPP,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_NPP2_E,243,114,3,kg m-2 s-1,Positive_14CO2_flux_from_NPP,Positive_14CO2_flux_from_NPP,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_NPP3_E,243,115,3,kg m-2 s-1,Positive_14CO2_flux_from_NPP,Positive_14CO2_flux_from_NPP,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_NPP4_E,243,116,3,kg m-2 s-1,Positive_14CO2_flux_from_NPP,Positive_14CO2_flux_from_NPP,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_NPP5_E,243,117,3,kg m-2 s-1,Positive_14CO2_flux_from_NPP,Positive_14CO2_flux_from_NPP,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_NPP6_E,243,118,3,kg m-2 s-1,Positive_14CO2_flux_from_NPP,Positive_14CO2_flux_from_NPP,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_NPN1_E,243,119,3,kg m-2 s-1,Negative_14CO2_flux_from_NPP,Negative_14CO2_flux_from_NPP,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_NPN2_E,243,120,3,kg m-2 s-1,Negative_14CO2_flux_from_NPP,Negative_14CO2_flux_from_NPP,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_NPN3_E,243,121,3,kg m-2 s-1,Negative_14CO2_flux_from_NPP,Negative_14CO2_flux_from_NPP,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_NPN4_E,243,122,3,kg m-2 s-1,Negative_14CO2_flux_from_NPP,Negative_14CO2_flux_from_NPP,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_NPN5_E,243,186,3,kg m-2 s-1,Negative_14CO2_flux_from_NPP,Negative_14CO2_flux_from_NPP,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_NPN6_E,243,187,3,kg m-2 s-1,Negative_14CO2_flux_from_NPP,Negative_14CO2_flux_from_NPP,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_HR1_E,243,188,3,kg m-2 s-1,14CO2_flux_from_HR,14CO2_flux_from_HR,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_HR2_E,243,189,3,kg m-2 s-1,14CO2_flux_from_HR,14CO2_flux_from_HR,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_HR3_E,243,190,3,kg m-2 s-1,14CO2_flux_from_HR,14CO2_flux_from_HR,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_HR4_E,243,191,3,kg m-2 s-1,14CO2_flux_from_HR,14CO2_flux_from_HR,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_HR5_E,243,192,3,kg m-2 s-1,14CO2_flux_from_HR,14CO2_flux_from_HR,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. -,C14_HR6_E,243,193,3,kg m-2 s-1,14CO2_flux_from_HR,14CO2_flux_from_HR,e, ,.FALSE.,.TRUE.,.FALSE.,.FALSE.,.TRUE. diff --git a/cases/che-wp4/tracerlist.txt b/cases/che-wp4/tracerlist.txt deleted file mode 100644 index 023c27ec..00000000 --- a/cases/che-wp4/tracerlist.txt +++ /dev/null @@ -1,86 +0,0 @@ -yshort_name - -CO2_BG -CO_BG -C14_BG - -CO2_FF1 -CO2_FF2 -CO2_FF3 -CO2_FF4 -CO2_FF5 -CO2_FF6 -CO2_BF1 -CO2_BF2 -CO2_BF3 -CO2_BF4 -CO2_BF5 -CO2_BF6 -CO2_NC1 -CO2_NC2 -CO2_NC3 -CO2_NC4 -CO2_NC5 -CO2_NC6 -CO_FF1 -CO_FF2 -CO_FF3 -CO_FF4 -CO_FF5 -CO_FF6 -CO_BF1 -CO_BF2 -CO_BF3 -CO_BF4 -CO_BF5 -CO_BF6 -C14_BF1 -C14_BF2 -C14_BF3 -C14_BF4 -C14_BF5 -C14_BF6 -C14_NUC1 -C14_NUC2 -C14_NUC3 -C14_NUC4 -C14_NUC5 -C14_NUC6 - -CO2_GPP1 -CO2_GPP2 -CO2_GPP3 -CO2_GPP4 -CO2_GPP5 -CO2_GPP6 -CO2_RA1 -CO2_RA2 -CO2_RA3 -CO2_RA4 -CO2_RA5 -CO2_RA6 -C14_NPP1 -C14_NPP2 -C14_NPP3 -C14_NPP4 -C14_NPP5 -C14_NPP6 -C14_NPN1 -C14_NPN2 -C14_NPN3 -C14_NPN4 -C14_NPN5 -C14_NPN6 -C14_HR1 -C14_HR2 -C14_HR3 -C14_HR4 -C14_HR5 -C14_HR6 - -CO2_O_P -CO2_O_N -CO_O_P -CO_O_N -C14_O_P -C14_O_N diff --git a/cases/che-wp4/variables.csv b/cases/che-wp4/variables.csv deleted file mode 100644 index 65b2e21d..00000000 --- a/cases/che-wp4/variables.csv +++ /dev/null @@ -1,88 +0,0 @@ -# name, least_significant_digit, min_value, max_value -CO2_BG, 2, 0, 1 -CO_BG, 2, 0, 1 -C14_BG, 2, 0, 1 -CO2_FF1, 2, 0, 1 -CO2_FF2, 2, 0, 1 -CO2_FF3, 2, 0, 1 -CO2_FF4, 2, 0, 1 -CO2_FF5, 2, 0, 1 -CO2_FF6, 2, 0, 1 -CO2_BF1, 4, 0, 1 -CO2_BF2, 4, 0, 1 -CO2_BF3, 4, 0, 1 -CO2_BF4, 4, 0, 1 -CO2_BF5, 4, 0, 1 -CO2_BF6, 4, 0, 1 -CO2_NC1, 3, 0, 1 -CO2_NC2, 3, 0, 1 -CO2_NC3, 3, 0, 1 -CO2_NC4, 3, 0, 1 -CO2_NC5, 3, 0, 1 -CO2_NC6, 3, 0, 1 -CO_FF1, 2, 0, 1 -CO_FF2, 2, 0, 1 -CO_FF3, 2, 0, 1 -CO_FF4, 2, 0, 1 -CO_FF5, 2, 0, 1 -CO_FF6, 2, 0, 1 -CO_BF1, 2, 0, 1 -CO_BF2, 2, 0, 1 -CO_BF3, 2, 0, 1 -CO_BF4, 2, 0, 1 -CO_BF5, 2, 0, 1 -CO_BF6, 2, 0, 1 -CO_NC1, 2, 0, 1 -CO_NC2, 2, 0, 1 -CO_NC3, 2, 0, 1 -CO_NC4, 2, 0, 1 -CO_NC5, 2, 0, 1 -CO_NC6, 2, 0, 1 -C14_BF1, 4, 0, 1 -C14_BF2, 4, 0, 1 -C14_BF3, 4, 0, 1 -C14_BF4, 4, 0, 1 -C14_BF5, 4, 0, 1 -C14_BF6, 4, 0, 1 -C14_NUC1, 3, 0, 1 -C14_NUC2, 3, 0, 1 -C14_NUC3, 3, 0, 1 -C14_NUC4, 3, 0, 1 -C14_NUC5, 3, 0, 1 -C14_NUC6, 3, 0, 1 -CO2_GPP1, 3, 0, 1 -CO2_GPP2, 3, 0, 1 -CO2_GPP3, 3, 0, 1 -CO2_GPP4, 3, 0, 1 -CO2_GPP5, 3, 0, 1 -CO2_GPP6, 3, 0, 1 -CO2_RA1, 3, 0, 1 -CO2_RA2, 3, 0, 1 -CO2_RA3, 3, 0, 1 -CO2_RA4, 3, 0, 1 -CO2_RA5, 3, 0, 1 -CO2_RA6, 3, 0, 1 -C14_NPP1, 6, 0, 1 -C14_NPP2, 6, 0, 1 -C14_NPP3, 6, 0, 1 -C14_NPP4, 6, 0, 1 -C14_NPP5, 6, 0, 1 -C14_NPP6, 6, 0, 1 -C14_NPN1, 6, 0, 1 -C14_NPN2, 6, 0, 1 -C14_NPN3, 6, 0, 1 -C14_NPN4, 6, 0, 1 -C14_NPN5, 6, 0, 1 -C14_NPN6, 6, 0, 1 -C14_HR1, 4, 0, 1 -C14_HR2, 4, 0, 1 -C14_HR3, 4, 0, 1 -C14_HR4, 4, 0, 1 -C14_HR5, 4, 0, 1 -C14_HR6, 4, 0, 1 -CO2_O_P, 4, 0, 1 -CO2_O_N, 4, 0, 1 -CO_O_P, 4, 0, 1 -CO_O_N, 4, 0, 1 -C14_O_P, 6, 0, 1 -C14_O_N, 6, 0, 1 diff --git a/cases/cosmo-7/GLOBAL.dat b/cases/cosmo-7/GLOBAL.dat deleted file mode 100644 index b95a9749..00000000 --- a/cases/cosmo-7/GLOBAL.dat +++ /dev/null @@ -1,220 +0,0 @@ -############################################################################### -# -# File: GLOBAL -# Category: LM package - namelist file for task "integ" -# -# Host: SUN -# Location: $LM_NDIR/ (e.g.: = integ) -# Permission: 440 -# Associated files: $LM_SDIR/lm_for -# -# -# Description: The variables in part A) and B) of this file control the -# behaviour of the task "integ". In part C) it is possible to -# define its own variables, for later usage in other namelist -# files. -# Any lines beginning with # are ignored. 'Predefined variables' -# (as defined below) can be used. -# -# -# Predefined variables: -# $LM_YY year of the experiment -# $LM_MM month of the experiment -# $LM_DD day of the experiment -# $LM_ZZ time of the experiment -# $LM_YYm12 year of the experiment minus 12 hours -# $LM_MMm12 month of the experiment minus 12 hours -# $LM_DDm12 day of the experiment minus 12 hours -# $LM_ZZm12 time of the experiment minus 12 hours -# $LM_DATEm12 shortcut for $LM_YY$LM_MM$LM_DD$LM_ZZ minus 12 hours -# $LM_YYp12 year of the experiment plus 12 hours -# $LM_MMp12 month of the experiment plus 12 hours -# $LM_DDp12 day of the experiment plus 12 hours -# $LM_ZZp12 time of the experiment plus 12 hours -# $LM_DATEp12 shortcut for $LM_YY$LM_MM$LM_DD$LM_ZZ plus 12 hours -# -############################################################################### - - - - - -# A) General -#----------- -# Variables controlling the general behaviour of the task 'integ'. -# Variables are defined following the pattern: -# setenv -# E.g.: setenv LM_NL_TEXPN A01 -#===================================================================== - -# Experiments names -setenv LM_NL_TEXPN PRL # For task -setenv LM_NL_C_TTAG 'COSMO-7 intpl' # Legend for plots -setenv LM_NL_F_TTAG '' # Legend for plots - -# Forecast range -setenv LM_NL_HENDE_PREASSML 0 -setenv LM_NL_HENDE_F 0 -setenv LM_NL_HENDE_C 90 - -# Forecast range for customers -setenv LM_NL_HENDE_CL 24 - -# Timestep of input files (hours) -setenv LM_NL_INPUT_INCR_C 1 - -# Difference between forecast time of boundary conditions and -# forecast time of the current task. -setenv LM_NL_INPUT_MINSHIFT_C 0 - -# Reservation type (opr only) -setenv LM_NL_RESV_TYPE intpl - -# A summary of the task status is kept if the value of LM_NL_SLOG is Y ; -# this summary is saved in file LOGinteg in directory LM_LOGDIR. -setenv LM_NL_SLOG Y # Y or N -#===================================================================== - - - -# B) Development of the task -#--------------------------- -# Variables controlling the development of the task 'integ'. -# Variables are defined following the pattern: -# setenv -# E.g.: setenv LM_NL_ARC Y -#===================================================================== -# The next variables control the execution of different modules: -# a module can be performed [Y] or skipped [N]. -#--------------------------------------------------------------------- -setenv LM_NL_ARC N # archive transactions -setenv LM_NL_BUF Y # buffer transactions -setenv LM_NL_GETOBS N # lm_getobs -setenv LM_NL_IFS2LM Y # lm_ifs2lm -setenv LM_NL_GME2LM N # lm_gme2lm -setenv LM_NL_IFS2LM_PREASSML N # lm_ifs2lm -preassml -setenv LM_NL_LM_C_PREASSML N # lm_lm_c -preassml -setenv LM_NL_LM2LM_PREASSML N # lm_lm2lm -preassml -setenv LM_NL_LM_F_PREASSML N # lm_lm_f -preassml -setenv LM_NL_LM_C N # lm_lm_c -setenv LM_NL_LM2LM N # lm_lm2lm -setenv LM_NL_LM_F N # lm_lm_f -setenv LM_NL_LM_C_POSTFCST N # lm_lm_c -postfcst -setenv LM_NL_FIELDEXTRA_C N # lm_fieldextra -setenv LM_NL_FIELDEXTRA_F N # lm_fieldextra -setenv LM_NL_PRT N # lm_print -setenv LM_NL_DISS N # dissemination -setenv LM_NL_CLIENTS N # used for D-PHASE module (opr only) -setenv LM_NL_SKYGUIDE N # lm_skyguide,lm_ist (opr only) - -# The next variables are used to execute user specific actions at the -# beginning and at the end of the job or task. -# If the the variable is set to the full path of an executable file -# (living on LM_HOST) this file will be automatically executed by the -# All environment variables defined by the LM package are accessible -# to these files. -# ATTENTION: these executable are NOT under the control of the -# LM package run time environment! -#----------------- -setenv LM_NL_BTHOOK -setenv LM_NL_BJHOOK -setenv LM_NL_EJHOOK -setenv LM_NL_ETHOOK - -# The next variable controls housekeeping at the end of the task. -# If the value of LM_NL_ROF is N no data are removed; if this value -# is Y the following data are removed: -# -> on NQS_HOST: directory LM_WDIR/LM_TAG. -# -> on LM_HOST: subdirectories of LMWDIR/LM_TAG defined by -# LM_RESOURCE, LM_PLOT*, LM_LOOPS, LM_PSANETZ, LM_GRIB. -# and all the preproc/model output -# It is also possible to set the value of LM_NL_ROF to T [T; T=1,2,...]: -# in this case the data defined above are immediately removed if the task -# is successful, otherwise are removed after T hours. -#---------------- -setenv LM_NL_ROF 6 - -# Cut-off time for active jobs: after T hours [T=1,2,...] an active -# job is killed. If LM_NL_JOBMAXT has no value, no time limit is -# enforced. -#---------------- -setenv LM_NL_JOBMAXT 24 -#===================================================================== - - - - - -# C. User defined variables -#-------------------------- -# You can define your own variables below. -# Variables are defined following the pattern: -# setenv -# must be capitalized and must begin with the string -# "LM_NL_". must be unique among all variables used -# in namelist files. -#===================================================================== -# GME grid -#--------- -setenv LM_NL_RESGME 128 -setenv LM_NL_KEGME 31 - -# IFS grid -#--------- -setenv LM_NL_POLPHIIFS 43.0 -setenv LM_NL_POLLAMIFS -170.0 -setenv LM_NL_IEIFS 264 -setenv LM_NL_JEIFS 223 -setenv LM_NL_KEIFS 137 -setenv LM_NL_DLAMIFS 0.1 -setenv LM_NL_DPHIIFS 0.1 -setenv LM_NL_PHILUIFS -10.7 -setenv LM_NL_LAMLUIFS -18.3 - -# LM coarse grid -#--------------- -setenv LM_NL_POLLATLM_C 43.0 -setenv LM_NL_POLLONLM_C -170.0 -setenv LM_NL_EXT_IE_C 601 -setenv LM_NL_EXT_JE_C 601 -setenv LM_NL_IELM_C 393 -setenv LM_NL_JELM_C 338 -setenv LM_NL_KELM_C 60 -setenv LM_NL_DLONLM_C 0.06 -setenv LM_NL_DLATLM_C 0.06 -setenv LM_NL_STARTLAT_TOT_C -9.78 -setenv LM_NL_STARTLON_TOT_C -16.32 - -# For levels ke, ke-1, ke-2 -#-------------------------- -@ tmp_value = $LM_NL_KELM_C - 1 ; setenv LM_NL_KEM1_C $tmp_value -@ tmp_value = $LM_NL_KELM_C - 2 ; setenv LM_NL_KEM2_C $tmp_value - -# For level ke+1 -#--------------- -@ tmp_value = $LM_NL_KELM_C + 1 ; setenv LM_NL_KEP1_C $tmp_value - -# LM fine grid -#--------------- -setenv LM_NL_POLLATLM_F 43.0 -setenv LM_NL_POLLONLM_F -170.0 -setenv LM_NL_EXT_IE_F 701 -setenv LM_NL_EXT_JE_F 701 -setenv LM_NL_IELM_F 520 -setenv LM_NL_JELM_F 350 -setenv LM_NL_KELM_F 60 -setenv LM_NL_DLONLM_F 0.02 -setenv LM_NL_DLATLM_F 0.02 -setenv LM_NL_STARTLAT_TOT_F -4.0 -setenv LM_NL_STARTLON_TOT_F -5.7 - -# For levels ke, ke-1, ke-2 -#-------------------------- -@ tmp_value = $LM_NL_KELM_F - 1 ; setenv LM_NL_KEM1_F $tmp_value -@ tmp_value = $LM_NL_KELM_F - 2 ; setenv LM_NL_KEM2_F $tmp_value - -# For level ke+1 -#--------------- -@ tmp_value = $LM_NL_KELM_F + 1 ; setenv LM_NL_KEP1_F $tmp_value - -#===================================================================== diff --git a/cases/cosmo-7/config.py b/cases/cosmo-7/config.py deleted file mode 100644 index 0b49f12e..00000000 --- a/cases/cosmo-7/config.py +++ /dev/null @@ -1,119 +0,0 @@ -import os -import types -import sys - -year = sys.argv[2][0:4] - -user = os.environ['USER'] - -# Everything defined before is not written to os.environ -# and thus not available to bash scripts. -not_config = list(locals().keys()) - -print(sys.argv) - -model = 'cosmo' -restart_step = 24 -variant = 'spinup' -spinup = 0 - -compute_host = 'daint' -compute_queue = 'normal' #'debug' #'normal' - -compute_account = 'em05' #'sd02' #'sd02' -constraint = 'mc' - -if constraint == 'gpu': - ntasks_per_node = 12 - mpich_cuda = ('export MPICH_RDMA_ENABLED_CUDA=1\n' - 'export MPICH_G2G_PIPELINE=256\n' - 'export CRAY_CUDA_MPS=1\n') -elif constraint == 'mc': - ntasks_per_node = 36 - mpich_cuda = '' - -# case name = pathname in cases/ -path = os.path.realpath(__file__) -casename = os.path.basename(os.path.dirname(path)) - -# meteo -#meteo_dir = '/store/mch/msopr/owm/IFS-HRES-BC/IFS-HRES-BC20' # before 2020-10-28 -#meteo_dir = '/store/empa/em05/COSMO7_BC/' # until 2020-11-11 12 -#meteo_dir = '/store/s83/osm/IFS-HRES-BC-EMPA/IFS-HRES-BC-EMPA20' # after 2020-11-11 12 -meteo_dir = '/store/s83/osm/IFS-HRES-BC-EMPA/IFS-HRES-BC-EMPA21' -meteo_dir_alt = '/store/mch/msopr/owm/IFS-HRES-BC/IFS-HRES-BC20' -meteo_prefix = "efsf" -meteo_inc = 1 - -# output -output_root = '/store/empa/em05/cosmo-7/output' - -# working root -work_root = os.environ['SCRATCH'] + "/processing_chain" -log_dir = os.path.join(work_root, 'logs') - -# chain root -chain_src_dir = os.getcwd() -tools_dir = os.path.join(chain_src_dir, 'jobs/tools') - -# INT2LM -int2lm_extpar_dir = '/store/empa/em05/cosmo-7/extpar' -int2lm_extpar_file = 'lmExtPara_601x601_0.06_20090226' -int2lm_bin = '/store/empa/em05/executables/int2lm_gnu_208d68e_20201005' - -# COSMO -cosmo_bin = '/store/empa/em05/executables/cosmo-pompa_cosmo7_container_gnu_4d8c5473_20210207' - -# FIELDEXTRA -laf_startfile = '/store/mch/msopr/owm/COSMO-7/ANA20/laf2020102212' -fieldextra_bin = '/store/empa/em05/executables/fieldextra_gnu_opt_omp_2dced5a5_20210107' -fieldextra_control_file = '%s/cases/%s/merge.ctl' % (chain_src_dir, casename) -do_merge_at_start = True - -# Case specific settings (int2lm and cosmo namelists and runscripts) -int2lm_namelist = '%s/cases/%s/int2lm_INPUT.cfg' % (chain_src_dir, casename) -int2lm_runjob = '%s/cases/%s/int2lm_runjob.cfg' % (chain_src_dir, casename) -cosmo_namelist = '%s/cases/%s/cosmo_INPUT_' % (chain_src_dir, casename) -cosmo_runjob = '%s/cases/%s/cosmo_runjob.cfg' % (chain_src_dir, casename) - -# Observation Nudging -obs_nudging_dir = '/store/empa/em05/obs_nudging_cosmo' -obs_nudging_prefixes = [ - 'cdfin_amdar', 'cdfin_buoy', 'cdfin_ship', 'cdfin_synop', 'cdfin_temp', - 'cdfin_wprof' -] -#obs_nudging_date_format = "-%Y%m%d%H%M%S" -obs_nudging_date_format = "-%Y%m%d000000" - -# Walltimes and domain decomposition - -## INT2LM -if compute_queue == "normal": - int2lm_walltime = "00:30:00" -elif compute_queue == "debug": - int2lm_walltime = "00:30:00" -else: - logging.error("Unset queue name: %s" % compute_queue) - sys.exit(1) - -int2lm_nodes = 2 -int2lm_np_x = 6 -int2lm_np_y = 4 -int2lm_np_tot = int2lm_np_x * int2lm_np_y - -## COSMO -if compute_queue == "normal": - cosmo_walltime = "16:00:00" - cosmo_np_x = 9 - cosmo_np_y = 8 -elif compute_queue == "debug": - cosmo_walltime = "00:30:00" - cosmo_np_x = 2 - cosmo_np_y = 2 -else: - logging.error("Unknown queue name: %s" % compute_queue) - sys.exit(1) - -# Total node count -cosmo_np_io = 0 -cosmo_np_tot = int(cosmo_np_x * cosmo_np_y / ntasks_per_node) + cosmo_np_io diff --git a/cases/cosmo-7/cosmo_INPUT_ASS.cfg b/cases/cosmo-7/cosmo_INPUT_ASS.cfg deleted file mode 100644 index b24c00ba..00000000 --- a/cases/cosmo-7/cosmo_INPUT_ASS.cfg +++ /dev/null @@ -1,46 +0,0 @@ - &NUDGING - lnudge=.true., lverif=.true., mruntyp=2, lverpas=.true., - itype_obfile = 2, ycdfdir= '{cfg.cosmo_input}/obs_nudging', - hnudgsta= {cfg.hstart}, hnudgend = {cfg.hstop}, tconbox = 240.0, - hversta = 0.001, hverend = {cfg.hstop}, khumbal = 100, - ntpscor = 1, ptpstop=400.0, luvgcor=.TRUE., - ltipol =.TRUE., tipolmx = 3.0, wtukrsa = 3.0, wtukrse = 1.0, - ltipsu =.TRUE., tipmxsu = 1.0, wtuksua = 1.5, wtuksue = 0.5, - wtukara = 1.5, wtukare = 0.5, - msprpar = 1, msprpsu = 0, - gnudg = .0006, .0006, .0006, .0006, - gnudgsu = .0006, .0006, .0000, .0006, - gnudgar = .0006, .0000, .0006, .0000, - vcorls = .333 , .333 , .04 , .04 , vcutof = 0.75, 0.75, 1.0 , 1.0 , - vcorlsu = .013 , .013 , .002 , .00001, vcutosu = 0.75, 0.75, 4.0 , 0.001 , - vcsnisu = 2500., 2500., 9. , 9. , - rhvfac = 1.0 , 0.0 , 0.83, 0.83, - rhinfl = 0., 70., 0., 0., rhtfac = 1.3 , 1.43 , 1.3 , 1.3 , - rhiflsu = 70., 70., 100., 70., rhtfsu = 1.0 , 1.43 , 1.0 , 1.0 , - fnondiv = 0.8 , cnondiv = 0.1 , cutofr = 3.5 , 3.5 , 3.5 , 3.5 , - tnondiv = 1.1 , cutofsu = 2.0 , 3.5 , 2.0 , 2.0 , - topobs = 849., 1099., 799., 699., - botmod = 1099., 1099., 1099., 899., - lscadj =.TRUE.,.TRUE.,.TRUE.,.FALSE., - dtqc = 720., qcvf = 5.0 , 1.0 ,10.0 , 0.0 , - qcc = 0., 500., 0., .7, - qccsu = 12., 500., 12., .7, - lsynop =.true., - laircf =.true., - ldribu =.true., - ltemp =.true., - lpilot =.true., - lcd137 =.false., - lcd132 =.true., - maxmlo = 600, maxsgo = 10000, maxuso = 5000, nolbc = 5, - altopsu = 100., 5000., 5000., 5000., thairh = 20., - exnlat = 90., exslat =-90., exwlon = -180., exelon = 180., - lsurfa =.false., - lt2m =.true., ht2a = 0., ht2i = 1., - lrh2m =.true., hh2a = 0., hh2i = 1., - lprecp =.true., hprc = 0., raintp = 12., - lpraof =.false., lprodr =.true. , ldiasa =.false., noctrq = 9, - dinlat = 50., dislat = 44., diwlon = 4., dielon = 12., - ionl = 235, jonl = 151, ionl2 = 221, jonl2 = 131, - mqcorr92=2 - /END diff --git a/cases/cosmo-7/cosmo_INPUT_DIA.cfg b/cases/cosmo-7/cosmo_INPUT_DIA.cfg deleted file mode 100644 index 7a675ef1..00000000 --- a/cases/cosmo-7/cosmo_INPUT_DIA.cfg +++ /dev/null @@ -1,7 +0,0 @@ - &DIACTL - n0meanval=0, nincmeanval=1, - itype_diag_t2m=1, - itype_diag_gusts=2, - lgplong =.TRUE., n0gp=0, hincgp=1., - stationlist_tot= 0, 0, 46.817, 6.935, 'Payerne' - /END diff --git a/cases/cosmo-7/cosmo_INPUT_DYN.cfg b/cases/cosmo-7/cosmo_INPUT_DYN.cfg deleted file mode 100644 index 34117564..00000000 --- a/cases/cosmo-7/cosmo_INPUT_DYN.cfg +++ /dev/null @@ -1,38 +0,0 @@ - &DYNCTL - ldivdamp_old=.false. - lcpp_dycore=.false. - lspubc=.true., - rdheight=11000.0, - nrdtau=10, - lexpl_lbc=.true., - rlwidth=85000.0, - ldyn_bbc=.false., - itype_bbc_w=114, - xkd=0.1, - lcond=.true., - l_diff_smag=.true., - lhordiff=.true., - itype_hdiff=2, - hd_corr_u_bd=0.75, - hd_corr_t_bd=0.75, - hd_corr_trcr_bd=0.0, - hd_corr_p_bd=0.75, - hd_corr_u_in=0.25, - hd_corr_t_in=0.0, - hd_corr_trcr_in=0.0, - hd_corr_p_in=0.0, - hd_dhmax=250., - l2tls=.true., - irunge_kutta=1, - irk_order=3, - iadv_order=5, - itheta_adv=0, - ltadv_limiter=.false., - y_scalar_advect='Bott2_Strang', - y_vert_adv_dyn='impl2', - ldiabf_lh=.true., - itype_outflow_qrsg=2, - itype_lbc_qrsg=1, - itype_fast_waves=2, - divdamp_slope=1.0 - /END diff --git a/cases/cosmo-7/cosmo_INPUT_INI.cfg b/cases/cosmo-7/cosmo_INPUT_INI.cfg deleted file mode 100644 index dbb5eb40..00000000 --- a/cases/cosmo-7/cosmo_INPUT_INI.cfg +++ /dev/null @@ -1,5 +0,0 @@ - &INICTL - ndfi=2, - tspan= 1840.0, taus= 1840.0, - dtbak=40.0, dtfwd=40.0, - /END diff --git a/cases/cosmo-7/cosmo_INPUT_IO.cfg b/cases/cosmo-7/cosmo_INPUT_IO.cfg deleted file mode 100644 index c736a385..00000000 --- a/cases/cosmo-7/cosmo_INPUT_IO.cfg +++ /dev/null @@ -1,77 +0,0 @@ - &IOCTL - ldwd_grib_use=.FALSE., - l_ke_in_gds=.TRUE., - lasync_io=.FALSE., - itype_gather=2, - ymode_read='r ', - ymode_write='w ', - nincwait=90, - nmaxwait=300, - nvers=955, - ncenter=215, - llockfiles=.true. - nhour_restart = {restart_start:.0f} ,{restart_stop:.0f}, {restart_step:.0f}, ! start, stop and increment in full forecast hours - - ydir_restart_in = '{cfg.cosmo_restart_in}', - ydir_restart_out = '{cfg.cosmo_restart_out}', - ytunit_restart = 'f', - /END - &GRIBIN - lbdana=.FALSE., - ydirini='../../cosmo/input/initial/', - lchkini=.TRUE., - hincbound=1.0, - ydirbd='../../int2lm/output/', - lchkbd =.TRUE., - lana_qi = .TRUE., - llb_qi = .TRUE., - lana_qg = .FALSE., - llb_qg = .FALSE., - lana_qr_qs = .TRUE., - llb_qr_qs = .TRUE., - lana_rho_snow = .TRUE., - lan_w_so = .TRUE., - lan_lai = .TRUE., lan_rootdp = .TRUE., lan_vio3 = .TRUE., lan_plcov = .TRUE., - lan_t_cl = .TRUE., lan_w_cl = .TRUE., lan_hmo3 = .TRUE., lan_t_so0 = .TRUE., - lan_t_snow = .TRUE., lan_w_snow = .TRUE., lan_w_i = .TRUE., lan_rho_snow = .TRUE., - newbc=0, - hnewbcdt=3.0, - /END - &GRIBOUT - lanalysis=.TRUE., - hcomb = 0, {cfg.hstop}, 1 - yvarml='HSURF ','FR_LAND ','SOILTYP ','PLCOV ','LAI ','ROOTDP ', - 'VIO3 ','HMO3 ','PP ','FOR_D ','FOR_E ', - 'U ','V ','W ','T ','QV ','QC ', - 'P ','PS ','T_SNOW ','FRESHSNW','W_SNOW ', - 'W_SO ','T_SO ','QV_S ','W_I ','RAIN_GSP','SNOW_GSP', - 'RAIN_CON','SNOW_CON','U_10M ','V_10M ','T_2M ','TD_2M ', - 'TMIN_2M ','TMAX_2M ','VMAX_10M','TCM ','TCH ','T_G ', - 'CLCT ','CLCH ','CLCM ','CLCL ','ALB_RAD ','ASOB_S ', - 'ATHB_S ','ASOB_T ','ATHB_T ','APAB_S ','TOT_PREC','Z0 ', - 'AUMFL_S ','AVMFL_S ','ASHFL_S ','ALHFL_S ','BAS_CON ','TOP_CON ', - 'HTOP_DC ','RUNOFF_S','RUNOFF_G','PMSL ','HBAS_CON','HTOP_CON', - 'QI ','QR ','QS ','TWATER ','TDIV_HUM', - 'CLCT_MOD','CLC ','HZEROCL ','DPSDT ','SNOWLMT ','DBZ_CMAX', - 'DBZ_850 ','RHO_SNOW','DURSUN ','DURSUN_M', - 'QCVG_CON','MFLX_CON','CAPE_CON','ZTD ','ZHD ','ZWD ', - 'TQC ','TQI ','TQV ','TKE ','HPBL ','EDR ', - 'SKYVIEW ','SLO_ANG ','SLO_ASP ','HORIZON ','VGUST_DYN_10M','VGUST_CON_10M', - 'CEILING ','ASWDIR_S ','ASWDIFD_S ','ASWDIFU_S ','ATHD_S ', - 'SSO_STDH ','SSO_GAMMA','SSO_THETA ','SSO_SIGMA', - 'AUSTR_SSO','AVSTR_SSO','AVDIS_SSO', - 'AMBR','AMBRfe','AMBRfr','AMBRhcem','AMBRresn','AMBRreso','AMBRress', - 'AMBRrprec','AMBRsdes' - zlev=750.,1000.,2000.,3000.,4000.,5000.,8500.,10500., - plev=100.,150.,200.,250.,300.,350.,400.,450.,500.,550.,600.,650., - 700.,750.,800.,850.,900.,925.,950.,1000., - yvarpl= 'T ', 'RELHUM ', 'U ', 'V ', - 'FI ', 'OMEGA ', 'QC ', 'QV ' - yvarzl= 'T ', 'RELHUM ', 'U ', 'V ', - 'P ', 'W ', 'QC ', - yvarsl= '', - lcheck = .TRUE., - ydir='../output/', - l_z_filter=.FALSE., l_p_filter=.FALSE., luvmasspoint=.false., - l_fi_pmsl_smooth=.FALSE., l_pmsl_filter=.FALSE., l_fi_filter=.FALSE., - /END diff --git a/cases/cosmo-7/cosmo_INPUT_ORG.cfg b/cases/cosmo-7/cosmo_INPUT_ORG.cfg deleted file mode 100644 index 03bee1f3..00000000 --- a/cases/cosmo-7/cosmo_INPUT_ORG.cfg +++ /dev/null @@ -1,52 +0,0 @@ - &LMGRID - startlat_tot= -9.78, - startlon_tot= -16.32, - pollat=43.0, - pollon=-170.0, - dlon=0.06, - dlat=0.06, - ie_tot= 393, - je_tot= 338, -ke_tot=60, - /END - &RUNCTL - dt= 60.0, - hstart = {cfg.hstart}, - hstop = {cfg.hstop}, - ydate_ini = '{cfg.inidate_yyyymmddhh}', - hincmxt=1.0, - itype_timing=4, - lreproduce=.TRUE., - luseobs =.TRUE., - lphys =.TRUE., - ldiagnos=.FALSE., - luse_rttov=.FALSE., - ldfi=.FALSE., - nprocx = {cfg.cosmo_np_x}, - nprocy = {cfg.cosmo_np_y}, - nprocio=0, - nboundlines=3, - ldump_ascii = .FALSE., - l_pollen = .FALSE. - /END - &TUNING - tkhmin=0.4, - tkmmin=0.4, - rlam_mom=0.0, - rlam_heat=1.0, - rat_sea=20.0, - rat_lam=1.0, - rat_can=1.0, - wichfakt=0.0, - c_lnd=2.0, - c_sea=1.5, - c_soil=1.0, - pat_len=500.0, - z0m_dia=0.2, - crsmin=150.0, - clc_diag=0.5, - qc0=0.0 - mu_rain=0.0, - rain_n0_factor=1.0, - v0snow=25.0, - /END diff --git a/cases/cosmo-7/cosmo_INPUT_PHY.cfg b/cases/cosmo-7/cosmo_INPUT_PHY.cfg deleted file mode 100644 index f135cdb4..00000000 --- a/cases/cosmo-7/cosmo_INPUT_PHY.cfg +++ /dev/null @@ -1,41 +0,0 @@ - &PHYCTL - lseaice=.false., - llake=.false., - lgsp=.true., - itype_gscp=3, - ldiniprec=.FALSE., - lrad=.true., - hincrad = 1.0, - lradtopo=.TRUE., - lforest=.TRUE., - ltur=.true., - ninctura=1, - lexpcor=.false., - ltmpcor=.false., - lprfcor=.false., - lnonloc=.false., - lcpfluc=.false., - itype_turb=3, - imode_turb=1, - itype_tran=2, - imode_tran=1, - limpltkediff=.true., - itype_wcld=2, - icldm_rad=4, - icldm_turb=2, - icldm_tran=0, - itype_synd=2, - lsoil=.TRUE., - lmelt=.TRUE., - lmelt_var=.TRUE., - lmulti_layer=.TRUE., - itype_evsl=2, - itype_trvg=2, - lconv=.true., - itype_conv=0, - nincconv=5, - lcape=.false., - lconf_avg=.true., - lsso=.TRUE., - ltkesso=.TRUE., - /END diff --git a/cases/cosmo-7/cosmo_INPUT_SAT.cfg b/cases/cosmo-7/cosmo_INPUT_SAT.cfg deleted file mode 100644 index cb92f673..00000000 --- a/cases/cosmo-7/cosmo_INPUT_SAT.cfg +++ /dev/null @@ -1,6 +0,0 @@ - &SATCTL - num_sensors=1, - sat_input_01='MSG' ,1,'SEVIRI',8, .TRUE., .TRUE.,.TRUE., .TRUE., - nchan_input_01=1,2,3,4,5,6,7,8 - lcon_clw=.TRUE., - /END diff --git a/cases/cosmo-7/cosmo_runjob.cfg b/cases/cosmo-7/cosmo_runjob.cfg deleted file mode 100644 index 9bff7541..00000000 --- a/cases/cosmo-7/cosmo_runjob.cfg +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash -l -#SBATCH --job-name="cosmo_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" -#SBATCH --account={cfg.compute_account} -#SBATCH --time={cfg.cosmo_walltime} -#SBATCH --nodes={cfg.cosmo_np_tot} -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --hint=nomultithread -#SBATCH --output={logfile} -#SBATCH --open-mode=append -#SBATCH --chdir={cfg.cosmo_work} - -export MALLOC_MMAP_MAX_=0 -export MALLOC_TRIM_THRESHOLD_=536870912 -export OMP_NUM_THREADS=1 - -{cfg.mpich_cuda} - -# Set this to avoid segmentation faults -ulimit -s unlimited -ulimit -a - -# clean up -rm -f YU* -rm -f M_* -rm -f core.* - -echo "=====================================================" -echo "============== JOB OUTPUT BEGINS ====================" -echo "============== StartTime: `date +%s` s" -echo "============== StartTime: `date`" -echo "=====================================================" - -srun -u ./cosmo >> {logfile} 2>&1 -pid=$? - -echo "=====================================================" -echo "============== JOB OUTPUT ENDS ====================" -echo "============== EndTime: `date +%s` s" -echo "============== EndTime: `date` s" -echo "=====================================================" - -[[ $pid == 0 ]] || {{ echo "Executing COSMO failed" >> {logfile}; exit 1; }} - -# check whether COSMO was successful by calculating name of the last -# output file that should have been created -parentdir={cfg.chain_root} -timestr="$(basename ${{parentdir}})" -IFS='_' read -r -a array <<< "${{timestr}}" -yyyymmddhh="${{array[0]}}" -yyyymmdd=$(echo $yyyymmddhh | cut -c1-8) -hh=$(echo $yyyymmddhh | cut -c9-10) -hoursSim="${{array[2]}}" -startdate=$(date -d "${{yyyymmdd}} ${{hh}}") -lastHour=$(date -d "$startdate +${{hoursSim}} hours" +"%Y%m%d%H") -lastHourFile={cfg.cosmo_output}/laf${{lastHour}} - -if [[ ! -f ${{lastHourFile}} ]] -then - echo "COSMO failed" >> {logfile} - exit 1 -fi - -# copy log file -echo "Copying logfile" -cp {logfile} {logfile_finish} diff --git a/cases/cosmo-7/ifs2lm.dat b/cases/cosmo-7/ifs2lm.dat deleted file mode 100644 index b6d0ba48..00000000 --- a/cases/cosmo-7/ifs2lm.dat +++ /dev/null @@ -1,144 +0,0 @@ -############################################################################### -# -# File: ifs2lm -# Category: LM package - namelist file for task "integ" -# -# Host: SUN -# Location: $LM_NDIR/ (e.g.: = integ) -# Permission: 440 -# Associated files: $LM_SDIR/lm_ifs2lm -# -# -# Description: environment and NAMELIST for the program int2lm witch -# ec2lm = .TRUE. -# This file is read by the script lm_ifs2lm which -# interpolates IFS analysis and forecast fields. -# Any lines beginning with # are ignored. 'Predefined variables' -# (as defined below) can be used. -# -# -# Predefined variables: -# 1) $LM_YY year of the experiment (last 2 digits) -# $LM_YYYY year of the experiment (4 digits) -# $LM_MM month of the experiment -# $LM_DD day of the experiment -# $LM_ZZ time of the experiment -# $LM_DATE shortcut for $LM_YY$LM_MM$LM_DD$LM_ZZ -# $LM_YYm12 year of the experiment minus 12 hours -# $LM_MMm12 month of the experiment minus 12 hours -# $LM_DDm12 day of the experiment minus 12 hours -# $LM_ZZm12 time of the experiment minus 12 hours -# $LM_DATEm12 shortcut for $LM_YY$LM_MM$LM_DD$LM_ZZ minus 12 hours -# $LM_YYp12 year of the experiment plus 12 hours -# $LM_MMp12 month of the experiment plus 12 hours -# $LM_DDp12 day of the experiment plus 12 hours -# $LM_ZZp12 time of the experiment plus 12 hours -# $LM_DATEp12 shortcut for $LM_YY$LM_MM$LM_DD$LM_ZZ plus 12 hours -# $LM_TAG shortcut for ${LM_DATE}_${LM_NL_TEXPN} -# $LM_WDIR input and ouput files are collected in $LM_WDIR/$LM_TAG -# $LM_LDIR boden data are in this directory -# 2) All variables defined in file 'GLOBAL' in the same directory: -# $LM_NL_YEMEXPN -# $LM_NL_HENDE -# .... -# -############################################################################### - -cat >! $workingDir/INPUT << EONL - &CONTRL - lmixcld=.true., - yinput_model = 'IFS' - hstart=0.0, - hstop=$LM_NL_HENDE_C.0, - hincbound=${LM_NL_INPUT_INCR_C}.0, - linitial=.TRUE., - lboundaries=.TRUE., - ltime_mean=.TRUE., - ltime_proc=.TRUE., - luvcor=.TRUE., - idbg_level=5, - luse_t_skin=.TRUE., - nprocx=$NQS_NXIFS2LM, nprocy=$NQS_NYIFS2LM, nprocio=$NQS_NIOIFS2LM, - lfilter_pp=.true., - llbc_smooth=.true., - lfilter_oro=.true., - ilow_pass_oro=4, - numfilt_oro=1, - ilow_pass_xso=5, - lxso_first=.FALSE., - numfilt_xso=1, - rxso_mask=750.0, - eps_filter=0.1, - norder_filter=5, - l_topo_z=.false., - rfill_valley=0.0, - ifill_valley=7, - lasync_io=.TRUE., - lprog_qi=.TRUE., - lprog_qr_qs=.TRUE., - nincwait=30, - nmaxwait=300, - lmulti_layer_lm=.TRUE., - itype_w_so_rel=1, - lpost_0006=.TRUE., - lforest=.TRUE. - ydate_ini='${LM_YYYY}${LM_MM}${LM_DD}${LM_ZZ}', - / - &GRID_IN - pcontrol_fi = 30000., - ie_in_tot = $LM_NL_IEIFS, je_in_tot = $LM_NL_JEIFS, ke_in_tot = $LM_NL_KEIFS, - startlat_in_tot = $LM_NL_PHILUIFS, startlon_in_tot = $LM_NL_LAMLUIFS, - pollat_in = $LM_NL_POLPHIIFS, pollon_in = $LM_NL_POLLAMIFS, - dlat_in = $LM_NL_DPHIIFS, dlon_in = $LM_NL_DLAMIFS, - / - &LMGRID - ielm_tot=$LM_NL_IELM_C, jelm_tot=$LM_NL_JELM_C, kelm_tot=$LM_NL_KELM_C, - ivctype=2, vcflat = 11357.0, irefatm=1, - vcoord_d=22000.00, 20905.22, 19848.88, 18830.22, 17848.51, - 16903.01, 15992.98, 15117.70, 14276.42, 13468.41, - 12692.96, 11949.32, 11236.77, 10554.60, 9902.08, - 9278.48, 8683.10, 8115.21, 7574.10, 7059.07, - 6569.40, 6104.39, 5663.33, 5245.53, 4850.27, - 4476.87, 4124.63, 3792.85, 3480.86, 3187.96, - 2913.47, 2656.71, 2417.00, 2193.66, 1986.04, - 1793.45, 1615.23, 1450.72, 1299.27, 1160.22, - 1032.92, 916.73, 811.00, 715.10, 628.39, - 550.25, 480.05, 417.19, 361.04, 311.01, - 266.50, 226.91, 191.67, 160.20, 131.95, - 106.35, 82.86, 60.98, 40.18, 20.00, - 0.00, - pollat =$LM_NL_POLLATLM_C , pollon =$LM_NL_POLLONLM_C , - dlon=$LM_NL_DLONLM_C , dlat=$LM_NL_DLATLM_C, - startlat_tot = $LM_NL_STARTLAT_TOT_C, - startlon_tot = $LM_NL_STARTLON_TOT_C, - lanalyt_calc_t0p0=.TRUE. - / - &DATABASE - / - &DATA - yinput_type = 'forecast', - l_ke_in_gds = .TRUE., - ie_ext = $LM_NL_EXT_IE_C, - je_ext = $LM_NL_EXT_JE_C, - ylmext_lfn = 'lmExtPara_601x601_0.06_20090226', - ylmext_cat = '$LM_LDIR/', - ylmext_form_read = 'grb1', - yinext_lfn = 'eas${LM_INI}', - yinext_cat = '$NQS_WDIR/$LM_TAG/$LM_INT2LM_IN/', - yinext_form_read = 'apix', - yin_cat = '$NQS_WDIR/$LM_TAG/$LM_INT2LM_IN/', - yin_form_read = 'apix', - ylm_cat = '$NQS_WDIR/$LM_TAG/$LM_INT2LM_OUT/', - ylm_form_write = 'grb1', - ncenter = 215, - nprocess_ini = 131, - nprocess_bd = 132, - ymode_write = 'w ', - / - &PRICTR - igp_tot = 36, 40, 48, 44, 48, 85, 77, - jgp_tot = 30, 94, 38, 26, 26, 96, 12, - lchkin=.TRUE., lchkout=.TRUE.,lprgp=.FALSE., - / - -EONL diff --git a/cases/cosmo-7/int2lm_INPUT.cfg b/cases/cosmo-7/int2lm_INPUT.cfg deleted file mode 100644 index 4754f6ac..00000000 --- a/cases/cosmo-7/int2lm_INPUT.cfg +++ /dev/null @@ -1,114 +0,0 @@ -&CONTRL - ydate_ini = '{cfg.inidate_int2lm_yyyymmddhh}', ! start of the forecast - hstart = {cfg.hstart_int2lm}, ! first hour to be processed - hstop = {cfg.hstop_int2lm}, ! last hour to be processed - nprocx = {cfg.int2lm_np_x}, ! number of processors in east-west direction - nprocy = {cfg.int2lm_np_y}, ! number of processors in north-south direction - lmixcld=.true., - yinput_model = 'IFS' - hincbound=1.0, - linitial=.TRUE., - lboundaries=.TRUE., - ltime_mean=.TRUE., - ltime_proc=.TRUE., - luvcor=.TRUE., - idbg_level=5, - luse_t_skin=.TRUE., - lfilter_pp=.true., - llbc_smooth=.true., - lfilter_oro=.true., - ilow_pass_oro=4, - numfilt_oro=1, - ilow_pass_xso=5, - lxso_first=.FALSE., - numfilt_xso=1, - rxso_mask=750.0, - eps_filter=0.1, - norder_filter=5, - l_topo_z=.false., - rfill_valley=0.0, - ifill_valley=7, - lasync_io=.TRUE., - lprog_qi=.TRUE., - lprog_qr_qs=.TRUE., - nincwait=30, - nmaxwait=300, - lmulti_layer_lm=.TRUE., - itype_w_so_rel=1, - lpost_0006=.TRUE., - lforest=.TRUE. -/ - -&GRID_IN - pcontrol_fi = 30000., - ie_in_tot = 264, - je_in_tot = 223, - ke_in_tot = 137, - startlat_in_tot = -10.7, - startlon_in_tot = -18.3, - pollat_in = 43, - pollon_in = -170, - dlat_in = 0.1, - dlon_in = 0.1, -/ - -&LMGRID - ielm_tot = 393, - jelm_tot = 338 - kelm_tot = 60, - ivctype = 2, - vcflat = 11357.0, - irefatm = 1, - vcoord_d = 22000.00, 20905.22, 19848.88, 18830.22, 17848.51, - 16903.01, 15992.98, 15117.70, 14276.42, 13468.41, - 12692.96, 11949.32, 11236.77, 10554.60, 9902.08, - 9278.48, 8683.10, 8115.21, 7574.10, 7059.07, - 6569.40, 6104.39, 5663.33, 5245.53, 4850.27, - 4476.87, 4124.63, 3792.85, 3480.86, 3187.96, - 2913.47, 2656.71, 2417.00, 2193.66, 1986.04, - 1793.45, 1615.23, 1450.72, 1299.27, 1160.22, - 1032.92, 916.73, 811.00, 715.10, 628.39, - 550.25, 480.05, 417.19, 361.04, 311.01, - 266.50, 226.91, 191.67, 160.20, 131.95, - 106.35, 82.86, 60.98, 40.18, 20.00, - 0.00, - pollat = 43.0, - pollon = -170.0, - dlat = 0.06, - dlon = 0.06, - startlat_tot = -9.78 - startlon_tot = -16.32 - lanalyt_calc_t0p0=.TRUE. -/ - -&DATABASE -/ - -&DATA - yinput_type = 'forecast', - l_ke_in_gds = .TRUE., - ie_ext = 601, - je_ext = 601, - ylmext_lfn = '{cfg.int2lm_extpar_file}', - ylmext_cat = '../input/extpar/', - ylmext_form_read = 'grb1', - yinext_lfn = 'efsf00000000', - yinext_cat = '../input/meteo/', - yinext_form_read = 'apix', - yin_cat = '../input/meteo/', - yin_form_read = 'apix', - ylm_cat = '../output/', - ylm_form_write = 'grb1', - ncenter = 215, - nprocess_ini = 131, - nprocess_bd = 132, - ymode_write = 'w ', -/ - -&PRICTR - igp_tot = 36, 40, 48, 44, 48, 85, 77, - jgp_tot = 30, 94, 38, 26, 26, 96, 12, - lchkin = .TRUE., - lchkout = .TRUE., - lprgp = .FALSE., -/ diff --git a/cases/cosmo-7/int2lm_runjob.cfg b/cases/cosmo-7/int2lm_runjob.cfg deleted file mode 100644 index d496ef70..00000000 --- a/cases/cosmo-7/int2lm_runjob.cfg +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash -l -#SBATCH --job-name=int2lm_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime} -#SBATCH --account={cfg.compute_account} -#SBATCH --time={cfg.int2lm_walltime} -#SBATCH --nodes={cfg.int2lm_nodes} -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --hint=nomultithread -#SBATCH --output={logfile} -#SBATCH --open-mode=append -#SBATCH --chdir={cfg.int2lm_work} - -# Export env variables -export OMP_NUM_THREADS=1 -export CRAY_CUDA_MPS=1 - -export MALLOC_MMAP_MAX_=0 -export MALLOC_TRIM_THRESHOLD_=536870912 - -# Set this to avoid segmentation faults -ulimit -s unlimited -ulimit -a - -# Load modules for post-processing -module load daint-{cfg.constraint} -module load NCO -module list - -unset G2G -export MV2_USE_CUDA=0 -export MV2_USE_GPUDIRECT=0 - -rm -f YU* - -echo "=====================================================" -echo "============== JOB OUTPUT BEGINS ====================" -echo "============== StartTime: `date +%s` s" -echo "============== StartTime: `date`" -echo "=====================================================" - -srun -u -n {cfg.int2lm_np_tot} ./int2lm >> {logfile} 2>&1 -pid=$? - -echo "=====================================================" -echo "============== JOB OUTPUT ENDS ====================" -echo "============== EndTime: `date +%s` s" -echo "============== EndTime: `date` s" -echo "=====================================================" - -[[ $pid == 0 ]] || {{ echo \"Executing INT2LM MPI command failed\" >> job.out; exit 1; }} - -# check whether INT2LM was successful by checking for presence of last -# meteofile that should have been processed -firstsecs=$(date -u --date "{ini_day} {ini_hour}" +%s) - -let lastsecs="firstsecs+{cfg.hstop_int2lm}*3600" -lastyyyymmddhh=$(date -u --date "1970-01-01 UTC +${{lastsecs}} sec" +%Y%m%d%H) -#lastHourFile="lbfd${{lastyyyymmddhh}}.nc" -lastHourFile=lbff01000000 - - -echo last file processed is $lastHourFile >> {logfile} - -[[ ! -f ../output/${{lastHourFile}} ]] && {{ echo "INT2LM failed" >> {logfile}; exit 1; }} - -cp {logfile} {logfile_finish} diff --git a/cases/cosmo-7/merge.ctl b/cases/cosmo-7/merge.ctl deleted file mode 100644 index 12e4bf0b..00000000 --- a/cases/cosmo-7/merge.ctl +++ /dev/null @@ -1,64 +0,0 @@ -&RunSpecification -strict_nl_parsing = .true. -verbosity = "moderate" -diagnostic_length = 110 -soft_memory_limit = 20.0 -strict_usage = .true. -/ - -&GlobalResource -dictionary = "/store/empa/em05/fieldextra/resources/dictionary_cosmo.txt" -grib_definition_path = "/store/empa/em05/fieldextra/resources/eccodes_definitions_cosmo", - "/store/empa/em05/fieldextra/resources/eccodes_definitions_vendor" -/ - -&GlobalSettings -default_model_name = "cosmo" -/ - -&ModelSpecification -earth_axis_large = 6371229. -earth_axis_small = 6371229. -model_name = "cosmo" -/ - -&Process - in_file = "{in_file}" - out_type = "INCORE" / -&Process in_field = "HSURF", tag="HSURF" / -&Process in_field = "FR_LAND", tag="fr_land" / -&Process in_field = "T_SO", levlist=0, tag="sst" / - - -# Here we define the fields that are merged from the interpolated IFS file -# this are external parameters and the SST -&Process - in_file = "{ifs_in_file}" - out_file = "{out_file}" - out_type = "GRIB1", in_regrid_target = "HSURF", in_size_field=1200 / -&Process in_field = "VIO3", levlist = -1, set_reference_date = {laf_output_refdate} / -&Process in_field = "HMO3", set_reference_date = {laf_output_refdate} / -&Process in_field = "PLCOV", set_reference_date = {laf_output_refdate} / -&Process in_field = "LAI", set_reference_date = {laf_output_refdate} / -&Process in_field = "ROOTDP", set_reference_date = {laf_output_refdate} / -&Process in_field = "FOR_D", set_reference_date = {laf_output_refdate} / -&Process in_field = "FOR_E", set_reference_date = {laf_output_refdate} / -# select IFS but use COSMO (sst) over land where fr_land > 0.5 or fr_lake > 0.5 -&Process in_field = "T_SO", levlist=0, merge_with="sst", merge_mask="fr_land>0.5", - set_auxiliary_metainfo="generatingProcessIdentifier=5", set_reference_date = {laf_output_refdate} / - -# Here we define the fields that are not taken from the COSMO file of the last cycle -&Process - in_file = "{in_file}" - out_file = "{out_file}" - out_type = "GRIB1", in_regrid_target = "HSURF", in_size_field=1200 - selection_mode = "EXCLUDE"/ -&Process in_field = "VIO3" / -&Process in_field = "HMO3" / -&Process in_field = "PLCOV" / -&Process in_field = "LAI" / -&Process in_field = "ROOTDP"/ -&Process in_field = "T_SO" , levlist = 0/ -&Process in_field = "FOR_D" / -&Process in_field = "FOR_E" / - diff --git a/cases/cosmo-art-mother-test/config.py b/cases/cosmo-art-mother-test/config.py deleted file mode 100644 index 0123e3ef..00000000 --- a/cases/cosmo-art-mother-test/config.py +++ /dev/null @@ -1,152 +0,0 @@ -import os -""" -Configuration file for the 'cosmo-art-mother-test' case with COSMO-ART -""" - -# GENERAL SETTINGS =========================================================== -user = os.environ['USER'] -if os.path.exists(os.environ['HOME'] + '/.acct'): - with open(os.environ['HOME'] + '/.acct', 'r') as file: - compute_account = file.read().rstrip() -else: - compute_account = os.popen("id -gn").read().splitlines()[0] -compute_host = 'daint' -compute_queue = 'normal' - -# Controls which flavor of cosmo is used to do the simulation. -model = 'cosmo-art' - -# case name = pathname in cases/ -path = os.path.realpath(__file__) -casename = os.path.basename(os.path.dirname(path)) - -# Root directory of the sourcecode of the chain (where run_chain.py is) -chain_src_dir = os.getcwd() -# Root directory of the input data (for convenience, not used outside this file) -input_root = '/store/empa/em05/input_cosmoart_processing_chain_example/' -# Root directory of the working space of the chain -work_root = os.path.join(chain_src_dir, 'work') - -# INPUT ====================================================================== # - -# METEO ---------------------------------------------------------------------- # -# meteo files (either path to input dir or name of mother run) -meteo_dir = os.path.join(input_root, 'meteo') -meteo_prefix = "eas" -meteo_nameformat = meteo_prefix + '%Y%m%d%H' -meteo_inc = 3 # increment between timesteps - -# EMISSIONS ------------------------------------------------------------------ # -# (possibly multiple) emissions-datasets -# for multiple datasets: emissions_dir & emis_gridname should be lists with -# corresponding path/prefix -emissions_dir = [ - os.path.join(input_root, 'emissions', 'emissions_mother_MACC_noSwiss'), - os.path.join(input_root, 'emissions', 'emissions_mother_ch') -] -emis_gridname = ["macc_", "swiss_mu_coarse_"] - -# PHOTO_RATE ----------------------------------------------------------------- # -photo_rate_file = os.path.join(input_root, 'art_photolysis', 'papa_data.d') - -# OBS_NUDGING ---------------------------------------------------------------- # -obs_nudging_dir = os.path.join(input_root, 'obs_nudging') -# nudging-filename: obs_nudging_prefix + -# sim_date.strftime(obs_nudging_date_format) + -# (sim_date + timedelta(days=1) -# .strftime(obs_nudging_date_format) -# Example: obs_nudging temp for simulation on 04.02.2015: -# cdfin_temp-20150204000000-20150205000000 -obs_nudging_prefixes = [ - 'cdfin_amdar', 'cdfin_buoy', 'cdfin_pilot_p', 'cdfin_ship', 'cdfin_synop', - 'cdfin_temp', 'cdfin_wprof' -] -obs_nudging_date_format = "-%Y%m%d%H%M%S" - -# ICBC ----------------------------------------------------------------------- # -# if the data is already preprocessed and just need to be copied, -# - mozart_file_orig is not used -# - mozart_dir_proc is where your data to be copied is -mozart_file_orig = os.path.join(input_root, 'icbc', - 'mozart4geos5_20150625-20150720_Europe.nc') -mozart_dir_proc = os.path.join(input_root, 'icbc', 'processed') -mozart_inc = 6 # increment between timesteps, change at your own risk -mozart_prefix = 'mozart' - -# SIMULATION ================================================================= # - -# INT2LM --------------------------------------------------------------------- # -# Extpar file -int2lm_extpar_dir = os.path.join(input_root, 'extpar') -int2lm_extpar_file = "external_parameter_empa_cosmo14.nc" -# landuse file -int2lm_lu_dir = os.path.join(input_root, 'extpar') -int2lm_lu_file = 'landuse_cosmo14.nc' -# plant functional types -int2lm_pft_dir = os.path.join(input_root, 'extpar') -int2lm_pft_file = 'pft_0.05_andrew.nc' -# Executable -int2lm_bin = os.path.join(input_root, "executables/int2lm") - -int2lm_libgrib_dir = os.path.join(input_root, 'libgrib_api') - -# Namelist and slurm runscript templates -int2lm_namelist = '%s/cases/%s/int2lm_INPUT.cfg' % (chain_src_dir, casename) -int2lm_runjob = '%s/cases/%s/int2lm_runjob.cfg' % (chain_src_dir, casename) - -int2lm_walltime = "00:30:00" - -# Domain decomposition -int2lm_nodes = 4 -int2lm_ntasks_per_node = 36 -int2lm_np_x = 12 -int2lm_np_y = 12 -int2lm_np_tot = int2lm_np_x * int2lm_np_y - -# COSMO ---------------------------------------------------------------------- # -# Executable -cosmo_bin = os.path.join(input_root, "executables/cosmoart") - -# Namelists and slurm runscript templates -cosmo_namelist = '%s/cases/%s/cosmo_INPUT_' % (chain_src_dir, casename) -cosmo_runjob = '%s/cases/%s/cosmo_runjob.cfg' % (chain_src_dir, casename) - -cosmo_walltime = "01:30:00" - -# Domain decomposition -cosmo_np_x = 12 -cosmo_np_y = 12 -cosmo_np_io = 0 -cosmo_np_tot = cosmo_np_x * cosmo_np_y + cosmo_np_io - -assert cosmo_np_tot // 36 == cosmo_np_tot / 36, ( - "n-tasks-per node is fixed at 36. " - "The number of processes has there" - "fore be divisible by 36 to get " - "nodes at full capacity") -cosmo_n_nodes = cosmo_np_tot // 36 - -# POSTPROCESSING ============================================================= # - -# POST_COSMO ----------------------------------------------------------------- # -# Root directory where the output of the chain is copied to -output_root = os.environ['SCRATCH'] + "/processing_chain/output/" + casename - -# VERIFY_CHAIN --------------------------------------------------------------- # -reference_dir = os.path.join(input_root, "reference_output") -# If the output file that gets compared to the reference is not at the location -# that post_cosmo copied it to, give the path to it here. Else leave it 'None' -# output_dir = None -# Use this if the post_cosmo job is not executed -output_dir = os.environ['SCRATCH'] + ( - "/cosmoart_processing_chain/" - "example_cosmoart_mother/2015020400_0_12/cosmo/output") - -# variables_to_check is a dict() with a tuple() of filenames as key and a list -# of variables-names as value. The tuple consists of the filenames of the two -# files to check, the list contains the variable-names that are compared. -# The verify_chain job will look for the files in the reference_dir (first tuple -# element) and the ouput_dir (second tuple element) -values_to_check = { - ("reference_mother_lffd2015020412.nc", "lffd2015020412.nc"): None -} diff --git a/cases/cosmo-art-mother-test/cosmo_INPUT_ART.cfg b/cases/cosmo-art-mother-test/cosmo_INPUT_ART.cfg deleted file mode 100644 index e376fd0d..00000000 --- a/cases/cosmo-art-mother-test/cosmo_INPUT_ART.cfg +++ /dev/null @@ -1,34 +0,0 @@ - &COSMO_ART - artstart=0.0, - lgas=.TRUE., - laero=.TRUE., - lgasini=.TRUE., - lgasbd=.TRUE., - laeroini=.TRUE., - laerobd=.TRUE., - hinc_artbounds=6.0, - hinc_emissions=1.0, - ledms= .FALSE., - lbvoc= .TRUE., - iart_bvocscheme=2, - lfire= .FALSE., - lseas=.TRUE., - ldust=.FALSE., - iart_dustscheme = 1, - lsatveg_dust = .FALSE., - cwhite_dust = 0.75, - lrad_dust=.FALSE., - lrad_aero=.FALSE., - lrad_seas=.FALSE., - lpoint=.FALSE., - lwash=.TRUE., - lgas_emiss_in=.TRUE., - laero_emiss_in=.TRUE., - lkpp=.FALSE., - aerostart=0.0, - ydirin_art = '{cfg.int2lm_output}', - laci_warm = .TRUE., - iaci_cold = 4, - acidelay=1, - ydirin_papa = '{cfg.cosmo_input}/art_photolysis', - / diff --git a/cases/cosmo-art-mother-test/cosmo_INPUT_ASS.cfg b/cases/cosmo-art-mother-test/cosmo_INPUT_ASS.cfg deleted file mode 100644 index 387e9a44..00000000 --- a/cases/cosmo-art-mother-test/cosmo_INPUT_ASS.cfg +++ /dev/null @@ -1,93 +0,0 @@ - &NUDGING - lnudge=.true., - lverif=.true., - mruntyp=2, - lverpas=.true., - itype_obfile = 2, - ycdfdir = '{cfg.cosmo_input}/obs_nudging', - hnudgsta = {cfg.hstart}, - hnudgend = {cfg.hstop}, - tconbox = 240.0, - hversta = 0.001, - hverend = {cfg.hstop}, - khumbal = 100, - ntpscor = 1, - ptpstop = 400.0, - luvgcor = .TRUE., - ltipol = .TRUE., - tipolmx = 3.0, - wtukrsa = 3.0, - wtukrse = 1.0, - ltipsu = .TRUE., - tipmxsu = 1.0, - wtuksua = 1.5, - wtuksue = 0.5, - wtukara = 1.5, - wtukare = 0.5, - msprpar = 1, - msprpsu = 0, - gnudg = .0006, .0006, .0006, .0006, - gnudgsu = .0006, .0006, .0000, .0006, - gnudgar = .0006, .0000, .0006, .0000, - vcorls = .333 , .333 , .04 , .04 , - vcutof = 0.75, 0.75, 1.0 , 1.0 , - vcorlsu = .013 ,.013 , .002 , .00001, - vcutosu = 0.75, 0.75, 4.0 , 0.001 , - vcsnisu = 2500., 2500., 9. , 9. , - rhvfac = 1.0 , 0.0 , 0.83, 0.83, - rhinfl = 0., 70., 0., 0., - rhtfac = 1.3 , 1.43 , 1.3 , 1.3 , - rhiflsu = 70., 70., 100., 70., - rhtfsu = 1.0 , 1.43 , 1.0 , 1.0 , - fnondiv = 0.8 , - cnondiv = 0.1 , - cutofr = 3.5 , 3.5 , 3.5 , 3.5 , - tnondiv = 1.1 , - cutofsu = 2.0 , 3.5 , 2.0 , 2.0 , - topobs = 849., 1099., 799., 699., - botmod = 1099., 1099., 1099., 899., - lscadj = .TRUE.,.TRUE.,.TRUE.,.FALSE., - dtqc = 720., - qcvf = 5.0 , 1.0 ,10.0 , 0.0 , - qcc = 0., 500., 0., .7, - qccsu = 12., 500., 12., .7, - lsynop =.true., - laircf =.true., - ldribu =.true., - ltemp =.true., - lpilot =.true., - lcd137 =.false., - lcd132 =.true., - maxmlo = 600, - maxsgo = 10000, - maxuso = 3000, - nolbc = 5, - altopsu = 100., 5000., 5000., 5000., - thairh = 20., - exnlat = 90., - exslat = -90., - exwlon = -180., - exelon = 180., - lsurfa =.false., - lt2m =.true., - ht2a = 0., - ht2i = 1., - lrh2m = .true., - hh2a = 0., - hh2i = 1., - lprecp = .true., - hprc = 0., - raintp = 12., - lpraof =.false., - lprodr =.true. , - ldiasa =.false., - noctrq = 9, - dinlat = 50., - dislat = 44., - diwlon = 4., - dielon = 12., - ionl = 235, - jonl = 151, - ionl2 = 221, - jonl2 = 131, -/END diff --git a/cases/cosmo-art-mother-test/cosmo_INPUT_DIA.cfg b/cases/cosmo-art-mother-test/cosmo_INPUT_DIA.cfg deleted file mode 100644 index 360a254f..00000000 --- a/cases/cosmo-art-mother-test/cosmo_INPUT_DIA.cfg +++ /dev/null @@ -1,12 +0,0 @@ - &DIACTL - !itype_diag_t2m=2, - ! n0meanval=0, - !nincmeanval=1, - !lgplong=.TRUE., - ! lgpshort=.FALSE., - ! lgpspec=.FALSE., - ! n0gp=0, - !hincgp=1.0, - !stationlist_tot= 0, 0, 50.050, 8.600, 'Frankfurt-Flughafen', - ! 0, 0, 52.220, 14.135, 'Lindenberg_Obs', - / diff --git a/cases/cosmo-art-mother-test/cosmo_INPUT_DYN.cfg b/cases/cosmo-art-mother-test/cosmo_INPUT_DYN.cfg deleted file mode 100644 index ab9b2794..00000000 --- a/cases/cosmo-art-mother-test/cosmo_INPUT_DYN.cfg +++ /dev/null @@ -1,27 +0,0 @@ - &DYNCTL - l2tls=.TRUE., - lcond=.TRUE., - ldyn_bbc=.FALSE., - ldiabf_lh=.TRUE., - l_diff_Smag=.TRUE., - y_scalar_advect='BOTT2_STRANG', - lspubc=.TRUE., - itype_hdiff=2, - hd_dhmax=250., - hd_corr_trcr_bd=0.0, - hd_corr_t_bd=0.75, - hd_corr_u_bd=0.75, - hd_corr_p_bd=0.75, - hd_corr_trcr_in=0.0, - hd_corr_t_in=0.0, - hd_corr_u_in=0.25, - hd_corr_p_in=0.0, - irunge_kutta=1, - irk_order=3, - iadv_order=5, - itype_fast_waves=2, - itype_bbc_w=114, - nrdtau=10, xkd=0.1, - rlwidth=85000.0, - itype_outflow_qrsg=2, - / diff --git a/cases/cosmo-art-mother-test/cosmo_INPUT_EPS.cfg b/cases/cosmo-art-mother-test/cosmo_INPUT_EPS.cfg deleted file mode 100644 index 6e56ca7a..00000000 --- a/cases/cosmo-art-mother-test/cosmo_INPUT_EPS.cfg +++ /dev/null @@ -1,5 +0,0 @@ - &EPSCTL - iepsmem=0, - iepstyp=55, - iepstot=15, - / diff --git a/cases/cosmo-art-mother-test/cosmo_INPUT_INI.cfg b/cases/cosmo-art-mother-test/cosmo_INPUT_INI.cfg deleted file mode 100644 index aab1855a..00000000 --- a/cases/cosmo-art-mother-test/cosmo_INPUT_INI.cfg +++ /dev/null @@ -1,8 +0,0 @@ - &INICTL - ndfi = 1, - nfilt = 1, - tspan = 3600.0, - dtbak = 60.0, - dtfwd = 60.0, - taus = 3600.0, - / diff --git a/cases/cosmo-art-mother-test/cosmo_INPUT_IO.cfg b/cases/cosmo-art-mother-test/cosmo_INPUT_IO.cfg deleted file mode 100644 index 4b2ac2dd..00000000 --- a/cases/cosmo-art-mother-test/cosmo_INPUT_IO.cfg +++ /dev/null @@ -1,95 +0,0 @@ -&IOCTL - yform_read='ncdf', - ymode_read='r ', - lasync_io=.FALSE., - ngribout=1, - nincwait=90, - nmaxwait=300, - l_ke_in_gds=.TRUE., -/ -&DATABASE -/ -&GRIBIN - lan_t_so0=.TRUE., - lan_t_cl=.TRUE., - lan_w_cl=.TRUE., - lan_vio3=.TRUE., - lan_hmo3=.TRUE., - lan_plcov=.TRUE., - lan_lai=.TRUE., - lan_rootdp=.TRUE., - lan_t_snow=.TRUE., - lan_w_i=.TRUE., - lan_w_snow=.TRUE., - lan_rho_snow=.FALSE., - lan_w_so=.TRUE., - hincbound=3.0, - lchkini=.TRUE., - lchkbd=.TRUE., - lbdana=.FALSE., - lana_qi=.TRUE., - llb_qi=.TRUE., - lana_rho_snow=.FALSE., - lana_qr_qs=.FALSE., - ydirini='../../int2lm/output', - ydirbd='../../int2lm/output', - ytunitbd='d', -/ -&GRIBOUT - hcomb=0,8761,1, - lanalysis=.false., - lcheck=.TRUE., - yform_write='ncdf', - ytunit='d', - yvarml= - 'U','V','W','T', - 'T_2M','TD_2M','U_10M','V_10M', - 'P','PP','TKE','PS','PMSL','Z0', - 'FIS ', 'HPBL','CLCT','CLC','CLWC', 'CIWC', - 'QV ','RELHUM ','RELHUM_2M', - 'W_CL ','T_CL ', 'T_S', - 'TQC','TQI','TQV','TQS','TQR','TQG', - 'RAIN_GSP','SNOW_GSP','GRAU_GSP','RAIN_CON', 'SNOW_CON', - 'TOT_PREC', - 'QC','QI','QR','QS','QG','NCCLOUD','NCRAIN','NCSNOW','NCICE','NCGRAUPEL','NCHAIL', - 'QNCLOUD','QNICE', - 'SOHR_RAD','THHR_RAD', - 'REFF_C','REFF_I','SOBS_RAD','THBS_RAD','SOBT_RAD','THBT_RAD','AUMFL_S','AVMFL_S','ATHD_S', - 'ASWDIR_S','ASWDIFD_S','ASWDIFU_S','ALWD_S','ALWU_S','ALHFL_S','ASHFL_S', - 'T_SO','W_SO','T_SNOW','W_SNOW','W_I','QV_S','FRESHSNW','ASOB_S','ATHB_S','APAB_S','ALB_RAD', - 'T_M','T_CL','T_G', - 'W_G1','W_G2','W_CL','W_SO_ICE', - 'RHO_SNOW', - 'SO2 ', 'SULF ', 'NO2 ', 'NO ', 'OZONE ', - 'HNO3 ', 'H2O2 ', 'ALD ', 'HCHO ', 'OP1 ', 'OP2 ', - 'PAA ', 'ORA1 ', 'ORA2 ', 'NH3 ', 'N2O5 ', 'NO3 ', - 'PAN ', 'HC3 ', 'HC5 ', 'HC8 ', 'ETH ', 'CO ', - 'OL2 ', 'OLI ', 'OLT ', 'TOL ', 'XYL ', 'ACO3 ', - 'TPAN ', 'HONO ', 'HNO4 ', 'KET ', 'GLY ', 'MGLY ', - 'DCB ', 'ONIT ', 'CSL ', 'ISO ', 'API ', 'LIM ', 'HACE','ISHP','ISON','MACR','MAHP','MPAN','NALD', - 'vso4_k ', 'vnh4_k ', 'vno3_k ', - 'VSEASA0 ', 'VSEASB0 ', 'VSEASC0 ', 'VSOILA0 ', 'VSOILB0 ', 'VSOILC0 ','VSEASA ', 'VSEASB ', 'VSEASC ', - 'VSOILA ', 'VSOILB ', 'VSOILC ', 'VSO4J ', 'VSO4I ', 'VNH4J ', 'VNH4I ', 'VNO3J ', 'VNO3I ','VSO4SEASA ', 'VSO4SEASB ', 'VSO4SEASC ', 'VNH4Jm ', - 'VNH4Im ', 'VNO3Jm ', 'VNO3Im ', 'VSO4Jm ','VSO4Im', - 'VORGBA1J ', 'VORGBA1I ', - 'VORGBA2J ', 'VORGBA2I ', 'VORGBA3J ', 'VORGBA3I ', - 'VORGBA4J ', 'VORGBA4I ', 'VORGPAJ ', 'VORGPAI ', - 'VORG1J ', 'VORG1I ', 'VORG10I ', 'VORG10J ', - 'VORG100I ', 'VORG100J ', 'VORG1000I ', 'VORG1000J ', - 'VORG1Jm ', 'VORG1Im ', 'VORG10Im ', 'VORG10Jm ', - 'VORG100Im ', 'VORG100Jm ', 'VORG1000Im ', 'VORG1000Jm ', - 'VECJ ', 'VECI ', 'VP25AJ ', 'VP25AI ', - 'VANTHA ', - 'VORGBA1Jm ', 'VORGBA1Im ', 'VORGBA2Jm ', 'VORGBA2Im ', - 'VORGBA3Jm ', 'VORGBA3Im ', 'VORGBA4Jm ', 'VORGBA4Im ', 'VORGPAJm ', - 'VORGPAIm ', - 'VSOOTJ ', 'VSOOTI ', 'VSOOT ', - 'VNU0 ', 'VAC0 ', 'VCORN ', - 'VNU0m ', 'VAC0m ','VSOOT0 ', - 'SOA1','SOA10','SOA100','SOA1000', - l_z_filter=.false., - l_p_filter=.false., - luvmasspoint=.false., - l_fi_pmsl_smooth=.false., - ydir='../output/', -/ diff --git a/cases/cosmo-art-mother-test/cosmo_INPUT_OAE.cfg b/cases/cosmo-art-mother-test/cosmo_INPUT_OAE.cfg deleted file mode 100644 index bfa835af..00000000 --- a/cases/cosmo-art-mother-test/cosmo_INPUT_OAE.cfg +++ /dev/null @@ -1,24 +0,0 @@ -! This is just an example file. Keep the given paths in the OAECTL-group, -! but adjust the number of emitted tracers in 'in_tracers' -&OAECTL - in_tracers = 2, - vertical_profile_nc = '../input/oae/vertical_profiles.nc', - hour_of_day_nc = '../input/oae/hourofday.nc', - day_of_week_nc = '../input/oae/dayofweek.nc', - month_of_year_nc = '../input/oae/monthofyear.nc', - gridded_emissions_nc = '../input/oae/emissions.nc', -/ -&TRACER - yshort_name = 'NO', - ycatl = 'NOX_A_AREA', 'NOX_A_POINT', 'NMVOC_B_AREA', 'NMVOC_B_POINT', - ytpl = 'CO_10', 'CO_10', 'CH4_1', 'CH4_2', - yvpl = 'SNAP-1', 'SNAP-10', 'SNAP-9', 'SNAP-7', - contribl = 0.42, 0.42, 0.69, 0.69, -/ -&TRACER - yshort_name = 'NO2', - ycatl = 'NOX_A_AREA', 'NOX_A_POINT', 'NMVOC_A_AREA', 'NMVOC_A_POINT', - ytpl = 'CO2_3', 'CO_6', 'CO_8', 'CO_2', - yvpl = 'SNAP-7', 'SNAP-5', 'SNAP-4', 'SNAP-2', - contribl = 0.22, 0.22, 0.1, 0.1, -/ \ No newline at end of file diff --git a/cases/cosmo-art-mother-test/cosmo_INPUT_ORG.cfg b/cases/cosmo-art-mother-test/cosmo_INPUT_ORG.cfg deleted file mode 100644 index 7e961988..00000000 --- a/cases/cosmo-art-mother-test/cosmo_INPUT_ORG.cfg +++ /dev/null @@ -1,58 +0,0 @@ - &LMGRID - startlat_tot = -9.54, - startlon_tot = -16.08, - pollat = 43.0, pollon = -170.0, - dlat = 0.12, dlon = 0.12, - ie_tot = 192, je_tot = 164, ke_tot=60, - / - &RUNCTL - hstart = {cfg.hstart}, - hstop = {cfg.hstop}, - dt = 60.0, - ydate_ini='{cfg.inidate_yyyymmddhh}', - nprocx = {cfg.cosmo_np_x}, - nprocy = {cfg.cosmo_np_y}, - nprocio= 0, -! num_asynio_comm = 1, num_iope_percomm = 1, - lphys = .TRUE., - luse_rttov = .FALSE., - luseobs = .TRUE., - leps = .FALSE., - lreorder = .FALSE., - lreproduce = .TRUE., - itype_timing = 4, - ldatatypes = .FALSE., - ltime_barrier = .FALSE., - ncomm_type = 3, - l_pollen = .FALSE., - nboundlines = 3, - l_cosmo_art= .TRUE., - idbg_level = 1, - lprintdeb_all=.TRUE., - ldebug_art=.TRUE., - ldump_ascii=.FALSE., -! lartif_data=.FALSE, - / - &TUNING - clc_diag = 0.5, - pat_len = 500.0, - tur_len = 150.0, - rlam_heat = 1.0, - rlam_mom = 0.0, - rat_lam = 1.0, - rat_can = 1.0, - rat_sea = 20.0, - c_lnd = 2.0, - c_soil = 1.0, - c_sea = 1.5, - z0m_dia = 0.2, - crsmin = 150.0, - wichfakt = 0.0, - qc0 = 0.0002, - q_crit = 1.6, - mu_rain = 0.5, - rain_n0_factor = 0.1, - v0snow = 20, - tkhmin = 0.4, - tkmmin = 0.4, - / diff --git a/cases/cosmo-art-mother-test/cosmo_INPUT_PHY.cfg b/cases/cosmo-art-mother-test/cosmo_INPUT_PHY.cfg deleted file mode 100644 index 58c47026..00000000 --- a/cases/cosmo-art-mother-test/cosmo_INPUT_PHY.cfg +++ /dev/null @@ -1,45 +0,0 @@ - &PHYCTL - lgsp=.TRUE., - lrad=.TRUE., - lradtopo = .false., - nradcoarse=1, - lradf_avg=.FALSE. - hincrad=1.0, - lforest=.true., - itype_albedo=1, ! geaendert - ltur=.TRUE., - ninctura=1, - lexpcor=.FALSE., - ltmpcor=.FALSE., - lprfcor=.FALSE., - lnonloc=.FALSE., - lcpfluc=.FALSE., - limpltkediff=.TRUE., - itype_turb=3, - imode_turb=1, - itype_tran=2, - imode_tran=1, - itype_wcld=2, - icldm_rad =4, - icldm_turb=2, - icldm_tran=0, - itype_synd=2, - lsoil=.TRUE., - itype_evsl=2, - itype_trvg=2, - lmulti_layer=.TRUE., - lmelt=.TRUE., - lmelt_var=.TRUE., - ke_soil = 7, - czml_soil = 0.005, 0.02, 0.06, 0.18, 0.54, 1.62, 4.86, 14.58, - lconv=.TRUE., - lcape=.FALSE., - lconf_avg=.TRUE., - lconv_inst=.TRUE., - itype_conv=0, - nincconv=5, - llake=.FALSE., - lseaice=.FALSE., - lsso=.FALSE., - ltkesso=.TRUE., - / diff --git a/cases/cosmo-art-mother-test/cosmo_runjob.cfg b/cases/cosmo-art-mother-test/cosmo_runjob.cfg deleted file mode 100644 index fdf63479..00000000 --- a/cases/cosmo-art-mother-test/cosmo_runjob.cfg +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -l -#SBATCH --account={cfg.compute_account} -#SBATCH --job-name="cosmo_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" -#SBATCH --time={cfg.cosmo_walltime} -#SBATCH --nodes={cfg.cosmo_n_nodes} -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node=36 -#SBATCH --cpus-per-task=1 -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --output={logfile} -#SBATCH --chdir={cfg.cosmo_work} -#SBATCH --open-mode=append - -export OMP_NUM_THREADS=1 - -module load daint-{cfg.constraint} - -ulimit -s unlimited -ulimit -a - -rm -f YU* -rm -f M_* - -echo "=====================================================" -echo "============== JOB OUTPUT BEGINS ====================" -echo "============== StartTime: `date +%s` s" -echo "============== StartTime: `date`" -echo "=====================================================" - - -srun -u ./cosmoart >> {logfile} 2>&1 -pid=$? - - -echo "=====================================================" -echo "============== JOB OUTPUT ENDS ====================" -echo "============== EndTime: `date +%s` s" -echo "============== EndTime: `date` s" -echo "=====================================================" - -[[ $pid == 0 ]] || {{ echo "Executing COSMO failed" >> {logfile}; exit 1; }} - -# check whether COSMO was successful by calculating name of the last -# output file that should have been created - -hoursSim=$(expr {cfg.hstop} % 24) -daysSim=$(expr {cfg.hstop} / 24) # bash does not know floating points, it truncates to integer -hoursSimNice=$(printf "%02d" $hoursSim) -daysSimNice=$(printf "%02d" $daysSim) -lastHourFile="lfff${{daysSimNice}}${{hoursSimNice}}0000.nc" - -[[ ! -f {cfg.cosmo_output}${{lastHourFile}} ]] || {{ echo "COSMO failed" >> {logfile}; exit 1; }} - -# copy log file -cp {logfile} {logfile_finish} diff --git a/cases/cosmo-art-mother-test/int2lm_INPUT.cfg b/cases/cosmo-art-mother-test/int2lm_INPUT.cfg deleted file mode 100644 index 5f3df35e..00000000 --- a/cases/cosmo-art-mother-test/int2lm_INPUT.cfg +++ /dev/null @@ -1,218 +0,0 @@ -&CONTRL - ydate_ini='{cfg.inidate_int2lm_yyyymmddhh}', - linitial=.TRUE., lboundaries=.TRUE., - hstart={cfg.hstart_int2lm}, - hstop={cfg.hstop_int2lm}, - hincbound=3.0, - nprocx={cfg.int2lm_np_x}, - nprocy={cfg.int2lm_np_y}, - yinput_model = 'IFS', - luse_t_skin=.TRUE., - lvertwind_ini=.TRUE., - lvertwind_bd=.TRUE., - lfilter_pp=.true., - llbc_smooth=.true., - lfilter_oro=.true., - ilow_pass_oro=4, - numfilt_oro=1, - ilow_pass_xso=5, - lxso_first=.FALSE., - numfilt_xso=1, - rxso_mask=750.0, - eps_filter=0.1, - norder_filter=5, - l_topo_z=.false., - rfill_valley=0.0, - ifill_valley=7, - lprog_qi=.TRUE., - lprog_qr_qs=.FALSE., - lprog_qg=.FALSE., - itype_w_so_rel=1, - lpost_0006=.TRUE., - lbdclim=.FALSE., - ltime_mean=.TRUE., - luvcor=.TRUE., - lreorder=.FALSE., - lprog_rho_snow=.FALSE., - lmulti_layer_lm=.TRUE., - lforest=.TRUE., - llake=.true., - lsso = .false., - lradtopo=.false., - l_smi = .TRUE., - idbg_level= 55, - l_art = .TRUE., - l_art_nested = .FALSE., -/ -&GRID_IN - startlon_in_tot = -18.25, - startlat_in_tot = -10.625, - pollon_in = -170.0, pollat_in = 43.0, - dlon_in = 0.125, dlat_in = 0.125, - ie_in_tot = 211, je_in_tot = 178, - ke_in_tot = 137, - pcontrol_fi=30000, -/ -&LMGRID -!COSMO-14 d1EU - startlon_tot = -16.08, - startlat_tot = -9.54, - pollon = -170.0, - pollat = 43.0, - dlon = 0.12, - dlat = 0.12, - ielm_tot = 192, - jelm_tot = 164, - kelm_tot = 60, - ivctype = 4, - irefatm = 2, - lanalyt_calc_t0p0 = .TRUE., - vcflat = 11357.0, - vcoord_d = 23588.50,22395.93,21304.04, 20307.39, 19399.95, - 18574.03, 17821.88, 17135.64, 16507.79, 15930.60, - 15396.52, 14897.86, 14427.98, 13981.10, 13551.52, - 13133.53, 12721.37, 12312.04, 11900.03, 11485.37, - 11068.19, 10648.54, 10226.48, 9802.09, 9375.43, - 8946.58, 8515.59, 8082.55, 7647.52, 7210.55, - 6771.96, 6332.38, 5896.41, 5468.04, 5050.84, - 4647.96, 4261.91, 3893.26, 3542.15, 3208.52, - 2892.23, 2593.71, 2312.95, 2049.75, 1803.89, - 1575.57, 1364.68, 1170.90, 993.84, 833.44, - 689.53, 561.52, 448.82, 350.95, 267.55, - 197.67, 137.23, 87.33, 48.44, 20.00, 0.00, -/ -&DATABASE -/ -&DATA - ie_ext=196, je_ext=168, - ylmext_lfn='{cfg.int2lm_extpar_file}', - ylmext_cat='../input/extpar/', - ylmext_form_read='ncdf', - yinext_lfn='{cfg.meteo_prefix}{cfg.inidate_int2lm_yyyymmddhh}', - yinext_cat='../input/meteo/', - yinext_form_read='apix', - yin_cat='../input/meteo/', - yinput_type='analysis', - yin_form_read='apix', - ylm_cat='../output/', - nprocess_ini = 131, nprocess_bd = 132, - ylm_form_write = "ncdf", - ytunit_out = "d", - ytunit_in = "d", - ymode_write = 'w b', - l_ke_in_gds = .TRUE., -/ -&PRICTR - lchkin = .FALSE., - lchkout = .FALSE., -/ -&ARTCONTROL - nart_ds = 5, -/ -&ARTDATASET - startlon_tot=-16.32, - dlon=0.12, - startlat_tot=-9.78, - dlat=0.12, - pollon=-170.0, - pollat=43.0, - ie_tot=196, - je_tot=168, - ke_tot=7, - yvertical_axis_type="geometric", - yvertical_method="D", - ylfn_prefix = "emis_", - yvarlist= "ORA2e","KETe","ALDe","HCHOe","CSLe","XYLe","TOLe", - "OLIe","OLTe","OL2e","HC8e","HC5e","HC3e","ETHe", - "SO2e","NOe","NO2e","NH3e","COe","ISOe","MGLYe","ORA1e", - "VSO4Je","VSO4Ie","VP25AIe","VP25AJe","VORGPAIe", - "VORGPAJe","VANTHAe","VSOOTe", - yinterp_type="N", - hinc=1.0, - lconst_in_time=.FALSE., - lconserve_mass=.TRUE., - ydirin='../input/emissions/', -/ -&ARTDATASET - startlon_tot=-16.32, - dlon=0.12, - startlat_tot=-9.78, - dlat=0.12, - pollon=-170.0, - pollat=43.0, - ie_tot=196, - je_tot=168, - ke_tot=7, - yvertical_axis_type="geometric", - yvertical_method="D", - ylfn_prefix = "emis_", - yvarlist= "ORA2e","KETe","ALDe","HCHOe","CSLe","XYLe","TOLe", - "OLIe","OLTe","OL2e","HC8e","HC5e","HC3e","ETHe", - "SO2e","NOe","NO2e","NH3e","COe","ISOe","MGLYe","ORA1e", - "VSO4Je","VSO4Ie","VP25AIe","VP25AJe","VORGPAIe", - "VORGPAJe","VANTHAe","VSOOTe", - yinterp_type="N", - hinc=1.0, - lconst_in_time=.FALSE., - lconserve_mass=.TRUE., - ydirin='../input/emissions2/', - ycombine_action="A", -/ -&ARTDATASET - startlon_tot= -20, - dlon=2.5, - startlat_tot= 31.26316, - dlat=1.89473, - ie_tot=21, - je_tot=18, - ke_tot=56, - yvertical_axis_type="hyb_sig_pr", - yvertical_method="I", - ylfn_prefix ='mozart_', - yvarlist="OZONE","NO","NO2","NO3","HNO3","OH","ONIT","H2O2","HO2","HNO4","N2O5","NH3", - "ALD","HCHO","CO","ETH","PAN","MPAN","OL2","ORA2","GLY","OP1","OP2","PAA","MGLY","CSL","HC5","HC3","ISO","TOL","KET","MACR","SO2", - "VSOILA","VSOILB","VSOILC","VSOOTJ","VORG1Jm","VSO4Jm", - yinterp_type="L", - hinc=6.0, - lconst_in_time=.FALSE., - lconserve_mass=.FALSE. - ydirin='../input/icbc/', -/ -&ARTDATASET - startlon_tot =-16.32, - dlon=0.12, - startlat_tot =-9.78, - dlat=0.12, - pollon=-170., - pollat=43., - ie_tot=196, - je_tot=168, - ke_tot=1, - ylfn_prefix = 'landuse', - yvarlist="PLUSE1","PLUSE2","PLUSE3","PLUSE4","PLUSE5", - "PLUSE6","PLUSE7","PLUSE8","PLUSE9","PLUSE10", - "PLUSE11","PLUSE12","PLUSE13","PLUSE14","PLUSE15", - "PLUSE16","PLUSE17","PLUSE18","PLUSE19","PLUSE20", - "PLUSE21","PLUSE22","PLUSE23", - lconst_in_time=.TRUE., - ydirin="../input/extpar/", - yinterp_type= 'N', - lconserve_mass = .FALSE., -/ -&ARTDATASET - startlon_tot =-14.9770802, - dlon=0.0500069454, - startlat_tot =30.0333426, - dlat=0.0500138927, - ie_tot=1201, - je_tot=901, - ke_tot=1, - ylfn_prefix = "pft", - yvarlist="PFT1","PFT2","PFT3","PFT4","PFT5", - "PFT6","PFT7","PFT8","PFT9","PFT10", - "PFT11","PFT12","PFT13","PFT14","PFT15", - lconst_in_time=.TRUE., - ydirin="../input/extpar/", - yinterp_type= 'N', - lconserve_mass = .FALSE., -/ diff --git a/cases/cosmo-art-mother-test/int2lm_runjob.cfg b/cases/cosmo-art-mother-test/int2lm_runjob.cfg deleted file mode 100644 index 52af77c8..00000000 --- a/cases/cosmo-art-mother-test/int2lm_runjob.cfg +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash -l -#SBATCH --job-name=int2lm_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime} -#SBATCH --time={cfg.int2lm_walltime} -#SBATCH --nodes={cfg.int2lm_nodes} -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.int2lm_ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --account={cfg.compute_account} -#SBATCH --output={logfile} -#SBATCH --open-mode=append -#SBATCH --chdir={cfg.int2lm_work} - - -module load daint-{cfg.constraint} -module load cray-netcdf - -ulimit -s unlimited -ulimit -a - -export OMP_NUM_THREADS=1 -export api_dir={cfg.int2lm_work}/libgrib_api/v1.20.0.2/cray -export GRIB_DEFINITION_PATH=$api_dir/share/grib_api/definitions:$api_dir/cosmo_definitions/definitions -export GRIB_SAMPLES_PATH=$api_dir/cosmo_definitions/samples -export HDF5_DISABLE_VERSION_CHECK=1 - - -rm -f YU* - -echo "=====================================================" -echo "============== JOB OUTPUT BEGINS ====================" -echo "============== StartTime: `date +%s` s" -echo "============== StartTime: `date`" -echo "=====================================================" - -srun -u -n {cfg.int2lm_np_tot} ./int2lm >> {logfile} 2>&1 -pid=$? - -echo "=====================================================" -echo "============== JOB OUTPUT ENDS ====================" -echo "============== EndTime: `date +%s` s" -echo "============== EndTime: `date` s" -echo "=====================================================" - -[[ $pid == 0 ]] || {{ echo \"Executing INT2LM MPI command failed\" >> job.out; exit 1; }} - -rm -f diag* - -# check whether INT2LM was successful by checking for presence of last -# meteofile that should have been processed -firstsecs=$(date -u --date "{ini_day} {ini_hour}" +%s) - -let lastsecs="firstsecs+{cfg.hstop_int2lm}*3600" -lastyyyymmddhh=$(date -u --date "1970-01-01 UTC +${{lastsecs}} sec" +%Y%m%d%H) -lastHourFile="lbfd${{lastyyyymmddhh}}.nc" - -echo last file processed is $lastHourFile >> {logfile} - -[[ ! -f ../output/${{lastHourFile}} ]] && {{ echo "INT2LM failed" >> {logfile}; exit 1; }} - -cp {logfile} {logfile_finish} diff --git a/cases/cosmo-art-nested-test/config.py b/cases/cosmo-art-nested-test/config.py deleted file mode 100644 index e0e895d9..00000000 --- a/cases/cosmo-art-nested-test/config.py +++ /dev/null @@ -1,142 +0,0 @@ -import os -""" -Configuration file for the 'cosmo-art-nested-test' case with COSMO-ART -""" - -# GENERAL SETTINGS =========================================================== -user = os.environ['USER'] -if os.path.exists(os.environ['HOME'] + '/.acct'): - with open(os.environ['HOME'] + '/.acct', 'r') as file: - compute_account = file.read().rstrip() -else: - compute_account = os.popen("id -gn").read().splitlines()[0] -compute_host = 'daint' -compute_queue = 'normal' - -# Controls which flavor of cosmo is used to do the simulation. -model = 'cosmo-art' - -# case name = pathname in cases/ -path = os.path.realpath(__file__) -casename = os.path.basename(os.path.dirname(path)) - -# Root directory of the sourcecode of the chain (where run_chain.py is) -chain_src_dir = os.getcwd() -# Root directory of the input data (for convenience, not used outside this file) -input_root = '/store/empa/em05/input_cosmoart_processing_chain_example/' -# Root directory of the working space of the chain -work_root = os.path.join(chain_src_dir, 'work') - -# INPUT ====================================================================== # - -# METEO ---------------------------------------------------------------------- # -# meteo files (either path to input dir or name of mother run) -meteo_dir = "cosmo-art-mother-test" -meteo_prefix = "eas" -meteo_nameformat = meteo_prefix + '%Y%m%d%H' - -# EMISSIONS ------------------------------------------------------------------ # -# (possibly multiple) emissions-datasets -# for multiple datasets: emissions_dir & emis_gridname should be lists with -# corresponding path/prefix -emissions_dir = [ - os.path.join(input_root, 'emissions', 'emissions_nest_MACC_noSwiss'), - os.path.join(input_root, 'emissions', 'emissions_nest_ch') -] -emis_gridname = ["macc_", "swiss_mu_fine_"] - -# PHOTO_RATE ----------------------------------------------------------------- # -photo_rate_file = os.path.join(input_root, 'art_photolysis', 'papa_data.d') - -# OBS_NUDGING ---------------------------------------------------------------- # -obs_nudging_dir = os.path.join(input_root, 'obs_nudging') -# nudging-filename: obs_nudging_prefix + -# sim_date.strftime(obs_nudging_date_format) + -# (sim_date + timedelta(days=1) -# .strftime(obs_nudging_date_format) -# Example: obs_nudging temp for simulation on 04.02.2015: -# cdfin_temp-20150204000000-20150205000000 -obs_nudging_prefixes = [ - 'cdfin_amdar', 'cdfin_buoy', 'cdfin_pilot_p', 'cdfin_ship', 'cdfin_synop', - 'cdfin_temp', 'cdfin_wprof' -] -obs_nudging_date_format = "-%Y%m%d%H%M%S" - -# SIMULATION ================================================================= # - -# INT2LM --------------------------------------------------------------------- # -# Extpar file -int2lm_extpar_dir = os.path.join(input_root, 'extpar') -int2lm_extpar_file = "Europe_0.02x0.02.nc" -# landuse file -int2lm_lu_dir = os.path.join(input_root, 'extpar') -int2lm_lu_file = 'landuse_cosmo2.nc' -# plant functional types -int2lm_pft_dir = os.path.join(input_root, 'extpar') -int2lm_pft_file = 'pft_0.05_andrew.nc' -# Executable -int2lm_bin = os.path.join(input_root, "executables/int2lm") - -int2lm_libgrib_dir = os.path.join(input_root, 'libgrib_api') - -# Namelist and slurm runscript templates -int2lm_namelist = '%s/cases/%s/int2lm_INPUT.cfg' % (chain_src_dir, casename) -int2lm_runjob = '%s/cases/%s/int2lm_runjob.cfg' % (chain_src_dir, casename) - -int2lm_walltime = "00:30:00" - -# Domain decomposition -int2lm_nodes = 4 -int2lm_ntasks_per_node = 36 -int2lm_np_x = 12 -int2lm_np_y = 12 -int2lm_np_tot = int2lm_np_x * int2lm_np_y - -# COSMO ---------------------------------------------------------------------- # -# Executable -cosmo_bin = os.path.join(input_root, "executables/cosmoart") - -# Namelists and slurm runscript templates -cosmo_namelist = '%s/cases/%s/cosmo_INPUT_' % (chain_src_dir, casename) -cosmo_runjob = '%s/cases/%s/cosmo_runjob.cfg' % (chain_src_dir, casename) - -cosmo_walltime = "01:30:00" - -# Domain decomposition -cosmo_np_x = 12 -cosmo_np_y = 12 -cosmo_np_io = 0 -cosmo_np_tot = cosmo_np_x * cosmo_np_y + cosmo_np_io - -assert cosmo_np_tot // 36 == cosmo_np_tot / 36, ( - "n-tasks-per node is fixed at 36. " - "The number of processes has there" - "fore be divisible by 36 to get " - "nodes at full capacity") -cosmo_n_nodes = cosmo_np_tot // 36 - -# POSTPROCESSING ============================================================= # - -# POST_COSMO ----------------------------------------------------------------- # -# Root directory where the output of the chain is copied to -output_root = os.environ['SCRATCH'] + "/processing_chain/output/" + casename - -# VERIFY_CHAIN --------------------------------------------------------------- # -reference_dir = os.path.join(input_root, "reference_output") - -# If the output file that gets compared to the reference is not at the location -# that post_cosmo copied it to, give the path to it here. Else leave it 'None' -# output_dir = None -# Use this if the post_cosmo job is not executed -output_dir = os.environ['SCRATCH'] + ( - "/cosmoart_processing_chain/" - "example_cosmoart_nested/2015020400_0_12/cosmo/output") - -# variables_to_check is a dict() with a tuple() of filenames as key and a list -# of variables-names as value. The tuple consists of the filenames of the two -# files to check, the list contains the variable-names that are compared. -# The verify_chain job will look for the files in the reference_dir (first tuple -# element) and the ouput_dir (second tuple element) -values_to_check = { - ("reference_nested_lffd2015020412.nc", "lffd2015020412.nc"): None -} diff --git a/cases/cosmo-art-nested-test/cosmo_INPUT_ART.cfg b/cases/cosmo-art-nested-test/cosmo_INPUT_ART.cfg deleted file mode 100644 index 8f5c098d..00000000 --- a/cases/cosmo-art-nested-test/cosmo_INPUT_ART.cfg +++ /dev/null @@ -1,33 +0,0 @@ -&COSMO_ART - lgas=.TRUE., - laero=.TRUE., - lgasini=.TRUE., - lgasbd=.TRUE., - laeroini=.TRUE., - laerobd=.TRUE., - hinc_artbounds=6.0, - hinc_emissions=1.0, - ledms= .FALSE., - lbvoc= .TRUE., - iart_bvocscheme=2, - lfire= .FALSE., - lseas=.TRUE., - ldust=.FALSE., - iart_dustscheme = 1, - lsatveg_dust = .FALSE., - cwhite_dust = 0.75, - lrad_dust=.FALSE., - lrad_aero=.FALSE., - lrad_seas=.FALSE., - lpoint=.FALSE., - lwash=.TRUE., - lgas_emiss_in=.TRUE., - laero_emiss_in=.TRUE., - lkpp=.FALSE., - aerostart=0.0, - ydirin_art = '{cfg.int2lm_output}', - laci_warm = .TRUE., - iaci_cold = 4, - acidelay = 1, - ydirin_papa = '{cfg.cosmo_input}/art_photolysis', -/ diff --git a/cases/cosmo-art-nested-test/cosmo_INPUT_ASS.cfg b/cases/cosmo-art-nested-test/cosmo_INPUT_ASS.cfg deleted file mode 100644 index f079b364..00000000 --- a/cases/cosmo-art-nested-test/cosmo_INPUT_ASS.cfg +++ /dev/null @@ -1,94 +0,0 @@ -&NUDGING - lnudge = .TRUE., - lverif=.TRUE., - mruntyp=2, - lverpas=.TRUE., - itype_obfile = 2, - ycdfdir = '{cfg.cosmo_input}/obs_nudging', - hnudgsta = {cfg.hstart}, - hnudgend = {cfg.hstop}, - tconbox = 240.0, - hversta = 0.001, - hverend = {cfg.hstop}, - khumbal = 100, - ntpscor = 1, - ptpstop = 400.0, - luvgcor = .TRUE., - ltipol = .TRUE., - tipolmx = 3.0, - wtukrsa = 3.0, - wtukrse = 1.0, - ltipsu = .TRUE., - tipmxsu = 1.0, - wtuksua = 1.5, - wtuksue = 0.5, - wtukara = 1.5, - wtukare = 0.5, - msprpar = 1, - msprpsu = 0, - gnudg = .0006, .0006, .0006, .0006, - gnudgsu = .0006, .0006, .0000, .0006, - gnudgar = .0006, .0000, .0006, .0000, - vcorls = .333 , .333 , .04 , .04 , - vcutof = 0.75, 0.75, 1.0 , 1.0 , - vcorlsu = .013 , .013 , .002 , .00001, - vcutosu = 0.75, 0.75, 4.0 , 0.001 , - vcsnisu = 2500., 2500., 9. , 9. , - rhvfac = 1.0 , 0.0 , 0.83, 0.83, - rhinfl = 0., 70., 0., 0., - rhtfac = 1.3 , 1.43 , 1.3 , 1.3 , - rhiflsu = 70., 70., 100., 70., - rhtfsu = 1.0 , 1.43 , 1.0 , 1.0 , - fnondiv = 0.8 , - cnondiv = 0.1 , - cutofr = 3.5 , 3.5 , 3.5 , 3.5 , - tnondiv = 1.1 , - cutofsu = 2.0 , 3.5 , 2.0 , 2.0 , - topobs = 849., 1099., 799., 699., - botmod = 1099., 1099., 1099., 899., - lscadj =.TRUE.,.TRUE.,.TRUE.,.FALSE., - dtqc = 720., - qcvf = 5.0 , 1.0 ,10.0 , 0.0 , - qcc = 0., 500., 0., .7, - qccsu = 12., 500., 12., .7, - lsynop =.true., - laircf =.true., - ldribu =.true., - ltemp =.true., - lpilot =.true., - lcd137 =.false., - lcd132 =.true., - maxmlo = 600, - maxsgo = 10000, - maxuso = 3000, - nolbc = 5, - altopsu = 100., 5000., 5000., 5000., - thairh = 20., - exnlat = 90., - exslat = -90., - exwlon = -180., - exelon = 180., - lsurfa =.false., - lt2m =.true., - ht2a = 0., - ht2i = 1., - lrh2m =.true., - hh2a = 0., - hh2i = 1., - lprecp =.true., - hprc = 0., - raintp = 12., - lpraof =.false., - lprodr =.true. , - ldiasa =.false., - noctrq = 9, - dinlat = 50., - dislat = 44., - diwlon = 4., - dielon = 12., - ionl = 235, - jonl = 151, - ionl2 = 221, - jonl2 = 131, -/END - diff --git a/cases/cosmo-art-nested-test/cosmo_INPUT_DIA.cfg b/cases/cosmo-art-nested-test/cosmo_INPUT_DIA.cfg deleted file mode 100644 index f9ef0d42..00000000 --- a/cases/cosmo-art-nested-test/cosmo_INPUT_DIA.cfg +++ /dev/null @@ -1,12 +0,0 @@ -&DIACTL - !itype_diag_t2m=2, - ! n0meanval=0, - !nincmeanval=1, - !lgplong=.TRUE., - ! lgpshort=.FALSE., - ! lgpspec=.FALSE., - ! n0gp=0, - !hincgp=1.0, - !stationlist_tot= 0, 0, 50.050, 8.600, 'Frankfurt-Flughafen', - ! 0, 0, 52.220, 14.135, 'Lindenberg_Obs', -/ diff --git a/cases/cosmo-art-nested-test/cosmo_INPUT_DYN.cfg b/cases/cosmo-art-nested-test/cosmo_INPUT_DYN.cfg deleted file mode 100644 index 8a65bf06..00000000 --- a/cases/cosmo-art-nested-test/cosmo_INPUT_DYN.cfg +++ /dev/null @@ -1,30 +0,0 @@ -&DYNCTL - l2tls=.TRUE., - lcond=.TRUE., - ldyn_bbc=.FALSE., - ldiabf_lh=.TRUE., - l_diff_Smag=.TRUE., - y_scalar_advect='BOTT2_STRANG', -! y_scalar_advect='SL3_MF', - lspubc=.TRUE., - itype_spubc=3, - itype_hdiff=2, - hd_dhmax=250., - hd_corr_trcr_bd=0.0, - hd_corr_t_bd=0.75, - hd_corr_u_bd=0.75, - hd_corr_p_bd=0.75, - hd_corr_trcr_in=0.0, - hd_corr_t_in=0.0, - hd_corr_u_in=0.25, - hd_corr_p_in=0.0, - irunge_kutta=1, - irk_order=3, - iadv_order=5, - itype_fast_waves=2, - itype_bbc_w=114, - nrdtau=3, - xkd=0.1, - rlwidth=35000.0, - itype_outflow_qrsg=2, -/ diff --git a/cases/cosmo-art-nested-test/cosmo_INPUT_EPS.cfg b/cases/cosmo-art-nested-test/cosmo_INPUT_EPS.cfg deleted file mode 100644 index 722a45f3..00000000 --- a/cases/cosmo-art-nested-test/cosmo_INPUT_EPS.cfg +++ /dev/null @@ -1,5 +0,0 @@ -&EPSCTL - iepsmem=0, - iepstyp=55, - iepstot=15, -/ diff --git a/cases/cosmo-art-nested-test/cosmo_INPUT_INI.cfg b/cases/cosmo-art-nested-test/cosmo_INPUT_INI.cfg deleted file mode 100644 index 82fb98d8..00000000 --- a/cases/cosmo-art-nested-test/cosmo_INPUT_INI.cfg +++ /dev/null @@ -1,8 +0,0 @@ -&INICTL - ndfi = 1, - nfilt = 1, - tspan = 3600.0, - dtbak = 60.0, - dtfwd = 60.0, - taus = 3600.0, -/ diff --git a/cases/cosmo-art-nested-test/cosmo_INPUT_IO.cfg b/cases/cosmo-art-nested-test/cosmo_INPUT_IO.cfg deleted file mode 100644 index a86912f9..00000000 --- a/cases/cosmo-art-nested-test/cosmo_INPUT_IO.cfg +++ /dev/null @@ -1,94 +0,0 @@ -&IOCTL - yform_read='ncdf', - lasync_io=.FALSE., - ngribout=1, - nincwait=90, - nmaxwait=300, -/ -&DATABASE -/ -&GRIBIN - lan_t_so0=.TRUE., - lan_t_cl=.TRUE., - lan_w_cl=.TRUE., - lan_vio3=.TRUE., - lan_hmo3=.TRUE., - lan_plcov=.TRUE., - lan_lai=.TRUE., - lan_rootdp=.TRUE., - lan_t_snow=.TRUE., - lan_w_i=.TRUE., - lan_w_snow=.TRUE., - lan_rho_snow=.FALSE., - lan_w_so=.TRUE., - hincbound=1.0, - lchkini=.TRUE., - lchkbd=.TRUE., - lbdana=.FALSE., - lana_qi=.TRUE., - llb_qi=.TRUE., - lana_rho_snow=.FALSE., - lana_qr_qs=.FALSE., - ydirini='../../int2lm/output', - ydirbd='../../int2lm/output', - ytunitbd='d', -/ -&GRIBOUT - hcomb=0,8761,1, - lanalysis=.false., - lcheck=.true., - lwrite_const=.true., - yform_write='ncdf', - yvarml= - 'U','V','W','T', - 'T_2M','TD_2M','U_10M','V_10M', - 'P','PP','TKE','PS','PMSL','Z0', - 'FIS ', 'HPBL','CLCT','CLC','CLWC', 'CIWC', - 'QV ','RELHUM ','RELHUM_2M', - 'W_CL ','T_CL ', 'T_S', - 'TQC','TQI','TQV','TQS','TQR','TQG', - 'RAIN_GSP','SNOW_GSP','GRAU_GSP','RAIN_CON', 'SNOW_CON', - 'TOT_PREC', - 'QC','QI','QR','QS','QG','NCCLOUD','NCRAIN','NCSNOW','NCICE','NCGRAUPEL','NCHAIL', - 'QNCLOUD','QNICE', - 'SOHR_RAD','THHR_RAD', - 'REFF_C','REFF_I','SOBS_RAD','THBS_RAD','SOBT_RAD','THBT_RAD','AUMFL_S','AVMFL_S','ATHD_S', - 'ASWDIR_S','ASWDIFD_S','ASWDIFU_S','ALWD_S','ALWU_S','ALHFL_S','ASHFL_S', - 'T_SO','W_SO','T_SNOW','W_SNOW','W_I','QV_S','FRESHSNW','ASOB_S','ATHB_S','APAB_S','ALB_RAD', - 'T_M','T_CL','T_G', - 'W_G1','W_G2','W_CL','W_SO_ICE', - 'RHO_SNOW','RHO', - 'SO2 ', 'SULF ', 'NO2 ', 'NO ', 'OZONE ', - 'HNO3 ', 'H2O2 ', 'ALD ', 'HCHO ', 'OP1 ', 'OP2 ', - 'PAA ', 'ORA1 ', 'ORA2 ', 'NH3 ', 'N2O5 ', 'NO3 ', - 'PAN ', 'HC3 ', 'HC5 ', 'HC8 ', 'ETH ', 'CO ', - 'OL2 ', 'OLI ', 'OLT ', 'TOL ', 'XYL ', 'ACO3 ', - 'TPAN ', 'HONO ', 'HNO4 ', 'KET ', 'GLY ', 'MGLY ', - 'DCB ', 'ONIT ', 'CSL ', 'ISO ', 'API ', 'LIM ', 'HACE','ISHP','ISON','MACR','MAHP','MPAN','NALD', - 'vso4_k ', 'vnh4_k ', 'vno3_k ', - 'VSEASA0 ', 'VSEASB0 ', 'VSEASC0 ', 'VSOILA0 ', 'VSOILB0 ', 'VSOILC0 ','VSEASA ', 'VSEASB ', 'VSEASC ', - 'VSOILA ', 'VSOILB ', 'VSOILC ', 'VSO4J ', 'VSO4I ', 'VNH4J ', 'VNH4I ', 'VNO3J ', 'VNO3I ','VSO4SEASA ', 'VSO4SEASB ', 'VSO4SEASC ', 'VNH4Jm ', - 'VNH4Im ', 'VNO3Jm ', 'VNO3Im ', 'VSO4Jm ','VSO4Im', - 'VORGBA1J ', 'VORGBA1I ', - 'VORGBA2J ', 'VORGBA2I ', 'VORGBA3J ', 'VORGBA3I ', - 'VORGBA4J ', 'VORGBA4I ', 'VORGPAJ ', 'VORGPAI ', - 'VORG1J ', 'VORG1I ', 'VORG10I ', 'VORG10J ', - 'VORG100I ', 'VORG100J ', 'VORG1000I ', 'VORG1000J ', - 'VORG1Jm ', 'VORG1Im ', 'VORG10Im ', 'VORG10Jm ', - 'VORG100Im ', 'VORG100Jm ', 'VORG1000Im ', 'VORG1000Jm ', - 'VECJ ', 'VECI ', 'VP25AJ ', 'VP25AI ', - 'VANTHA ', - 'VORGBA1Jm ', 'VORGBA1Im ', 'VORGBA2Jm ', 'VORGBA2Im ', - 'VORGBA3Jm ', 'VORGBA3Im ', 'VORGBA4Jm ', 'VORGBA4Im ', 'VORGPAJm ', - 'VORGPAIm ', - 'VSOOTJ ', 'VSOOTI ', 'VSOOT ', - 'VNU0 ', 'VAC0 ', 'VCORN ', - 'VNU0m ', 'VAC0m ','VSOOT0 ', 'SOA1','SOA10','SOA100','SOA1000', - 'TAU_AERO_ART', - yvarpl=' ', - yvarzl=' ', - yvarsl='', - zlev=500.0,1000.0,1500.0,2000.0,3000.0,5000.0, - ydir='../output/', - ytunit='d', -/ diff --git a/cases/cosmo-art-nested-test/cosmo_INPUT_ORG.cfg b/cases/cosmo-art-nested-test/cosmo_INPUT_ORG.cfg deleted file mode 100644 index cac3258c..00000000 --- a/cases/cosmo-art-nested-test/cosmo_INPUT_ORG.cfg +++ /dev/null @@ -1,57 +0,0 @@ -&LMGRID - startlat_tot = -1.74, - startlon_tot = -3.48, - pollat = 43.0, pollon = -170.0, - dlat = 0.02, dlon = 0.02, - ie_tot = 220, je_tot = 142, ke_tot=60, -/ -&RUNCTL - hstart = {cfg.hstart}, - hstop = {cfg.hstop}, - dt = 20.0, - ydate_ini='{cfg.inidate_yyyymmddhh}', - nprocx = {cfg.cosmo_np_x}, - nprocy = {cfg.cosmo_np_y}, - nprocio= 0, -! num_asynio_comm = 1, num_iope_percomm = 1, - lphys = .TRUE., - luse_rttov = .FALSE., - luseobs = .TRUE., - leps = .FALSE., - lreorder = .FALSE., - lreproduce = .TRUE., - itype_timing = 4, - ldatatypes = .FALSE., - ltime_barrier = .FALSE., - ncomm_type = 3, - l_pollen = .FALSE., - nboundlines = 3, - l_cosmo_art= .TRUE., - idbg_level = 1, - lprintdeb_all = .TRUE., - ldebug_art = .TRUE., -! lartif_data = .FALSE, -/ -&TUNING - clc_diag = 0.5, - pat_len = 500.0, - tur_len = 150.0, - rlam_heat = 1.0, - rlam_mom = 0.0, - rat_lam = 1.0, - rat_can = 1.0, - rat_sea = 20.0, - c_lnd = 2.0, - c_soil = 1.0, - c_sea = 1.5, - z0m_dia = 0.2, - crsmin = 150.0, - wichfakt = 0.0, - qc0 = 0.0002, - q_crit = 1.6, - mu_rain = 0.5, - rain_n0_factor = 0.1, - v0snow = 20, - tkhmin = 0.4, - tkmmin = 0.4, -/ diff --git a/cases/cosmo-art-nested-test/cosmo_INPUT_PHY.cfg b/cases/cosmo-art-nested-test/cosmo_INPUT_PHY.cfg deleted file mode 100644 index fca57629..00000000 --- a/cases/cosmo-art-nested-test/cosmo_INPUT_PHY.cfg +++ /dev/null @@ -1,46 +0,0 @@ -&PHYCTL - lgsp=.TRUE., - itype_gscp=4, - lrad=.TRUE., - nradcoarse=1, - lradf_avg=.FALSE. - hincrad=0.25, - lforest=.TRUE., - itype_albedo=1, ! geaendert - ltur=.TRUE., - ninctura=1, - lexpcor=.FALSE., - ltmpcor=.FALSE., - lprfcor=.FALSE., - lnonloc=.FALSE., - lcpfluc=.FALSE., - limpltkediff=.TRUE., - itype_turb=3, - imode_turb=1, - itype_tran=2, - imode_tran=1, - itype_wcld=2, - icldm_rad =4, - icldm_turb=2, - icldm_tran=0, - itype_synd=2, - lsoil=.TRUE., - itype_evsl=2, - itype_trvg=2, - lmulti_layer=.TRUE., - lmelt=.TRUE., - lmelt_var=.TRUE., - ke_soil = 7, - czml_soil = 0.005, 0.02, 0.06, 0.18, 0.54, 1.62, 4.86, 14.58, - lconv=.FALSE., - lcape=.FALSE., - lconf_avg=.TRUE., - lconv_inst=.TRUE., - itype_conv=3, - itype_heatcond=2, - nincconv=10, - llake=.FALSE., - lseaice=.FALSE., - lsso=.FALSE., - ltkesso=.FALSE., -/ diff --git a/cases/cosmo-art-nested-test/cosmo_runjob.cfg b/cases/cosmo-art-nested-test/cosmo_runjob.cfg deleted file mode 100644 index fdf63479..00000000 --- a/cases/cosmo-art-nested-test/cosmo_runjob.cfg +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -l -#SBATCH --account={cfg.compute_account} -#SBATCH --job-name="cosmo_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" -#SBATCH --time={cfg.cosmo_walltime} -#SBATCH --nodes={cfg.cosmo_n_nodes} -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node=36 -#SBATCH --cpus-per-task=1 -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --output={logfile} -#SBATCH --chdir={cfg.cosmo_work} -#SBATCH --open-mode=append - -export OMP_NUM_THREADS=1 - -module load daint-{cfg.constraint} - -ulimit -s unlimited -ulimit -a - -rm -f YU* -rm -f M_* - -echo "=====================================================" -echo "============== JOB OUTPUT BEGINS ====================" -echo "============== StartTime: `date +%s` s" -echo "============== StartTime: `date`" -echo "=====================================================" - - -srun -u ./cosmoart >> {logfile} 2>&1 -pid=$? - - -echo "=====================================================" -echo "============== JOB OUTPUT ENDS ====================" -echo "============== EndTime: `date +%s` s" -echo "============== EndTime: `date` s" -echo "=====================================================" - -[[ $pid == 0 ]] || {{ echo "Executing COSMO failed" >> {logfile}; exit 1; }} - -# check whether COSMO was successful by calculating name of the last -# output file that should have been created - -hoursSim=$(expr {cfg.hstop} % 24) -daysSim=$(expr {cfg.hstop} / 24) # bash does not know floating points, it truncates to integer -hoursSimNice=$(printf "%02d" $hoursSim) -daysSimNice=$(printf "%02d" $daysSim) -lastHourFile="lfff${{daysSimNice}}${{hoursSimNice}}0000.nc" - -[[ ! -f {cfg.cosmo_output}${{lastHourFile}} ]] || {{ echo "COSMO failed" >> {logfile}; exit 1; }} - -# copy log file -cp {logfile} {logfile_finish} diff --git a/cases/cosmo-art-nested-test/int2lm_INPUT.cfg b/cases/cosmo-art-nested-test/int2lm_INPUT.cfg deleted file mode 100644 index ae8682f8..00000000 --- a/cases/cosmo-art-nested-test/int2lm_INPUT.cfg +++ /dev/null @@ -1,196 +0,0 @@ -&CONTRL - ydate_ini='{cfg.inidate_int2lm_yyyymmddhh}', - linitial=.TRUE., lboundaries=.TRUE., - hstart={cfg.hstart_int2lm}, - hstop={cfg.hstop_int2lm}, - hincbound=1.0, - nprocx={cfg.int2lm_np_x}, - nprocy={cfg.int2lm_np_y}, - yinput_model = 'COSMO', - luse_t_skin=.TRUE., - lvertwind_ini=.TRUE., - lvertwind_bd=.TRUE., - lfilter_pp=.true., - llbc_smooth=.true., - lfilter_oro=.true., - ilow_pass_oro=4, - numfilt_oro=1, - ilow_pass_xso=5, - lxso_first=.FALSE., - numfilt_xso=1, - rxso_mask=750.0, - eps_filter=0.1, - norder_filter=5, - l_topo_z=.false., - rfill_valley=0.0, - ifill_valley=7, - lprog_qi=.TRUE., - lprog_qr_qs=.TRUE., - lprog_qg=.FALSE., - itype_w_so_rel=1, - lpost_0006=.TRUE., - lbdclim=.FALSE., - ltime_mean=.TRUE., - luvcor=.TRUE., - lreorder=.FALSE., - lprog_rho_snow=.TRUE., - lmulti_layer_in=.TRUE., - lmulti_layer_lm=.TRUE., - lforest=.true., - llake=.false., - lsso = .false., - lradtopo=.false., - l_smi = .TRUE., - idbg_level= 2, - l_art = .TRUE., - l_art_nested = .TRUE., -/ -&GRID_IN -!COSMO-14 d1EU - startlon_in_tot = -16.08, startlat_in_tot = -9.54, - pollon_in = -170.0, pollat_in = 43.0, - dlon_in = 0.12, dlat_in = 0.12, - ie_in_tot = 192, je_in_tot = 164, ke_in_tot = 60, -! pcontrol_fi=30000., -/ -&LMGRID -!COSMO-2 d2CH - startlon_tot = -3.48, - startlat_tot = -1.74, - pollon = -170.0, - pollat = 43.0, - dlon = 0.02, - dlat = 0.02, - ielm_tot = 220, - jelm_tot = 142, - kelm_tot = 60, - ivctype = 4, - irefatm = 2, - lanalyt_calc_t0p0 = .TRUE., - vcflat = 11357.0, - vcoord_d = 23588.50,22395.93,21304.04, 20307.39, 19399.95, - 18574.03, 17821.88, 17135.64, 16507.79, 15930.60, - 15396.52, 14897.86, 14427.98, 13981.10, 13551.52, - 13133.53, 12721.37, 12312.04, 11900.03, 11485.37, - 11068.19, 10648.54, 10226.48, 9802.09, 9375.43, - 8946.58, 8515.59, 8082.55, 7647.52, 7210.55, - 6771.96, 6332.38, 5896.41, 5468.04, 5050.84, - 4647.96, 4261.91, 3893.26, 3542.15, 3208.52, - 2892.23, 2593.71, 2312.95, 2049.75, 1803.89, - 1575.57, 1364.68, 1170.90, 993.84, 833.44, - 689.53, 561.52, 448.82, 350.95, 267.55, - 197.67, 137.23, 87.33, 48.44, 20.00, 0.00, -/ -&DATABASE -/ -&DATA - ie_ext=1179, je_ext=1014, - ylmext_lfn='{cfg.int2lm_extpar_file}', - ylmext_cat="../input/extpar/", - ylmext_form_read='ncdf', - yinext_lfn='{cfg.meteo_prefix}{cfg.inidate_int2lm_yyyymmddhh}c.nc', - yinext_cat="../input/meteo", - yinext_form_read='ncdf', - yin_cat="../input/meteo", - yinput_type='forecast', - yin_form_read='ncdf', - ylm_cat="../output", - nprocess_ini = 131, nprocess_bd = 132, - ylm_form_write = "ncdf", - ytunit_out = "d", - ytunit_in = "d", - ymode_write = 'w b', - l_ke_in_gds = .TRUE., -/ -&PRICTR - lchkin = .FALSE., - lchkout = .FALSE., -/ -&ARTCONTROL - nart_ds = 4, -/ -&ARTDATASET - startlon_tot=-3.52, - dlon=0.02, - startlat_tot=-1.78, - dlat=0.02, - pollon=-170.0, - pollat=43.0, - ie_tot=224, - je_tot=146, ke_tot=7, - yvertical_axis_type="geometric", - yvertical_method="D", - ylfn_prefix = "emis_", - yvarlist= "ORA2e","KETe","ALDe","HCHOe","CSLe","XYLe","TOLe", - "OLIe","OLTe","OL2e","HC8e","HC5e","HC3e","ETHe", - "SO2e","NOe","NO2e","NH3e","COe","ISOe","MGLYe","ORA1e", - "VSO4Je","VSO4Ie","VP25AIe","VP25AJe","VORGPAIe", - "VORGPAJe","VANTHAe","VSOOTe", - hinc=1.0, - lconst_in_time=.FALSE., - lconserve_mass=.TRUE., - ydirin="../input/emissions/", -/ -&ARTDATASET - startlon_tot=-3.52, - dlon=0.02, - startlat_tot=-1.78, - dlat=0.02, - pollon=-170.0, - pollat=43.0, - ie_tot=224, - je_tot=146, - ke_tot=7, - yvertical_axis_type="geometric", - yvertical_method="D", - ylfn_prefix = "emis_" - yvarlist= "ORA2e","KETe","ALDe","HCHOe","CSLe","XYLe","TOLe", - "OLIe","OLTe","OL2e","HC8e","HC5e","HC3e","ETHe", - "SO2e","NOe","NO2e","NH3e","COe","ISOe","MGLYe","ORA1e", - "VSO4Je","VSO4Ie","VP25AIe","VP25AJe","VORGPAIe", - "VORGPAJe","VANTHAe","VSOOTe", - hinc=1.0, - lconst_in_time=.FALSE., - lconserve_mass=.TRUE., - ydirin="../input/emissions2/", - ycombine_action="A", -/ -&ARTDATASET - startlon_tot =-3.52, - dlon=0.02, - startlat_tot =-1.78, - dlat=0.02, - pollon=-170., - pollat=43., - ie_tot=224, - je_tot=146, - ke_tot=1, - ylfn_prefix = 'landuse', - yvarlist="PLUSE1","PLUSE2","PLUSE3","PLUSE4","PLUSE5", - "PLUSE6","PLUSE7","PLUSE8","PLUSE9","PLUSE10", - "PLUSE11","PLUSE12","PLUSE13","PLUSE14","PLUSE15", - "PLUSE16","PLUSE17","PLUSE18","PLUSE19","PLUSE20", - "PLUSE21","PLUSE22","PLUSE23", - lconst_in_time=.TRUE., - ydirin="../input/extpar/", - yinterp_type= 'N', - lconserve_mass = .FALSE., -/ -&ARTDATASET - startlon_tot =-14.9770802, - dlon=0.0500069454, - startlat_tot =30.0333426, - dlat=0.0500138927, - ie_tot=1201, - je_tot=901, - ke_tot=1, - ylfn_prefix = "pft", - yvarlist="PFT1","PFT2","PFT3","PFT4","PFT5", - "PFT6","PFT7","PFT8","PFT9","PFT10", - "PFT11","PFT12","PFT13","PFT14","PFT15", - lconst_in_time=.TRUE., - ydirin="../input/extpar/", - yinterp_type= 'N', - lconserve_mass = .FALSE., -/ - diff --git a/cases/cosmo-art-nested-test/int2lm_runjob.cfg b/cases/cosmo-art-nested-test/int2lm_runjob.cfg deleted file mode 100644 index c4d5a0d0..00000000 --- a/cases/cosmo-art-nested-test/int2lm_runjob.cfg +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash -l -#SBATCH --job-name=int2lm -#SBATCH --time={cfg.int2lm_walltime} -#SBATCH --nodes={cfg.int2lm_nodes} -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.int2lm_ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --account={cfg.compute_account} -#SBATCH --output={logfile} -#SBATCH --open-mode=append -#SBATCH --chdir={cfg.int2lm_work} - - -module load daint-{cfg.constraint} -module load cray-netcdf - -ulimit -s unlimited -ulimit -a - -export OMP_NUM_THREADS=1 -export api_dir={cfg.int2lm_work}/libgrib_api/v1.20.0.2/cray -export GRIB_DEFINITION_PATH=$api_dir/share/grib_api/definitions:$api_dir/cosmo_definitions/definitions -export GRIB_SAMPLES_PATH=$api_dir/cosmo_definitions/samples -export HDF5_DISABLE_VERSION_CHECK=1 - -rm -f YU* -rm -f diag* - -echo "=====================================================" -echo "============== JOB OUTPUT BEGINS ====================" -echo "============== StartTime: `date +%s` s" -echo "============== StartTime: `date`" -echo "=====================================================" - -srun -u -n {cfg.int2lm_np_tot} ./int2lm >> {logfile} 2>&1 -pid=$? - -echo "=====================================================" -echo "============== JOB OUTPUT ENDS ====================" -echo "============== EndTime: `date +%s` s" -echo "============== EndTime: `date` s" -echo "=====================================================" - -[[ $pid == 0 ]] || {{ echo \"Executing INT2LM MPI command failed\" >> job.out; exit 1; }} - -rm -f diag* - -# check whether INT2LM was successful by checking for presence of last -# meteofile that should have been processed -firstsecs=$(date -u --date "{ini_day} {ini_hour}" +%s) - -let lastsecs="firstsecs+{cfg.hstop_int2lm}*3600" -lastyyyymmddhh=$(date -u --date "1970-01-01 UTC +${{lastsecs}} sec" +%Y%m%d%H) -lastHourFile="lbfd${{lastyyyymmddhh}}.nc" - -echo last file processed is $lastHourFile >> {logfile} - -[[ ! -f ../output/${{lastHourFile}} ]] && {{ echo "INT2LM failed" >> {logfile}; exit 1; }} - -cp {logfile} {logfile_finish} diff --git a/cases/icon-art-global/config.py b/cases/icon-art-global/config.py deleted file mode 100644 index 5f2dd7f8..00000000 --- a/cases/icon-art-global/config.py +++ /dev/null @@ -1,144 +0,0 @@ -import os -""" -Configuration file for the 'icon-art-global' case with ICON-ART -""" - -# ----------------------------------------------------------- -# GENERAL SETTINGS -# ----------------------------------------------------------- - -user = os.environ['USER'] -compute_host = 'daint' -compute_queue = 'debug' # 'normal' / 'debug' -constraint = 'mc' # 'mc' / 'gpu' -if os.path.exists(os.environ['HOME'] + '/.acct'): - with open(os.environ['HOME'] + '/.acct', 'r') as file: - compute_account = file.read().rstrip() -else: - compute_account = os.popen("id -gn").read().splitlines()[0] - -# -- Model to run - -model = 'icon-art-global' - -# -- Number of tasks per node -ntasks_per_node = 36 if constraint == 'mc' else 12 - -# -- case name = pathname in cases/ -casename = os.path.basename(os.path.dirname(os.path.realpath(__file__))) - -# -- Root directory of the sourcecode of the chain (where run_chain.py is) -chain_src_dir = os.getcwd() - -# -- Case directory -case_dir = os.path.join(chain_src_dir, 'cases', casename) - -# ----------------------------------------------------------- -# -- SIMULATION -# ----------------------------------------------------------- - -# -- Root directory of the working space of the chain -work_dir = os.path.join(chain_src_dir, 'work') - -# -- Executable -# icon_bin = os.path.join('/scratch/snx3000/jthanwer/spack-install/daint/icon/c2sm-master/gcc/qcndg6qwq6e5gfutwoycqmwf2m4lvg7g/', 'bin', 'icon') # -- eccodes, ocean, noart -# icon_bin = os.path.join('/scratch/snx3000/jthanwer/spack-install/daint/icon/c2sm-master/gcc/x6pisrz7umszlrpnazse3cuosdxt45kt/', 'bin', 'icon') # -- art -# icon_bin = os.path.join('/scratch/snx3000/jthanwer/icon-online-traj/cpu/', 'bin', 'icon') # -- online-traj, cpu+art, dev-build -icon_bin = os.path.join('/scratch/snx3000/jthanwer/icon/cpu/', 'bin', - 'icon') # - -# -- Paths for namelists and slurm runscript templates -# icon_runjob = os.path.join(case_dir, 'icon_runjob_withoutart.cfg') -icon_runjob = os.path.join(case_dir, 'icon_runjob.cfg') -icon_era5_inijob = os.path.join(case_dir, 'icon_era5_inicond.sh') -icon_era5_nudgingjob = os.path.join(case_dir, 'icon_era5_nudging.sh') -icon_species_inijob = os.path.join(case_dir, 'icon_species_inicond.sh') -icon_species_nudgingjob = os.path.join(case_dir, 'icon_species_nudging.sh') - -# -- Number of hours simulated by one job / directory -restart_step = 24 # -- hours or Pandas frequency - -# -- Number of hours between two output data -output_writing_step = 12 # -- TO MODIFY - -# -- Initial conditios -era5_inicond = False # -- TO MODIFY -species_inicond = True -species2restart = ['TROH'] - -# -- Nudging (meteorological and tracers) -era5_global_nudging = False -species_global_nudging = False -species2nudge = [] -nudging_step = 12 - -# -- Walltimes and domain decomposition -if compute_queue == "normal": - icon_walltime = "00:30:00" - icon_np_tot = 2 - -elif compute_queue == "debug": - icon_walltime = "00:30:00" - icon_np_tot = 2 - -# ----------------------------------------------------------- -# -- INPUT DATA -# ----------------------------------------------------------- - -input_root = '/scratch/snx3000/jthanwer/DATA/ICON_INPUT/' -input_root_icbc = os.path.join(input_root, 'ICBC') -input_root_grid = os.path.join(input_root, 'GRIDS') -input_root_rad = os.path.join(input_root, 'RAD') -input_root_oem = os.path.join(input_root, 'OEM', 'SF6') -input_root_chemistry = os.path.join(input_root, 'CHEMISTRY', - 'OH_GCP2022_ORIGINAL') -input_root_tracers = os.path.join(input_root, 'XML/examples') -input_root_configs = os.path.join(input_root, 'CONFIGS') -input_root_art = os.path.join(input_root, 'ART') - -# -- Initial conditions and boundary conditions -inicond_filename = '/scratch/snx3000/jthanwer/DATA/ICON_INPUT/ICBC/era2icon_R2B03_2022060200.nc' - -# -- Grid -dynamics_grid_filename = os.path.join(input_root_grid, "iconR2B03-DOM01.nc") -radiation_grid_filename = os.path.join(input_root_grid, "iconR2B03-DOM01.nc") -extpar_filename = os.path.join(input_root_grid, "extpar_iconR2B03-DOM01.nc") - -# -- Radiation -cldopt_filename = os.path.join(input_root_rad, 'ECHAM6_CldOptProps.nc') -lrtm_filename = os.path.join(input_root_rad, 'rrtmg_lw.nc') - -# -- OEM -# oem_emis_filename = os.path.join(input_root_oem, 'OEM_SF6_{year}.nc') -oem_vertprof_filename = os.path.join(input_root_oem, 'vertical_profiles.nc') -oem_hourofday_filename = os.path.join(input_root_oem, 'hourofday.nc') -oem_dayofweek_filename = os.path.join(input_root_oem, 'dayofweek.nc') -oem_monthofyear_filename = os.path.join(input_root_oem, 'monthofyear.nc') - -# -- Chemistry (OH) -oh_molec_filename = os.path.join(input_root_chemistry, - 'oh_gcp2022_icongrid.nc') # -- TO MODIFY - -# -- ART -pntSrc_xml_filename = os.path.join(input_root_configs, - 'CONFIG2/point-sources.xml') # -- TO MODIFY -boundcond_xml_filename = os.path.join(input_root_tracers, - 'boundary-conditions.xml') -chemtracer_xml_filename = os.path.join(input_root_configs, - 'CONFIG2/tracers.xml') # -- TO MODIFY - -# -- Nudging -map_file_nudging = os.path.join(input_root_icbc, 'map_file.nudging') - -# ----------------------------------------------------------- -# -- Additional settings derived from constants -# ----------------------------------------------------------- - -# -- Nudge type (global or nothing) -nudge_type = 2 if era5_global_nudging else 0 - -# -- Time step for global nudging in seconds -nudging_step_seconds = nudging_step * 3600 - -# -- Prescribed initial conditions for CH4, CO and/or OH -iart_init_gas = 4 if species_inicond else 0 diff --git a/cases/icon-art-global/icon_era5_inicond.sh b/cases/icon-art-global/icon_era5_inicond.sh deleted file mode 100644 index 522d4878..00000000 --- a/cases/icon-art-global/icon_era5_inicond.sh +++ /dev/null @@ -1,179 +0,0 @@ -#!/bin/bash - -cd {cfg.icon_input_icbc} - -# --------------------------------- -# -- Pre-processing -# --------------------------------- - -rm -f {cfg.inicond_filename_scratch} - -# -- Convert the GRIB files to NetCDF -cdo -t ecmwf -f nc copy era5_ml.grib era5_ml.nc -cdo -t ecmwf -f nc copy era5_surf.grib era5_surf.nc - -# -- Put all variables in the same file -cdo merge era5_ml.nc era5_surf.nc era5_original.nc - -# -- Change variable and coordinates names to be consistent with ICON nomenclature -cdo setpartabn,mypartab,convert era5_original.nc tmp.nc - -# -- Order the variables alphabetically -ncks tmp.nc data_in.nc -rm tmp.nc era5_surf.nc era5_ml.nc era5_original.nc - -# --------------------------------- -# -- Re-mapping -# --------------------------------- - -# -- Retrieve the dynamic horizontal grid -cdo -s selgrid,2 {cfg.dynamics_grid_filename_scratch} triangular-grid.nc - -# -- Create the weights for remapping ERA5 latlon grid onto the triangular grid -cdo gendis,triangular-grid.nc data_in.nc weights.nc - -# -- Extract the land-sea mask variable in input and output files -cdo selname,LSM data_in.nc LSM_in.nc -ncrename -h -v LSM,FR_LAND LSM_in.nc -cdo selname,FR_LAND {cfg.extpar_filename_scratch} LSM_out_tmp.nc - -# -- Add time dimension to LSM_out.nc -ncecat -O -u time LSM_out_tmp.nc LSM_out_tmp.nc -ncks -h -A -v time LSM_in.nc LSM_out_tmp.nc - -# -- Create two different files for land- and sea-mask -cdo -L setctomiss,0. -ltc,0.5 LSM_in.nc oceanmask_in.nc -cdo -L setctomiss,0. -gec,0.5 LSM_in.nc landmask_in.nc -cdo -L setctomiss,0. -ltc,0.5 LSM_out_tmp.nc oceanmask_out.nc -cdo -L setctomiss,0. -gec,0.5 LSM_out_tmp.nc landmask_out.nc -cdo setrtoc2,0.5,1.0,1,0 LSM_out_tmp.nc LSM_out.nc -rm LSM_in.nc LSM_out_tmp.nc - -# -- Select surface sea variables defined only on sea -ncks -h -v SST,CI data_in.nc datasea_in.nc - -# -- Select surface variables defined on both that must be remap differently on sea and on land -ncks -h -v SKT,STL1,STL2,STL3,STL4,ALB_SNOW,W_SNOW,T_SNOW data_in.nc dataland_in.nc - -# ----------------------------------------------------------------------------- -# -- Remap land and ocean area differently for variables -# ----------------------------------------------------------------------------- - -# -- Ocean part -# ----------------- - -# -- Apply the ocean mask (by dividing) -cdo div dataland_in.nc oceanmask_in.nc tmp1_land.nc -cdo div datasea_in.nc oceanmask_in.nc tmp1_sea.nc - -# -- Set missing values to a distance-weighted average -cdo setmisstodis tmp1_land.nc tmp2_land.nc -cdo setmisstodis tmp1_sea.nc tmp2_sea.nc - -# -- Remap -cdo remapdis,triangular-grid.nc tmp2_land.nc tmp3_land.nc -cdo remapdis,triangular-grid.nc tmp2_sea.nc tmp3_sea.nc - -# -- Apply the ocean mask to remapped variables (by dividing) -cdo div tmp3_land.nc oceanmask_out.nc dataland_ocean_out.nc -cdo div tmp3_sea.nc oceanmask_out.nc datasea_ocean_out.nc - -# -- Clean the repository -rm tmp*.nc oceanmask*.nc - -# # -- Land part -# # ----------------- - -cdo div dataland_in.nc landmask_in.nc tmp1.nc -cdo setmisstodis tmp1.nc tmp2.nc -cdo remapdis,triangular-grid.nc tmp2.nc tmp3.nc -cdo div tmp3.nc landmask_out.nc dataland_land_out.nc -rm tmp*.nc landmask*.nc dataland_in.nc datasea_in.nc - -# -- merge remapped land and ocean part -# -------------------------------------- - -cdo ifthenelse LSM_out.nc dataland_land_out.nc dataland_ocean_out.nc dataland_out.nc -rm dataland_ocean_out.nc dataland_land_out.nc - -# remap the rest and merge all files -# -------------------------------------- - -# -- Select all variables apart from these ones -ncks -h -x -v SKT,STL1,STL2,STL3,STL4,SMIL1,SMIL2,SMIL3,SMIL4,ALB_SNOW,W_SNOW,T_SNOW,SST,CI,LSM data_in.nc datarest_in.nc - -# -- Remap -cdo -s remapdis,triangular-grid.nc datarest_in.nc era5_final.nc -rm datarest_in.nc - -# -- Fill NaN values for SST and CI -cdo setmisstodis -selname,SST,CI datasea_ocean_out.nc dataland_ocean_out_filled.nc -rm datasea_ocean_out.nc - -# -- Merge remapped files plus land sea mask from EXTPAR -ncks -h -A dataland_out.nc era5_final.nc -ncks -h -A dataland_ocean_out_filled.nc era5_final.nc -ncks -h -A -v FR_LAND LSM_out.nc era5_final.nc -ncrename -h -v FR_LAND,LSM era5_final.nc -rm LSM_out.nc dataland_out.nc - -# ------------------------------------------------------------------------ -# -- Convert the (former) SWVLi variables to real soil moisture indices -# ------------------------------------------------------------------------ - -# -- Properties of IFS soil types (see Table 1 ERA5 Data documentation -# -- https://confluence.ecmwf.int/display/CKB/ERA5%3A+data+documentation) -# Soil type 1 2 3 4 5 6 7 -wiltingp=(0 0.059 0.151 0.133 0.279 0.335 0.267 0.151) # wilting point -fieldcap=(0 0.244 0.347 0.383 0.448 0.541 0.663 0.347) # field capacity - -ncks -h -v SMIL1,SMIL2,SMIL3,SMIL4,SLT data_in.nc swvl.nc -rm data_in.nc - -# -- Loop over the soil types and apply the right constants -smi_equation="" -for ilev in {{1..4}}; do - - smi_equation="${{smi_equation}}SMIL${{ilev}} = (SMIL${{ilev}} - ${{wiltingp[1]}}) / (${{fieldcap[1]}} - ${{wiltingp[1]}}) * (SLT==1)" - for ist in {{2..7}}; do - smi_equation="${{smi_equation}} + (SMIL${{ilev}} - ${{wiltingp[$ist]}}) / (${{fieldcap[$ist]}} - ${{wiltingp[$ist]}}) * (SLT==${{ist}})" - done - smi_equation="${{smi_equation}};" - -done - -cdo expr,"${{smi_equation}}" swvl.nc smil_in.nc -rm swvl.nc - -# -- Remap SMIL variables -cdo -s remapdis,triangular-grid.nc smil_in.nc smil_out.nc -rm smil_in.nc - -# -- Overwrite the variables SMIL1,SMIL2,SMIL3,SMIL4 -ncks -A -v SMIL1,SMIL2,SMIL3,SMIL4 smil_out.nc era5_final.nc -rm smil_out.nc - -# -------------------------------------- -# -- Create the LNSP variable -# -------------------------------------- - -# -- Apply logarithm to surface pressure -cdo expr,'LNPS=ln(PS);' era5_final.nc tmp.nc - -# -- Put the new variable LNSP in the original file -ncks -A -v LNPS tmp.nc era5_final.nc -rm tmp.nc - -# --------------------------------- -# -- Post-processing -# --------------------------------- - -# -- Rename dimensions and order alphabetically -ncrename -h -d cell,ncells era5_final.nc -ncrename -h -d nv,vertices era5_final.nc -ncks era5_final.nc {cfg.inicond_filename_scratch} -rm era5_final.nc - -# -- Clean the repository -rm weights.nc -rm triangular-grid.nc \ No newline at end of file diff --git a/cases/icon-art-global/icon_era5_nudging.sh b/cases/icon-art-global/icon_era5_nudging.sh deleted file mode 100644 index 64c48711..00000000 --- a/cases/icon-art-global/icon_era5_nudging.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - -cd {cfg.icon_input_icbc} - -# --------------------------------- -# -- Pre-processing -# --------------------------------- - -rm -f {filename} - -# -- Convert the GRIB files to NetCDF -cdo -t ecmwf -f nc copy era5_ml_nudging.grib era5_ml_nudging.nc -cdo -t ecmwf -f nc copy era5_surf_nudging.grib era5_surf_nudging.nc - -# -- Put all variables in the same file -cdo merge era5_ml_nudging.nc era5_surf_nudging.nc era5_original_nudging.nc - -# -- Change variable and coordinates names to be consistent with ICON nomenclature -cdo setpartabn,mypartab,convert era5_original_nudging.nc tmp.nc - -# -- Order the variables alphabetically -ncks tmp.nc data_in.nc -rm tmp.nc era5_surf_nudging.nc era5_ml_nudging.nc era5_original_nudging.nc - -# --------------------------------- -# -- Re-mapping -# --------------------------------- - -# -- Retrieve the dynamic horizontal grid -cdo -s selgrid,2 {cfg.dynamics_grid_filename_scratch} triangular-grid.nc - -# -- Create the weights for remapping ERA5 latlon grid onto the triangular grid -cdo gendis,triangular-grid.nc data_in.nc weights.nc - -# -- Remap -cdo -s remapdis,triangular-grid.nc data_in.nc era5_final.nc -rm data_in.nc - -# -------------------------------------- -# -- Create the LNSP variable -# -------------------------------------- - -# -- Apply logarithm to surface pressure -cdo expr,'LNPS=ln(PS);' era5_final.nc tmp.nc - -# -- Put the new variable LNSP in the original file -ncks -A -v LNPS tmp.nc era5_final.nc -rm tmp.nc - -# --------------------------------- -# -- Post-processing -# --------------------------------- - -# -- Rename dimensions and order alphabetically -ncrename -h -d cell,ncells era5_final.nc -ncrename -h -d nv,vertices era5_final.nc -ncks era5_final.nc {filename} -rm era5_final.nc - - -# -- Clean the repository -rm weights.nc -rm triangular-grid.nc - diff --git a/cases/icon-art-global/icon_runjob.cfg b/cases/icon-art-global/icon_runjob.cfg deleted file mode 100644 index 69b725b7..00000000 --- a/cases/icon-art-global/icon_runjob.cfg +++ /dev/null @@ -1,402 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name="{cfg.casename}_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" -#SBATCH --account={cfg.compute_account} -#SBATCH --time={cfg.icon_walltime} -#SBATCH --nodes={cfg.icon_np_tot} -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --hint=nomultithread -#SBATCH --output={logfile} -#SBATCH --open-mode=append -#SBATCH --chdir={cfg.icon_work} - -# -- OpenMP environment variables -export OMP_NUM_THREADS=1 -export ICON_THREADS=1 -export OMP_SCHEDULE=static,12 -export OMP_DYNAMIC="false" -export OMP_STACKSIZE=200M - - -# -- ECCODES path -export ECCODES_DEFINITION_PATH=/store/empa/em05/eccodes_definitions/definitions.edzw-2.12.5-2 -export ECCODES_DEFINITION_PATH=$ECCODES_DEFINITION_PATH:/store/empa/em05/easybuild.backup/software/ecCodes/2.12.5-CrayGNU-20.08/share/eccodes/definitions -export ECCODES_DEFINITION_PATH=$ECCODES_DEFINITION_PATH:/project/g110/spack-install/daint/eccodes/2.19.0/pgi/6skdmw5lsn6mjv4esxkyalf6xogllshi/share/eccodes/definitions/ - -set -x - -# -- Set time step -dtime=900 - -# ---------------------------------------------------------------------------- -# Create ICON master namelist -# ---------------------------------------------------------------------------- - -cat > icon_master.namelist << EOF -! master_model_nml: repeated for each model ---------------------------------- -&master_model_nml - model_type = 1 ! identifies which component to run (atmosphere,ocean,...) - model_name = "ATMO" ! character string for naming this component. - model_namelist_filename = "NAMELIST_NWP" ! file name containing the model namelists - model_min_rank = 1 ! start MPI rank for this model - model_max_rank = 65536 ! end MPI rank for this model - model_inc_rank = 1 ! stride of MPI ranks -/ - -! time_nml: specification of date and time------------------------------------ -&time_nml - ini_datetime_string = "{cfg.ini_datetime_string}" ! initial date and time of the simulation - end_datetime_string = "{cfg.end_datetime_string}" ! end date and time of the simulation - is_relative_time = .TRUE. ! if time loop shall start with step 0 -/ -EOF - -# ---------------------------------------------------------------------- -# Create model namelists -# ---------------------------------------------------------------------- - -cat > NAMELIST_NWP << EOF -! parallel_nml: MPI parallelization ------------------------------------------- -¶llel_nml - nproma = 8 ! optimal setting 8 for CRAY; use 16 or 24 for IBM - num_io_procs = 1 ! up to one PE per output stream is possible - num_prefetch_proc = 1 -/ - - -! grid_nml: horizontal grid -------------------------------------------------- -&grid_nml - dynamics_grid_filename = "{cfg.dynamics_grid_filename_scratch}" ! array of the grid filenames for the dycore - dynamics_parent_grid_id = 0 ! array of the indexes of the parent grid filenames - lredgrid_phys = .TRUE. ! .true.=radiation is calculated on a reduced grid - lfeedback = .TRUE. ! specifies if feedback to parent grid is performed - ifeedback_type = 2 ! feedback type (incremental/relaxation-based) -/ - - -! initicon_nml: specify read-in of initial state ------------------------------ -&initicon_nml - init_mode = 2 ! 2: start from IFS data - ifs2icon_filename = '{cfg.inicond_filename_scratch}' ! initial data filename - zpbl1 = 500. ! bottom height (AGL) of layer used for gradient computation - zpbl2 = 1000. ! top height (AGL) of layer used for gradient computation -/ - -! extpar_nml: external data -------------------------------------------------- -&extpar_nml - extpar_filename = '{cfg.extpar_filename_scratch}' ! filename of external parameter input file - itopo = 1 ! topography (0:analytical) - itype_vegetation_cycle = 2 ! specifics for annual cycle of LAI - n_iter_smooth_topo = 1 ! iterations of topography smoother - heightdiff_threshold = 2250. - hgtdiff_max_smooth_topo = 750. - read_nc_via_cdi = .TRUE. - itype_lwemiss = 2 -/ - -! io_nml: general switches for model I/O ------------------------------------- -&io_nml - itype_pres_msl = 5 ! method for computation of mean sea level pressure - itype_rh = 1 ! method for computation of relative humidity - lnetcdf_flt64_output = .FALSE. ! NetCDF files is written in 64-bit instead of 32-bit accuracy -/ - -! run_nml: general switches --------------------------------------------------- -&run_nml - dtime = ${{dtime}} ! timestep in seconds - iforcing = 3 ! forcing of dynamics and transport by parameterized processes - lart = .TRUE. ! main switch for ART - ldynamics = .TRUE. ! compute adiabatic dynamic tendencies - ltestcase = .FALSE. ! real case run - ltimer = .FALSE. ! timer for monitoring the runtime of specific routines - ltransport = .TRUE. ! compute large-scale tracer transport - lvert_nest = .FALSE. ! vertical nesting - msg_level = 10 ! detailed report during integration - timers_level = 1 ! performance timer granularity - output = "nml" ! main switch for enabling/disabling components of the model output - num_lev = 65 ! number of full levels (atm.) for each domain -/ - -! nwp_phy_nml: switches for the physics schemes ------------------------------ -&nwp_phy_nml - lrtm_filename = '{cfg.lrtm_filename_scratch}' ! longwave absorption coefficients for RRTM_LW - cldopt_filename = '{cfg.cldopt_filename_scratch}' ! RRTM cloud optical properties - dt_rad = $(( 4 * dtime)) ! time step for radiation in s - dt_conv = $(( 1 * dtime)) ! time step for convection in s (domain specific) - dt_sso = $(( 2 * dtime)) ! time step for SSO parameterization - dt_gwd = $(( 2 * dtime)) ! time step for gravity wave drag parameterization - efdt_min_raylfric = 7200. ! minimum e-folding time of Rayleigh friction - icapdcycl = 3 ! apply CAPE modification to improve diurnalcycle over tropical land - icpl_aero_conv = 1 ! coupling between autoconversion and Tegen aerosol climatology - icpl_aero_gscp = 0 ! - icpl_o3_tp = 1 ! - inwp_cldcover = 1 ! cloud cover scheme for radiation - inwp_convection = 1 ! convection - inwp_gscp = 1 ! cloud microphysics and precipitation - inwp_gwd = 1 ! non-orographic gravity wave drag - inwp_radiation = 1 ! radiation - inwp_satad = 1 ! saturation adjustment - inwp_sso = 1 ! subgrid scale orographic drag - inwp_surface = 1 ! surface scheme - inwp_turb = 1 ! vertical diffusion and transfer - itype_z0 = 2 ! type of roughness length data - latm_above_top = .TRUE. ! take into account atmosphere above model top for radiation computation - ldetrain_conv_prec = .TRUE. ! Activate detrainment of convective rain and snowl - mu_rain = 0.5 - rain_n0_factor = 0.1 - lshallowconv_only = .FALSE. - lgrayzone_deepconv = .TRUE. ! activates shallow and deep convection but not mid-level convection, -/ - -! nwp_tuning_nml: additional tuning parameters ---------------------------------- -&nwp_tuning_nml - itune_albedo = 1 - tune_box_liq_asy = 4.0 - tune_gfrcrit = 0.333 - tune_gkdrag = 0.0 - tune_gkwake = 0.25 - tune_gust_factor = 7.0 - tune_minsnowfrac = 0.3 - tune_sgsclifac = 1.0 - tune_rcucov = 0.075 - tune_rhebc_land = 0.825 - tune_zvz0i = 0.85 - icpl_turb_clc = 2 - max_calibfac_clcl = 2.0 - tune_box_liq = 0.04 -/ - - -! turbdiff_nml: turbulent diffusion ------------------------------------------- -&turbdiff_nml - a_hshr = 2.0 ! length scale factor for separated horizontal shear mode - frcsmot = 0.2 ! these 2 switches together apply vertical smoothing of the TKE source terms - icldm_turb = 2 ! mode of cloud water representation in turbulence - imode_frcsmot = 2 ! in the tropics (only), which reduces the moist bias in the tropical lower troposphere - imode_tkesso = 2 - itype_sher = 2 - ltkeshs = .TRUE. ! type of shear forcing used in turbulence - ltkesso = .TRUE. - pat_len = 750. ! effective length scale of thermal surface patterns - q_crit = 2.0 - rat_sea = 0.8 - tkhmin = 0.5 - tkmmin = 0.75 - tur_len = 300. - rlam_heat = 10.0 - alpha1 = 0.125 -/ - -&lnd_nml - c_soil = 1.25 - c_soil_urb = 0.5 - cwimax_ml = 5.e-4 - idiag_snowfrac = 20 - itype_evsl = 4 - itype_heatcond = 3 - itype_lndtbl = 4 - itype_root = 2 - itype_snowevap = 3 - itype_trvg = 3 - llake = .TRUE. - lmulti_snow = .FALSE. - lprog_albsi = .TRUE. - itype_canopy = 2 - lseaice = .TRUE. - lsnowtile = .TRUE. - nlev_snow = 3 - ntiles = 3 - sstice_mode = 2 -/ - -! radiation_nml: radiation scheme --------------------------------------------- -&radiation_nml - albedo_type = 2 ! Modis albedo - irad_o3 = 79 ! ozone climatology - irad_aero = 6 - islope_rad = 0 - direct_albedo_water = 3 - albedo_whitecap = 1 - vmr_co2 = 407.e-06 ! values representative for 2012 - vmr_ch4 = 1857.e-09 - vmr_n2o = 330.0e-09 - vmr_o2 = 0.20946 - vmr_cfc11 = 240.e-12 - vmr_cfc12 = 532.e-12 -/ - -! nonhydrostatic_nml: nonhydrostatic model ----------------------------------- -&nonhydrostatic_nml - damp_height = 12250.0 ! height at which Rayleigh damping of vertical wind starts - divdamp_fac = 0.004 ! scaling factor for divergence damping - divdamp_order = 24 ! order of divergence damping - divdamp_type = 32 ! type of divergence damping - exner_expol = 0.6 ! temporal extrapolation of Exner function - hbot_qvsubstep = 22500.0 ! height above which QV is advected with substepping scheme - htop_moist_proc = 22500.0 ! max. height for moist physics - iadv_rhotheta = 2 ! advection method for rho and rhotheta - igradp_method = 3 ! discretization of horizontal pressure gradient - itime_scheme = 4 ! time integration scheme - ivctype = 2 ! type of vertical coordinate - l_open_ubc = .FALSE. ! .TRUE.=use open upper boundary condition - l_zdiffu_t = .TRUE. ! specifies computation of Smagorinsky temperature diffusion - rayleigh_coeff = 5.0 ! Rayleigh damping coefficient - thhgtd_zdiffu = 125.0 ! threshold of height difference (temperature diffusion) - thslp_zdiffu = 0.02 ! slope threshold (temperature diffusion) - vwind_offctr = 0.2 ! off-centering in vertical wind solver -/ - -! sleve_nml: vertical level specification ------------------------------------- -&sleve_nml - decay_exp = 1.2 ! exponent of decay function - decay_scale_1 = 4000.0 ! decay scale of large-scale topography component - decay_scale_2 = 2500.0 ! decay scale of small-scale topography component - flat_height = 16000.0 ! height above which the coordinate surfaces are flat - itype_laydistr = 1 - min_lay_thckn = 20.0 ! minimum layer thickness of lowermost layer - stretch_fac = 0.65 ! stretching factor to vary distribution of model levels - htop_thcknlimit = 15000.0 - top_height = 75000.0 ! height of model top -/ - -! dynamics_nml: dynamical core ----------------------------------------------- -&dynamics_nml - divavg_cntrwgt = 0.50 ! weight of central cell for divergence averaging - idiv_method = 1 ! method for divergence computation - iequations = 3 ! type of equations and prognostic variables - lcoriolis = .TRUE. ! Coriolis force -/ - -! transport_nml: tracer transport --------------------------------------------- -&transport_nml - ctracer_list = '12345' ! kann vermutlich raus - ihadv_tracer = 52,2,2,2,2,2 ! tracer specific method to compute horizontal advection - ivadv_tracer = 3,3,3,3,3,3 ! tracer specific method to compute vertical advection - itype_hlimit = 3,4,4,4,4,4 ! type of limiter for horizontal transport - llsq_svd = .TRUE. - beta_fct = 1.005 -/ - -! diffusion_nml: horizontal (numerical) diffusion ---------------------------- -&diffusion_nml - hdiff_efdt_ratio = 24.0 ! ratio of e-folding time to time step - hdiff_order = 5 ! order of nabla operator for diffusion - hdiff_smag_fac = 0.025 ! scaling factor for Smagorinsky diffusion - itype_t_diffu = 2 ! discretization of temperature diffusion - itype_vn_diffu = 1 ! reconstruction method used for Smagorinsky diffusion - lhdiff_vn = .TRUE. ! diffusion on the horizontal wind field - lhdiff_temp = .TRUE. ! diffusion on the temperature field -/ - -! interpol_nml: settings for internal interpolation methods ------------------ -&interpol_nml - lsq_high_ord = 3 - l_intp_c2l = .TRUE. - l_mono_c2l = .TRUE. -/ - -! nudging_nml: settings for global nudging ----------------------------------- -&nudging_nml -nudge_type = {cfg.nudge_type} ! global nudging -nudge_var = 'vn' ! variables that shall be nudged, default = all (vn,thermdyn,qv) -nudge_start_height = 0. ! Start nudging at the surface -nudge_end_height = 75000.0 ! End nudging at the top -nudge_profile = 2 -/ - -! limarea_nml: settings for global nudging ----------------------------------- -&limarea_nml -itype_latbc = 1 ! time-dependent lateral boundary conditions provided by an external source -dtime_latbc = {cfg.nudging_step_seconds} ! Time difference between two consecutive boundary data -latbc_path = '{cfg.icon_input_icbc}' ! Absolute path to boundary data -latbc_filename = 'era2icon_R2B03__nudging.nc' ! boundary data input filename -latbc_varnames_map_file = '{cfg.map_file_nudging_scratch}' ! Dictionary file which maps internal variable names onto GRIB2 shortnames or NetCDF varnames -latbc_boundary_grid = ' ' ! no boundary grid: driving data have to be available on entire grid (important to let a space) -/ - -! art_nml: Aerosols and Reactive Trace gases extension------------------------------------------------- -&art_nml - lart_diag_out = .TRUE. ! If this switch is set to .TRUE., diagnostic - ! ... output elds are available. Set it to - ! ... .FALSE. when facing memory problems. - lart_pntSrc = .TRUE. ! enables point sources - !lart_bound_cond = .FALSE. ! enables boundary conditions - lart_chem = .TRUE. ! enables chemistry - lart_chemtracer = .TRUE. ! main switch for the treatment of chemical tracer - lart_aerosol = .FALSE. ! main switch for the treatment of atmospheric aerosol - - iart_seasalt = 0 - iart_init_gas = {cfg.iart_init_gas} - cart_cheminit_type = 'EMAC' - cart_cheminit_file = '{cfg.inicond_filename_scratch}' - cart_cheminit_coord = '{cfg.inicond_filename_scratch}' - - cart_chemtracer_xml = '{cfg.chemtracer_xml_filename_scratch}' ! path to xml file for chemical tracers - cart_pntSrc_xml = '{cfg.pntSrc_xml_filename_scratch}' ! path to xml file for point sources - cart_input_folder = '{cfg.input_root_art}' ! absolute Path to ART source code -/ - -! output_nml: specifies an output stream -------------------------------------- -&output_nml - filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2 - dom = -1 ! write all domains - output_bounds = 0.,100000000,{cfg.output_writing_step} ! start, end, increment - output_time_unit = 3 ! Unit of bounds is in hours instead of seconds - steps_per_file = 1 ! number of steps per file - steps_per_file_inclfirst = .FALSE. ! First step is not accounted for in steps_per_file - include_last = .FALSE. - mode = 1 ! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis) - output_filename = 'ICON-ART' - filename_format = '{cfg.icon_output}/_latlon_' ! file name base - remap = 1 ! 1: remap to lat-lon grid - reg_lon_def = -179.,2,179 - reg_lat_def = 89.,-2,-89. - ml_varlist = 'z_ifc','pres','qv','rho','temp','u','v','group:ART_CHEMISTRY','OH_Nconc', -/ - -! output_nml: specifies an output stream -------------------------------------- -&output_nml - filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2 - dom = -1 ! write all domains - output_bounds = 0.,100000000,{cfg.output_writing_step} ! start, end, increment - output_time_unit = 3 ! Unit of bounds is in hours instead of seconds - steps_per_file = 1 ! number of steps per file - steps_per_file_inclfirst = .FALSE. ! First step is not accounted for in steps_per_file - include_last = .FALSE. - mode = 1 ! 1: forecast mode (mrelative t-axis), 2: climate mode (absolute t-axis) - output_filename = 'ICON-ART' - filename_format = '{cfg.icon_output}/_unstr_' ! file name base - remap = 0 ! 1: remap to lat-lon grid - ml_varlist = 'z_ifc','pres','qv','rho','temp','u','v','group:ART_CHEMISTRY','OH_Nconc', -/ - - -EOF - -# ! ml_varlist = 'z_ifc','z_mc','pres','pres_sfc','qv','rho','temp','u','v','group:ART_CHEMISTRY', - -# ---------------------------------------------------------------------- -# run the model! -# ---------------------------------------------------------------------- - srun ./icon.exe - - - -# ! output_nml: specifies an output stream -------------------------------------- -# &output_nml -# filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2 -# dom = -1 ! write all domains -# output_bounds = 0., 2678400., 3600. ! start, end, increment -# steps_per_file = 1 ! number of steps per file -# mode = 1 ! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis) -# include_last = .TRUE. -# output_filename = 'ICON-ART' -# filename_format = '{cfg.icon_output}/_latlon_' ! file name base -# remap = 1 ! 1: remap to lat-lon grid -# reg_lon_def = -179.,2,179 -# reg_lat_def = 90.,-1,-90. -# ml_varlist = 'z_ifc','z_mc','pres','pres_sfc','qc','rh','rho','temp','u','v','w','group:ART_CHEMISTRY', -# / \ No newline at end of file diff --git a/cases/icon-art-global/icon_species_inicond.sh b/cases/icon-art-global/icon_species_inicond.sh deleted file mode 100644 index e76abb76..00000000 --- a/cases/icon-art-global/icon_species_inicond.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash - -cd {cfg.icon_input_icbc} - - -species2restart=($(echo {cfg.species2restart} | tr -d '[],')) - - -if [[ {cfg.lrestart} == '.FALSE.' ]]; then - - # ---------------------------------------------------------- - # -- Replicate Q and GEOSP variables for ICON-ART - # ---------------------------------------------------------- - - cdo expr,'Q=QV;' {filename} tmp.nc - ncks -A -v Q tmp.nc {filename} - rm tmp.nc - - cdo expr,'GEOP_SFC=GEOSP;' {filename} tmp.nc - ncks -A -v GEOP_SFC tmp.nc {filename} - rm tmp.nc - -fi - -# ---------------------------------------------------------- -# -- Create CH4 and CO variables (if CAMS not available) -# ---------------------------------------------------------- -if [[ "${{species2restart[*]}}" =~ "TRCH4" || "${{species2restart[*]}}" =~ "TRCO" ]]; then - - # ---------------------------------------------------------- - # -- Remap CAMS data (if CAMS available...) - # ---------------------------------------------------------- - - # # -- Convert the GRIB files to NetCDF - # cdo -t ecmwf -f nc copy cams.grib cams.nc - - # # -- Retrieve the dynamic horizontal grid - # cdo -s selgrid,2 {cfg.dynamics_grid_filename_scratch} triangular-grid.nc - - # # -- Remap - # cdo -s remapdis,triangular-grid.nc cams.nc cams_final.nc - # rm cams.nc - - # # -- Merge CAMS and ERA5 data - # ncks -h -A cams.nc tmp.nc - # rm cams.nc cams.grib - - # # -- Rename variables - # ncrename -h CH4,TRCH4 tmp.nc - # ncrename -h CO,TRCO tmp.nc - # ncks tmp.nc {filename} - # rm tmp.nc - - # ---------------------------------------------------------- - # -- Or just create basic variables - # ---------------------------------------------------------- - var_tracer="TRCH4{ext_restart}" - cdo expr,"TRCH4=QV / QV * 0.000002;" {filename} tmp.nc - if [ ! -z "{ext_restart}" ] ; then - ncrename -h -v TRCH4,${{var_tracer}} tmp.nc - fi - ncks -A -v ${{var_tracer}} tmp.nc {filename} - rm tmp.nc - - var_tracer="TRCO{ext_restart}" - cdo expr,"TRCO=QV / QV * 0.000002;" {filename} tmp.nc - if [ ! -z "{ext_restart}" ] ; then - ncrename -h -v TRCO,${{var_tracer}} tmp.nc - fi - ncks -A -v ${{var_tracer}} tmp.nc {filename} - rm tmp.nc - - -fi - diff --git a/cases/icon-art-global/icon_species_nudging.sh b/cases/icon-art-global/icon_species_nudging.sh deleted file mode 100644 index 6d7f91fd..00000000 --- a/cases/icon-art-global/icon_species_nudging.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -cd {cfg.icon_input_icbc} - -# ---------------------------------------------------------- -# -- Replicate Q and GEOSP variables for ICON-ART -# ---------------------------------------------------------- - -cdo expr,'Q=QV;' {filename} tmp.nc -ncks -A -v Q tmp.nc {filename} -rm tmp.nc - -cdo expr,'GEOP_SFC=GEOSP;' {filename} tmp.nc -ncks -A -v GEOP_SFC tmp.nc {filename} -rm tmp.nc - -# ---------------------------------------------------------- -# -- Remap CAMS data (if CAMS available) -# ---------------------------------------------------------- - -# # -- Convert the GRIB files to NetCDF -# cdo -t ecmwf -f nc copy cams.grib cams.nc - -# # -- Retrieve the dynamic horizontal grid -# cdo -s selgrid,2 {cfg.dynamics_grid_filename_scratch} triangular-grid.nc - -# # -- Remap -# cdo -s remapdis,triangular-grid.nc cams.nc cams_final.nc -# rm cams.nc - -# # -- Merge CAMS and ERA5 data -# ncks -h -A cams.nc tmp.nc -# rm cams.nc cams.grib - -# # -- Rename variables -# ncrename -h CH4,TRCH4 tmp.nc -# ncrename -h CO,TRCO tmp.nc -# ncks tmp.nc {filename} -# rm tmp.nc - -# ---------------------------------------------------------- -# -- Create CH4 and CO variables (if CAMS not available) -# ---------------------------------------------------------- - -cdo expr,'TRCH4=QV / QV * 0.000002;' {filename} tmp.nc -ncks -A -v TRCH4 tmp.nc {filename} -rm tmp.nc - -cdo expr,'TRCO=QV / QV * 0.0000002;' {filename} tmp.nc -ncks -A -v TRCO tmp.nc {filename} -rm tmp.nc - -cdo expr,'TROH=QV / QV * 0.000004;' {filename} tmp.nc -ncks -A -v TROH tmp.nc {filename} -rm tmp.nc diff --git a/cases/icon-art-global/mypartab b/cases/icon-art-global/mypartab deleted file mode 100644 index 9552aa1f..00000000 --- a/cases/icon-art-global/mypartab +++ /dev/null @@ -1,117 +0,0 @@ -¶meter ! temperature -name = "t" -out_name = "T" -/ -¶meter ! horiz. wind comp. u -name = "u" -out_name = "U" -/ -¶meter ! horiz. wind comp. u -name = "v" -out_name = "V" -/ -¶meter ! vertical velocity -name = "w" -out_name = "W" -/ -¶meter ! specific humidity -name = "q" -out_name = "QV" -/ -¶meter ! cloud liquid water content -name = "clwc" -out_name = "QC" -/ -¶meter ! cloud ice water content -name = "ciwc" -out_name = "QI" -/ -¶meter ! rain water content -name = "crwc" -out_name = "QR" -/ -¶meter ! snow water content -name = "cswc" -out_name = "QS" -/ -¶meter ! snow temperature -name = "TSN" -out_name = "T_SNOW" -/ -¶meter ! water content of snow -name = "SD" -out_name = "W_SNOW" -/ -¶meter ! density of snow -name = "RSN" -out_name = "RHO_SNOW" -/ -¶meter ! snow albedo -name = "ASN" -out_name = "ALB_SNOW" -/ -¶meter ! skin temperature -name = "SKT" -out_name = "SKT" -/ -¶meter ! sea surface temperature -name = "SSTK" -out_name = "SST" -/ -¶meter ! soil temperature level 1 -name = "STL1" -out_name = "STL1" -/ -¶meter ! soil temperature level 2 -name = "STL2" -out_name = "STL2" -/ -¶meter ! soil temperature level 3 -name = "STL3" -out_name = "STL3" -/ -¶meter ! soil temperature level 4 -name = "STL4" -out_name = "STL4" -/ -¶meter ! sea-ice cover -name = "CI" -out_name = "CI" -/ -¶meter ! water cont. of interception storage -name = "SRC" -out_name = "W_I" -/ -¶meter ! Land/sea mask -name = "LSM" -out_name = "LSM" -/ -¶meter ! soil moisture index layer 1 -name = "SWVL1" -out_name = "SMIL1" -/ -¶meter ! soil moisture index layer 2 -name = "SWVL2" -out_name = "SMIL2" -/ -¶meter ! soil moisture index layer 3 -name = "SWVL3" -out_name = "SMIL3" -/ -¶meter ! soil moisture index layer 4 -name = "SWVL4" -out_name = "SMIL4" -/ -¶meter ! logarithm of surface pressure -name = "LNSP" -out_name = "LNPS" -/ -¶meter ! logarithm of surface pressure -name = "SP" -out_name = "PS" -/ -¶meter -name = "Z" -out_name = "GEOSP" -/ - diff --git a/cases/icon-art-oem-ensembles-test/config.py b/cases/icon-art-oem-ensembles-test/config.py deleted file mode 100644 index c8547330..00000000 --- a/cases/icon-art-oem-ensembles-test/config.py +++ /dev/null @@ -1,167 +0,0 @@ -import os -""" -Configuration file for the 'icon-art-oem-ensembles-test' case with ICON-ART -""" - -# GENERAL SETTINGS =========================================================== -user = os.environ['USER'] -if os.path.exists(os.environ['HOME'] + '/.acct'): - with open(os.environ['HOME'] + '/.acct', 'r') as file: - compute_account = file.read().rstrip() -else: - compute_account = os.popen("id -gn").read().splitlines()[0] -compute_host = 'daint' -compute_queue = 'debug' # 'normal' / 'debug' -constraint = 'mc' # 'mc' / 'gpu' - -model = 'icon-art-oem' -restart_step = 24 # hours - -if constraint == 'gpu': - ntasks_per_node = 12 -elif constraint == 'mc': - ntasks_per_node = 36 - -# case name = pathname in cases/ -path = os.path.realpath(__file__) -casename = os.path.basename(os.path.dirname(path)) - -# Root directory of the sourcecode of the chain (where run_chain.py is) -chain_src_dir = os.getcwd() - -# Root directory of the working space of the chain -work_root = os.path.join(chain_src_dir, 'work') - -# Directory where executables are stored -exe_dir = "/store/empa/em05/executables" - -# Case directory -case_dir = os.path.join(chain_src_dir, 'cases', casename) - -# PREPARE_DATA --------------------------------------------------------------- -input_root = '/store/empa/em05/input_iconart_processing_chain_example/' - -input_root_meteo = '/store/empa/em05/input_iconart_processing_chain_example/meteo' -meteo_prefix = 'ifs_' -meteo_nameformat = meteo_prefix + '%Y%m%d%H' -meteo_suffix = '.grb' -meteo_inc = 3 - -input_root_chem = '/store/empa/em05/input_iconart_processing_chain_example/chem' - -input_root_icbc = os.path.join(input_root, 'icbc') -chem_prefix = 'cams_gqpe_' -chem_nameformat = chem_prefix + '%Y%m%d_%H' -chem_suffix = '.grb' -chem_inc = 3 - -icontools_runjobs = [ - 'icontools_remap_ic_runjob.cfg', - 'icontools_remap_00_lbc_runjob.cfg', - 'icontools_remap_lbc_rest_runjob.cfg', - 'icontools_remap_ic_chem_runjob.cfg', - 'icontools_remap_lbc_chem_runjob.cfg', -] - -# Icontools executables -#icontools_dir = '/project/s903/mjaehn/spack-install/daint/icontools/master/cce/ldcbgsjjzq2p73xbei7ws4wce5ivzxer/bin/' -icontools_dir = '/scratch/snx3000/msteiner/spack-stages/daint/spack-stage-icontools-master-t524rnfa5sfyn4rbvarypyzwae4jg46d/spack-src/icontools' -iconremap_bin = os.path.join(icontools_dir, "iconremap") -iconsub_bin = os.path.join(icontools_dir, "iconsub") - -# Input data for runscript---------------------------------------------------- -# Grid -input_root_grid = os.path.join(input_root, 'grids') -radiation_grid_filename = os.path.join(input_root_grid, - "testcase_DOM01.parent.nc") -dynamics_grid_filename = os.path.join(input_root_grid, "testcase_DOM01.nc") -map_file_latbc = os.path.join(input_root_grid, "map_file.latbc") -extpar_filename = os.path.join( - input_root_grid, "external_parameter_icon_testcase_DOM01_tiles.nc") -input_root_rad = os.path.join(input_root, 'rad') -cldopt_filename = os.path.join(input_root_rad, 'rrtm_cldopt.nc') -lrtm_filename = os.path.join(input_root_rad, 'rrtmg_lw.nc') - -input_root_mapping = os.path.join(input_root, 'mapping') -map_file_ana = os.path.join(input_root_mapping, "map_file.ana") - -# File names ----------------------------------------------------------------- -latbc_filename = "ifs__lbc.nc" -inidata_prefix = "ifs_init_" -inidata_nameformat = inidata_prefix + '%Y%m%d%H' -inidata_filename_suffix = ".nc" - -output_filename = "icon-art-test" -filename_format = "_DOM_" - -# ART settings---------------------------------------------------------------- -input_root_tracers = os.path.join(input_root, 'XML') -chemtracer_xml_filename = os.path.join(input_root_tracers, - 'tracers_ensemble.xml') -art_input_folder = os.path.join(input_root, 'ART') - -# OAE ------------------------------------------------------------------------ -# Online anthropogenic emissions -oae_dir = os.path.join(input_root, 'OEM') -oae_gridded_emissions_nc = 'tno_3cat.nc' -oae_vertical_profiles_nc = 'vertical_profiles.nc' -oae_hourofday_nc = 'hourofday.nc' -oae_dayofweek_nc = 'dayofweek.nc' -oae_monthofyear_nc = 'monthofyear.nc' -#oae_hourofyear_nc = 'hourofyear.nc' -oae_ens_reg_nc = 'regions_testcase.nc' -oae_ens_lambda_nc = 'lambdas_testcase.nc' - -# SIMULATION ================================================================= -# ICON ----------------------------------------------------------------------- -# Executable -icon_bin = os.path.join(exe_dir, "icon-art-oem-nudging_20211011") - -# Namelists and slurm runscript templates -icon_runjob = os.path.join(case_dir, 'icon_runjob.cfg') -icon_namelist_master = os.path.join(case_dir, 'icon_master.namelist.cfg') -icon_namelist_nwp = os.path.join(case_dir, 'icon_NAMELIST_NWP.cfg') - -# Walltimes and domain decomposition -if compute_queue == "normal": - icon_walltime = "00:30:00" - icon_np_tot = 16 -elif compute_queue == "debug": - icon_walltime = "00:30:00" - icon_np_tot = 10 - -# POST-PROCESSING ============================================================ -# REDUCE_OUTPUT -------------------------------------------------------------- -convert_gas = True -output_levels = 20 - -# POST_COSMO ----------------------------------------------------------------- -# Root directory where the output of the chain is copied to -output_root = os.path.join(chain_src_dir, "output", casename) - -# VERIFY_CHAIN --------------------------------------------------------------- -reference_dir = os.path.join(input_root, "reference_output") - -# If the output file that gets compared to the reference is not at the location -# that post_icon copied it to, give the path to it here. Else leave it 'None' -#output_dir = None -output_dir = os.path.join(work_root, casename, '2018010100_0_24', 'icon', - 'output') - -# variables_to_check is a dict() with a tuple() of filenames as key and a list -# of variables-names as value. The tuple consists of the filenames of the two -# files to check, the list contains the variable-names that are compared. -# The verify_chain job will look for the files in the reference_dir (first tuple -# element) and the ouput_dir (second tuple element) -values_to_check = { - ("icon-oem-pgi-20.1.1-cpu-20210215-NWP_LAM_DOM01_01000000.nc", "NWP_LAM_DOM01_01000000.nc"): - [ - 'temp', - 'pres', - 'u', - 'v', - 'w', - 'OEM_tracer_1', - 'OEM_tracer_2', - ] -} diff --git a/cases/icon-art-oem-ensembles-test/icon_runjob.cfg b/cases/icon-art-oem-ensembles-test/icon_runjob.cfg deleted file mode 100755 index 967589ed..00000000 --- a/cases/icon-art-oem-ensembles-test/icon_runjob.cfg +++ /dev/null @@ -1,379 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name="{cfg.casename}_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" -#SBATCH --account={cfg.compute_account} -#SBATCH --time={cfg.icon_walltime} -#SBATCH --nodes={cfg.icon_np_tot} -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --hint=nomultithread -#SBATCH --output={logfile} -#SBATCH --open-mode=append -#SBATCH --chdir={cfg.icon_work} - -# OpenMP environment variables -# ---------------------------- -export OMP_NUM_THREADS=1 -export ICON_THREADS=1 -export OMP_SCHEDULE=static,12 -export OMP_DYNAMIC="false" -export OMP_STACKSIZE=200M -# -# MPI variables -# ------------- -no_of_nodes={cfg.icon_np_tot} -mpi_procs_pernode={cfg.ntasks_per_node} -((mpi_total_procs=no_of_nodes * mpi_procs_pernode)) -# -# blocking length -# --------------- -nproma=16 - -set -x - -export ECCODES_DEFINITION_PATH=/users/msteiner/eccodes_definitions/definitions.edzw-2.12.5-2:/store/empa/em05/easybuild/software/ecCodes/2.12.5-CrayGNU-19.10/share/eccodes/definitions - -# ---------------------------------------------------------------------------- -# Link radiation input files -# ---------------------------------------------------------------------------- -ln -sf {cfg.art_input_folder}/runctrl_examples/photo_ctrl/* . -ln -sf {cfg.art_input_folder}/runctrl_examples/init_ctrl/* . - -# ---------------------------------------------------------------------------- -# create ICON master namelist -# ---------------------------------------------------------------------------- - -cat > icon_master.namelist << EOF -! master_nml: ---------------------------------------------------------------- -&master_nml - lrestart = {cfg.lrestart} ! .TRUE.=current experiment is resumed -/ - -! master_model_nml: repeated for each model ---------------------------------- -&master_model_nml - model_type = 1 ! identifies which component to run (atmosphere,ocean,...) - model_name = "ATMO" ! character string for naming this component. - model_namelist_filename = "NAMELIST_NWP" ! file name containing the model namelists - model_min_rank = 1 ! start MPI rank for this model - model_max_rank = 65536 ! end MPI rank for this model - model_inc_rank = 1 ! stride of MPI ranks -/ - -! time_nml: specification of date and time------------------------------------ -&time_nml - ini_datetime_string = "{cfg.ini_datetime_string}" ! initial date and time of the simulation - end_datetime_string = "{cfg.end_datetime_string}" ! end date and time of the simulation 10T00 -/ -EOF - -# ---------------------------------------------------------------------- -# model namelists -# ---------------------------------------------------------------------- - -cat > NAMELIST_NWP << EOF -! parallel_nml: MPI parallelization ------------------------------------------- -¶llel_nml - nproma = 128 ! loop chunk length - p_test_run = .FALSE. ! .TRUE. means verification run for MPI parallelization - num_io_procs = 1 ! number of I/O processors - num_restart_procs = 0 ! number of restart processors - num_prefetch_proc = 1 ! number of processors for LBC prefetching - iorder_sendrecv = 3 ! sequence of MPI send/receive calls -/ - - -! run_nml: general switches --------------------------------------------------- -&run_nml - ltestcase = .FALSE. ! real case run - num_lev = 60 ! number of full levels (atm.) for each domain - lvert_nest = .FALSE. ! no vertical nesting - dtime = 60. ! timestep in seconds - ldynamics = .TRUE. ! compute adiabatic dynamic tendencies - ltransport = .TRUE. ! compute large-scale tracer transport - ntracer = 0 ! number of advected tracers - iforcing = 3 ! forcing of dynamics and transport by parameterized processes - msg_level = 7 ! detailed report during integration - ltimer = .TRUE. ! timer for monitoring the runtime of specific routines - timers_level = 10 ! performance timer granularity - check_uuid_gracefully = .TRUE. ! give only warnings for non-matching uuids - output = "nml" ! main switch for enabling/disabling components of the model output - lart = .TRUE. ! main switch for ART - debug_check_level = 10 -/ - -! art_nml: Aerosols and Reactive Trace gases extension------------------------------------------------- -&art_nml - lart_chem = .TRUE. ! enables chemistry - lart_pntSrc = .FALSE. ! enables point sources - lart_aerosol = .FALSE. ! main switch for the treatment of atmospheric aerosol - lart_chemtracer = .TRUE. ! main switch for the treatment of chemical tracer - lart_diag_out = .TRUE. ! If this switch is set to .TRUE., diagnostic - ! ... output elds are available. Set it to - ! ... .FALSE. when facing memory problems. - iart_init_gas = 4 - cart_cheminit_file = '{inidata_filename}' - cart_cheminit_type = 'EMAC' - cart_cheminit_coord = '{inidata_filename}' - iart_seasalt = 0 ! enable seasalt - cart_chemtracer_xml = '{cfg.chemtracer_xml_filename_scratch}' ! path to xml file for passive tracers - cart_input_folder = '{cfg.art_input_folder}' ! absolute Path to ART source code -/ - -! oem_nml: online emission module --------------------------------------------- -&oemctrl_nml - gridded_emissions_nc = '{cfg.oae_gridded_emissions_nc_scratch}' - vertical_profile_nc = '{cfg.oae_vertical_profiles_nc_scratch}' - hour_of_day_nc = '{cfg.oae_hourofday_nc_scratch}' - day_of_week_nc = '{cfg.oae_dayofweek_nc_scratch}' - month_of_year_nc = '{cfg.oae_monthofyear_nc_scratch}' - hour_of_year_nc = '{cfg.oae_hourofyear_nc_scratch}' - ens_reg_nc = '{cfg.oae_ens_reg_nc_scratch}' - ens_lambda_nc = '{cfg.oae_ens_lambda_nc_scratch}' -/ - -! diffusion_nml: horizontal (numerical) diffusion ---------------------------- -&diffusion_nml - lhdiff_vn = .TRUE. ! diffusion on the horizontal wind field - lhdiff_temp = .TRUE. ! diffusion on the temperature field - lhdiff_w = .TRUE. ! diffusion on the vertical wind field - hdiff_order = 5 ! order of nabla operator for diffusion - itype_vn_diffu = 1 ! reconstruction method used for Smagorinsky diffusion - itype_t_diffu = 2 ! discretization of temperature diffusion - hdiff_efdt_ratio = 24.0 ! ratio of e-folding time to time step - hdiff_smag_fac = 0.025 ! scaling factor for Smagorinsky diffusion -/ - -! dynamics_nml: dynamical core ----------------------------------------------- -&dynamics_nml - iequations = 3 ! type of equations and prognostic variables - idiv_method = 1 ! method for divergence computation - divavg_cntrwgt = 0.50 ! weight of central cell for divergence averaging - lcoriolis = .TRUE. ! Coriolis force -/ - -! extpar_nml: external data -------------------------------------------------- -&extpar_nml - itopo = 1 ! topography (0:analytical) - extpar_filename = '{cfg.extpar_filename_scratch}' ! filename of external parameter input file - n_iter_smooth_topo = 1,1 ! iterations of topography smoother - heightdiff_threshold = 3000. ! height difference between neighb. grid points - hgtdiff_max_smooth_topo = 750.,750. ! see Namelist doc - heightdiff_threshold = 2250.,1500. -/ - -! initicon_nml: specify read-in of initial state ------------------------------ -&initicon_nml - init_mode = 2 ! 7: start from DWD fg with subsequent vertical remapping - lread_ana = .FALSE. ! no analysis data will be read - ifs2icon_filename = "{inidata_filename}" ! initial data filename - ana_varnames_map_file = "{cfg.map_file_ana_scratch}" ! dictionary mapping internal names onto GRIB2 shortNames - ltile_coldstart = .TRUE. ! coldstart for surface tiles - ltile_init = .FALSE. ! set it to .TRUE. if FG data originate from run without tiles -/ - -! grid_nml: horizontal grid -------------------------------------------------- -&grid_nml - dynamics_grid_filename = "{cfg.dynamics_grid_filename_scratch}" ! array of the grid filenames for the dycore - radiation_grid_filename = "{cfg.radiation_grid_filename_scratch}" ! array of the grid filenames for the radiation model - dynamics_parent_grid_id = 0 ! array of the indexes of the parent grid filenames - lredgrid_phys = .TRUE. ! .true.=radiation is calculated on a reduced grid - lfeedback = .TRUE. ! specifies if feedback to parent grid is performed - l_limited_area = .TRUE. ! .TRUE. performs limited area run - ifeedback_type = 2 ! feedback type (incremental/relaxation-based) - start_time = 0. ! Time when a nested domain starts to be active [s] -/ - -! gridref_nml: grid refinement settings -------------------------------------- -&gridref_nml - denom_diffu_v = 150. ! denominator for lateral boundary diffusion of velocity -/ - -! interpol_nml: settings for internal interpolation methods ------------------ -&interpol_nml - nudge_zone_width = 8 ! width of lateral boundary nudging zone - support_baryctr_intp = .FALSE. ! barycentric interpolation support for output - nudge_max_coeff = 0.07 - nudge_efold_width = 2.0 -/ - -! io_nml: general switches for model I/O ------------------------------------- -&io_nml - itype_pres_msl = 5 ! method for computation of mean sea level pressure - itype_rh = 1 ! method for computation of relative humidity - lmask_boundary = .TRUE. ! mask out interpolation zone in output -/ - -! limarea_nml: settings for limited area mode --------------------------------- -&limarea_nml - itype_latbc = 1 ! 1: time-dependent lateral boundary conditions - dtime_latbc = 10800 ! time difference between 2 consecutive boundary data - nlev_latbc = 90 ! Number of vertical levels in boundary data - latbc_boundary_grid = "{cfg.lateral_boundary_grid_scratch}" ! Grid file defining the lateral boundary - latbc_path = "{cfg.icon_input_icbc}" ! Absolute path to boundary data - latbc_varnames_map_file = "{cfg.map_file_latbc_scratch}" - latbc_filename = "{cfg.latbc_filename}" ! boundary data input filename - init_latbc_from_fg = .FALSE. ! .TRUE.: take lbc for initial time from first guess -/ - -! lnd_nml: land scheme switches ----------------------------------------------- -&lnd_nml - ntiles = 1 ! number of tiles - nlev_snow = 3 ! number of snow layers - lmulti_snow = .FALSE. ! .TRUE. for use of multi-layer snow model - idiag_snowfrac = 20 ! type of snow-fraction diagnosis - lsnowtile = .TRUE. ! .TRUE.=consider snow-covered and snow-free separately - itype_root = 2 ! root density distribution - itype_heatcond = 3 ! type of soil heat conductivity - itype_lndtbl = 4 ! table for associating surface parameters - itype_evsl = 4 ! type of bare soil evaporation - itype_root = 2 ! root density distribution - cwimax_ml = 5.e-4 ! scaling parameter for max. interception storage - c_soil = 1.75 ! surface area density of the evaporative soil surface - c_soil_urb = 0.5 ! same for urban areas - lseaice = .TRUE. ! .TRUE. for use of sea-ice model - llake = .TRUE. ! .TRUE. for use of lake model -/ - -! nonhydrostatic_nml: nonhydrostatic model ----------------------------------- -&nonhydrostatic_nml - iadv_rhotheta = 2 ! advection method for rho and rhotheta - ivctype = 2 ! type of vertical coordinate - itime_scheme = 4 ! time integration scheme - ndyn_substeps = 5 ! number of dynamics steps per fast-physics step - exner_expol = 0.333 ! temporal extrapolation of Exner function - vwind_offctr = 0.2 ! off-centering in vertical wind solver - damp_height = 12500.0 ! height at which Rayleigh damping of vertical wind starts - rayleigh_coeff = 1.5 ! Rayleigh damping coefficient - divdamp_order = 24 ! order of divergence damping - divdamp_type = 3 ! type of divergence damping - divdamp_fac = 0.004 ! scaling factor for divergence damping - l_open_ubc = .FALSE. ! .TRUE.=use open upper boundary condition - igradp_method = 3 ! discretization of horizontal pressure gradient - l_zdiffu_t = .TRUE. ! specifies computation of Smagorinsky temperature diffusion - thslp_zdiffu = 0.02 ! slope threshold (temperature diffusion) - thhgtd_zdiffu = 125.0 ! threshold of height difference (temperature diffusion) - htop_moist_proc = 22500.0 ! max. height for moist physics - hbot_qvsubstep = 22500.0 ! height above which QV is advected with substepping scheme -/ - -! nwp_phy_nml: switches for the physics schemes ------------------------------ -&nwp_phy_nml - inwp_gscp = 2 ! cloud microphysics and precipitation - inwp_convection = 1 ! convection - lshallowconv_only = .FALSE. ! only shallow convection - inwp_radiation = 1 ! radiation - inwp_cldcover = 1 ! cloud cover scheme for radiation - inwp_turb = 1 ! vertical diffusion and transfer - inwp_satad = 1 ! saturation adjustment - inwp_sso = 1 ! subgrid scale orographic drag - inwp_gwd = 0 ! non-orographic gravity wave drag - inwp_surface = 1 ! surface scheme - latm_above_top = .TRUE. ! take into account atmosphere above model top for radiation computation - ldetrain_conv_prec = .TRUE. - efdt_min_raylfric = 7200. ! minimum e-folding time of Rayleigh friction - itype_z0 = 2 ! type of roughness length data - icapdcycl = 3 ! apply CAPE modification to improve diurnalcycle over tropical land - icpl_aero_conv = 1 ! coupling between autoconversion and Tegen aerosol climatology - icpl_aero_gscp = 1 ! coupling between autoconversion and Tegen aerosol climatology - lrtm_filename = '{cfg.lrtm_filename_scratch}' ! longwave absorption coefficients for RRTM_LW - cldopt_filename = '{cfg.cldopt_filename_scratch}' ! RRTM cloud optical properties - dt_rad = 720. ! time step for radiation in s - dt_conv = 120.,90.,90. ! time step for convection in s (domain specific) - dt_sso = 120.,360.,360. ! time step for SSO parameterization - dt_gwd = 360.,360.,360. ! time step for gravity wave drag parameterization -/ - -! nwp_tuning_nml: additional tuning parameters ---------------------------------- -&nwp_tuning_nml - itune_albedo = 1 ! reduced albedo (w.r.t. MODIS data) over Sahara - tune_gkwake = 1.8 - tune_gkdrag = 0.01 - tune_minsnowfrac = 0.3 -/ - -! output_nml: specifies an output stream -------------------------------------- -&output_nml - filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2 - dom = 1 ! write domain 1 only - output_bounds = 0., 10000000., 3600. ! start, end, increment - steps_per_file = 1 ! number of steps per file - mode = 1 ! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis) - include_last = .TRUE. - output_filename = 'ICON-ART-OEM' - filename_format = '{cfg.icon_output}/_DOM_' ! file name base - steps_per_file_inclfirst = .FALSE. - output_grid = .TRUE. - remap = 1 ! 1: remap to lat-lon grid - !north_pole = -170.,40. ! definition of north_pole for rotated lat-lon grid - reg_lon_def = -16.0,0.13,36.0 ! - reg_lat_def = 32.0,0.12,74.0 ! - ml_varlist = 'group:PBL_VARS', - 'group:ATMO_ML_VARS', - 'group:precip_vars', - 'group:land_vars', - 'group:nh_prog_vars', - 'z_mc', 'z_ifc', - 'group:ART_CHEMISTRY', - 'group:ART_DIAGNOSTICS', - 'group:ART_PASSIVE', - 'group:ART_AEROSOL' -/ - -! radiation_nml: radiation scheme --------------------------------------------- -&radiation_nml - irad_o3 = 7 ! ozone climatology - irad_aero = 6 ! aerosols - albedo_type = 2 ! type of surface albedo - vmr_co2 = 390.e-06 - vmr_ch4 = 1800.e-09 - vmr_n2o = 322.0e-09 - vmr_o2 = 0.20946 - vmr_cfc11 = 240.e-12 - vmr_cfc12 = 532.e-12 -/ - -! sleve_nml: vertical level specification ------------------------------------- -&sleve_nml - min_lay_thckn = 20.0 ! layer thickness of lowermost layer - top_height = 23000.0 ! height of model top - stretch_fac = 0.65 ! stretching factor to vary distribution of model levels - decay_scale_1 = 4000.0 ! decay scale of large-scale topography component - decay_scale_2 = 2500.0 ! decay scale of small-scale topography component - decay_exp = 1.2 ! exponent of decay function - flat_height = 16000.0 ! height above which the coordinate surfaces are flat -/ - -! transport_nml: tracer transport --------------------------------------------- -&transport_nml - npassive_tracer = 0 ! number of additional passive tracers - ivadv_tracer = 3, 3, 3, 3, 3, 3 ! tracer specific method to compute vertical advection - itype_hlimit = 3, 4, 4, 4, 4, 4 ! type of limiter for horizontal transport - ihadv_tracer = 52, 2, 2, 2, 2, 22 ! tracer specific method to compute horizontal advection - llsq_svd = .TRUE. ! use SV decomposition for least squares design matrix -/ - -! turbdiff_nml: turbulent diffusion ------------------------------------------- -&turbdiff_nml - tkhmin = 0.75 ! scaling factor for minimum vertical diffusion coefficient - tkmmin = 0.75 ! scaling factor for minimum vertical diffusion coefficient - pat_len = 750.0 ! effective length scale of thermal surface patterns - c_diff = 0.2 ! length scale factor for vertical diffusion of TKE - rat_sea = 7.5 ! controls laminar resistance for sea surface - ltkesso = .TRUE. ! consider TKE-production by sub-grid SSO wakes - frcsmot = 0.2 ! these 2 switches together apply vertical smoothing of the TKE source terms - imode_frcsmot = 2 ! in the tropics (only), which reduces the moist bias in the tropical lower troposphere - itype_sher = 3 ! type of shear forcing used in turbulence - ltkeshs = .TRUE. ! include correction term for coarse grids in hor. shear production term - a_hshr = 2.0 ! length scale factor for separated horizontal shear mode - icldm_turb = 1 ! mode of cloud water representation in turbulence - ldiff_qi = .TRUE. -/ - -EOF - -# ---------------------------------------------------------------------- -# run the model! -# ---------------------------------------------------------------------- - srun ./icon.exe diff --git a/cases/icon-art-oem-ensembles-test/icontools_remap_00_lbc_runjob.cfg b/cases/icon-art-oem-ensembles-test/icontools_remap_00_lbc_runjob.cfg deleted file mode 100755 index 4315e042..00000000 --- a/cases/icon-art-oem-ensembles-test/icontools_remap_00_lbc_runjob.cfg +++ /dev/null @@ -1,151 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name="{cfg.casename}_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" -#SBATCH --account={cfg.compute_account} -#SBATCH --chdir={cfg.icon_work} -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --nodes=1 -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --output={logfile} -#SBATCH --open-mode=append - -ulimit -s unlimited - -set -x - -export ECCODES_DEFINITION_PATH=/store/empa/em05/eccodes_definitions/definitions.edzw-2.12.5-2:/store/empa/em05/easybuild/software/ecCodes/2.12.5-CrayGNU-20.08/share/eccodes/definitions - -#----------------------------------------------------------------------------- -# PART I: Create auxiliary grid file which contains only the cells of the -# boundary zone. -#----------------------------------------------------------------------------- -cat > NAMELIST_ICONSUB_{cfg.inidate_yyyymmddhh} << EOF_1 -&iconsub_nml - grid_filename = '{cfg.dynamics_grid_filename}', - output_type = 4, - lwrite_grid = .TRUE., -/ -&subarea_nml - ORDER = "{cfg.lateral_boundary_grid_order}", - grf_info_file = '{cfg.dynamics_grid_filename}', - min_refin_c_ctrl = 1 - max_refin_c_ctrl = 14 -/ -EOF_1 - -srun -n 1 {cfg.iconsub_bin} \ - --nml NAMELIST_ICONSUB_{cfg.inidate_yyyymmddhh} 2>&1 - -#----------------------------------------------------------------------------- -# PART II: Extract boundary data -#----------------------------------------------------------------------------- -rm -f ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}* - -set +x -cat > NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} << EOF -! -&input_field_nml ! temperature - inputname = "T" - outputname = "T" - code = 130 - intp_method = 3 -/ -&input_field_nml ! horiz. wind comp. u - inputname = "U" - outputname = "U" - intp_method = 3 -/ -&input_field_nml ! horiz. wind comp. u - inputname = "V" - outputname = "V" - intp_method = 3 -/ -&input_field_nml ! vertical velocity - inputname = "OMEGA" - outputname = "W" - code = 135 - intp_method = 3 -/ -&input_field_nml ! surface pressure - inputname = "LNSP" - outputname = "LNPS" - code = 152 - intp_method = 3 -/ -&input_field_nml ! geopotential - inputname = "Z" - outputname = "GEOSP" - code = 129 - intp_method = 3 -/ -&input_field_nml ! specific humidity - inputname = "QV" - outputname = "QV" - code = 133 - intp_method = 3 -/ -&input_field_nml ! cloud liquid water content - inputname = "CLWC" - outputname = "QC" - code = 246 - intp_method = 3 -/ -&input_field_nml ! cloud ice water content - inputname = "CIWC" - outputname = "QI" - code = 247 - intp_method = 3 -/ -&input_field_nml ! rain water content - inputname = "CRWC" - outputname = "QR" - code = 75 - intp_method = 3 -/ -&input_field_nml ! snow water content - inputname = "CSWC" - outputname = "QS" - code = 76 - intp_method = 3 -/ -EOF - -#----------------------------------------------------------------------------- -# loop over file list: - -echo "DATAFILELIST is {datafile_list}" -for datafilename in {datafile_list} ; do - datafile="${{datafilename##*/}}" # get filename without path - outdatafile=${{datafile%.*}} # get filename without suffix - cat > NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} << EOF_2C -&remap_nml - in_grid_filename = '{cfg.input_root_meteo}/{cfg.meteo_prefix}{cfg.inidate_yyyymmddhh}{cfg.meteo_suffix}' - in_filename = '{cfg.input_root_meteo}/${{datafile}}' - in_type = 1 - out_grid_filename = '{cfg.lateral_boundary_grid_scratch}' - out_filename = '{cfg.icon_input_icbc}/${{outdatafile}}_lbc.nc' - out_type = 2 - out_filetype = 4 - l_have3dbuffer = .false. -! ncstorage_file = "ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}" -/ -EOF_2C - - srun -n 1 {cfg.iconremap_bin} -q \ - --remap_nml NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} \ - --input_field_nml NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} 2>&1 - -done - -#----------------------------------------------------------------------------- -# clean-up - -rm -f nml.log -rm -f NAMELIST_ICONSUB_{cfg.inidate_yyyymmddhh} NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} - -#----------------------------------------------------------------------------- -exit -#----------------------------------------------------------------------------- - diff --git a/cases/icon-art-oem-ensembles-test/icontools_remap_ic_chem_runjob.cfg b/cases/icon-art-oem-ensembles-test/icontools_remap_ic_chem_runjob.cfg deleted file mode 100755 index 767d3530..00000000 --- a/cases/icon-art-oem-ensembles-test/icontools_remap_ic_chem_runjob.cfg +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name="{cfg.casename}_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" -#SBATCH --account={cfg.compute_account} -#SBATCH --chdir={cfg.icon_work} -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --nodes=1 -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --output={logfile} -#SBATCH --open-mode=append - -ulimit -s unlimited - -set -x - -export ECCODES_DEFINITION_PATH=/store/empa/em05/eccodes_definitions/definitions.edzw-2.12.5-2:/store/empa/em05/easybuild/software/ecCodes/2.12.5-CrayGNU-20.08/share/eccodes/definitions - -#----------------------------------------------------------------------------- -# Remap inital data onto local (limited-area) grid -#----------------------------------------------------------------------------- -cat > NAMELIST_ICONREMAP_FIELDS << EOF -! -&input_field_nml - inputname = "ch4" - outputname = "CH4_BG" - code = 255 - intp_method = 3 -/ -&input_field_nml ! temperature - inputname = "T" - outputname = "T" - code = 130 - intp_method = 3 -/ -&input_field_nml ! specific humidity - inputname = "QV" - outputname = "Q" - code = 133 - intp_method = 3 -/ -&input_field_nml - inputname = "LNSP" - outputname = "LNPS" - code = 152 - intp_method = 3 -/ -EOF - -#----------------------------------------------------------------------------- -# loop over file list: - -datafilename={cfg.input_root_chem}/{cfg.chem_prefix}{cfg.inidate_yyyymmdd_hh}{cfg.chem_suffix} -datafile="${{datafilename##*/}}" # get filename without path -outdatafile=${{datafile%.*}} # get filename without suffix - -# create ICON master namelist -# ------------------------ -# For a complete list see Namelist_overview and Namelist_overview.pdf - -cat > NAMELIST_ICONREMAP << EOF -&remap_nml - in_grid_filename = '{cfg.input_root_chem}/{cfg.chem_prefix}{cfg.inidate_yyyymmdd_hh}{cfg.chem_suffix}' - in_filename = '{cfg.input_root_chem}/${{datafile}}' - in_type = 1 - out_grid_filename = '{cfg.dynamics_grid_filename_scratch}' - out_filename = '{cfg.icon_input_icbc}/${{outdatafile}}.nc' - out_type = 2 - out_filetype = 4 - l_have3dbuffer = .false. -/ -EOF - -srun -n 1 {cfg.iconremap_bin} \ - -vvvvv -q --remap_nml NAMELIST_ICONREMAP \ - --input_field_nml NAMELIST_ICONREMAP_FIELDS 2>&1 - - -#----------------------------------------------------------------------------- -# clean-up - -rm -f ncstorage.tmp* -rm -f nml.log NAMELIST_SUB NAMELIST_ICONREMAP NAMELIST_ICONREMAP_FIELDS - -#----------------------------------------------------------------------------- -exit -#----------------------------------------------------------------------------- diff --git a/cases/icon-art-oem-ensembles-test/icontools_remap_ic_runjob.cfg b/cases/icon-art-oem-ensembles-test/icontools_remap_ic_runjob.cfg deleted file mode 100755 index 2e0d4549..00000000 --- a/cases/icon-art-oem-ensembles-test/icontools_remap_ic_runjob.cfg +++ /dev/null @@ -1,242 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name="{cfg.casename}_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" -#SBATCH --account={cfg.compute_account} -#SBATCH --chdir={cfg.icon_work} -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --nodes=1 -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --output={logfile} -#SBATCH --open-mode=append - -ulimit -s unlimited - -set -x - -export ECCODES_DEFINITION_PATH=/store/empa/em05/eccodes_definitions/definitions.edzw-2.12.5-2:/store/empa/em05/easybuild/software/ecCodes/2.12.5-CrayGNU-20.08/share/eccodes/definitions - -#----------------------------------------------------------------------------- -# Remap inital data onto local (limited-area) grid -#----------------------------------------------------------------------------- -cat > NAMELIST_ICONREMAP_FIELDS << EOF -! -&input_field_nml ! temperature - inputname = "T" - outputname = "T" - code = 130 - intp_method = 3 -/ -&input_field_nml ! horiz. wind comp. u - inputname = "U" - outputname = "U" - intp_method = 3 -/ -&input_field_nml ! horiz. wind comp. u - inputname = "V" - outputname = "V" - intp_method = 3 -/ -&input_field_nml ! vertical velocity - inputname = "OMEGA" - outputname = "W" - code = 135 - intp_method = 3 -/ -&input_field_nml ! surface pressure - inputname = "LNSP" - outputname = "LNPS" - code = 152 - intp_method = 3 -/ -&input_field_nml ! geopotential - inputname = "Z" - outputname = "GEOSP" - code = 129 - intp_method = 3 -/ -&input_field_nml ! geopotential - inputname = "Z" - outputname = "GEOP_SFC" - code = 129 - intp_method = 3 -/ -&input_field_nml ! specific humidity - inputname = "QV" - outputname = "QV" - code = 133 - intp_method = 3 -/ -&input_field_nml ! cloud liquid water content - inputname = "CLWC" - outputname = "QC" - code = 246 - intp_method = 3 -/ -&input_field_nml ! cloud ice water content - inputname = "CIWC" - outputname = "QI" - code = 247 - intp_method = 3 -/ -&input_field_nml ! rain water content - inputname = "CRWC" - outputname = "QR" - code = 75 - intp_method = 3 -/ -&input_field_nml ! snow water content - inputname = "CSWC" - outputname = "QS" - code = 76 - intp_method = 3 -/ -&input_field_nml ! snow temperature - inputname = "TSN" - outputname = "T_SNOW" - code = 238 - intp_method = 3 -/ -&input_field_nml ! water content of snow - inputname = "SD" - outputname = "W_SNOW" - code = 141 - intp_method = 3 -/ -&input_field_nml ! density of snow - inputname = "RSN" - outputname = "RHO_SNOW" - code = 33 - intp_method = 3 -/ -&input_field_nml ! snow albedo - inputname = "ASN" - outputname = "ALB_SNOW" - code = 32 - intp_method = 3 -/ -&input_field_nml ! skin temperature - inputname = "SKT" - outputname = "SKT" - code = 235 - intp_method = 3 -/ -&input_field_nml ! sea surface temperature - inputname = "SST" - outputname = "SST" - code = 34 - intp_method = 3 -/ -&input_field_nml ! soil temperature level 1 - inputname = "STL1" - outputname = "STL1" - code = 139 - intp_method = 3 -/ -&input_field_nml ! soil temperature level 2 - inputname = "STL2" - outputname = "STL2" - code = 170 - intp_method = 3 -/ -&input_field_nml ! soil temperature level 3 - inputname = "STL3" - outputname = "STL3" - code = 183 - intp_method = 3 -/ -&input_field_nml ! soil temperature level 4 - inputname = "STL4" - outputname = "STL4" - code = 236 - intp_method = 3 -/ -&input_field_nml ! sea-ice cover - inputname = "CI" - outputname = "CI" - code = 31 - intp_method = 3 -/ -&input_field_nml ! water cont. of interception storage - inputname = "SRC" - outputname = "W_I" - code = 198 - intp_method = 3 -/ -&input_field_nml ! surface roughness - inputname = "SR" - outputname = "Z0" - code = 173 - intp_method = 3 -/ -&input_field_nml ! Land/sea mask - inputname = "LSM" - outputname = "LSM" - code = 172 - intp_method = 3 -/ -&input_field_nml ! soil moisture index layer 1 - inputname = "SWVL1" - outputname = "SMIL1" - code = 80 - intp_method = 3 -/ -&input_field_nml ! soil moisture index layer 2 - inputname = "SWVL2" - outputname = "SMIL2" - code = 81 - intp_method = 3 -/ -&input_field_nml ! soil moisture index layer 3 - inputname = "SWVL3" - outputname = "SMIL3" - code = 82 - intp_method = 3 -/ -&input_field_nml ! soil moisture index layer 4 - inputname = "SWVL4" - outputname = "SMIL4" - code = 83 - intp_method = 3 -/ -EOF - -#----------------------------------------------------------------------------- -# loop over file list: - -datafilename={cfg.input_root_meteo}/{cfg.meteo_prefix}{cfg.inidate_yyyymmddhh}{cfg.meteo_suffix} -datafile="${{datafilename##*/}}" # get filename without path -outdatafile=${{datafile%.*}} # get filename without suffix - -# create ICON master namelist -# ------------------------ -# For a complete list see Namelist_overview and Namelist_overview.pdf - -cat > NAMELIST_ICONREMAP << EOF -&remap_nml - in_grid_filename = '{cfg.input_root_meteo}/{cfg.meteo_prefix}{cfg.inidate_yyyymmddhh}{cfg.meteo_suffix}' - in_filename = '{cfg.input_root_meteo}/${{datafile}}' - in_type = 1 - out_grid_filename = '{cfg.dynamics_grid_filename}' - out_filename = '{cfg.icon_input_icbc}/${{outdatafile}}.nc' - out_type = 2 - out_filetype = 4 - l_have3dbuffer = .false. -/ -EOF - -srun -n 1 {cfg.iconremap_bin} \ - -vvvvv -q --remap_nml NAMELIST_ICONREMAP \ - --input_field_nml NAMELIST_ICONREMAP_FIELDS 2>&1 - - -#----------------------------------------------------------------------------- -# clean-up - -rm -f ncstorage.tmp* -rm -f nml.log NAMELIST_SUB NAMELIST_ICONREMAP NAMELIST_ICONREMAP_FIELDS - -#----------------------------------------------------------------------------- -exit -#----------------------------------------------------------------------------- diff --git a/cases/icon-art-oem-ensembles-test/icontools_remap_lbc_chem_runjob.cfg b/cases/icon-art-oem-ensembles-test/icontools_remap_lbc_chem_runjob.cfg deleted file mode 100755 index 1ae2a094..00000000 --- a/cases/icon-art-oem-ensembles-test/icontools_remap_lbc_chem_runjob.cfg +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name="{cfg.casename}_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" -#SBATCH --account={cfg.compute_account} -#SBATCH --chdir={cfg.icon_work} -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --nodes=1 -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --output={logfile} -#SBATCH --open-mode=append - -ulimit -s unlimited - -set -x - -export ECCODES_DEFINITION_PATH=/store/empa/em05/eccodes_definitions/definitions.edzw-2.12.5-2:/store/empa/em05/easybuild/software/ecCodes/2.12.5-CrayGNU-20.08/share/eccodes/definitions - -#----------------------------------------------------------------------------- -# Extract boundary data -#----------------------------------------------------------------------------- - -rm -f ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}* - -cat > NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} << EOF -! -&input_field_nml - inputname = "ch4" - outputname = "CH4_BG" - code = 255 - intp_method = 3 -&input_field_nml ! temperature - inputname = "T" - outputname = "T" - code = 130 - intp_method = 3 -/ -&input_field_nml ! specific humidity - inputname = "QV" - outputname = "Q" - code = 133 - intp_method = 3 -/ -&input_field_nml - inputname = "LNSP" - outputname = "LNPS" - code = 152 - intp_method = 3 -/ -EOF - -#----------------------------------------------------------------------------- -# loop over file list: - -echo "DATAFILELIST is {datafile_list_chem}" -for datafilename in {datafile_list_chem} ; do - datafile="${{datafilename##*/}}" # get filename without path - outdatafile=${{datafile%.*}} # get filename without suffix - cat > NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} << EOF_2C -&remap_nml - in_grid_filename = '{cfg.input_root_chem}/{cfg.chem_prefix}{cfg.inidate_yyyymmdd_hh}{cfg.chem_suffix}' - in_filename = '{cfg.input_root_chem}/${{datafile}}' - in_type = 1 - out_grid_filename = '{cfg.lateral_boundary_grid_scratch}' - out_filename = '{cfg.icon_input_icbc}/${{outdatafile}}_lbc.nc' - out_type = 2 - out_filetype = 4 - l_have3dbuffer = .false. -! ncstorage_file = "ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}" -/ -EOF_2C - - srun -n 1 {cfg.iconremap_bin} -q \ - --remap_nml NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} \ - --input_field_nml NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} 2>&1 - -done - -#----------------------------------------------------------------------------- -# clean-up - -#rm -f ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}* -rm -f nml.log -rm -f NAMELIST_ICONSUB_{cfg.inidate_yyyymmddhh} NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} - -#----------------------------------------------------------------------------- -exit -#----------------------------------------------------------------------------- - diff --git a/cases/icon-art-oem-ensembles-test/icontools_remap_lbc_rest_runjob.cfg b/cases/icon-art-oem-ensembles-test/icontools_remap_lbc_rest_runjob.cfg deleted file mode 100755 index 7bbedc54..00000000 --- a/cases/icon-art-oem-ensembles-test/icontools_remap_lbc_rest_runjob.cfg +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name="{cfg.casename}_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" -#SBATCH --account={cfg.compute_account} -#SBATCH --chdir={cfg.icon_work} -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --nodes=1 -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --output={logfile} -#SBATCH --open-mode=append - -ulimit -s unlimited - -set -x - -export ECCODES_DEFINITION_PATH=/store/empa/em05/eccodes_definitions/definitions.edzw-2.12.5-2:/store/empa/em05/easybuild/software/ecCodes/2.12.5-CrayGNU-20.08/share/eccodes/definitions - -#----------------------------------------------------------------------------- -# Extract boundary data -#----------------------------------------------------------------------------- - -rm -f ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}* - -cat > NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} << EOF -! -&input_field_nml ! temperature - inputname = "T" - outputname = "T" - code = 130 - intp_method = 3 -/ -&input_field_nml ! horiz. wind comp. u - inputname = "U" - outputname = "U" - intp_method = 3 -/ -&input_field_nml ! horiz. wind comp. v - inputname = "V" - outputname = "V" - intp_method = 3 -/ -&input_field_nml ! vertical velocity - inputname = "OMEGA" - outputname = "W" - code = 135 - intp_method = 3 -/ -&input_field_nml ! surface pressure - inputname = "LNSP" - outputname = "LNPS" - code = 152 - intp_method = 3 -/ -&input_field_nml ! specific humidity - inputname = "QV" - outputname = "QV" - code = 133 - intp_method = 3 -/ -&input_field_nml ! cloud liquid water content - inputname = "CLWC" - outputname = "QC" - code = 246 - intp_method = 3 -/ -&input_field_nml ! cloud ice water content - inputname = "CIWC" - outputname = "QI" - code = 247 - intp_method = 3 -/ -&input_field_nml ! rain water content - inputname = "CRWC" - outputname = "QR" - code = 75 - intp_method = 3 -/ -&input_field_nml ! snow water content - inputname = "CSWC" - outputname = "QS" - code = 76 - intp_method = 3 -/ -EOF - -#----------------------------------------------------------------------------- -# loop over file list: - -echo "DATAFILELIST is {datafile_list_rest}" -for datafilename in {datafile_list_rest} ; do - datafile="${{datafilename##*/}}" # get filename without path - outdatafile=${{datafile%.*}} # get filename without suffix - cat > NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} << EOF_2C -&remap_nml - in_grid_filename = '{cfg.input_root_meteo}/{cfg.meteo_prefix}{cfg.inidate_yyyymmddhh}{cfg.meteo_suffix}' - in_filename = '{cfg.input_root_meteo}/${{datafile}}' - in_type = 1 - out_grid_filename = '{cfg.lateral_boundary_grid_scratch}' - out_filename = '{cfg.icon_input_icbc}/${{outdatafile}}_lbc.nc' - out_type = 2 - out_filetype = 4 - l_have3dbuffer = .false. -! ncstorage_file = "ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}" -/ -EOF_2C - - srun -n 1 {cfg.iconremap_bin} -q \ - --remap_nml NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} \ - --input_field_nml NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} 2>&1 - -done - -#----------------------------------------------------------------------------- -# clean-up - -#rm -f ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}* -rm -f nml.log -rm -f NAMELIST_ICONSUB_{cfg.inidate_yyyymmddhh} NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} - -#----------------------------------------------------------------------------- -exit -#----------------------------------------------------------------------------- - diff --git a/cases/icon-art-oem-test/config.py b/cases/icon-art-oem-test/config.py deleted file mode 100644 index 4095948c..00000000 --- a/cases/icon-art-oem-test/config.py +++ /dev/null @@ -1,166 +0,0 @@ -import os -""" -Configuration file for the 'icon-art-oem-test' case with ICON-ART -""" - -# GENERAL SETTINGS =========================================================== -user = os.environ['USER'] -if os.path.exists(os.environ['HOME'] + '/.acct'): - with open(os.environ['HOME'] + '/.acct', 'r') as file: - compute_account = file.read().rstrip() -else: - compute_account = os.popen("id -gn").read().splitlines()[0] -compute_host = 'daint' -compute_queue = 'debug' # 'normal' / 'debug' -constraint = 'mc' # 'mc' / 'gpu' - -model = 'icon-art-oem' -restart_step = 24 # hours - -if constraint == 'gpu': - ntasks_per_node = 12 -elif constraint == 'mc': - ntasks_per_node = 36 - -# case name = pathname in cases/ -path = os.path.realpath(__file__) -casename = os.path.basename(os.path.dirname(path)) - -# Root directory of the sourcecode of the chain (where run_chain.py is) -chain_src_dir = os.getcwd() - -# Root directory of the working space of the chain -work_root = os.path.join(chain_src_dir, 'work') - -# Directory where executables are stored -exe_dir = "/store/empa/em05/executables" - -# Case directory -case_dir = os.path.join(chain_src_dir, 'cases', casename) - -# PREPARE_DATA --------------------------------------------------------------- -input_root = '/store/empa/em05/input_iconart_processing_chain_example/' - -input_root_meteo = '/store/empa/em05/input_iconart_processing_chain_example/meteo' -meteo_prefix = 'ifs_' -meteo_nameformat = meteo_prefix + '%Y%m%d%H' -meteo_suffix = '.grb' -meteo_inc = 3 - -input_root_chem = '/store/empa/em05/input_iconart_processing_chain_example/chem' - -input_root_icbc = os.path.join(input_root, 'icbc') -chem_prefix = 'cams_gqpe_' -chem_nameformat = chem_prefix + '%Y%m%d_%H' -chem_suffix = '.grb' -chem_inc = 3 - -icontools_runjobs = [ - 'icontools_remap_ic_runjob.cfg', - 'icontools_remap_00_lbc_runjob.cfg', - 'icontools_remap_lbc_rest_runjob.cfg', - 'icontools_remap_ic_chem_runjob.cfg', - 'icontools_remap_lbc_chem_runjob.cfg', -] - -# Icontools executables -#icontools_dir = '/project/s903/mjaehn/spack-install/daint/icontools/master/cce/ldcbgsjjzq2p73xbei7ws4wce5ivzxer/bin/' -icontools_dir = '/scratch/snx3000/msteiner/spack-stages/daint/spack-stage-icontools-master-t524rnfa5sfyn4rbvarypyzwae4jg46d/spack-src/icontools' -iconremap_bin = os.path.join(icontools_dir, "iconremap") -iconsub_bin = os.path.join(icontools_dir, "iconsub") - -# Input data for runscript---------------------------------------------------- -# Grid -input_root_grid = os.path.join(input_root, 'grids') -radiation_grid_filename = os.path.join(input_root_grid, - "testcase_DOM01.parent.nc") -dynamics_grid_filename = os.path.join(input_root_grid, "testcase_DOM01.nc") -map_file_latbc = os.path.join(input_root_grid, "map_file.latbc") -extpar_filename = os.path.join( - input_root_grid, "external_parameter_icon_testcase_DOM01_tiles.nc") -input_root_rad = os.path.join(input_root, 'rad') -cldopt_filename = os.path.join(input_root_rad, 'rrtm_cldopt.nc') -lrtm_filename = os.path.join(input_root_rad, 'rrtmg_lw.nc') - -input_root_mapping = os.path.join(input_root, 'mapping') -map_file_ana = os.path.join(input_root_mapping, "map_file.ana") - -# File names ----------------------------------------------------------------- -latbc_filename = "ifs__lbc.nc" -inidata_prefix = "ifs_init_" -inidata_nameformat = inidata_prefix + '%Y%m%d%H' -inidata_filename_suffix = ".nc" - -output_filename = "icon-art-test" -filename_format = "_DOM_" - -# ART settings---------------------------------------------------------------- -input_root_tracers = os.path.join(input_root, 'XML') -chemtracer_xml_filename = os.path.join(input_root_tracers, - 'tracers_oh_pntsrc.xml') -pntSrc_xml_filename = os.path.join(input_root_tracers, 'pntSrc_example.xml') -art_input_folder = os.path.join(input_root, 'ART') - -# OAE ------------------------------------------------------------------------ -# Online anthropogenic emissions -oae_dir = os.path.join(input_root, 'OEM') -oae_gridded_emissions_nc = 'tno_3cat.nc' -oae_vertical_profiles_nc = 'vertical_profiles.nc' -oae_hourofday_nc = 'hourofday.nc' -oae_dayofweek_nc = 'dayofweek.nc' -oae_monthofyear_nc = 'monthofyear.nc' -#oae_hourofyear_nc = 'hourofyear.nc' - -# SIMULATION ================================================================= -# ICON ----------------------------------------------------------------------- -# Executable -icon_bin = os.path.join(exe_dir, "icon-art-oem-nudging_20211011") - -# Namelists and slurm runscript templates -icon_runjob = os.path.join(case_dir, 'icon_runjob.cfg') -icon_namelist_master = os.path.join(case_dir, 'icon_master.namelist.cfg') -icon_namelist_nwp = os.path.join(case_dir, 'icon_NAMELIST_NWP.cfg') - -# Walltimes and domain decomposition -if compute_queue == "normal": - icon_walltime = "00:30:00" - icon_np_tot = 16 -elif compute_queue == "debug": - icon_walltime = "00:30:00" - icon_np_tot = 10 - -# POST-PROCESSING ============================================================ -# REDUCE_OUTPUT -------------------------------------------------------------- -convert_gas = True -output_levels = 20 - -# POST_COSMO ----------------------------------------------------------------- -# Root directory where the output of the chain is copied to -output_root = os.path.join(chain_src_dir, "output", casename) - -# VERIFY_CHAIN --------------------------------------------------------------- -reference_dir = os.path.join(input_root, "reference_output") - -# If the output file that gets compared to the reference is not at the location -# that post_icon copied it to, give the path to it here. Else leave it 'None' -#output_dir = None -output_dir = os.path.join(work_root, casename, '2018010100_0_24', 'icon', - 'output') - -# variables_to_check is a dict() with a tuple() of filenames as key and a list -# of variables-names as value. The tuple consists of the filenames of the two -# files to check, the list contains the variable-names that are compared. -# The verify_chain job will look for the files in the reference_dir (first tuple -# element) and the ouput_dir (second tuple element) -values_to_check = { - ("icon-oem-pgi-20.1.1-cpu-20210215-NWP_LAM_DOM01_01000000.nc", "NWP_LAM_DOM01_01000000.nc"): - [ - 'temp', - 'pres', - 'u', - 'v', - 'w', - 'OEM_tracer_1', - 'OEM_tracer_2', - ] -} diff --git a/cases/icon-art-oem-test/icon_runjob.cfg b/cases/icon-art-oem-test/icon_runjob.cfg deleted file mode 100755 index 1d4f4e66..00000000 --- a/cases/icon-art-oem-test/icon_runjob.cfg +++ /dev/null @@ -1,378 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name="{cfg.casename}_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" -#SBATCH --account={cfg.compute_account} -#SBATCH --time={cfg.icon_walltime} -#SBATCH --nodes={cfg.icon_np_tot} -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --hint=nomultithread -#SBATCH --output={logfile} -#SBATCH --open-mode=append -#SBATCH --chdir={cfg.icon_work} - -# OpenMP environment variables -# ---------------------------- -export OMP_NUM_THREADS=1 -export ICON_THREADS=1 -export OMP_SCHEDULE=static,12 -export OMP_DYNAMIC="false" -export OMP_STACKSIZE=200M -# -# MPI variables -# ------------- -no_of_nodes={cfg.icon_np_tot} -mpi_procs_pernode={cfg.ntasks_per_node} -((mpi_total_procs=no_of_nodes * mpi_procs_pernode)) -# -# blocking length -# --------------- -nproma=16 - -set -x - -export ECCODES_DEFINITION_PATH=/users/msteiner/eccodes_definitions/definitions.edzw-2.12.5-2:/store/empa/em05/easybuild/software/ecCodes/2.12.5-CrayGNU-19.10/share/eccodes/definitions - -# ---------------------------------------------------------------------------- -# Link radiation input files -# ---------------------------------------------------------------------------- -ln -sf {cfg.art_input_folder}/runctrl_examples/photo_ctrl/* . -ln -sf {cfg.art_input_folder}/runctrl_examples/init_ctrl/* . - -# ---------------------------------------------------------------------------- -# create ICON master namelist -# ---------------------------------------------------------------------------- - -cat > icon_master.namelist << EOF -! master_nml: ---------------------------------------------------------------- -&master_nml - lrestart = {cfg.lrestart} ! .TRUE.=current experiment is resumed -/ - -! master_model_nml: repeated for each model ---------------------------------- -&master_model_nml - model_type = 1 ! identifies which component to run (atmosphere,ocean,...) - model_name = "ATMO" ! character string for naming this component. - model_namelist_filename = "NAMELIST_NWP" ! file name containing the model namelists - model_min_rank = 1 ! start MPI rank for this model - model_max_rank = 65536 ! end MPI rank for this model - model_inc_rank = 1 ! stride of MPI ranks -/ - -! time_nml: specification of date and time------------------------------------ -&time_nml - ini_datetime_string = "{cfg.ini_datetime_string}" ! initial date and time of the simulation - end_datetime_string = "{cfg.end_datetime_string}" ! end date and time of the simulation 10T00 -/ -EOF - -# ---------------------------------------------------------------------- -# model namelists -# ---------------------------------------------------------------------- - -cat > NAMELIST_NWP << EOF -! parallel_nml: MPI parallelization ------------------------------------------- -¶llel_nml - nproma = 128 ! loop chunk length - p_test_run = .FALSE. ! .TRUE. means verification run for MPI parallelization - num_io_procs = 1 ! number of I/O processors - num_restart_procs = 0 ! number of restart processors - num_prefetch_proc = 1 ! number of processors for LBC prefetching - iorder_sendrecv = 3 ! sequence of MPI send/receive calls -/ - - -! run_nml: general switches --------------------------------------------------- -&run_nml - ltestcase = .FALSE. ! real case run - num_lev = 60 ! number of full levels (atm.) for each domain - lvert_nest = .FALSE. ! no vertical nesting - dtime = 60. ! timestep in seconds - ldynamics = .TRUE. ! compute adiabatic dynamic tendencies - ltransport = .TRUE. ! compute large-scale tracer transport - ntracer = 0 ! number of advected tracers - iforcing = 3 ! forcing of dynamics and transport by parameterized processes - msg_level = 7 ! detailed report during integration - ltimer = .TRUE. ! timer for monitoring the runtime of specific routines - timers_level = 10 ! performance timer granularity - check_uuid_gracefully = .TRUE. ! give only warnings for non-matching uuids - output = "nml" ! main switch for enabling/disabling components of the model output - lart = .TRUE. ! main switch for ART - debug_check_level = 10 -/ - -! art_nml: Aerosols and Reactive Trace gases extension------------------------------------------------- -&art_nml - lart_chem = .TRUE. ! enables chemistry - lart_pntSrc = .TRUE. ! enables point sources - lart_aerosol = .FALSE. ! main switch for the treatment of atmospheric aerosol - lart_chemtracer = .TRUE. ! main switch for the treatment of chemical tracer - lart_diag_out = .TRUE. ! If this switch is set to .TRUE., diagnostic - ! ... output elds are available. Set it to - ! ... .FALSE. when facing memory problems. - iart_init_gas = 4 - cart_cheminit_file = '{inidata_filename}' - cart_cheminit_type = 'EMAC' - cart_cheminit_coord = '{inidata_filename}' - iart_seasalt = 0 ! enable seasalt - cart_chemtracer_xml = '{cfg.chemtracer_xml_filename_scratch}' ! path to xml file for passive tracers - cart_pntSrc_xml = '{cfg.pntSrc_xml_filename}' - cart_input_folder = '{cfg.art_input_folder}' ! absolute Path to ART source code -/ - -! oem_nml: online emission module --------------------------------------------- -&oemctrl_nml - gridded_emissions_nc = '{cfg.oae_gridded_emissions_nc_scratch}' - vertical_profile_nc = '{cfg.oae_vertical_profiles_nc_scratch}' - hour_of_day_nc = '{cfg.oae_hourofday_nc_scratch}' - day_of_week_nc = '{cfg.oae_dayofweek_nc_scratch}' - month_of_year_nc = '{cfg.oae_monthofyear_nc_scratch}' - hour_of_year_nc = '{cfg.oae_hourofyear_nc_scratch}' -/ - -! diffusion_nml: horizontal (numerical) diffusion ---------------------------- -&diffusion_nml - lhdiff_vn = .TRUE. ! diffusion on the horizontal wind field - lhdiff_temp = .TRUE. ! diffusion on the temperature field - lhdiff_w = .TRUE. ! diffusion on the vertical wind field - hdiff_order = 5 ! order of nabla operator for diffusion - itype_vn_diffu = 1 ! reconstruction method used for Smagorinsky diffusion - itype_t_diffu = 2 ! discretization of temperature diffusion - hdiff_efdt_ratio = 24.0 ! ratio of e-folding time to time step - hdiff_smag_fac = 0.025 ! scaling factor for Smagorinsky diffusion -/ - -! dynamics_nml: dynamical core ----------------------------------------------- -&dynamics_nml - iequations = 3 ! type of equations and prognostic variables - idiv_method = 1 ! method for divergence computation - divavg_cntrwgt = 0.50 ! weight of central cell for divergence averaging - lcoriolis = .TRUE. ! Coriolis force -/ - -! extpar_nml: external data -------------------------------------------------- -&extpar_nml - itopo = 1 ! topography (0:analytical) - extpar_filename = '{cfg.extpar_filename_scratch}' ! filename of external parameter input file - n_iter_smooth_topo = 1,1 ! iterations of topography smoother - heightdiff_threshold = 3000. ! height difference between neighb. grid points - hgtdiff_max_smooth_topo = 750.,750. ! see Namelist doc - heightdiff_threshold = 2250.,1500. -/ - -! initicon_nml: specify read-in of initial state ------------------------------ -&initicon_nml - init_mode = 2 ! 7: start from DWD fg with subsequent vertical remapping - lread_ana = .FALSE. ! no analysis data will be read - ifs2icon_filename = "{inidata_filename}" ! initial data filename - ana_varnames_map_file = "{cfg.map_file_ana_scratch}" ! dictionary mapping internal names onto GRIB2 shortNames - ltile_coldstart = .TRUE. ! coldstart for surface tiles - ltile_init = .FALSE. ! set it to .TRUE. if FG data originate from run without tiles -/ - -! grid_nml: horizontal grid -------------------------------------------------- -&grid_nml - dynamics_grid_filename = "{cfg.dynamics_grid_filename_scratch}" ! array of the grid filenames for the dycore - radiation_grid_filename = "{cfg.radiation_grid_filename_scratch}" ! array of the grid filenames for the radiation model - dynamics_parent_grid_id = 0 ! array of the indexes of the parent grid filenames - lredgrid_phys = .TRUE. ! .true.=radiation is calculated on a reduced grid - lfeedback = .TRUE. ! specifies if feedback to parent grid is performed - l_limited_area = .TRUE. ! .TRUE. performs limited area run - ifeedback_type = 2 ! feedback type (incremental/relaxation-based) - start_time = 0. ! Time when a nested domain starts to be active [s] -/ - -! gridref_nml: grid refinement settings -------------------------------------- -&gridref_nml - denom_diffu_v = 150. ! denominator for lateral boundary diffusion of velocity -/ - -! interpol_nml: settings for internal interpolation methods ------------------ -&interpol_nml - nudge_zone_width = 8 ! width of lateral boundary nudging zone - support_baryctr_intp = .FALSE. ! barycentric interpolation support for output - nudge_max_coeff = 0.07 - nudge_efold_width = 2.0 -/ - -! io_nml: general switches for model I/O ------------------------------------- -&io_nml - itype_pres_msl = 5 ! method for computation of mean sea level pressure - itype_rh = 1 ! method for computation of relative humidity - lmask_boundary = .TRUE. ! mask out interpolation zone in output -/ - -! limarea_nml: settings for limited area mode --------------------------------- -&limarea_nml - itype_latbc = 1 ! 1: time-dependent lateral boundary conditions - dtime_latbc = 10800 ! time difference between 2 consecutive boundary data - nlev_latbc = 90 ! Number of vertical levels in boundary data - latbc_boundary_grid = "{cfg.lateral_boundary_grid_scratch}" ! Grid file defining the lateral boundary - latbc_path = "{cfg.icon_input_icbc}" ! Absolute path to boundary data - latbc_varnames_map_file = "{cfg.map_file_latbc_scratch}" - latbc_filename = "{cfg.latbc_filename}" ! boundary data input filename - init_latbc_from_fg = .FALSE. ! .TRUE.: take lbc for initial time from first guess -/ - -! lnd_nml: land scheme switches ----------------------------------------------- -&lnd_nml - ntiles = 1 ! number of tiles - nlev_snow = 3 ! number of snow layers - lmulti_snow = .FALSE. ! .TRUE. for use of multi-layer snow model - idiag_snowfrac = 20 ! type of snow-fraction diagnosis - lsnowtile = .TRUE. ! .TRUE.=consider snow-covered and snow-free separately - itype_root = 2 ! root density distribution - itype_heatcond = 3 ! type of soil heat conductivity - itype_lndtbl = 4 ! table for associating surface parameters - itype_evsl = 4 ! type of bare soil evaporation - itype_root = 2 ! root density distribution - cwimax_ml = 5.e-4 ! scaling parameter for max. interception storage - c_soil = 1.75 ! surface area density of the evaporative soil surface - c_soil_urb = 0.5 ! same for urban areas - lseaice = .TRUE. ! .TRUE. for use of sea-ice model - llake = .TRUE. ! .TRUE. for use of lake model -/ - -! nonhydrostatic_nml: nonhydrostatic model ----------------------------------- -&nonhydrostatic_nml - iadv_rhotheta = 2 ! advection method for rho and rhotheta - ivctype = 2 ! type of vertical coordinate - itime_scheme = 4 ! time integration scheme - ndyn_substeps = 5 ! number of dynamics steps per fast-physics step - exner_expol = 0.333 ! temporal extrapolation of Exner function - vwind_offctr = 0.2 ! off-centering in vertical wind solver - damp_height = 12500.0 ! height at which Rayleigh damping of vertical wind starts - rayleigh_coeff = 1.5 ! Rayleigh damping coefficient - divdamp_order = 24 ! order of divergence damping - divdamp_type = 3 ! type of divergence damping - divdamp_fac = 0.004 ! scaling factor for divergence damping - l_open_ubc = .FALSE. ! .TRUE.=use open upper boundary condition - igradp_method = 3 ! discretization of horizontal pressure gradient - l_zdiffu_t = .TRUE. ! specifies computation of Smagorinsky temperature diffusion - thslp_zdiffu = 0.02 ! slope threshold (temperature diffusion) - thhgtd_zdiffu = 125.0 ! threshold of height difference (temperature diffusion) - htop_moist_proc = 22500.0 ! max. height for moist physics - hbot_qvsubstep = 22500.0 ! height above which QV is advected with substepping scheme -/ - -! nwp_phy_nml: switches for the physics schemes ------------------------------ -&nwp_phy_nml - inwp_gscp = 2 ! cloud microphysics and precipitation - inwp_convection = 1 ! convection - lshallowconv_only = .FALSE. ! only shallow convection - inwp_radiation = 1 ! radiation - inwp_cldcover = 1 ! cloud cover scheme for radiation - inwp_turb = 1 ! vertical diffusion and transfer - inwp_satad = 1 ! saturation adjustment - inwp_sso = 1 ! subgrid scale orographic drag - inwp_gwd = 0 ! non-orographic gravity wave drag - inwp_surface = 1 ! surface scheme - latm_above_top = .TRUE. ! take into account atmosphere above model top for radiation computation - ldetrain_conv_prec = .TRUE. - efdt_min_raylfric = 7200. ! minimum e-folding time of Rayleigh friction - itype_z0 = 2 ! type of roughness length data - icapdcycl = 3 ! apply CAPE modification to improve diurnalcycle over tropical land - icpl_aero_conv = 1 ! coupling between autoconversion and Tegen aerosol climatology - icpl_aero_gscp = 1 ! coupling between autoconversion and Tegen aerosol climatology - lrtm_filename = '{cfg.lrtm_filename_scratch}' ! longwave absorption coefficients for RRTM_LW - cldopt_filename = '{cfg.cldopt_filename_scratch}' ! RRTM cloud optical properties - dt_rad = 720. ! time step for radiation in s - dt_conv = 120.,90.,90. ! time step for convection in s (domain specific) - dt_sso = 120.,360.,360. ! time step for SSO parameterization - dt_gwd = 360.,360.,360. ! time step for gravity wave drag parameterization -/ - -! nwp_tuning_nml: additional tuning parameters ---------------------------------- -&nwp_tuning_nml - itune_albedo = 1 ! reduced albedo (w.r.t. MODIS data) over Sahara - tune_gkwake = 1.8 - tune_gkdrag = 0.01 - tune_minsnowfrac = 0.3 -/ - -! output_nml: specifies an output stream -------------------------------------- -&output_nml - filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2 - dom = 1 ! write domain 1 only - output_bounds = 0., 10000000., 3600. ! start, end, increment - steps_per_file = 1 ! number of steps per file - mode = 1 ! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis) - include_last = .TRUE. - output_filename = 'ICON-ART-OEM' - filename_format = '{cfg.icon_output}/_DOM_' ! file name base - steps_per_file_inclfirst = .FALSE. - output_grid = .TRUE. - remap = 1 ! 1: remap to lat-lon grid - !north_pole = -170.,40. ! definition of north_pole for rotated lat-lon grid - reg_lon_def = -16.0,0.13,36.0 ! - reg_lat_def = 32.0,0.12,74.0 ! - ml_varlist = 'group:PBL_VARS', - 'group:ATMO_ML_VARS', - 'group:precip_vars', - 'group:land_vars', - 'group:nh_prog_vars', - 'z_mc', 'z_ifc', - 'group:ART_CHEMISTRY', - 'group:ART_DIAGNOSTICS', - 'group:ART_PASSIVE', - 'group:ART_AEROSOL' -/ - -! radiation_nml: radiation scheme --------------------------------------------- -&radiation_nml - irad_o3 = 7 ! ozone climatology - irad_aero = 6 ! aerosols - albedo_type = 2 ! type of surface albedo - vmr_co2 = 390.e-06 - vmr_ch4 = 1800.e-09 - vmr_n2o = 322.0e-09 - vmr_o2 = 0.20946 - vmr_cfc11 = 240.e-12 - vmr_cfc12 = 532.e-12 -/ - -! sleve_nml: vertical level specification ------------------------------------- -&sleve_nml - min_lay_thckn = 20.0 ! layer thickness of lowermost layer - top_height = 23000.0 ! height of model top - stretch_fac = 0.65 ! stretching factor to vary distribution of model levels - decay_scale_1 = 4000.0 ! decay scale of large-scale topography component - decay_scale_2 = 2500.0 ! decay scale of small-scale topography component - decay_exp = 1.2 ! exponent of decay function - flat_height = 16000.0 ! height above which the coordinate surfaces are flat -/ - -! transport_nml: tracer transport --------------------------------------------- -&transport_nml - npassive_tracer = 0 ! number of additional passive tracers - ivadv_tracer = 3, 3, 3, 3, 3, 3 ! tracer specific method to compute vertical advection - itype_hlimit = 3, 4, 4, 4, 4, 4 ! type of limiter for horizontal transport - ihadv_tracer = 52, 2, 2, 2, 2, 22 ! tracer specific method to compute horizontal advection - llsq_svd = .TRUE. ! use SV decomposition for least squares design matrix -/ - -! turbdiff_nml: turbulent diffusion ------------------------------------------- -&turbdiff_nml - tkhmin = 0.75 ! scaling factor for minimum vertical diffusion coefficient - tkmmin = 0.75 ! scaling factor for minimum vertical diffusion coefficient - pat_len = 750.0 ! effective length scale of thermal surface patterns - c_diff = 0.2 ! length scale factor for vertical diffusion of TKE - rat_sea = 7.5 ! controls laminar resistance for sea surface - ltkesso = .TRUE. ! consider TKE-production by sub-grid SSO wakes - frcsmot = 0.2 ! these 2 switches together apply vertical smoothing of the TKE source terms - imode_frcsmot = 2 ! in the tropics (only), which reduces the moist bias in the tropical lower troposphere - itype_sher = 3 ! type of shear forcing used in turbulence - ltkeshs = .TRUE. ! include correction term for coarse grids in hor. shear production term - a_hshr = 2.0 ! length scale factor for separated horizontal shear mode - icldm_turb = 1 ! mode of cloud water representation in turbulence - ldiff_qi = .TRUE. -/ - -EOF - -# ---------------------------------------------------------------------- -# run the model! -# ---------------------------------------------------------------------- - srun ./icon.exe diff --git a/cases/icon-art-oem-test/icontools_remap_00_lbc_runjob.cfg b/cases/icon-art-oem-test/icontools_remap_00_lbc_runjob.cfg deleted file mode 100755 index 4315e042..00000000 --- a/cases/icon-art-oem-test/icontools_remap_00_lbc_runjob.cfg +++ /dev/null @@ -1,151 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name="{cfg.casename}_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" -#SBATCH --account={cfg.compute_account} -#SBATCH --chdir={cfg.icon_work} -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --nodes=1 -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --output={logfile} -#SBATCH --open-mode=append - -ulimit -s unlimited - -set -x - -export ECCODES_DEFINITION_PATH=/store/empa/em05/eccodes_definitions/definitions.edzw-2.12.5-2:/store/empa/em05/easybuild/software/ecCodes/2.12.5-CrayGNU-20.08/share/eccodes/definitions - -#----------------------------------------------------------------------------- -# PART I: Create auxiliary grid file which contains only the cells of the -# boundary zone. -#----------------------------------------------------------------------------- -cat > NAMELIST_ICONSUB_{cfg.inidate_yyyymmddhh} << EOF_1 -&iconsub_nml - grid_filename = '{cfg.dynamics_grid_filename}', - output_type = 4, - lwrite_grid = .TRUE., -/ -&subarea_nml - ORDER = "{cfg.lateral_boundary_grid_order}", - grf_info_file = '{cfg.dynamics_grid_filename}', - min_refin_c_ctrl = 1 - max_refin_c_ctrl = 14 -/ -EOF_1 - -srun -n 1 {cfg.iconsub_bin} \ - --nml NAMELIST_ICONSUB_{cfg.inidate_yyyymmddhh} 2>&1 - -#----------------------------------------------------------------------------- -# PART II: Extract boundary data -#----------------------------------------------------------------------------- -rm -f ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}* - -set +x -cat > NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} << EOF -! -&input_field_nml ! temperature - inputname = "T" - outputname = "T" - code = 130 - intp_method = 3 -/ -&input_field_nml ! horiz. wind comp. u - inputname = "U" - outputname = "U" - intp_method = 3 -/ -&input_field_nml ! horiz. wind comp. u - inputname = "V" - outputname = "V" - intp_method = 3 -/ -&input_field_nml ! vertical velocity - inputname = "OMEGA" - outputname = "W" - code = 135 - intp_method = 3 -/ -&input_field_nml ! surface pressure - inputname = "LNSP" - outputname = "LNPS" - code = 152 - intp_method = 3 -/ -&input_field_nml ! geopotential - inputname = "Z" - outputname = "GEOSP" - code = 129 - intp_method = 3 -/ -&input_field_nml ! specific humidity - inputname = "QV" - outputname = "QV" - code = 133 - intp_method = 3 -/ -&input_field_nml ! cloud liquid water content - inputname = "CLWC" - outputname = "QC" - code = 246 - intp_method = 3 -/ -&input_field_nml ! cloud ice water content - inputname = "CIWC" - outputname = "QI" - code = 247 - intp_method = 3 -/ -&input_field_nml ! rain water content - inputname = "CRWC" - outputname = "QR" - code = 75 - intp_method = 3 -/ -&input_field_nml ! snow water content - inputname = "CSWC" - outputname = "QS" - code = 76 - intp_method = 3 -/ -EOF - -#----------------------------------------------------------------------------- -# loop over file list: - -echo "DATAFILELIST is {datafile_list}" -for datafilename in {datafile_list} ; do - datafile="${{datafilename##*/}}" # get filename without path - outdatafile=${{datafile%.*}} # get filename without suffix - cat > NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} << EOF_2C -&remap_nml - in_grid_filename = '{cfg.input_root_meteo}/{cfg.meteo_prefix}{cfg.inidate_yyyymmddhh}{cfg.meteo_suffix}' - in_filename = '{cfg.input_root_meteo}/${{datafile}}' - in_type = 1 - out_grid_filename = '{cfg.lateral_boundary_grid_scratch}' - out_filename = '{cfg.icon_input_icbc}/${{outdatafile}}_lbc.nc' - out_type = 2 - out_filetype = 4 - l_have3dbuffer = .false. -! ncstorage_file = "ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}" -/ -EOF_2C - - srun -n 1 {cfg.iconremap_bin} -q \ - --remap_nml NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} \ - --input_field_nml NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} 2>&1 - -done - -#----------------------------------------------------------------------------- -# clean-up - -rm -f nml.log -rm -f NAMELIST_ICONSUB_{cfg.inidate_yyyymmddhh} NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} - -#----------------------------------------------------------------------------- -exit -#----------------------------------------------------------------------------- - diff --git a/cases/icon-art-oem-test/icontools_remap_ic_chem_runjob.cfg b/cases/icon-art-oem-test/icontools_remap_ic_chem_runjob.cfg deleted file mode 100755 index 767d3530..00000000 --- a/cases/icon-art-oem-test/icontools_remap_ic_chem_runjob.cfg +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name="{cfg.casename}_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" -#SBATCH --account={cfg.compute_account} -#SBATCH --chdir={cfg.icon_work} -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --nodes=1 -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --output={logfile} -#SBATCH --open-mode=append - -ulimit -s unlimited - -set -x - -export ECCODES_DEFINITION_PATH=/store/empa/em05/eccodes_definitions/definitions.edzw-2.12.5-2:/store/empa/em05/easybuild/software/ecCodes/2.12.5-CrayGNU-20.08/share/eccodes/definitions - -#----------------------------------------------------------------------------- -# Remap inital data onto local (limited-area) grid -#----------------------------------------------------------------------------- -cat > NAMELIST_ICONREMAP_FIELDS << EOF -! -&input_field_nml - inputname = "ch4" - outputname = "CH4_BG" - code = 255 - intp_method = 3 -/ -&input_field_nml ! temperature - inputname = "T" - outputname = "T" - code = 130 - intp_method = 3 -/ -&input_field_nml ! specific humidity - inputname = "QV" - outputname = "Q" - code = 133 - intp_method = 3 -/ -&input_field_nml - inputname = "LNSP" - outputname = "LNPS" - code = 152 - intp_method = 3 -/ -EOF - -#----------------------------------------------------------------------------- -# loop over file list: - -datafilename={cfg.input_root_chem}/{cfg.chem_prefix}{cfg.inidate_yyyymmdd_hh}{cfg.chem_suffix} -datafile="${{datafilename##*/}}" # get filename without path -outdatafile=${{datafile%.*}} # get filename without suffix - -# create ICON master namelist -# ------------------------ -# For a complete list see Namelist_overview and Namelist_overview.pdf - -cat > NAMELIST_ICONREMAP << EOF -&remap_nml - in_grid_filename = '{cfg.input_root_chem}/{cfg.chem_prefix}{cfg.inidate_yyyymmdd_hh}{cfg.chem_suffix}' - in_filename = '{cfg.input_root_chem}/${{datafile}}' - in_type = 1 - out_grid_filename = '{cfg.dynamics_grid_filename_scratch}' - out_filename = '{cfg.icon_input_icbc}/${{outdatafile}}.nc' - out_type = 2 - out_filetype = 4 - l_have3dbuffer = .false. -/ -EOF - -srun -n 1 {cfg.iconremap_bin} \ - -vvvvv -q --remap_nml NAMELIST_ICONREMAP \ - --input_field_nml NAMELIST_ICONREMAP_FIELDS 2>&1 - - -#----------------------------------------------------------------------------- -# clean-up - -rm -f ncstorage.tmp* -rm -f nml.log NAMELIST_SUB NAMELIST_ICONREMAP NAMELIST_ICONREMAP_FIELDS - -#----------------------------------------------------------------------------- -exit -#----------------------------------------------------------------------------- diff --git a/cases/icon-art-oem-test/icontools_remap_ic_runjob.cfg b/cases/icon-art-oem-test/icontools_remap_ic_runjob.cfg deleted file mode 100755 index 2e0d4549..00000000 --- a/cases/icon-art-oem-test/icontools_remap_ic_runjob.cfg +++ /dev/null @@ -1,242 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name="{cfg.casename}_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" -#SBATCH --account={cfg.compute_account} -#SBATCH --chdir={cfg.icon_work} -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --nodes=1 -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --output={logfile} -#SBATCH --open-mode=append - -ulimit -s unlimited - -set -x - -export ECCODES_DEFINITION_PATH=/store/empa/em05/eccodes_definitions/definitions.edzw-2.12.5-2:/store/empa/em05/easybuild/software/ecCodes/2.12.5-CrayGNU-20.08/share/eccodes/definitions - -#----------------------------------------------------------------------------- -# Remap inital data onto local (limited-area) grid -#----------------------------------------------------------------------------- -cat > NAMELIST_ICONREMAP_FIELDS << EOF -! -&input_field_nml ! temperature - inputname = "T" - outputname = "T" - code = 130 - intp_method = 3 -/ -&input_field_nml ! horiz. wind comp. u - inputname = "U" - outputname = "U" - intp_method = 3 -/ -&input_field_nml ! horiz. wind comp. u - inputname = "V" - outputname = "V" - intp_method = 3 -/ -&input_field_nml ! vertical velocity - inputname = "OMEGA" - outputname = "W" - code = 135 - intp_method = 3 -/ -&input_field_nml ! surface pressure - inputname = "LNSP" - outputname = "LNPS" - code = 152 - intp_method = 3 -/ -&input_field_nml ! geopotential - inputname = "Z" - outputname = "GEOSP" - code = 129 - intp_method = 3 -/ -&input_field_nml ! geopotential - inputname = "Z" - outputname = "GEOP_SFC" - code = 129 - intp_method = 3 -/ -&input_field_nml ! specific humidity - inputname = "QV" - outputname = "QV" - code = 133 - intp_method = 3 -/ -&input_field_nml ! cloud liquid water content - inputname = "CLWC" - outputname = "QC" - code = 246 - intp_method = 3 -/ -&input_field_nml ! cloud ice water content - inputname = "CIWC" - outputname = "QI" - code = 247 - intp_method = 3 -/ -&input_field_nml ! rain water content - inputname = "CRWC" - outputname = "QR" - code = 75 - intp_method = 3 -/ -&input_field_nml ! snow water content - inputname = "CSWC" - outputname = "QS" - code = 76 - intp_method = 3 -/ -&input_field_nml ! snow temperature - inputname = "TSN" - outputname = "T_SNOW" - code = 238 - intp_method = 3 -/ -&input_field_nml ! water content of snow - inputname = "SD" - outputname = "W_SNOW" - code = 141 - intp_method = 3 -/ -&input_field_nml ! density of snow - inputname = "RSN" - outputname = "RHO_SNOW" - code = 33 - intp_method = 3 -/ -&input_field_nml ! snow albedo - inputname = "ASN" - outputname = "ALB_SNOW" - code = 32 - intp_method = 3 -/ -&input_field_nml ! skin temperature - inputname = "SKT" - outputname = "SKT" - code = 235 - intp_method = 3 -/ -&input_field_nml ! sea surface temperature - inputname = "SST" - outputname = "SST" - code = 34 - intp_method = 3 -/ -&input_field_nml ! soil temperature level 1 - inputname = "STL1" - outputname = "STL1" - code = 139 - intp_method = 3 -/ -&input_field_nml ! soil temperature level 2 - inputname = "STL2" - outputname = "STL2" - code = 170 - intp_method = 3 -/ -&input_field_nml ! soil temperature level 3 - inputname = "STL3" - outputname = "STL3" - code = 183 - intp_method = 3 -/ -&input_field_nml ! soil temperature level 4 - inputname = "STL4" - outputname = "STL4" - code = 236 - intp_method = 3 -/ -&input_field_nml ! sea-ice cover - inputname = "CI" - outputname = "CI" - code = 31 - intp_method = 3 -/ -&input_field_nml ! water cont. of interception storage - inputname = "SRC" - outputname = "W_I" - code = 198 - intp_method = 3 -/ -&input_field_nml ! surface roughness - inputname = "SR" - outputname = "Z0" - code = 173 - intp_method = 3 -/ -&input_field_nml ! Land/sea mask - inputname = "LSM" - outputname = "LSM" - code = 172 - intp_method = 3 -/ -&input_field_nml ! soil moisture index layer 1 - inputname = "SWVL1" - outputname = "SMIL1" - code = 80 - intp_method = 3 -/ -&input_field_nml ! soil moisture index layer 2 - inputname = "SWVL2" - outputname = "SMIL2" - code = 81 - intp_method = 3 -/ -&input_field_nml ! soil moisture index layer 3 - inputname = "SWVL3" - outputname = "SMIL3" - code = 82 - intp_method = 3 -/ -&input_field_nml ! soil moisture index layer 4 - inputname = "SWVL4" - outputname = "SMIL4" - code = 83 - intp_method = 3 -/ -EOF - -#----------------------------------------------------------------------------- -# loop over file list: - -datafilename={cfg.input_root_meteo}/{cfg.meteo_prefix}{cfg.inidate_yyyymmddhh}{cfg.meteo_suffix} -datafile="${{datafilename##*/}}" # get filename without path -outdatafile=${{datafile%.*}} # get filename without suffix - -# create ICON master namelist -# ------------------------ -# For a complete list see Namelist_overview and Namelist_overview.pdf - -cat > NAMELIST_ICONREMAP << EOF -&remap_nml - in_grid_filename = '{cfg.input_root_meteo}/{cfg.meteo_prefix}{cfg.inidate_yyyymmddhh}{cfg.meteo_suffix}' - in_filename = '{cfg.input_root_meteo}/${{datafile}}' - in_type = 1 - out_grid_filename = '{cfg.dynamics_grid_filename}' - out_filename = '{cfg.icon_input_icbc}/${{outdatafile}}.nc' - out_type = 2 - out_filetype = 4 - l_have3dbuffer = .false. -/ -EOF - -srun -n 1 {cfg.iconremap_bin} \ - -vvvvv -q --remap_nml NAMELIST_ICONREMAP \ - --input_field_nml NAMELIST_ICONREMAP_FIELDS 2>&1 - - -#----------------------------------------------------------------------------- -# clean-up - -rm -f ncstorage.tmp* -rm -f nml.log NAMELIST_SUB NAMELIST_ICONREMAP NAMELIST_ICONREMAP_FIELDS - -#----------------------------------------------------------------------------- -exit -#----------------------------------------------------------------------------- diff --git a/cases/icon-art-oem-test/icontools_remap_lbc_chem_runjob.cfg b/cases/icon-art-oem-test/icontools_remap_lbc_chem_runjob.cfg deleted file mode 100755 index 1ae2a094..00000000 --- a/cases/icon-art-oem-test/icontools_remap_lbc_chem_runjob.cfg +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name="{cfg.casename}_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" -#SBATCH --account={cfg.compute_account} -#SBATCH --chdir={cfg.icon_work} -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --nodes=1 -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --output={logfile} -#SBATCH --open-mode=append - -ulimit -s unlimited - -set -x - -export ECCODES_DEFINITION_PATH=/store/empa/em05/eccodes_definitions/definitions.edzw-2.12.5-2:/store/empa/em05/easybuild/software/ecCodes/2.12.5-CrayGNU-20.08/share/eccodes/definitions - -#----------------------------------------------------------------------------- -# Extract boundary data -#----------------------------------------------------------------------------- - -rm -f ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}* - -cat > NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} << EOF -! -&input_field_nml - inputname = "ch4" - outputname = "CH4_BG" - code = 255 - intp_method = 3 -&input_field_nml ! temperature - inputname = "T" - outputname = "T" - code = 130 - intp_method = 3 -/ -&input_field_nml ! specific humidity - inputname = "QV" - outputname = "Q" - code = 133 - intp_method = 3 -/ -&input_field_nml - inputname = "LNSP" - outputname = "LNPS" - code = 152 - intp_method = 3 -/ -EOF - -#----------------------------------------------------------------------------- -# loop over file list: - -echo "DATAFILELIST is {datafile_list_chem}" -for datafilename in {datafile_list_chem} ; do - datafile="${{datafilename##*/}}" # get filename without path - outdatafile=${{datafile%.*}} # get filename without suffix - cat > NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} << EOF_2C -&remap_nml - in_grid_filename = '{cfg.input_root_chem}/{cfg.chem_prefix}{cfg.inidate_yyyymmdd_hh}{cfg.chem_suffix}' - in_filename = '{cfg.input_root_chem}/${{datafile}}' - in_type = 1 - out_grid_filename = '{cfg.lateral_boundary_grid_scratch}' - out_filename = '{cfg.icon_input_icbc}/${{outdatafile}}_lbc.nc' - out_type = 2 - out_filetype = 4 - l_have3dbuffer = .false. -! ncstorage_file = "ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}" -/ -EOF_2C - - srun -n 1 {cfg.iconremap_bin} -q \ - --remap_nml NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} \ - --input_field_nml NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} 2>&1 - -done - -#----------------------------------------------------------------------------- -# clean-up - -#rm -f ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}* -rm -f nml.log -rm -f NAMELIST_ICONSUB_{cfg.inidate_yyyymmddhh} NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} - -#----------------------------------------------------------------------------- -exit -#----------------------------------------------------------------------------- - diff --git a/cases/icon-art-oem-test/icontools_remap_lbc_rest_runjob.cfg b/cases/icon-art-oem-test/icontools_remap_lbc_rest_runjob.cfg deleted file mode 100755 index 7bbedc54..00000000 --- a/cases/icon-art-oem-test/icontools_remap_lbc_rest_runjob.cfg +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env bash -#SBATCH --job-name="{cfg.casename}_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" -#SBATCH --account={cfg.compute_account} -#SBATCH --chdir={cfg.icon_work} -#SBATCH --partition={cfg.compute_queue} -#SBATCH --constraint={cfg.constraint} -#SBATCH --nodes=1 -#SBATCH --ntasks-per-core=1 -#SBATCH --ntasks-per-node={cfg.ntasks_per_node} -#SBATCH --cpus-per-task=1 -#SBATCH --output={logfile} -#SBATCH --open-mode=append - -ulimit -s unlimited - -set -x - -export ECCODES_DEFINITION_PATH=/store/empa/em05/eccodes_definitions/definitions.edzw-2.12.5-2:/store/empa/em05/easybuild/software/ecCodes/2.12.5-CrayGNU-20.08/share/eccodes/definitions - -#----------------------------------------------------------------------------- -# Extract boundary data -#----------------------------------------------------------------------------- - -rm -f ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}* - -cat > NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} << EOF -! -&input_field_nml ! temperature - inputname = "T" - outputname = "T" - code = 130 - intp_method = 3 -/ -&input_field_nml ! horiz. wind comp. u - inputname = "U" - outputname = "U" - intp_method = 3 -/ -&input_field_nml ! horiz. wind comp. v - inputname = "V" - outputname = "V" - intp_method = 3 -/ -&input_field_nml ! vertical velocity - inputname = "OMEGA" - outputname = "W" - code = 135 - intp_method = 3 -/ -&input_field_nml ! surface pressure - inputname = "LNSP" - outputname = "LNPS" - code = 152 - intp_method = 3 -/ -&input_field_nml ! specific humidity - inputname = "QV" - outputname = "QV" - code = 133 - intp_method = 3 -/ -&input_field_nml ! cloud liquid water content - inputname = "CLWC" - outputname = "QC" - code = 246 - intp_method = 3 -/ -&input_field_nml ! cloud ice water content - inputname = "CIWC" - outputname = "QI" - code = 247 - intp_method = 3 -/ -&input_field_nml ! rain water content - inputname = "CRWC" - outputname = "QR" - code = 75 - intp_method = 3 -/ -&input_field_nml ! snow water content - inputname = "CSWC" - outputname = "QS" - code = 76 - intp_method = 3 -/ -EOF - -#----------------------------------------------------------------------------- -# loop over file list: - -echo "DATAFILELIST is {datafile_list_rest}" -for datafilename in {datafile_list_rest} ; do - datafile="${{datafilename##*/}}" # get filename without path - outdatafile=${{datafile%.*}} # get filename without suffix - cat > NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} << EOF_2C -&remap_nml - in_grid_filename = '{cfg.input_root_meteo}/{cfg.meteo_prefix}{cfg.inidate_yyyymmddhh}{cfg.meteo_suffix}' - in_filename = '{cfg.input_root_meteo}/${{datafile}}' - in_type = 1 - out_grid_filename = '{cfg.lateral_boundary_grid_scratch}' - out_filename = '{cfg.icon_input_icbc}/${{outdatafile}}_lbc.nc' - out_type = 2 - out_filetype = 4 - l_have3dbuffer = .false. -! ncstorage_file = "ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}" -/ -EOF_2C - - srun -n 1 {cfg.iconremap_bin} -q \ - --remap_nml NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} \ - --input_field_nml NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} 2>&1 - -done - -#----------------------------------------------------------------------------- -# clean-up - -#rm -f ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}* -rm -f nml.log -rm -f NAMELIST_ICONSUB_{cfg.inidate_yyyymmddhh} NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} - -#----------------------------------------------------------------------------- -exit -#----------------------------------------------------------------------------- - diff --git a/cases/icon-art-test/config.py b/cases/icon-art-test/config.py index fba72acb..c3c8f8c9 100644 --- a/cases/icon-art-test/config.py +++ b/cases/icon-art-test/config.py @@ -69,7 +69,12 @@ 'lrtm_filename': ['rrtmg_lw.nc', 'rad'], 'map_file_ana': ['map_file.ana', 'mapping'], 'chemtracer_xml_filename': ['tracers_oh_pntsrc.xml', 'XML'], - 'pntSrc_xml_filename': ['pntSrc_example.xml', 'XML'] + 'pntSrc_xml_filename': ['pntSrc_example.xml', 'XML'], + 'oae_gridded_emissions_nc': ['tno_3cat.nc', 'OEM'], + 'oae_vertical_profiles_nc': ['vertical_profiles.nc', 'OEM'], + 'oae_hourofday_nc': ['hourofday.nc', 'OEM'], + 'oae_dayofweek_nc': ['dayofweek.nc', 'OEM'], + 'oae_monthofyear_nc': ['monthofyear.nc', 'OEM'], } # File names ----------------------------------------------------------------- diff --git a/cases/icon-art-test/icon_runjob.cfg b/cases/icon-art-test/icon_runjob.cfg index 91f4e3d7..561d40ad 100755 --- a/cases/icon-art-test/icon_runjob.cfg +++ b/cases/icon-art-test/icon_runjob.cfg @@ -112,13 +112,25 @@ cat > NAMELIST_NWP << EOF lart_diag_out = .TRUE. ! If this switch is set to .TRUE., diagnostic ! ... output elds are available. Set it to ! ... .FALSE. when facing memory problems. - iart_init_gas = 0 + iart_init_gas = 4 + cart_cheminit_file = '{inidata_filename}' + cart_cheminit_type = 'EMAC' + cart_cheminit_coord = '{inidata_filename}' iart_seasalt = 0 ! enable seasalt cart_chemtracer_xml = '{cfg.chemtracer_xml_filename_scratch}' ! path to xml file for passive tracers cart_pntSrc_xml = '{cfg.pntSrc_xml_filename_scratch}' cart_input_folder = '{cfg.art_input_folder}' ! absolute Path to ART source code / +! oem_nml: online emission module --------------------------------------------- +&oemctrl_nml + gridded_emissions_nc = '{cfg.oae_gridded_emissions_nc_scratch}' + vertical_profile_nc = '{cfg.oae_vertical_profiles_nc_scratch}' + hour_of_day_nc = '{cfg.oae_hourofday_nc_scratch}' + day_of_week_nc = '{cfg.oae_dayofweek_nc_scratch}' + month_of_year_nc = '{cfg.oae_monthofyear_nc_scratch}' +/ + ! diffusion_nml: horizontal (numerical) diffusion ---------------------------- &diffusion_nml lhdiff_vn = .TRUE. ! diffusion on the horizontal wind field diff --git a/run_chain.py b/run_chain.py index 7e7f741e..5582ae75 100755 --- a/run_chain.py +++ b/run_chain.py @@ -370,7 +370,7 @@ def run_chain(work_root, model_cfg, cfg, start_time, hstart, hstop, job_names, setattr(cfg, 'icon_input_icbc', os.path.join(chain_root, 'icon', 'input', 'icbc')) setattr(cfg, 'icon_input_oae', - os.path.join(chain_root, 'icon', 'input', 'oae')) + os.path.join(chain_root, 'icon', 'input', 'OEM')) setattr(cfg, 'icon_input_grid', os.path.join(chain_root, 'icon', 'input', 'grid')) setattr(cfg, 'icon_input_mapping', From acb51754a7866134bde433c56f2e5dfe152fb61e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Fri, 30 Jun 2023 15:19:32 +0200 Subject: [PATCH 074/108] Add template for icon-art-global-test --- cases/icon-art-global-test/config.py | 144 +++++++ .../icon-art-global-test/icon_era5_inicond.sh | 179 ++++++++ .../icon-art-global-test/icon_era5_nudging.sh | 64 +++ cases/icon-art-global-test/icon_runjob.cfg | 402 ++++++++++++++++++ .../icon_species_inicond.sh | 75 ++++ .../icon_species_nudging.sh | 55 +++ cases/icon-art-global-test/mypartab | 117 +++++ 7 files changed, 1036 insertions(+) create mode 100644 cases/icon-art-global-test/config.py create mode 100644 cases/icon-art-global-test/icon_era5_inicond.sh create mode 100644 cases/icon-art-global-test/icon_era5_nudging.sh create mode 100644 cases/icon-art-global-test/icon_runjob.cfg create mode 100644 cases/icon-art-global-test/icon_species_inicond.sh create mode 100644 cases/icon-art-global-test/icon_species_nudging.sh create mode 100644 cases/icon-art-global-test/mypartab diff --git a/cases/icon-art-global-test/config.py b/cases/icon-art-global-test/config.py new file mode 100644 index 00000000..5f2dd7f8 --- /dev/null +++ b/cases/icon-art-global-test/config.py @@ -0,0 +1,144 @@ +import os +""" +Configuration file for the 'icon-art-global' case with ICON-ART +""" + +# ----------------------------------------------------------- +# GENERAL SETTINGS +# ----------------------------------------------------------- + +user = os.environ['USER'] +compute_host = 'daint' +compute_queue = 'debug' # 'normal' / 'debug' +constraint = 'mc' # 'mc' / 'gpu' +if os.path.exists(os.environ['HOME'] + '/.acct'): + with open(os.environ['HOME'] + '/.acct', 'r') as file: + compute_account = file.read().rstrip() +else: + compute_account = os.popen("id -gn").read().splitlines()[0] + +# -- Model to run + +model = 'icon-art-global' + +# -- Number of tasks per node +ntasks_per_node = 36 if constraint == 'mc' else 12 + +# -- case name = pathname in cases/ +casename = os.path.basename(os.path.dirname(os.path.realpath(__file__))) + +# -- Root directory of the sourcecode of the chain (where run_chain.py is) +chain_src_dir = os.getcwd() + +# -- Case directory +case_dir = os.path.join(chain_src_dir, 'cases', casename) + +# ----------------------------------------------------------- +# -- SIMULATION +# ----------------------------------------------------------- + +# -- Root directory of the working space of the chain +work_dir = os.path.join(chain_src_dir, 'work') + +# -- Executable +# icon_bin = os.path.join('/scratch/snx3000/jthanwer/spack-install/daint/icon/c2sm-master/gcc/qcndg6qwq6e5gfutwoycqmwf2m4lvg7g/', 'bin', 'icon') # -- eccodes, ocean, noart +# icon_bin = os.path.join('/scratch/snx3000/jthanwer/spack-install/daint/icon/c2sm-master/gcc/x6pisrz7umszlrpnazse3cuosdxt45kt/', 'bin', 'icon') # -- art +# icon_bin = os.path.join('/scratch/snx3000/jthanwer/icon-online-traj/cpu/', 'bin', 'icon') # -- online-traj, cpu+art, dev-build +icon_bin = os.path.join('/scratch/snx3000/jthanwer/icon/cpu/', 'bin', + 'icon') # + +# -- Paths for namelists and slurm runscript templates +# icon_runjob = os.path.join(case_dir, 'icon_runjob_withoutart.cfg') +icon_runjob = os.path.join(case_dir, 'icon_runjob.cfg') +icon_era5_inijob = os.path.join(case_dir, 'icon_era5_inicond.sh') +icon_era5_nudgingjob = os.path.join(case_dir, 'icon_era5_nudging.sh') +icon_species_inijob = os.path.join(case_dir, 'icon_species_inicond.sh') +icon_species_nudgingjob = os.path.join(case_dir, 'icon_species_nudging.sh') + +# -- Number of hours simulated by one job / directory +restart_step = 24 # -- hours or Pandas frequency + +# -- Number of hours between two output data +output_writing_step = 12 # -- TO MODIFY + +# -- Initial conditios +era5_inicond = False # -- TO MODIFY +species_inicond = True +species2restart = ['TROH'] + +# -- Nudging (meteorological and tracers) +era5_global_nudging = False +species_global_nudging = False +species2nudge = [] +nudging_step = 12 + +# -- Walltimes and domain decomposition +if compute_queue == "normal": + icon_walltime = "00:30:00" + icon_np_tot = 2 + +elif compute_queue == "debug": + icon_walltime = "00:30:00" + icon_np_tot = 2 + +# ----------------------------------------------------------- +# -- INPUT DATA +# ----------------------------------------------------------- + +input_root = '/scratch/snx3000/jthanwer/DATA/ICON_INPUT/' +input_root_icbc = os.path.join(input_root, 'ICBC') +input_root_grid = os.path.join(input_root, 'GRIDS') +input_root_rad = os.path.join(input_root, 'RAD') +input_root_oem = os.path.join(input_root, 'OEM', 'SF6') +input_root_chemistry = os.path.join(input_root, 'CHEMISTRY', + 'OH_GCP2022_ORIGINAL') +input_root_tracers = os.path.join(input_root, 'XML/examples') +input_root_configs = os.path.join(input_root, 'CONFIGS') +input_root_art = os.path.join(input_root, 'ART') + +# -- Initial conditions and boundary conditions +inicond_filename = '/scratch/snx3000/jthanwer/DATA/ICON_INPUT/ICBC/era2icon_R2B03_2022060200.nc' + +# -- Grid +dynamics_grid_filename = os.path.join(input_root_grid, "iconR2B03-DOM01.nc") +radiation_grid_filename = os.path.join(input_root_grid, "iconR2B03-DOM01.nc") +extpar_filename = os.path.join(input_root_grid, "extpar_iconR2B03-DOM01.nc") + +# -- Radiation +cldopt_filename = os.path.join(input_root_rad, 'ECHAM6_CldOptProps.nc') +lrtm_filename = os.path.join(input_root_rad, 'rrtmg_lw.nc') + +# -- OEM +# oem_emis_filename = os.path.join(input_root_oem, 'OEM_SF6_{year}.nc') +oem_vertprof_filename = os.path.join(input_root_oem, 'vertical_profiles.nc') +oem_hourofday_filename = os.path.join(input_root_oem, 'hourofday.nc') +oem_dayofweek_filename = os.path.join(input_root_oem, 'dayofweek.nc') +oem_monthofyear_filename = os.path.join(input_root_oem, 'monthofyear.nc') + +# -- Chemistry (OH) +oh_molec_filename = os.path.join(input_root_chemistry, + 'oh_gcp2022_icongrid.nc') # -- TO MODIFY + +# -- ART +pntSrc_xml_filename = os.path.join(input_root_configs, + 'CONFIG2/point-sources.xml') # -- TO MODIFY +boundcond_xml_filename = os.path.join(input_root_tracers, + 'boundary-conditions.xml') +chemtracer_xml_filename = os.path.join(input_root_configs, + 'CONFIG2/tracers.xml') # -- TO MODIFY + +# -- Nudging +map_file_nudging = os.path.join(input_root_icbc, 'map_file.nudging') + +# ----------------------------------------------------------- +# -- Additional settings derived from constants +# ----------------------------------------------------------- + +# -- Nudge type (global or nothing) +nudge_type = 2 if era5_global_nudging else 0 + +# -- Time step for global nudging in seconds +nudging_step_seconds = nudging_step * 3600 + +# -- Prescribed initial conditions for CH4, CO and/or OH +iart_init_gas = 4 if species_inicond else 0 diff --git a/cases/icon-art-global-test/icon_era5_inicond.sh b/cases/icon-art-global-test/icon_era5_inicond.sh new file mode 100644 index 00000000..522d4878 --- /dev/null +++ b/cases/icon-art-global-test/icon_era5_inicond.sh @@ -0,0 +1,179 @@ +#!/bin/bash + +cd {cfg.icon_input_icbc} + +# --------------------------------- +# -- Pre-processing +# --------------------------------- + +rm -f {cfg.inicond_filename_scratch} + +# -- Convert the GRIB files to NetCDF +cdo -t ecmwf -f nc copy era5_ml.grib era5_ml.nc +cdo -t ecmwf -f nc copy era5_surf.grib era5_surf.nc + +# -- Put all variables in the same file +cdo merge era5_ml.nc era5_surf.nc era5_original.nc + +# -- Change variable and coordinates names to be consistent with ICON nomenclature +cdo setpartabn,mypartab,convert era5_original.nc tmp.nc + +# -- Order the variables alphabetically +ncks tmp.nc data_in.nc +rm tmp.nc era5_surf.nc era5_ml.nc era5_original.nc + +# --------------------------------- +# -- Re-mapping +# --------------------------------- + +# -- Retrieve the dynamic horizontal grid +cdo -s selgrid,2 {cfg.dynamics_grid_filename_scratch} triangular-grid.nc + +# -- Create the weights for remapping ERA5 latlon grid onto the triangular grid +cdo gendis,triangular-grid.nc data_in.nc weights.nc + +# -- Extract the land-sea mask variable in input and output files +cdo selname,LSM data_in.nc LSM_in.nc +ncrename -h -v LSM,FR_LAND LSM_in.nc +cdo selname,FR_LAND {cfg.extpar_filename_scratch} LSM_out_tmp.nc + +# -- Add time dimension to LSM_out.nc +ncecat -O -u time LSM_out_tmp.nc LSM_out_tmp.nc +ncks -h -A -v time LSM_in.nc LSM_out_tmp.nc + +# -- Create two different files for land- and sea-mask +cdo -L setctomiss,0. -ltc,0.5 LSM_in.nc oceanmask_in.nc +cdo -L setctomiss,0. -gec,0.5 LSM_in.nc landmask_in.nc +cdo -L setctomiss,0. -ltc,0.5 LSM_out_tmp.nc oceanmask_out.nc +cdo -L setctomiss,0. -gec,0.5 LSM_out_tmp.nc landmask_out.nc +cdo setrtoc2,0.5,1.0,1,0 LSM_out_tmp.nc LSM_out.nc +rm LSM_in.nc LSM_out_tmp.nc + +# -- Select surface sea variables defined only on sea +ncks -h -v SST,CI data_in.nc datasea_in.nc + +# -- Select surface variables defined on both that must be remap differently on sea and on land +ncks -h -v SKT,STL1,STL2,STL3,STL4,ALB_SNOW,W_SNOW,T_SNOW data_in.nc dataland_in.nc + +# ----------------------------------------------------------------------------- +# -- Remap land and ocean area differently for variables +# ----------------------------------------------------------------------------- + +# -- Ocean part +# ----------------- + +# -- Apply the ocean mask (by dividing) +cdo div dataland_in.nc oceanmask_in.nc tmp1_land.nc +cdo div datasea_in.nc oceanmask_in.nc tmp1_sea.nc + +# -- Set missing values to a distance-weighted average +cdo setmisstodis tmp1_land.nc tmp2_land.nc +cdo setmisstodis tmp1_sea.nc tmp2_sea.nc + +# -- Remap +cdo remapdis,triangular-grid.nc tmp2_land.nc tmp3_land.nc +cdo remapdis,triangular-grid.nc tmp2_sea.nc tmp3_sea.nc + +# -- Apply the ocean mask to remapped variables (by dividing) +cdo div tmp3_land.nc oceanmask_out.nc dataland_ocean_out.nc +cdo div tmp3_sea.nc oceanmask_out.nc datasea_ocean_out.nc + +# -- Clean the repository +rm tmp*.nc oceanmask*.nc + +# # -- Land part +# # ----------------- + +cdo div dataland_in.nc landmask_in.nc tmp1.nc +cdo setmisstodis tmp1.nc tmp2.nc +cdo remapdis,triangular-grid.nc tmp2.nc tmp3.nc +cdo div tmp3.nc landmask_out.nc dataland_land_out.nc +rm tmp*.nc landmask*.nc dataland_in.nc datasea_in.nc + +# -- merge remapped land and ocean part +# -------------------------------------- + +cdo ifthenelse LSM_out.nc dataland_land_out.nc dataland_ocean_out.nc dataland_out.nc +rm dataland_ocean_out.nc dataland_land_out.nc + +# remap the rest and merge all files +# -------------------------------------- + +# -- Select all variables apart from these ones +ncks -h -x -v SKT,STL1,STL2,STL3,STL4,SMIL1,SMIL2,SMIL3,SMIL4,ALB_SNOW,W_SNOW,T_SNOW,SST,CI,LSM data_in.nc datarest_in.nc + +# -- Remap +cdo -s remapdis,triangular-grid.nc datarest_in.nc era5_final.nc +rm datarest_in.nc + +# -- Fill NaN values for SST and CI +cdo setmisstodis -selname,SST,CI datasea_ocean_out.nc dataland_ocean_out_filled.nc +rm datasea_ocean_out.nc + +# -- Merge remapped files plus land sea mask from EXTPAR +ncks -h -A dataland_out.nc era5_final.nc +ncks -h -A dataland_ocean_out_filled.nc era5_final.nc +ncks -h -A -v FR_LAND LSM_out.nc era5_final.nc +ncrename -h -v FR_LAND,LSM era5_final.nc +rm LSM_out.nc dataland_out.nc + +# ------------------------------------------------------------------------ +# -- Convert the (former) SWVLi variables to real soil moisture indices +# ------------------------------------------------------------------------ + +# -- Properties of IFS soil types (see Table 1 ERA5 Data documentation +# -- https://confluence.ecmwf.int/display/CKB/ERA5%3A+data+documentation) +# Soil type 1 2 3 4 5 6 7 +wiltingp=(0 0.059 0.151 0.133 0.279 0.335 0.267 0.151) # wilting point +fieldcap=(0 0.244 0.347 0.383 0.448 0.541 0.663 0.347) # field capacity + +ncks -h -v SMIL1,SMIL2,SMIL3,SMIL4,SLT data_in.nc swvl.nc +rm data_in.nc + +# -- Loop over the soil types and apply the right constants +smi_equation="" +for ilev in {{1..4}}; do + + smi_equation="${{smi_equation}}SMIL${{ilev}} = (SMIL${{ilev}} - ${{wiltingp[1]}}) / (${{fieldcap[1]}} - ${{wiltingp[1]}}) * (SLT==1)" + for ist in {{2..7}}; do + smi_equation="${{smi_equation}} + (SMIL${{ilev}} - ${{wiltingp[$ist]}}) / (${{fieldcap[$ist]}} - ${{wiltingp[$ist]}}) * (SLT==${{ist}})" + done + smi_equation="${{smi_equation}};" + +done + +cdo expr,"${{smi_equation}}" swvl.nc smil_in.nc +rm swvl.nc + +# -- Remap SMIL variables +cdo -s remapdis,triangular-grid.nc smil_in.nc smil_out.nc +rm smil_in.nc + +# -- Overwrite the variables SMIL1,SMIL2,SMIL3,SMIL4 +ncks -A -v SMIL1,SMIL2,SMIL3,SMIL4 smil_out.nc era5_final.nc +rm smil_out.nc + +# -------------------------------------- +# -- Create the LNSP variable +# -------------------------------------- + +# -- Apply logarithm to surface pressure +cdo expr,'LNPS=ln(PS);' era5_final.nc tmp.nc + +# -- Put the new variable LNSP in the original file +ncks -A -v LNPS tmp.nc era5_final.nc +rm tmp.nc + +# --------------------------------- +# -- Post-processing +# --------------------------------- + +# -- Rename dimensions and order alphabetically +ncrename -h -d cell,ncells era5_final.nc +ncrename -h -d nv,vertices era5_final.nc +ncks era5_final.nc {cfg.inicond_filename_scratch} +rm era5_final.nc + +# -- Clean the repository +rm weights.nc +rm triangular-grid.nc \ No newline at end of file diff --git a/cases/icon-art-global-test/icon_era5_nudging.sh b/cases/icon-art-global-test/icon_era5_nudging.sh new file mode 100644 index 00000000..64c48711 --- /dev/null +++ b/cases/icon-art-global-test/icon_era5_nudging.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +cd {cfg.icon_input_icbc} + +# --------------------------------- +# -- Pre-processing +# --------------------------------- + +rm -f {filename} + +# -- Convert the GRIB files to NetCDF +cdo -t ecmwf -f nc copy era5_ml_nudging.grib era5_ml_nudging.nc +cdo -t ecmwf -f nc copy era5_surf_nudging.grib era5_surf_nudging.nc + +# -- Put all variables in the same file +cdo merge era5_ml_nudging.nc era5_surf_nudging.nc era5_original_nudging.nc + +# -- Change variable and coordinates names to be consistent with ICON nomenclature +cdo setpartabn,mypartab,convert era5_original_nudging.nc tmp.nc + +# -- Order the variables alphabetically +ncks tmp.nc data_in.nc +rm tmp.nc era5_surf_nudging.nc era5_ml_nudging.nc era5_original_nudging.nc + +# --------------------------------- +# -- Re-mapping +# --------------------------------- + +# -- Retrieve the dynamic horizontal grid +cdo -s selgrid,2 {cfg.dynamics_grid_filename_scratch} triangular-grid.nc + +# -- Create the weights for remapping ERA5 latlon grid onto the triangular grid +cdo gendis,triangular-grid.nc data_in.nc weights.nc + +# -- Remap +cdo -s remapdis,triangular-grid.nc data_in.nc era5_final.nc +rm data_in.nc + +# -------------------------------------- +# -- Create the LNSP variable +# -------------------------------------- + +# -- Apply logarithm to surface pressure +cdo expr,'LNPS=ln(PS);' era5_final.nc tmp.nc + +# -- Put the new variable LNSP in the original file +ncks -A -v LNPS tmp.nc era5_final.nc +rm tmp.nc + +# --------------------------------- +# -- Post-processing +# --------------------------------- + +# -- Rename dimensions and order alphabetically +ncrename -h -d cell,ncells era5_final.nc +ncrename -h -d nv,vertices era5_final.nc +ncks era5_final.nc {filename} +rm era5_final.nc + + +# -- Clean the repository +rm weights.nc +rm triangular-grid.nc + diff --git a/cases/icon-art-global-test/icon_runjob.cfg b/cases/icon-art-global-test/icon_runjob.cfg new file mode 100644 index 00000000..69b725b7 --- /dev/null +++ b/cases/icon-art-global-test/icon_runjob.cfg @@ -0,0 +1,402 @@ +#!/usr/bin/env bash +#SBATCH --job-name="{cfg.casename}_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" +#SBATCH --account={cfg.compute_account} +#SBATCH --time={cfg.icon_walltime} +#SBATCH --nodes={cfg.icon_np_tot} +#SBATCH --ntasks-per-core=1 +#SBATCH --ntasks-per-node={cfg.ntasks_per_node} +#SBATCH --cpus-per-task=1 +#SBATCH --partition={cfg.compute_queue} +#SBATCH --constraint={cfg.constraint} +#SBATCH --hint=nomultithread +#SBATCH --output={logfile} +#SBATCH --open-mode=append +#SBATCH --chdir={cfg.icon_work} + +# -- OpenMP environment variables +export OMP_NUM_THREADS=1 +export ICON_THREADS=1 +export OMP_SCHEDULE=static,12 +export OMP_DYNAMIC="false" +export OMP_STACKSIZE=200M + + +# -- ECCODES path +export ECCODES_DEFINITION_PATH=/store/empa/em05/eccodes_definitions/definitions.edzw-2.12.5-2 +export ECCODES_DEFINITION_PATH=$ECCODES_DEFINITION_PATH:/store/empa/em05/easybuild.backup/software/ecCodes/2.12.5-CrayGNU-20.08/share/eccodes/definitions +export ECCODES_DEFINITION_PATH=$ECCODES_DEFINITION_PATH:/project/g110/spack-install/daint/eccodes/2.19.0/pgi/6skdmw5lsn6mjv4esxkyalf6xogllshi/share/eccodes/definitions/ + +set -x + +# -- Set time step +dtime=900 + +# ---------------------------------------------------------------------------- +# Create ICON master namelist +# ---------------------------------------------------------------------------- + +cat > icon_master.namelist << EOF +! master_model_nml: repeated for each model ---------------------------------- +&master_model_nml + model_type = 1 ! identifies which component to run (atmosphere,ocean,...) + model_name = "ATMO" ! character string for naming this component. + model_namelist_filename = "NAMELIST_NWP" ! file name containing the model namelists + model_min_rank = 1 ! start MPI rank for this model + model_max_rank = 65536 ! end MPI rank for this model + model_inc_rank = 1 ! stride of MPI ranks +/ + +! time_nml: specification of date and time------------------------------------ +&time_nml + ini_datetime_string = "{cfg.ini_datetime_string}" ! initial date and time of the simulation + end_datetime_string = "{cfg.end_datetime_string}" ! end date and time of the simulation + is_relative_time = .TRUE. ! if time loop shall start with step 0 +/ +EOF + +# ---------------------------------------------------------------------- +# Create model namelists +# ---------------------------------------------------------------------- + +cat > NAMELIST_NWP << EOF +! parallel_nml: MPI parallelization ------------------------------------------- +¶llel_nml + nproma = 8 ! optimal setting 8 for CRAY; use 16 or 24 for IBM + num_io_procs = 1 ! up to one PE per output stream is possible + num_prefetch_proc = 1 +/ + + +! grid_nml: horizontal grid -------------------------------------------------- +&grid_nml + dynamics_grid_filename = "{cfg.dynamics_grid_filename_scratch}" ! array of the grid filenames for the dycore + dynamics_parent_grid_id = 0 ! array of the indexes of the parent grid filenames + lredgrid_phys = .TRUE. ! .true.=radiation is calculated on a reduced grid + lfeedback = .TRUE. ! specifies if feedback to parent grid is performed + ifeedback_type = 2 ! feedback type (incremental/relaxation-based) +/ + + +! initicon_nml: specify read-in of initial state ------------------------------ +&initicon_nml + init_mode = 2 ! 2: start from IFS data + ifs2icon_filename = '{cfg.inicond_filename_scratch}' ! initial data filename + zpbl1 = 500. ! bottom height (AGL) of layer used for gradient computation + zpbl2 = 1000. ! top height (AGL) of layer used for gradient computation +/ + +! extpar_nml: external data -------------------------------------------------- +&extpar_nml + extpar_filename = '{cfg.extpar_filename_scratch}' ! filename of external parameter input file + itopo = 1 ! topography (0:analytical) + itype_vegetation_cycle = 2 ! specifics for annual cycle of LAI + n_iter_smooth_topo = 1 ! iterations of topography smoother + heightdiff_threshold = 2250. + hgtdiff_max_smooth_topo = 750. + read_nc_via_cdi = .TRUE. + itype_lwemiss = 2 +/ + +! io_nml: general switches for model I/O ------------------------------------- +&io_nml + itype_pres_msl = 5 ! method for computation of mean sea level pressure + itype_rh = 1 ! method for computation of relative humidity + lnetcdf_flt64_output = .FALSE. ! NetCDF files is written in 64-bit instead of 32-bit accuracy +/ + +! run_nml: general switches --------------------------------------------------- +&run_nml + dtime = ${{dtime}} ! timestep in seconds + iforcing = 3 ! forcing of dynamics and transport by parameterized processes + lart = .TRUE. ! main switch for ART + ldynamics = .TRUE. ! compute adiabatic dynamic tendencies + ltestcase = .FALSE. ! real case run + ltimer = .FALSE. ! timer for monitoring the runtime of specific routines + ltransport = .TRUE. ! compute large-scale tracer transport + lvert_nest = .FALSE. ! vertical nesting + msg_level = 10 ! detailed report during integration + timers_level = 1 ! performance timer granularity + output = "nml" ! main switch for enabling/disabling components of the model output + num_lev = 65 ! number of full levels (atm.) for each domain +/ + +! nwp_phy_nml: switches for the physics schemes ------------------------------ +&nwp_phy_nml + lrtm_filename = '{cfg.lrtm_filename_scratch}' ! longwave absorption coefficients for RRTM_LW + cldopt_filename = '{cfg.cldopt_filename_scratch}' ! RRTM cloud optical properties + dt_rad = $(( 4 * dtime)) ! time step for radiation in s + dt_conv = $(( 1 * dtime)) ! time step for convection in s (domain specific) + dt_sso = $(( 2 * dtime)) ! time step for SSO parameterization + dt_gwd = $(( 2 * dtime)) ! time step for gravity wave drag parameterization + efdt_min_raylfric = 7200. ! minimum e-folding time of Rayleigh friction + icapdcycl = 3 ! apply CAPE modification to improve diurnalcycle over tropical land + icpl_aero_conv = 1 ! coupling between autoconversion and Tegen aerosol climatology + icpl_aero_gscp = 0 ! + icpl_o3_tp = 1 ! + inwp_cldcover = 1 ! cloud cover scheme for radiation + inwp_convection = 1 ! convection + inwp_gscp = 1 ! cloud microphysics and precipitation + inwp_gwd = 1 ! non-orographic gravity wave drag + inwp_radiation = 1 ! radiation + inwp_satad = 1 ! saturation adjustment + inwp_sso = 1 ! subgrid scale orographic drag + inwp_surface = 1 ! surface scheme + inwp_turb = 1 ! vertical diffusion and transfer + itype_z0 = 2 ! type of roughness length data + latm_above_top = .TRUE. ! take into account atmosphere above model top for radiation computation + ldetrain_conv_prec = .TRUE. ! Activate detrainment of convective rain and snowl + mu_rain = 0.5 + rain_n0_factor = 0.1 + lshallowconv_only = .FALSE. + lgrayzone_deepconv = .TRUE. ! activates shallow and deep convection but not mid-level convection, +/ + +! nwp_tuning_nml: additional tuning parameters ---------------------------------- +&nwp_tuning_nml + itune_albedo = 1 + tune_box_liq_asy = 4.0 + tune_gfrcrit = 0.333 + tune_gkdrag = 0.0 + tune_gkwake = 0.25 + tune_gust_factor = 7.0 + tune_minsnowfrac = 0.3 + tune_sgsclifac = 1.0 + tune_rcucov = 0.075 + tune_rhebc_land = 0.825 + tune_zvz0i = 0.85 + icpl_turb_clc = 2 + max_calibfac_clcl = 2.0 + tune_box_liq = 0.04 +/ + + +! turbdiff_nml: turbulent diffusion ------------------------------------------- +&turbdiff_nml + a_hshr = 2.0 ! length scale factor for separated horizontal shear mode + frcsmot = 0.2 ! these 2 switches together apply vertical smoothing of the TKE source terms + icldm_turb = 2 ! mode of cloud water representation in turbulence + imode_frcsmot = 2 ! in the tropics (only), which reduces the moist bias in the tropical lower troposphere + imode_tkesso = 2 + itype_sher = 2 + ltkeshs = .TRUE. ! type of shear forcing used in turbulence + ltkesso = .TRUE. + pat_len = 750. ! effective length scale of thermal surface patterns + q_crit = 2.0 + rat_sea = 0.8 + tkhmin = 0.5 + tkmmin = 0.75 + tur_len = 300. + rlam_heat = 10.0 + alpha1 = 0.125 +/ + +&lnd_nml + c_soil = 1.25 + c_soil_urb = 0.5 + cwimax_ml = 5.e-4 + idiag_snowfrac = 20 + itype_evsl = 4 + itype_heatcond = 3 + itype_lndtbl = 4 + itype_root = 2 + itype_snowevap = 3 + itype_trvg = 3 + llake = .TRUE. + lmulti_snow = .FALSE. + lprog_albsi = .TRUE. + itype_canopy = 2 + lseaice = .TRUE. + lsnowtile = .TRUE. + nlev_snow = 3 + ntiles = 3 + sstice_mode = 2 +/ + +! radiation_nml: radiation scheme --------------------------------------------- +&radiation_nml + albedo_type = 2 ! Modis albedo + irad_o3 = 79 ! ozone climatology + irad_aero = 6 + islope_rad = 0 + direct_albedo_water = 3 + albedo_whitecap = 1 + vmr_co2 = 407.e-06 ! values representative for 2012 + vmr_ch4 = 1857.e-09 + vmr_n2o = 330.0e-09 + vmr_o2 = 0.20946 + vmr_cfc11 = 240.e-12 + vmr_cfc12 = 532.e-12 +/ + +! nonhydrostatic_nml: nonhydrostatic model ----------------------------------- +&nonhydrostatic_nml + damp_height = 12250.0 ! height at which Rayleigh damping of vertical wind starts + divdamp_fac = 0.004 ! scaling factor for divergence damping + divdamp_order = 24 ! order of divergence damping + divdamp_type = 32 ! type of divergence damping + exner_expol = 0.6 ! temporal extrapolation of Exner function + hbot_qvsubstep = 22500.0 ! height above which QV is advected with substepping scheme + htop_moist_proc = 22500.0 ! max. height for moist physics + iadv_rhotheta = 2 ! advection method for rho and rhotheta + igradp_method = 3 ! discretization of horizontal pressure gradient + itime_scheme = 4 ! time integration scheme + ivctype = 2 ! type of vertical coordinate + l_open_ubc = .FALSE. ! .TRUE.=use open upper boundary condition + l_zdiffu_t = .TRUE. ! specifies computation of Smagorinsky temperature diffusion + rayleigh_coeff = 5.0 ! Rayleigh damping coefficient + thhgtd_zdiffu = 125.0 ! threshold of height difference (temperature diffusion) + thslp_zdiffu = 0.02 ! slope threshold (temperature diffusion) + vwind_offctr = 0.2 ! off-centering in vertical wind solver +/ + +! sleve_nml: vertical level specification ------------------------------------- +&sleve_nml + decay_exp = 1.2 ! exponent of decay function + decay_scale_1 = 4000.0 ! decay scale of large-scale topography component + decay_scale_2 = 2500.0 ! decay scale of small-scale topography component + flat_height = 16000.0 ! height above which the coordinate surfaces are flat + itype_laydistr = 1 + min_lay_thckn = 20.0 ! minimum layer thickness of lowermost layer + stretch_fac = 0.65 ! stretching factor to vary distribution of model levels + htop_thcknlimit = 15000.0 + top_height = 75000.0 ! height of model top +/ + +! dynamics_nml: dynamical core ----------------------------------------------- +&dynamics_nml + divavg_cntrwgt = 0.50 ! weight of central cell for divergence averaging + idiv_method = 1 ! method for divergence computation + iequations = 3 ! type of equations and prognostic variables + lcoriolis = .TRUE. ! Coriolis force +/ + +! transport_nml: tracer transport --------------------------------------------- +&transport_nml + ctracer_list = '12345' ! kann vermutlich raus + ihadv_tracer = 52,2,2,2,2,2 ! tracer specific method to compute horizontal advection + ivadv_tracer = 3,3,3,3,3,3 ! tracer specific method to compute vertical advection + itype_hlimit = 3,4,4,4,4,4 ! type of limiter for horizontal transport + llsq_svd = .TRUE. + beta_fct = 1.005 +/ + +! diffusion_nml: horizontal (numerical) diffusion ---------------------------- +&diffusion_nml + hdiff_efdt_ratio = 24.0 ! ratio of e-folding time to time step + hdiff_order = 5 ! order of nabla operator for diffusion + hdiff_smag_fac = 0.025 ! scaling factor for Smagorinsky diffusion + itype_t_diffu = 2 ! discretization of temperature diffusion + itype_vn_diffu = 1 ! reconstruction method used for Smagorinsky diffusion + lhdiff_vn = .TRUE. ! diffusion on the horizontal wind field + lhdiff_temp = .TRUE. ! diffusion on the temperature field +/ + +! interpol_nml: settings for internal interpolation methods ------------------ +&interpol_nml + lsq_high_ord = 3 + l_intp_c2l = .TRUE. + l_mono_c2l = .TRUE. +/ + +! nudging_nml: settings for global nudging ----------------------------------- +&nudging_nml +nudge_type = {cfg.nudge_type} ! global nudging +nudge_var = 'vn' ! variables that shall be nudged, default = all (vn,thermdyn,qv) +nudge_start_height = 0. ! Start nudging at the surface +nudge_end_height = 75000.0 ! End nudging at the top +nudge_profile = 2 +/ + +! limarea_nml: settings for global nudging ----------------------------------- +&limarea_nml +itype_latbc = 1 ! time-dependent lateral boundary conditions provided by an external source +dtime_latbc = {cfg.nudging_step_seconds} ! Time difference between two consecutive boundary data +latbc_path = '{cfg.icon_input_icbc}' ! Absolute path to boundary data +latbc_filename = 'era2icon_R2B03__nudging.nc' ! boundary data input filename +latbc_varnames_map_file = '{cfg.map_file_nudging_scratch}' ! Dictionary file which maps internal variable names onto GRIB2 shortnames or NetCDF varnames +latbc_boundary_grid = ' ' ! no boundary grid: driving data have to be available on entire grid (important to let a space) +/ + +! art_nml: Aerosols and Reactive Trace gases extension------------------------------------------------- +&art_nml + lart_diag_out = .TRUE. ! If this switch is set to .TRUE., diagnostic + ! ... output elds are available. Set it to + ! ... .FALSE. when facing memory problems. + lart_pntSrc = .TRUE. ! enables point sources + !lart_bound_cond = .FALSE. ! enables boundary conditions + lart_chem = .TRUE. ! enables chemistry + lart_chemtracer = .TRUE. ! main switch for the treatment of chemical tracer + lart_aerosol = .FALSE. ! main switch for the treatment of atmospheric aerosol + + iart_seasalt = 0 + iart_init_gas = {cfg.iart_init_gas} + cart_cheminit_type = 'EMAC' + cart_cheminit_file = '{cfg.inicond_filename_scratch}' + cart_cheminit_coord = '{cfg.inicond_filename_scratch}' + + cart_chemtracer_xml = '{cfg.chemtracer_xml_filename_scratch}' ! path to xml file for chemical tracers + cart_pntSrc_xml = '{cfg.pntSrc_xml_filename_scratch}' ! path to xml file for point sources + cart_input_folder = '{cfg.input_root_art}' ! absolute Path to ART source code +/ + +! output_nml: specifies an output stream -------------------------------------- +&output_nml + filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2 + dom = -1 ! write all domains + output_bounds = 0.,100000000,{cfg.output_writing_step} ! start, end, increment + output_time_unit = 3 ! Unit of bounds is in hours instead of seconds + steps_per_file = 1 ! number of steps per file + steps_per_file_inclfirst = .FALSE. ! First step is not accounted for in steps_per_file + include_last = .FALSE. + mode = 1 ! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis) + output_filename = 'ICON-ART' + filename_format = '{cfg.icon_output}/_latlon_' ! file name base + remap = 1 ! 1: remap to lat-lon grid + reg_lon_def = -179.,2,179 + reg_lat_def = 89.,-2,-89. + ml_varlist = 'z_ifc','pres','qv','rho','temp','u','v','group:ART_CHEMISTRY','OH_Nconc', +/ + +! output_nml: specifies an output stream -------------------------------------- +&output_nml + filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2 + dom = -1 ! write all domains + output_bounds = 0.,100000000,{cfg.output_writing_step} ! start, end, increment + output_time_unit = 3 ! Unit of bounds is in hours instead of seconds + steps_per_file = 1 ! number of steps per file + steps_per_file_inclfirst = .FALSE. ! First step is not accounted for in steps_per_file + include_last = .FALSE. + mode = 1 ! 1: forecast mode (mrelative t-axis), 2: climate mode (absolute t-axis) + output_filename = 'ICON-ART' + filename_format = '{cfg.icon_output}/_unstr_' ! file name base + remap = 0 ! 1: remap to lat-lon grid + ml_varlist = 'z_ifc','pres','qv','rho','temp','u','v','group:ART_CHEMISTRY','OH_Nconc', +/ + + +EOF + +# ! ml_varlist = 'z_ifc','z_mc','pres','pres_sfc','qv','rho','temp','u','v','group:ART_CHEMISTRY', + +# ---------------------------------------------------------------------- +# run the model! +# ---------------------------------------------------------------------- + srun ./icon.exe + + + +# ! output_nml: specifies an output stream -------------------------------------- +# &output_nml +# filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2 +# dom = -1 ! write all domains +# output_bounds = 0., 2678400., 3600. ! start, end, increment +# steps_per_file = 1 ! number of steps per file +# mode = 1 ! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis) +# include_last = .TRUE. +# output_filename = 'ICON-ART' +# filename_format = '{cfg.icon_output}/_latlon_' ! file name base +# remap = 1 ! 1: remap to lat-lon grid +# reg_lon_def = -179.,2,179 +# reg_lat_def = 90.,-1,-90. +# ml_varlist = 'z_ifc','z_mc','pres','pres_sfc','qc','rh','rho','temp','u','v','w','group:ART_CHEMISTRY', +# / \ No newline at end of file diff --git a/cases/icon-art-global-test/icon_species_inicond.sh b/cases/icon-art-global-test/icon_species_inicond.sh new file mode 100644 index 00000000..e76abb76 --- /dev/null +++ b/cases/icon-art-global-test/icon_species_inicond.sh @@ -0,0 +1,75 @@ +#!/bin/bash + +cd {cfg.icon_input_icbc} + + +species2restart=($(echo {cfg.species2restart} | tr -d '[],')) + + +if [[ {cfg.lrestart} == '.FALSE.' ]]; then + + # ---------------------------------------------------------- + # -- Replicate Q and GEOSP variables for ICON-ART + # ---------------------------------------------------------- + + cdo expr,'Q=QV;' {filename} tmp.nc + ncks -A -v Q tmp.nc {filename} + rm tmp.nc + + cdo expr,'GEOP_SFC=GEOSP;' {filename} tmp.nc + ncks -A -v GEOP_SFC tmp.nc {filename} + rm tmp.nc + +fi + +# ---------------------------------------------------------- +# -- Create CH4 and CO variables (if CAMS not available) +# ---------------------------------------------------------- +if [[ "${{species2restart[*]}}" =~ "TRCH4" || "${{species2restart[*]}}" =~ "TRCO" ]]; then + + # ---------------------------------------------------------- + # -- Remap CAMS data (if CAMS available...) + # ---------------------------------------------------------- + + # # -- Convert the GRIB files to NetCDF + # cdo -t ecmwf -f nc copy cams.grib cams.nc + + # # -- Retrieve the dynamic horizontal grid + # cdo -s selgrid,2 {cfg.dynamics_grid_filename_scratch} triangular-grid.nc + + # # -- Remap + # cdo -s remapdis,triangular-grid.nc cams.nc cams_final.nc + # rm cams.nc + + # # -- Merge CAMS and ERA5 data + # ncks -h -A cams.nc tmp.nc + # rm cams.nc cams.grib + + # # -- Rename variables + # ncrename -h CH4,TRCH4 tmp.nc + # ncrename -h CO,TRCO tmp.nc + # ncks tmp.nc {filename} + # rm tmp.nc + + # ---------------------------------------------------------- + # -- Or just create basic variables + # ---------------------------------------------------------- + var_tracer="TRCH4{ext_restart}" + cdo expr,"TRCH4=QV / QV * 0.000002;" {filename} tmp.nc + if [ ! -z "{ext_restart}" ] ; then + ncrename -h -v TRCH4,${{var_tracer}} tmp.nc + fi + ncks -A -v ${{var_tracer}} tmp.nc {filename} + rm tmp.nc + + var_tracer="TRCO{ext_restart}" + cdo expr,"TRCO=QV / QV * 0.000002;" {filename} tmp.nc + if [ ! -z "{ext_restart}" ] ; then + ncrename -h -v TRCO,${{var_tracer}} tmp.nc + fi + ncks -A -v ${{var_tracer}} tmp.nc {filename} + rm tmp.nc + + +fi + diff --git a/cases/icon-art-global-test/icon_species_nudging.sh b/cases/icon-art-global-test/icon_species_nudging.sh new file mode 100644 index 00000000..6d7f91fd --- /dev/null +++ b/cases/icon-art-global-test/icon_species_nudging.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +cd {cfg.icon_input_icbc} + +# ---------------------------------------------------------- +# -- Replicate Q and GEOSP variables for ICON-ART +# ---------------------------------------------------------- + +cdo expr,'Q=QV;' {filename} tmp.nc +ncks -A -v Q tmp.nc {filename} +rm tmp.nc + +cdo expr,'GEOP_SFC=GEOSP;' {filename} tmp.nc +ncks -A -v GEOP_SFC tmp.nc {filename} +rm tmp.nc + +# ---------------------------------------------------------- +# -- Remap CAMS data (if CAMS available) +# ---------------------------------------------------------- + +# # -- Convert the GRIB files to NetCDF +# cdo -t ecmwf -f nc copy cams.grib cams.nc + +# # -- Retrieve the dynamic horizontal grid +# cdo -s selgrid,2 {cfg.dynamics_grid_filename_scratch} triangular-grid.nc + +# # -- Remap +# cdo -s remapdis,triangular-grid.nc cams.nc cams_final.nc +# rm cams.nc + +# # -- Merge CAMS and ERA5 data +# ncks -h -A cams.nc tmp.nc +# rm cams.nc cams.grib + +# # -- Rename variables +# ncrename -h CH4,TRCH4 tmp.nc +# ncrename -h CO,TRCO tmp.nc +# ncks tmp.nc {filename} +# rm tmp.nc + +# ---------------------------------------------------------- +# -- Create CH4 and CO variables (if CAMS not available) +# ---------------------------------------------------------- + +cdo expr,'TRCH4=QV / QV * 0.000002;' {filename} tmp.nc +ncks -A -v TRCH4 tmp.nc {filename} +rm tmp.nc + +cdo expr,'TRCO=QV / QV * 0.0000002;' {filename} tmp.nc +ncks -A -v TRCO tmp.nc {filename} +rm tmp.nc + +cdo expr,'TROH=QV / QV * 0.000004;' {filename} tmp.nc +ncks -A -v TROH tmp.nc {filename} +rm tmp.nc diff --git a/cases/icon-art-global-test/mypartab b/cases/icon-art-global-test/mypartab new file mode 100644 index 00000000..9552aa1f --- /dev/null +++ b/cases/icon-art-global-test/mypartab @@ -0,0 +1,117 @@ +¶meter ! temperature +name = "t" +out_name = "T" +/ +¶meter ! horiz. wind comp. u +name = "u" +out_name = "U" +/ +¶meter ! horiz. wind comp. u +name = "v" +out_name = "V" +/ +¶meter ! vertical velocity +name = "w" +out_name = "W" +/ +¶meter ! specific humidity +name = "q" +out_name = "QV" +/ +¶meter ! cloud liquid water content +name = "clwc" +out_name = "QC" +/ +¶meter ! cloud ice water content +name = "ciwc" +out_name = "QI" +/ +¶meter ! rain water content +name = "crwc" +out_name = "QR" +/ +¶meter ! snow water content +name = "cswc" +out_name = "QS" +/ +¶meter ! snow temperature +name = "TSN" +out_name = "T_SNOW" +/ +¶meter ! water content of snow +name = "SD" +out_name = "W_SNOW" +/ +¶meter ! density of snow +name = "RSN" +out_name = "RHO_SNOW" +/ +¶meter ! snow albedo +name = "ASN" +out_name = "ALB_SNOW" +/ +¶meter ! skin temperature +name = "SKT" +out_name = "SKT" +/ +¶meter ! sea surface temperature +name = "SSTK" +out_name = "SST" +/ +¶meter ! soil temperature level 1 +name = "STL1" +out_name = "STL1" +/ +¶meter ! soil temperature level 2 +name = "STL2" +out_name = "STL2" +/ +¶meter ! soil temperature level 3 +name = "STL3" +out_name = "STL3" +/ +¶meter ! soil temperature level 4 +name = "STL4" +out_name = "STL4" +/ +¶meter ! sea-ice cover +name = "CI" +out_name = "CI" +/ +¶meter ! water cont. of interception storage +name = "SRC" +out_name = "W_I" +/ +¶meter ! Land/sea mask +name = "LSM" +out_name = "LSM" +/ +¶meter ! soil moisture index layer 1 +name = "SWVL1" +out_name = "SMIL1" +/ +¶meter ! soil moisture index layer 2 +name = "SWVL2" +out_name = "SMIL2" +/ +¶meter ! soil moisture index layer 3 +name = "SWVL3" +out_name = "SMIL3" +/ +¶meter ! soil moisture index layer 4 +name = "SWVL4" +out_name = "SMIL4" +/ +¶meter ! logarithm of surface pressure +name = "LNSP" +out_name = "LNPS" +/ +¶meter ! logarithm of surface pressure +name = "SP" +out_name = "PS" +/ +¶meter +name = "Z" +out_name = "GEOSP" +/ + From a29c09d0520345fa14b8047737ee0f587850d508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Mon, 3 Jul 2023 15:45:44 +0200 Subject: [PATCH 075/108] Modify config for icon-art-global --- cases/icon-art-global-test/config.py | 71 +++++++--------------------- 1 file changed, 18 insertions(+), 53 deletions(-) diff --git a/cases/icon-art-global-test/config.py b/cases/icon-art-global-test/config.py index 5f2dd7f8..f5d43998 100644 --- a/cases/icon-art-global-test/config.py +++ b/cases/icon-art-global-test/config.py @@ -9,8 +9,8 @@ user = os.environ['USER'] compute_host = 'daint' -compute_queue = 'debug' # 'normal' / 'debug' -constraint = 'mc' # 'mc' / 'gpu' +compute_queue = 'normal' # 'normal' / 'debug' +constraint = 'gpu' # 'mc' / 'gpu' if os.path.exists(os.environ['HOME'] + '/.acct'): with open(os.environ['HOME'] + '/.acct', 'r') as file: compute_account = file.read().rstrip() @@ -38,14 +38,10 @@ # ----------------------------------------------------------- # -- Root directory of the working space of the chain -work_dir = os.path.join(chain_src_dir, 'work') +work_root = os.path.join(chain_src_dir, 'work') # -- Executable -# icon_bin = os.path.join('/scratch/snx3000/jthanwer/spack-install/daint/icon/c2sm-master/gcc/qcndg6qwq6e5gfutwoycqmwf2m4lvg7g/', 'bin', 'icon') # -- eccodes, ocean, noart -# icon_bin = os.path.join('/scratch/snx3000/jthanwer/spack-install/daint/icon/c2sm-master/gcc/x6pisrz7umszlrpnazse3cuosdxt45kt/', 'bin', 'icon') # -- art -# icon_bin = os.path.join('/scratch/snx3000/jthanwer/icon-online-traj/cpu/', 'bin', 'icon') # -- online-traj, cpu+art, dev-build -icon_bin = os.path.join('/scratch/snx3000/jthanwer/icon/cpu/', 'bin', - 'icon') # +icon_bin = os.path.join(chain_src_dir, 'src', 'icon-art', 'bin', 'icon') # -- Paths for namelists and slurm runscript templates # icon_runjob = os.path.join(case_dir, 'icon_runjob_withoutart.cfg') @@ -76,7 +72,6 @@ if compute_queue == "normal": icon_walltime = "00:30:00" icon_np_tot = 2 - elif compute_queue == "debug": icon_walltime = "00:30:00" icon_np_tot = 2 @@ -85,50 +80,20 @@ # -- INPUT DATA # ----------------------------------------------------------- -input_root = '/scratch/snx3000/jthanwer/DATA/ICON_INPUT/' -input_root_icbc = os.path.join(input_root, 'ICBC') -input_root_grid = os.path.join(input_root, 'GRIDS') -input_root_rad = os.path.join(input_root, 'RAD') -input_root_oem = os.path.join(input_root, 'OEM', 'SF6') -input_root_chemistry = os.path.join(input_root, 'CHEMISTRY', - 'OH_GCP2022_ORIGINAL') -input_root_tracers = os.path.join(input_root, 'XML/examples') -input_root_configs = os.path.join(input_root, 'CONFIGS') -input_root_art = os.path.join(input_root, 'ART') - -# -- Initial conditions and boundary conditions -inicond_filename = '/scratch/snx3000/jthanwer/DATA/ICON_INPUT/ICBC/era2icon_R2B03_2022060200.nc' - -# -- Grid -dynamics_grid_filename = os.path.join(input_root_grid, "iconR2B03-DOM01.nc") -radiation_grid_filename = os.path.join(input_root_grid, "iconR2B03-DOM01.nc") -extpar_filename = os.path.join(input_root_grid, "extpar_iconR2B03-DOM01.nc") - -# -- Radiation -cldopt_filename = os.path.join(input_root_rad, 'ECHAM6_CldOptProps.nc') -lrtm_filename = os.path.join(input_root_rad, 'rrtmg_lw.nc') - -# -- OEM -# oem_emis_filename = os.path.join(input_root_oem, 'OEM_SF6_{year}.nc') -oem_vertprof_filename = os.path.join(input_root_oem, 'vertical_profiles.nc') -oem_hourofday_filename = os.path.join(input_root_oem, 'hourofday.nc') -oem_dayofweek_filename = os.path.join(input_root_oem, 'dayofweek.nc') -oem_monthofyear_filename = os.path.join(input_root_oem, 'monthofyear.nc') - -# -- Chemistry (OH) -oh_molec_filename = os.path.join(input_root_chemistry, - 'oh_gcp2022_icongrid.nc') # -- TO MODIFY - -# -- ART -pntSrc_xml_filename = os.path.join(input_root_configs, - 'CONFIG2/point-sources.xml') # -- TO MODIFY -boundcond_xml_filename = os.path.join(input_root_tracers, - 'boundary-conditions.xml') -chemtracer_xml_filename = os.path.join(input_root_configs, - 'CONFIG2/tracers.xml') # -- TO MODIFY - -# -- Nudging -map_file_nudging = os.path.join(input_root_icbc, 'map_file.nudging') +input_root = os.path.join(chain_src_dir, 'input', 'icon-art-global') +input_files = { + 'inicond_filename': ['era2icon_R2B03_2022060200.nc', 'icbc'], + 'map_file_nudging': ['map_file.nudging', 'icbc'], + 'dynamics_grid_filename':["iconR2B03-DOM01.nc", 'grid'], + 'radiation_grid_filename':["iconR2B03-DOM01.nc", 'grid'], + 'extpar_filename': ["extpar_iconR2B03-DOM01.nc", 'grid'], + 'cldopt_filename': ['ECHAM6_CldOptProps.nc', 'rad'], + 'lrtm_filename': ['rrtmg_lw.nc', 'rad'], + 'oh_molec_filename': ['oh_gcp2022_icongrid.nc', 'chemistry'], + 'pntSrc_xml_filename': ['point-sources.xml', 'config'], + 'boundcond_xml_filename': ['boundary-conditions.xml', 'tracers'], + 'chemtracer_xml_filename': ['tracers.xml', 'config'], +} # ----------------------------------------------------------- # -- Additional settings derived from constants From 25fc3f379af51d5514158c07b313d256362f4c49 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 3 Jul 2023 13:46:27 +0000 Subject: [PATCH 076/108] GitHub Action: Apply Pep8-formatting --- cases/icon-art-global-test/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cases/icon-art-global-test/config.py b/cases/icon-art-global-test/config.py index f5d43998..9ea6e765 100644 --- a/cases/icon-art-global-test/config.py +++ b/cases/icon-art-global-test/config.py @@ -84,10 +84,10 @@ input_files = { 'inicond_filename': ['era2icon_R2B03_2022060200.nc', 'icbc'], 'map_file_nudging': ['map_file.nudging', 'icbc'], - 'dynamics_grid_filename':["iconR2B03-DOM01.nc", 'grid'], - 'radiation_grid_filename':["iconR2B03-DOM01.nc", 'grid'], + 'dynamics_grid_filename': ["iconR2B03-DOM01.nc", 'grid'], + 'radiation_grid_filename': ["iconR2B03-DOM01.nc", 'grid'], 'extpar_filename': ["extpar_iconR2B03-DOM01.nc", 'grid'], - 'cldopt_filename': ['ECHAM6_CldOptProps.nc', 'rad'], + 'cldopt_filename': ['ECHAM6_CldOptProps.nc', 'rad'], 'lrtm_filename': ['rrtmg_lw.nc', 'rad'], 'oh_molec_filename': ['oh_gcp2022_icongrid.nc', 'chemistry'], 'pntSrc_xml_filename': ['point-sources.xml', 'config'], From d8e520f227a00dd4cbbe470370d38355726b2e2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 5 Jul 2023 14:37:58 +0200 Subject: [PATCH 077/108] Fix and unify scripts for icon-art-global --- cases/icon-art-global-test/config.py | 8 ++++++-- cases/icon-art-global-test/icon_runjob.cfg | 23 +++++++++++----------- cases/icon-art-test/config.py | 2 +- cases/icon-art-test/icon_runjob.cfg | 11 +---------- jobs/prepare_data.py | 14 ++++++------- 5 files changed, 26 insertions(+), 32 deletions(-) diff --git a/cases/icon-art-global-test/config.py b/cases/icon-art-global-test/config.py index 9ea6e765..8fcc25f6 100644 --- a/cases/icon-art-global-test/config.py +++ b/cases/icon-art-global-test/config.py @@ -43,6 +43,9 @@ # -- Executable icon_bin = os.path.join(chain_src_dir, 'src', 'icon-art', 'bin', 'icon') +# eccodes +eccodes_dir = os.path.join(chain_src_dir, 'input', 'eccodes_definitions') + # -- Paths for namelists and slurm runscript templates # icon_runjob = os.path.join(case_dir, 'icon_runjob_withoutart.cfg') icon_runjob = os.path.join(case_dir, 'icon_runjob.cfg') @@ -79,8 +82,10 @@ # ----------------------------------------------------------- # -- INPUT DATA # ----------------------------------------------------------- +# ART settings----------------------------------------------- +input_root = os.path.join(chain_src_dir, 'input', model) +art_input_folder = os.path.join(input_root, 'art') -input_root = os.path.join(chain_src_dir, 'input', 'icon-art-global') input_files = { 'inicond_filename': ['era2icon_R2B03_2022060200.nc', 'icbc'], 'map_file_nudging': ['map_file.nudging', 'icbc'], @@ -91,7 +96,6 @@ 'lrtm_filename': ['rrtmg_lw.nc', 'rad'], 'oh_molec_filename': ['oh_gcp2022_icongrid.nc', 'chemistry'], 'pntSrc_xml_filename': ['point-sources.xml', 'config'], - 'boundcond_xml_filename': ['boundary-conditions.xml', 'tracers'], 'chemtracer_xml_filename': ['tracers.xml', 'config'], } diff --git a/cases/icon-art-global-test/icon_runjob.cfg b/cases/icon-art-global-test/icon_runjob.cfg index 69b725b7..0604e023 100644 --- a/cases/icon-art-global-test/icon_runjob.cfg +++ b/cases/icon-art-global-test/icon_runjob.cfg @@ -13,23 +13,24 @@ #SBATCH --open-mode=append #SBATCH --chdir={cfg.icon_work} -# -- OpenMP environment variables +# OpenMP environment variables +# ---------------------------- export OMP_NUM_THREADS=1 export ICON_THREADS=1 export OMP_SCHEDULE=static,12 export OMP_DYNAMIC="false" export OMP_STACKSIZE=200M +set -x # -- ECCODES path -export ECCODES_DEFINITION_PATH=/store/empa/em05/eccodes_definitions/definitions.edzw-2.12.5-2 -export ECCODES_DEFINITION_PATH=$ECCODES_DEFINITION_PATH:/store/empa/em05/easybuild.backup/software/ecCodes/2.12.5-CrayGNU-20.08/share/eccodes/definitions -export ECCODES_DEFINITION_PATH=$ECCODES_DEFINITION_PATH:/project/g110/spack-install/daint/eccodes/2.19.0/pgi/6skdmw5lsn6mjv4esxkyalf6xogllshi/share/eccodes/definitions/ - -set -x +export ECCODES_DEFINITION_PATH={cfg.eccodes_dir}/definitions.edzw-2.12.5-2:{cfg.eccodes_dir}/definitions -# -- Set time step -dtime=900 +# ---------------------------------------------------------------------------- +# Link radiation input files +# ---------------------------------------------------------------------------- +ln -sf {cfg.art_input_folder}/* . +ln -sf {cfg.art_input_folder}/* . # ---------------------------------------------------------------------------- # Create ICON master namelist @@ -106,7 +107,7 @@ cat > NAMELIST_NWP << EOF ! run_nml: general switches --------------------------------------------------- &run_nml - dtime = ${{dtime}} ! timestep in seconds + dtime = 900 ! timestep in seconds iforcing = 3 ! forcing of dynamics and transport by parameterized processes lart = .TRUE. ! main switch for ART ldynamics = .TRUE. ! compute adiabatic dynamic tendencies @@ -336,7 +337,7 @@ latbc_boundary_grid = ' ' cart_chemtracer_xml = '{cfg.chemtracer_xml_filename_scratch}' ! path to xml file for chemical tracers cart_pntSrc_xml = '{cfg.pntSrc_xml_filename_scratch}' ! path to xml file for point sources - cart_input_folder = '{cfg.input_root_art}' ! absolute Path to ART source code + cart_input_folder = '{cfg.art_input_folder}' ! absolute Path to ART source code / ! output_nml: specifies an output stream -------------------------------------- @@ -399,4 +400,4 @@ EOF # reg_lon_def = -179.,2,179 # reg_lat_def = 90.,-1,-90. # ml_varlist = 'z_ifc','z_mc','pres','pres_sfc','qc','rh','rho','temp','u','v','w','group:ART_CHEMISTRY', -# / \ No newline at end of file +# / diff --git a/cases/icon-art-test/config.py b/cases/icon-art-test/config.py index c3c8f8c9..9fad1068 100644 --- a/cases/icon-art-test/config.py +++ b/cases/icon-art-test/config.py @@ -36,7 +36,7 @@ case_dir = os.path.join(chain_src_dir, 'cases', casename) # PREPARE_DATA --------------------------------------------------------------- -input_root = os.path.join(chain_src_dir, 'input', 'icon-art') +input_root = os.path.join(chain_src_dir, 'input', model) # meteo input_root_meteo = os.path.join(chain_src_dir, 'input', 'meteo') meteo_prefix = 'ifs_' diff --git a/cases/icon-art-test/icon_runjob.cfg b/cases/icon-art-test/icon_runjob.cfg index 561d40ad..2ff163ab 100755 --- a/cases/icon-art-test/icon_runjob.cfg +++ b/cases/icon-art-test/icon_runjob.cfg @@ -20,19 +20,10 @@ export ICON_THREADS=1 export OMP_SCHEDULE=static,12 export OMP_DYNAMIC="false" export OMP_STACKSIZE=200M -# -# MPI variables -# ------------- -no_of_nodes={cfg.icon_np_tot} -mpi_procs_pernode={cfg.ntasks_per_node} -((mpi_total_procs=no_of_nodes * mpi_procs_pernode)) -# -# blocking length -# --------------- -nproma=16 set -x +# -- ECCODES path export ECCODES_DEFINITION_PATH={cfg.eccodes_dir}/definitions.edzw-2.12.5-2:{cfg.eccodes_dir}/definitions # ---------------------------------------------------------------------------- diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index cd7b28b2..9d2ea831 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -88,20 +88,18 @@ def main(starttime, hstart, hstop, cfg, model_cfg): # Create directories #----------------------------------------------------- tools.create_dir(cfg.icon_work, "icon_work") - tools.create_dir(cfg.icon_input_icbc, "icon_input_icbc") - tools.create_dir(cfg.icon_input_grid, "icon_input_grid") - tools.create_dir(cfg.icon_input_mapping, "icon_input_mapping") - tools.create_dir(cfg.icon_input_oae, "icon_input_oem") - tools.create_dir(cfg.icon_input_rad, "icon_input_rad") tools.create_dir(cfg.icon_output, "icon_output") tools.create_dir(cfg.icon_restart_out, "icon_restart_out") - if cfg.model.startswith('icon-art'): - tools.create_dir(cfg.icon_input_xml, "icon_input_xml") #----------------------------------------------------- - # Copy files + # Create directories and copy input files #----------------------------------------------------- for varname in cfg.input_files: + file_info = cfg.input_files[varname] + input_dir = os.path.join(cfg.chain_root, 'icon', 'input', file_info[1]) + input_dir_name = 'icon_input_' + file_info[1] + setattr(cfg, input_dir_name, input_dir) + tools.create_dir(input_dir, input_dir_name) varname_scratch = varname + '_scratch' tools.copy_file(getattr(cfg, varname), getattr(cfg, varname_scratch), From 840a407c8204e18ed1a23ecb21f78b51084add9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 6 Jul 2023 08:17:55 +0200 Subject: [PATCH 078/108] Add icbc folder for prepare_data job --- jobs/prepare_data.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index 9d2ea831..c0244e7b 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -88,11 +88,12 @@ def main(starttime, hstart, hstop, cfg, model_cfg): # Create directories #----------------------------------------------------- tools.create_dir(cfg.icon_work, "icon_work") + tools.create_dir(cfg.icon_input_icbc, "icon_input_icbc") tools.create_dir(cfg.icon_output, "icon_output") tools.create_dir(cfg.icon_restart_out, "icon_restart_out") #----------------------------------------------------- - # Create directories and copy input files + # Create input directories and copy files #----------------------------------------------------- for varname in cfg.input_files: file_info = cfg.input_files[varname] From e32960597a1212a5a65e224fe36c8c9ac7c6cbfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 6 Jul 2023 08:17:57 +0200 Subject: [PATCH 079/108] Add new tests for Jenkins --- jenkins/scripts/jenkins.sh | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/jenkins/scripts/jenkins.sh b/jenkins/scripts/jenkins.sh index a416b0b3..440caa7d 100755 --- a/jenkins/scripts/jenkins.sh +++ b/jenkins/scripts/jenkins.sh @@ -48,17 +48,45 @@ else ./jenkins/scripts/build_icon.sh fi +# Build ICON-ART +if [[ -f src/icon-art/bin/icon ]]; then + echo icon-art executable already exists - skipping build. +else + echo building icon-art... + ./jenkins/scripts/build_icon-art.sh +fi + # Test COSMO-GHG if [[ -f work/cosmo-ghg-11km-test/2015010112_-6_12/checkpoints/finished/post_cosmo ]]; then echo cosmo-ghg test case already finished - skipping test. else echo running cosmo-ghg test case... - python run_chain.py cosmo-ghg-11km-test 2015-01-01 0 24 -f + ./jenkins/scripts/test_cosmo-ghg.sh fi # Test ICON -echo running icon test case... -python run_chain.py icon-test 2018-01-01 0 24 -j prepare_data icon -f +if [[ -f work/icon-test/2018010100_0_24/checkpoints/finished/icon ]]; then + echo icon test case already finished - skipping test. +else + echo running icon test case... + ./jenkins/scripts/test_icon.sh +fi + +# Test ICON-ART +if [[ -f work/icon-art-test/2018010100_0_24/checkpoints/finished/icon ]]; then + echo icon-art test case already finished - skipping test. +else + echo running icon-art test case... + ./jenkins/scripts/test_icon-art.sh +fi + +# Test ICON-ART-GLOBAL +if [[ -f work/icon-art-global-test/2018010100_0_24/checkpoints/finished/icon ]]; then + echo icon-art-global test case already finished - skipping test. +else + echo running icon-art-global test case... + ./jenkins/scripts/test_icon-art-global.sh +fi # Print success message echo "Success!" From 4001f52a0c2252533a3341cb96a7edcbeef17e97 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 6 Jul 2023 06:18:49 +0000 Subject: [PATCH 080/108] GitHub Action: Apply Pep8-formatting --- cases/icon-art-test/config.py | 2 +- jobs/prepare_data.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cases/icon-art-test/config.py b/cases/icon-art-test/config.py index 9fad1068..2437391d 100644 --- a/cases/icon-art-test/config.py +++ b/cases/icon-art-test/config.py @@ -36,7 +36,7 @@ case_dir = os.path.join(chain_src_dir, 'cases', casename) # PREPARE_DATA --------------------------------------------------------------- -input_root = os.path.join(chain_src_dir, 'input', model) +input_root = os.path.join(chain_src_dir, 'input', model) # meteo input_root_meteo = os.path.join(chain_src_dir, 'input', 'meteo') meteo_prefix = 'ifs_' diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index c0244e7b..342afc47 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -97,7 +97,8 @@ def main(starttime, hstart, hstop, cfg, model_cfg): #----------------------------------------------------- for varname in cfg.input_files: file_info = cfg.input_files[varname] - input_dir = os.path.join(cfg.chain_root, 'icon', 'input', file_info[1]) + input_dir = os.path.join(cfg.chain_root, 'icon', 'input', + file_info[1]) input_dir_name = 'icon_input_' + file_info[1] setattr(cfg, input_dir_name, input_dir) tools.create_dir(input_dir, input_dir_name) From 72fb10a6145f0b44cb30622d951b280e1e812f0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 6 Jul 2023 09:36:40 +0200 Subject: [PATCH 081/108] Add actual test scripts --- jenkins/scripts/build_icon-art.sh | 29 +++++++++++++++++++++++++ jenkins/scripts/test_cosmo-ghg.sh | 13 +++++++++++ jenkins/scripts/test_icon-art-global.sh | 13 +++++++++++ jenkins/scripts/test_icon-art.sh | 13 +++++++++++ jenkins/scripts/test_icon.sh | 13 +++++++++++ 5 files changed, 81 insertions(+) create mode 100755 jenkins/scripts/build_icon-art.sh create mode 100755 jenkins/scripts/test_cosmo-ghg.sh create mode 100755 jenkins/scripts/test_icon-art-global.sh create mode 100755 jenkins/scripts/test_icon-art.sh create mode 100755 jenkins/scripts/test_icon.sh diff --git a/jenkins/scripts/build_icon-art.sh b/jenkins/scripts/build_icon-art.sh new file mode 100755 index 00000000..6d228e99 --- /dev/null +++ b/jenkins/scripts/build_icon-art.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +set -e -x + +function error { + echo "*** Error: $@" >&2 + exit 1 +} + +# Check if script is called correctly +[[ $(git rev-parse --show-toplevel 2>/dev/null) = $(pwd) ]] || error "$0 not launched from toplevel of repository" + +BRANCH=art +GIT_REMOTE=git@github.com:C2SM/icon.git + +pushd src +# Activate spack +. spack-c2sm/setup-env.sh + +# Remove icon-art folder (if existing) +rm -fr icon-art + +# Clone icon-art +git clone --depth 1 --recurse-submodules --shallow-submodules -b ${BRANCH} ${GIT_REMOTE} icon-art + pushd icon-art + spack env activate -p -d config/cscs/spack/v0.18.1.7/art_daint_cpu_nvhpc + spack install -u build + popd +popd diff --git a/jenkins/scripts/test_cosmo-ghg.sh b/jenkins/scripts/test_cosmo-ghg.sh new file mode 100755 index 00000000..4b7a7ba8 --- /dev/null +++ b/jenkins/scripts/test_cosmo-ghg.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e -x + +function error { + echo "*** Error: $@" >&2 + exit 1 +} + +# Check if script is called correctly +[[ $(git rev-parse --show-toplevel 2>/dev/null) = $(pwd) ]] || error "$0 not launched from toplevel of repository" + +python run_chain.py cosmo-ghg-11km-test 2015-01-01 0 24 -f diff --git a/jenkins/scripts/test_icon-art-global.sh b/jenkins/scripts/test_icon-art-global.sh new file mode 100755 index 00000000..3aca4c13 --- /dev/null +++ b/jenkins/scripts/test_icon-art-global.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e -x + +function error { + echo "*** Error: $@" >&2 + exit 1 +} + +# Check if script is called correctly +[[ $(git rev-parse --show-toplevel 2>/dev/null) = $(pwd) ]] || error "$0 not launched from toplevel of repository" + +python run_chain.py icon-art-global-test 2018-01-01 0 24 -j prepare_data icon -f diff --git a/jenkins/scripts/test_icon-art.sh b/jenkins/scripts/test_icon-art.sh new file mode 100755 index 00000000..95e82379 --- /dev/null +++ b/jenkins/scripts/test_icon-art.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e -x + +function error { + echo "*** Error: $@" >&2 + exit 1 +} + +# Check if script is called correctly +[[ $(git rev-parse --show-toplevel 2>/dev/null) = $(pwd) ]] || error "$0 not launched from toplevel of repository" + +python run_chain.py icon-art-test 2018-01-01 0 24 -j prepare_data icon -f diff --git a/jenkins/scripts/test_icon.sh b/jenkins/scripts/test_icon.sh new file mode 100755 index 00000000..e97edbc1 --- /dev/null +++ b/jenkins/scripts/test_icon.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e -x + +function error { + echo "*** Error: $@" >&2 + exit 1 +} + +# Check if script is called correctly +[[ $(git rev-parse --show-toplevel 2>/dev/null) = $(pwd) ]] || error "$0 not launched from toplevel of repository" + +python run_chain.py icon-test 2018-01-01 0 24 -j prepare_data icon -f From c4b2d50be4e05659e220f81e4eff0b5679cb15f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 6 Jul 2023 14:34:39 +0200 Subject: [PATCH 082/108] Fix check for input data size --- jenkins/scripts/jenkins.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/scripts/jenkins.sh b/jenkins/scripts/jenkins.sh index 440caa7d..4c617827 100755 --- a/jenkins/scripts/jenkins.sh +++ b/jenkins/scripts/jenkins.sh @@ -17,7 +17,7 @@ fi # Preparation size=$(du -sb input | awk '{print $1}') -if [[ $size -gt 40000000000 ]]; then +if [[ $size -gt 12000000000 ]]; then echo input data already present - skipping download... else echo downloading input data... From 1416270330fb2e950a651ab2d738f8d9d40bbfe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 6 Jul 2023 14:34:56 +0200 Subject: [PATCH 083/108] Add Q field to initial file --- jobs/prepare_data.py | 80 +++++++++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 34 deletions(-) diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index 342afc47..f4f5ab14 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -275,39 +275,6 @@ def main(starttime, hstart, hstop, cfg, model_cfg): os.path.join(cfg.icon_work, 'restart_atm_DOM01.nc')) else: # non-global ICON-ART - # Copy data for ICON-ART-OEM - if cfg.model == 'icon-art-oem': - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_gridded_emissions_nc), - cfg.oae_gridded_emissions_nc_scratch) - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_vertical_profiles_nc), - cfg.oae_vertical_profiles_nc_scratch) - if hasattr(cfg, 'oae_hourofday_nc'): - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_hourofday_nc), - cfg.oae_hourofday_nc_scratch) - if hasattr(cfg, 'oae_dayofweek_nc'): - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_dayofweek_nc), - cfg.oae_dayofweek_nc_scratch) - if hasattr(cfg, 'oae_monthofyear_nc'): - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_monthofyear_nc), - cfg.oae_monthofyear_nc_scratch) - if hasattr(cfg, 'oae_hourofyear_nc'): - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_hourofyear_nc), - cfg.oae_hourofyear_nc_scratch) - if hasattr(cfg, 'oae_ens_reg_nc'): - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_ens_reg_nc), - cfg.oae_ens_reg_nc_scratch) - if hasattr(cfg, 'oae_ens_lambda_nc'): - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_ens_lambda_nc), - cfg.oae_ens_lambda_nc_scratch) - #----------------------------------------------------- # Get datafile lists for LBC (each at 00 UTC and others) #----------------------------------------------------- @@ -387,10 +354,55 @@ def main(starttime, hstart, hstop, cfg, model_cfg): logging.info("Added GEOSP to file {}".format(merged_file)) #----------------------------------------------------- - # In case of OEM: merge chem tracers with meteo-files + # Add Q (copy of QV) to initial file #----------------------------------------------------- + if cfg.model.startswith('icon-art'): + meteo_file = os.path.join(cfg.icon_input_icbc, + starttime.strftime(cfg.meteo_nameformat) + '.nc') + merged_file = os.path.join(cfg.icon_input_icbc, + starttime.strftime(cfg.meteo_nameformat) + + '_merged.nc') + ds = xr.open_dataset(meteo_file) + ds['Q'] = ds['QV'] + ds.to_netcdf(merged_file) + tools.rename_file(merged_file, meteo_file) + logging.info("Added Q to file {}".format(meteo_file)) + #----------------------------------------------------- + # In case of OEM: Copy data and merge chem tracers with meteo-files + #----------------------------------------------------- if cfg.model == 'icon-art-oem': + tools.copy_file( + os.path.join(cfg.oae_dir, cfg.oae_gridded_emissions_nc), + cfg.oae_gridded_emissions_nc_scratch) + tools.copy_file( + os.path.join(cfg.oae_dir, cfg.oae_vertical_profiles_nc), + cfg.oae_vertical_profiles_nc_scratch) + if hasattr(cfg, 'oae_hourofday_nc'): + tools.copy_file( + os.path.join(cfg.oae_dir, cfg.oae_hourofday_nc), + cfg.oae_hourofday_nc_scratch) + if hasattr(cfg, 'oae_dayofweek_nc'): + tools.copy_file( + os.path.join(cfg.oae_dir, cfg.oae_dayofweek_nc), + cfg.oae_dayofweek_nc_scratch) + if hasattr(cfg, 'oae_monthofyear_nc'): + tools.copy_file( + os.path.join(cfg.oae_dir, cfg.oae_monthofyear_nc), + cfg.oae_monthofyear_nc_scratch) + if hasattr(cfg, 'oae_hourofyear_nc'): + tools.copy_file( + os.path.join(cfg.oae_dir, cfg.oae_hourofyear_nc), + cfg.oae_hourofyear_nc_scratch) + if hasattr(cfg, 'oae_ens_reg_nc'): + tools.copy_file( + os.path.join(cfg.oae_dir, cfg.oae_ens_reg_nc), + cfg.oae_ens_reg_nc_scratch) + if hasattr(cfg, 'oae_ens_lambda_nc'): + tools.copy_file( + os.path.join(cfg.oae_dir, cfg.oae_ens_lambda_nc), + cfg.oae_ens_lambda_nc_scratch) + for time in tools.iter_hours(starttime, hstart, hstop, cfg.meteo_inc): if time == starttime: From ac7e45f31006f7a4bc6eaed8196b2ba204810dac Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 6 Jul 2023 12:35:35 +0000 Subject: [PATCH 084/108] GitHub Action: Apply Pep8-formatting --- jobs/prepare_data.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index f4f5ab14..7ce652b8 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -357,11 +357,12 @@ def main(starttime, hstart, hstop, cfg, model_cfg): # Add Q (copy of QV) to initial file #----------------------------------------------------- if cfg.model.startswith('icon-art'): - meteo_file = os.path.join(cfg.icon_input_icbc, - starttime.strftime(cfg.meteo_nameformat) + '.nc') - merged_file = os.path.join(cfg.icon_input_icbc, - starttime.strftime(cfg.meteo_nameformat) - + '_merged.nc') + meteo_file = os.path.join( + cfg.icon_input_icbc, + starttime.strftime(cfg.meteo_nameformat) + '.nc') + merged_file = os.path.join( + cfg.icon_input_icbc, + starttime.strftime(cfg.meteo_nameformat) + '_merged.nc') ds = xr.open_dataset(meteo_file) ds['Q'] = ds['QV'] ds.to_netcdf(merged_file) From f07498f4986cb0f48ce3d99ea0c78a6a07207440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 6 Jul 2023 15:33:06 +0200 Subject: [PATCH 085/108] Add PS field to meteo file --- jobs/prepare_data.py | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index 7ce652b8..bf658e6e 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -31,6 +31,7 @@ import subprocess from datetime import timedelta import xarray as xr +import numpy as np from . import tools from .tools.interpolate_data import create_oh_for_restart, create_oh_for_inicond from .tools.fetch_external_data import fetch_era5, fetch_era5_nudging @@ -354,20 +355,32 @@ def main(starttime, hstart, hstop, cfg, model_cfg): logging.info("Added GEOSP to file {}".format(merged_file)) #----------------------------------------------------- - # Add Q (copy of QV) to initial file + # Add Q (copy of QV) and/or PS to initial file #----------------------------------------------------- if cfg.model.startswith('icon-art'): meteo_file = os.path.join( cfg.icon_input_icbc, starttime.strftime(cfg.meteo_nameformat) + '.nc') - merged_file = os.path.join( - cfg.icon_input_icbc, - starttime.strftime(cfg.meteo_nameformat) + '_merged.nc') ds = xr.open_dataset(meteo_file) - ds['Q'] = ds['QV'] - ds.to_netcdf(merged_file) - tools.rename_file(merged_file, meteo_file) - logging.info("Added Q to file {}".format(meteo_file)) + merging = False + if 'PS' not in ds: + if 'LNPS' not in ds: + raise KeyError( + f"'LNPS' must be found in the initial conditions file {meteo_file}" + ) + merging = True + ds['PS'] = np.exp(ds['LNPS']) + ds['PS'] = ds['PS'].squeeze(dim=['lev_2']) # Remove the lev 2 dimension + ds['PS'].attrs['standard_name'] = 'Surface pressure' # Just change the attributes + ds['PS'].attrs['long_name'] = 'exp(LNPS), generated by cif ' + ds['PS'].attrs['units'] = 'Pa' + logging.info(f"Added PS to file {meteo_file}") + if 'Q' not in ds: + merging = True + ds['Q'] = ds['QV'] + logging.info(f"Added Q to file {meteo_file}") + if merging: + ds.to_netcdf(meteo_file) #----------------------------------------------------- # In case of OEM: Copy data and merge chem tracers with meteo-files From df3dd8dc9b06bcafd25c3aed2cb6f4fcfe7de5a8 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 6 Jul 2023 13:33:43 +0000 Subject: [PATCH 086/108] GitHub Action: Apply Pep8-formatting --- jobs/prepare_data.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index bf658e6e..265ec448 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -370,9 +370,12 @@ def main(starttime, hstart, hstop, cfg, model_cfg): ) merging = True ds['PS'] = np.exp(ds['LNPS']) - ds['PS'] = ds['PS'].squeeze(dim=['lev_2']) # Remove the lev 2 dimension - ds['PS'].attrs['standard_name'] = 'Surface pressure' # Just change the attributes - ds['PS'].attrs['long_name'] = 'exp(LNPS), generated by cif ' + ds['PS'] = ds['PS'].squeeze( + dim=['lev_2']) # Remove the lev 2 dimension + ds['PS'].attrs[ + 'standard_name'] = 'Surface pressure' # Just change the attributes + ds['PS'].attrs[ + 'long_name'] = 'exp(LNPS), generated by cif ' ds['PS'].attrs['units'] = 'Pa' logging.info(f"Added PS to file {meteo_file}") if 'Q' not in ds: From 56b170725f9a9a3bb243ae55e55bf6b86f1b0981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Fri, 7 Jul 2023 13:51:38 +0200 Subject: [PATCH 087/108] unify config files --- cases/cosmo-ghg-11km-test/config.py | 2 +- cases/icon-art-global-test/config.py | 63 +++++++++++++--------------- cases/icon-art-test/config.py | 21 +++++----- cases/icon-test/config.py | 13 +++--- 4 files changed, 45 insertions(+), 54 deletions(-) diff --git a/cases/cosmo-ghg-11km-test/config.py b/cases/cosmo-ghg-11km-test/config.py index ad58753c..aa536830 100644 --- a/cases/cosmo-ghg-11km-test/config.py +++ b/cases/cosmo-ghg-11km-test/config.py @@ -13,7 +13,7 @@ else: compute_account = os.popen("id -gn").read().splitlines()[0] compute_host = 'daint' -compute_queue = 'debug' # 'normal' +compute_queue = 'normal' constraint = 'gpu' # 'mc' model = 'cosmo-ghg' diff --git a/cases/icon-art-global-test/config.py b/cases/icon-art-global-test/config.py index 8fcc25f6..5c7e98e7 100644 --- a/cases/icon-art-global-test/config.py +++ b/cases/icon-art-global-test/config.py @@ -3,50 +3,48 @@ Configuration file for the 'icon-art-global' case with ICON-ART """ -# ----------------------------------------------------------- -# GENERAL SETTINGS -# ----------------------------------------------------------- - +# GENERAL SETTINGS =========================================================== user = os.environ['USER'] -compute_host = 'daint' -compute_queue = 'normal' # 'normal' / 'debug' -constraint = 'gpu' # 'mc' / 'gpu' -if os.path.exists(os.environ['HOME'] + '/.acct'): +if user == 'jenkins': + compute_account = 'g110' +elif os.path.exists(os.environ['HOME'] + '/.acct'): with open(os.environ['HOME'] + '/.acct', 'r') as file: compute_account = file.read().rstrip() else: compute_account = os.popen("id -gn").read().splitlines()[0] - -# -- Model to run +compute_host = 'daint' +compute_queue = 'normal' +constraint = 'gpu' # 'mc' model = 'icon-art-global' +restart_step = 24 # hours -# -- Number of tasks per node +# Number of tasks per node ntasks_per_node = 36 if constraint == 'mc' else 12 -# -- case name = pathname in cases/ +# Case name = pathname in cases/ casename = os.path.basename(os.path.dirname(os.path.realpath(__file__))) -# -- Root directory of the sourcecode of the chain (where run_chain.py is) +# Root directory of the sourcecode of the chain (where run_chain.py is) chain_src_dir = os.getcwd() -# -- Case directory +# Root directory of the working space of the chain +work_root = os.path.join(chain_src_dir, 'work') + +# Case directory case_dir = os.path.join(chain_src_dir, 'cases', casename) # ----------------------------------------------------------- -# -- SIMULATION +# SIMULATION # ----------------------------------------------------------- -# -- Root directory of the working space of the chain -work_root = os.path.join(chain_src_dir, 'work') - -# -- Executable +# Executable icon_bin = os.path.join(chain_src_dir, 'src', 'icon-art', 'bin', 'icon') # eccodes eccodes_dir = os.path.join(chain_src_dir, 'input', 'eccodes_definitions') -# -- Paths for namelists and slurm runscript templates +# Paths for namelists and slurm runscript templates # icon_runjob = os.path.join(case_dir, 'icon_runjob_withoutart.cfg') icon_runjob = os.path.join(case_dir, 'icon_runjob.cfg') icon_era5_inijob = os.path.join(case_dir, 'icon_era5_inicond.sh') @@ -54,24 +52,21 @@ icon_species_inijob = os.path.join(case_dir, 'icon_species_inicond.sh') icon_species_nudgingjob = os.path.join(case_dir, 'icon_species_nudging.sh') -# -- Number of hours simulated by one job / directory -restart_step = 24 # -- hours or Pandas frequency - -# -- Number of hours between two output data -output_writing_step = 12 # -- TO MODIFY +# Number of hours between two output data +output_writing_step = 12 # TO MODIFY -# -- Initial conditios -era5_inicond = False # -- TO MODIFY +# Initial conditios +era5_inicond = False # TO MODIFY species_inicond = True species2restart = ['TROH'] -# -- Nudging (meteorological and tracers) +# Nudging (meteorological and tracers) era5_global_nudging = False species_global_nudging = False species2nudge = [] nudging_step = 12 -# -- Walltimes and domain decomposition +# Walltimes and domain decomposition if compute_queue == "normal": icon_walltime = "00:30:00" icon_np_tot = 2 @@ -80,7 +75,7 @@ icon_np_tot = 2 # ----------------------------------------------------------- -# -- INPUT DATA +# INPUT DATA # ----------------------------------------------------------- # ART settings----------------------------------------------- input_root = os.path.join(chain_src_dir, 'input', model) @@ -100,14 +95,14 @@ } # ----------------------------------------------------------- -# -- Additional settings derived from constants +# Additional settings derived from constants # ----------------------------------------------------------- -# -- Nudge type (global or nothing) +# Nudge type (global or nothing) nudge_type = 2 if era5_global_nudging else 0 -# -- Time step for global nudging in seconds +# Time step for global nudging in seconds nudging_step_seconds = nudging_step * 3600 -# -- Prescribed initial conditions for CH4, CO and/or OH +# Prescribed initial conditions for CH4, CO and/or OH iart_init_gas = 4 if species_inicond else 0 diff --git a/cases/icon-art-test/config.py b/cases/icon-art-test/config.py index 2437391d..644a7f0d 100644 --- a/cases/icon-art-test/config.py +++ b/cases/icon-art-test/config.py @@ -5,26 +5,25 @@ # GENERAL SETTINGS =========================================================== user = os.environ['USER'] -if os.path.exists(os.environ['HOME'] + '/.acct'): +if user == 'jenkins': + compute_account = 'g110' +elif os.path.exists(os.environ['HOME'] + '/.acct'): with open(os.environ['HOME'] + '/.acct', 'r') as file: compute_account = file.read().rstrip() else: compute_account = os.popen("id -gn").read().splitlines()[0] compute_host = 'daint' -compute_queue = 'normal' # 'normal' / 'debug' -constraint = 'gpu' # 'mc' / 'gpu' +compute_queue = 'normal' +constraint = 'gpu' # 'mc' model = 'icon-art' restart_step = 24 # hours -if constraint == 'gpu': - ntasks_per_node = 12 -elif constraint == 'mc': - ntasks_per_node = 36 +# Number of tasks per node +ntasks_per_node = 36 if constraint == 'mc' else 12 -# case name = pathname in cases/ -path = os.path.realpath(__file__) -casename = os.path.basename(os.path.dirname(path)) +# Case name = pathname in cases/ +casename = os.path.basename(os.path.dirname(os.path.realpath(__file__))) # Root directory of the sourcecode of the chain (where run_chain.py is) chain_src_dir = os.getcwd() @@ -35,7 +34,7 @@ # Case directory case_dir = os.path.join(chain_src_dir, 'cases', casename) -# PREPARE_DATA --------------------------------------------------------------- +# PRE-PROCESSING ============================================================= input_root = os.path.join(chain_src_dir, 'input', model) # meteo input_root_meteo = os.path.join(chain_src_dir, 'input', 'meteo') diff --git a/cases/icon-test/config.py b/cases/icon-test/config.py index ba2b7256..494317e1 100644 --- a/cases/icon-test/config.py +++ b/cases/icon-test/config.py @@ -13,20 +13,17 @@ else: compute_account = os.popen("id -gn").read().splitlines()[0] compute_host = 'daint' -compute_queue = 'normal' # 'normal' / 'debug' +compute_queue = 'normal' constraint = 'gpu' # 'mc' / 'gpu' model = 'icon' restart_step = 24 # hours -if constraint == 'gpu': - ntasks_per_node = 12 -elif constraint == 'mc': - ntasks_per_node = 36 +# Number of tasks per node +ntasks_per_node = 36 if constraint == 'mc' else 12 -# case name = pathname in cases/ -path = os.path.realpath(__file__) -casename = os.path.basename(os.path.dirname(path)) +# Case name = pathname in cases/ +casename = os.path.basename(os.path.dirname(os.path.realpath(__file__))) # Root directory of the sourcecode of the chain (where run_chain.py is) chain_src_dir = os.getcwd() From fe5cb1fc83b671c2ff992b8b2f3240a8c7d1920c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Fri, 7 Jul 2023 13:51:53 +0200 Subject: [PATCH 088/108] Add icon-art-global-test to Jenkinsfile --- jenkins/Jenkinsfile | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index fcdd0e7e..630d4835 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -95,6 +95,19 @@ pipeline { } } } + stage('Build ICON-ART') { + steps { + sh '''source ${WORKSPACE}/miniconda/etc/profile.d/conda.sh + conda activate proc-chain + ./jenkins/scripts/build_icon-art.sh''' + } + post { + failure { + echo 'Cleaning up workspace' + deleteDir() + } + } + } } } stage('Test COSMO-GHG') { @@ -105,7 +118,7 @@ pipeline { sh '''source ${WORKSPACE}/miniconda/etc/profile.d/conda.sh conda activate proc-chain . ${WORKSPACE}/src/spack-c2sm/setup-env.sh - python run_chain.py cosmo-ghg-11km-test 2015-01-01 0 24 -f''' + ./jenkins/scripts/test_cosmo-ghg.sh''' } post { failure { @@ -122,7 +135,24 @@ pipeline { sh '''source ${WORKSPACE}/miniconda/etc/profile.d/conda.sh conda activate proc-chain . ${WORKSPACE}/src/spack-c2sm/setup-env.sh - python run_chain.py icon-test 2018-01-01 0 24 -j prepare_data icon -f''' + ./jenkins/scripts/test_icon.sh''' + } + post { + failure { + echo 'Cleaning up workspace' + deleteDir() + } + } + } + stage('Test ICON-ART (global)') { + environment { + PATH = "${WORKSPACE}/miniconda/bin:$PATH" + } + steps { + sh '''source ${WORKSPACE}/miniconda/etc/profile.d/conda.sh + conda activate proc-chain + . ${WORKSPACE}/src/spack-c2sm/setup-env.sh + ./jenkins/scripts/test_icon-art-global.sh''' } post { failure { From 18713e51445e9440da8ca67b13c44f88f1837ef1 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 7 Jul 2023 11:52:28 +0000 Subject: [PATCH 089/108] GitHub Action: Apply Pep8-formatting --- cases/icon-test/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cases/icon-test/config.py b/cases/icon-test/config.py index 494317e1..81f15118 100644 --- a/cases/icon-test/config.py +++ b/cases/icon-test/config.py @@ -13,7 +13,7 @@ else: compute_account = os.popen("id -gn").read().splitlines()[0] compute_host = 'daint' -compute_queue = 'normal' +compute_queue = 'normal' constraint = 'gpu' # 'mc' / 'gpu' model = 'icon' From 598c04154953a32f3c4750c490f1b5b772b0d204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 12 Jul 2023 14:16:16 +0200 Subject: [PATCH 090/108] Change input data path --- jenkins/scripts/get_data.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/scripts/get_data.sh b/jenkins/scripts/get_data.sh index c908845f..19b94def 100755 --- a/jenkins/scripts/get_data.sh +++ b/jenkins/scripts/get_data.sh @@ -12,7 +12,7 @@ function error { mkdir -p input pushd input - wget ftp://iacftp.ethz.ch/pub_read/mjaehn/input_processing-chain/input_processing-chain.tgz + wget ftp://iacftp.ethz.ch/pub_read/mjaehn/input_processing-chain.tgz tar -xvzf input_processing-chain.tgz rm -f input_processing-chain.tgz popd From 1ce285d1b83086985493d8a40965f90a54b13c48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 13 Jul 2023 09:10:34 +0200 Subject: [PATCH 091/108] Fix modifying initial file --- jobs/prepare_data.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index 265ec448..2090a0a5 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -361,6 +361,9 @@ def main(starttime, hstart, hstop, cfg, model_cfg): meteo_file = os.path.join( cfg.icon_input_icbc, starttime.strftime(cfg.meteo_nameformat) + '.nc') + merged_file = os.path.join( + cfg.icon_input_icbc, + starttime.strftime(cfg.meteo_nameformat) + '_merged.nc') ds = xr.open_dataset(meteo_file) merging = False if 'PS' not in ds: @@ -369,13 +372,11 @@ def main(starttime, hstart, hstop, cfg, model_cfg): f"'LNPS' must be found in the initial conditions file {meteo_file}" ) merging = True - ds['PS'] = np.exp(ds['LNPS']) - ds['PS'] = ds['PS'].squeeze( - dim=['lev_2']) # Remove the lev 2 dimension - ds['PS'].attrs[ - 'standard_name'] = 'Surface pressure' # Just change the attributes - ds['PS'].attrs[ - 'long_name'] = 'exp(LNPS), generated by cif ' + ds['PS'] = ds['LNPS'] + ds['PS'].attrs = ds['LNPS'].attrs + ds['PS'] = np.exp(ds['PS']) + ds['PS'] = ds['PS'].squeeze(dim='lev_2') + ds['PS'].attrs["long_name"] = 'surface pressure' ds['PS'].attrs['units'] = 'Pa' logging.info(f"Added PS to file {meteo_file}") if 'Q' not in ds: @@ -383,7 +384,8 @@ def main(starttime, hstart, hstop, cfg, model_cfg): ds['Q'] = ds['QV'] logging.info(f"Added Q to file {meteo_file}") if merging: - ds.to_netcdf(meteo_file) + ds.to_netcdf(merged_file) + tools.rename_file(merged_file, meteo_file) #----------------------------------------------------- # In case of OEM: Copy data and merge chem tracers with meteo-files From e7f0d9a8cbeecddf44737c67091e3daf91c959ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Fri, 14 Jul 2023 09:38:32 +0200 Subject: [PATCH 092/108] Rename icon-art-test to icon-art-oem-test --- .../config.py | 10 +- .../icon_runjob.cfg | 0 .../icontools_remap_00_lbc_runjob.cfg | 0 .../icontools_remap_ic_chem_runjob.cfg | 91 ++++++++++++++++++ .../icontools_remap_ic_runjob.cfg | 0 .../icontools_remap_lbc_chem_runjob.cfg | 93 +++++++++++++++++++ .../icontools_remap_lbc_rest_runjob.cfg | 0 ...{test_icon-art.sh => test_icon-art-oem.sh} | 2 +- 8 files changed, 191 insertions(+), 5 deletions(-) rename cases/{icon-art-test => icon-art-oem-test}/config.py (95%) rename cases/{icon-art-test => icon-art-oem-test}/icon_runjob.cfg (100%) mode change 100755 => 100644 rename cases/{icon-art-test => icon-art-oem-test}/icontools_remap_00_lbc_runjob.cfg (100%) mode change 100755 => 100644 create mode 100644 cases/icon-art-oem-test/icontools_remap_ic_chem_runjob.cfg rename cases/{icon-art-test => icon-art-oem-test}/icontools_remap_ic_runjob.cfg (100%) mode change 100755 => 100644 create mode 100644 cases/icon-art-oem-test/icontools_remap_lbc_chem_runjob.cfg rename cases/{icon-art-test => icon-art-oem-test}/icontools_remap_lbc_rest_runjob.cfg (100%) mode change 100755 => 100644 rename jenkins/scripts/{test_icon-art.sh => test_icon-art-oem.sh} (75%) mode change 100755 => 100644 diff --git a/cases/icon-art-test/config.py b/cases/icon-art-oem-test/config.py similarity index 95% rename from cases/icon-art-test/config.py rename to cases/icon-art-oem-test/config.py index 644a7f0d..b46574ff 100644 --- a/cases/icon-art-test/config.py +++ b/cases/icon-art-oem-test/config.py @@ -1,6 +1,6 @@ import os """ -Configuration file for the 'icon-art-test' case with ICON-ART +Configuration file for the 'icon-art-oem-test' case with ICON-ART """ # GENERAL SETTINGS =========================================================== @@ -16,7 +16,7 @@ compute_queue = 'normal' constraint = 'gpu' # 'mc' -model = 'icon-art' +model = 'icon-art-oem' restart_step = 24 # hours # Number of tasks per node @@ -37,7 +37,7 @@ # PRE-PROCESSING ============================================================= input_root = os.path.join(chain_src_dir, 'input', model) # meteo -input_root_meteo = os.path.join(chain_src_dir, 'input', 'meteo') +input_root_meteo = os.path.join(input_root, 'meteo') meteo_prefix = 'ifs_' meteo_nameformat = meteo_prefix + '%Y%m%d%H' meteo_suffix = '.grb' @@ -52,6 +52,8 @@ 'icontools_remap_ic_runjob.cfg', 'icontools_remap_00_lbc_runjob.cfg', 'icontools_remap_lbc_rest_runjob.cfg', + 'icontools_remap_ic_chem_runjob.cfg', + 'icontools_remap_lbc_chem_runjob.cfg', ] # Input data for runscript---------------------------------------------------- @@ -82,7 +84,7 @@ inidata_nameformat = inidata_prefix + '%Y%m%d%H' inidata_filename_suffix = ".nc" -output_filename = "icon-art-test" +output_filename = "icon-art-oem-test" filename_format = "_DOM_" lateral_boundary_grid_order = 'lateral_boundary' diff --git a/cases/icon-art-test/icon_runjob.cfg b/cases/icon-art-oem-test/icon_runjob.cfg old mode 100755 new mode 100644 similarity index 100% rename from cases/icon-art-test/icon_runjob.cfg rename to cases/icon-art-oem-test/icon_runjob.cfg diff --git a/cases/icon-art-test/icontools_remap_00_lbc_runjob.cfg b/cases/icon-art-oem-test/icontools_remap_00_lbc_runjob.cfg old mode 100755 new mode 100644 similarity index 100% rename from cases/icon-art-test/icontools_remap_00_lbc_runjob.cfg rename to cases/icon-art-oem-test/icontools_remap_00_lbc_runjob.cfg diff --git a/cases/icon-art-oem-test/icontools_remap_ic_chem_runjob.cfg b/cases/icon-art-oem-test/icontools_remap_ic_chem_runjob.cfg new file mode 100644 index 00000000..661cc202 --- /dev/null +++ b/cases/icon-art-oem-test/icontools_remap_ic_chem_runjob.cfg @@ -0,0 +1,91 @@ +#!/usr/bin/env bash +#SBATCH --job-name="{cfg.casename}_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" +#SBATCH --account={cfg.compute_account} +#SBATCH --chdir={cfg.icon_work} +#SBATCH --partition={cfg.compute_queue} +#SBATCH --constraint={cfg.constraint} +#SBATCH --nodes=1 +#SBATCH --ntasks-per-core=1 +#SBATCH --ntasks-per-node={cfg.ntasks_per_node} +#SBATCH --cpus-per-task=1 +#SBATCH --output={logfile} +#SBATCH --open-mode=append + +ulimit -s unlimited + +set -x + +export ECCODES_DEFINITION_PATH={cfg.eccodes_dir}/definitions.edzw-2.12.5-2:{cfg.eccodes_dir}/definitions + +. {cfg.chain_src_dir}/src/spack-c2sm/setup-env.sh +spack load icontools + +#----------------------------------------------------------------------------- +# Remap inital data onto local (limited-area) grid +#----------------------------------------------------------------------------- +cat > NAMELIST_ICONREMAP_FIELDS << EOF +! +&input_field_nml + inputname = "ch4" + outputname = "CH4_BG" + code = 255 + intp_method = 3 +/ +&input_field_nml ! temperature + inputname = "T" + outputname = "T" + code = 130 + intp_method = 3 +/ +&input_field_nml ! specific humidity + inputname = "QV" + outputname = "Q" + code = 133 + intp_method = 3 +/ +&input_field_nml + inputname = "LNSP" + outputname = "LNPS" + code = 152 + intp_method = 3 +/ +EOF + +#----------------------------------------------------------------------------- +# loop over file list: + +datafilename={cfg.input_root_chem}/{cfg.chem_prefix}{cfg.inidate_yyyymmdd_hh}{cfg.chem_suffix} +datafile="${{datafilename##*/}}" # get filename without path +outdatafile=${{datafile%.*}} # get filename without suffix + +# create ICON master namelist +# ------------------------ +# For a complete list see Namelist_overview and Namelist_overview.pdf + +cat > NAMELIST_ICONREMAP << EOF +&remap_nml + in_grid_filename = '{cfg.input_root_chem}/{cfg.chem_prefix}{cfg.inidate_yyyymmdd_hh}{cfg.chem_suffix}' + in_filename = '{cfg.input_root_chem}/${{datafile}}' + in_type = 1 + out_grid_filename = '{cfg.dynamics_grid_filename_scratch}' + out_filename = '{cfg.icon_input_icbc}/${{outdatafile}}.nc' + out_type = 2 + out_filetype = 4 + l_have3dbuffer = .false. +/ +EOF + +srun -n 1 {cfg.iconremap_bin} \ + -vvvvv -q --remap_nml NAMELIST_ICONREMAP \ + --input_field_nml NAMELIST_ICONREMAP_FIELDS 2>&1 + + +#----------------------------------------------------------------------------- +# clean-up + +rm -f ncstorage.tmp* +rm -f nml.log NAMELIST_SUB NAMELIST_ICONREMAP NAMELIST_ICONREMAP_FIELDS + +#----------------------------------------------------------------------------- +exit +#----------------------------------------------------------------------------- diff --git a/cases/icon-art-test/icontools_remap_ic_runjob.cfg b/cases/icon-art-oem-test/icontools_remap_ic_runjob.cfg old mode 100755 new mode 100644 similarity index 100% rename from cases/icon-art-test/icontools_remap_ic_runjob.cfg rename to cases/icon-art-oem-test/icontools_remap_ic_runjob.cfg diff --git a/cases/icon-art-oem-test/icontools_remap_lbc_chem_runjob.cfg b/cases/icon-art-oem-test/icontools_remap_lbc_chem_runjob.cfg new file mode 100644 index 00000000..8b8297c5 --- /dev/null +++ b/cases/icon-art-oem-test/icontools_remap_lbc_chem_runjob.cfg @@ -0,0 +1,93 @@ +#!/usr/bin/env bash +#SBATCH --job-name="{cfg.casename}_{cfg.inidate_yyyymmddhh}_{cfg.forecasttime}" +#SBATCH --account={cfg.compute_account} +#SBATCH --chdir={cfg.icon_work} +#SBATCH --partition={cfg.compute_queue} +#SBATCH --constraint={cfg.constraint} +#SBATCH --nodes=1 +#SBATCH --ntasks-per-core=1 +#SBATCH --ntasks-per-node={cfg.ntasks_per_node} +#SBATCH --cpus-per-task=1 +#SBATCH --output={logfile} +#SBATCH --open-mode=append + +ulimit -s unlimited + +set -x + +export ECCODES_DEFINITION_PATH={cfg.eccodes_dir}/definitions.edzw-2.12.5-2:{cfg.eccodes_dir}/definitions + +. {cfg.chain_src_dir}/src/spack-c2sm/setup-env.sh +spack load icontools + +#----------------------------------------------------------------------------- +# Extract boundary data +#----------------------------------------------------------------------------- + +rm -f ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}* + +cat > NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} << EOF +! +&input_field_nml + inputname = "ch4" + outputname = "CH4_BG" + code = 255 + intp_method = 3 +&input_field_nml ! temperature + inputname = "T" + outputname = "T" + code = 130 + intp_method = 3 +/ +&input_field_nml ! specific humidity + inputname = "QV" + outputname = "Q" + code = 133 + intp_method = 3 +/ +&input_field_nml + inputname = "LNSP" + outputname = "LNPS" + code = 152 + intp_method = 3 +/ +EOF + +#----------------------------------------------------------------------------- +# loop over file list: + +echo "DATAFILELIST is {datafile_list_chem}" +for datafilename in {datafile_list_chem} ; do + datafile="${{datafilename##*/}}" # get filename without path + outdatafile=${{datafile%.*}} # get filename without suffix + cat > NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} << EOF_2C +&remap_nml + in_grid_filename = '{cfg.input_root_chem}/{cfg.chem_prefix}{cfg.inidate_yyyymmdd_hh}{cfg.chem_suffix}' + in_filename = '{cfg.input_root_chem}/${{datafile}}' + in_type = 1 + out_grid_filename = '{cfg.lateral_boundary_grid_scratch}' + out_filename = '{cfg.icon_input_icbc}/${{outdatafile}}_lbc.nc' + out_type = 2 + out_filetype = 4 + l_have3dbuffer = .false. +! ncstorage_file = "ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}" +/ +EOF_2C + + srun -n 1 {cfg.iconremap_bin} -q \ + --remap_nml NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} \ + --input_field_nml NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} 2>&1 + +done + +#----------------------------------------------------------------------------- +# clean-up + +#rm -f ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}* +rm -f nml.log +rm -f NAMELIST_ICONSUB_{cfg.inidate_yyyymmddhh} NAMELIST_ICONREMAP_lbc_{cfg.inidate_yyyymmddhh} NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} + +#----------------------------------------------------------------------------- +exit +#----------------------------------------------------------------------------- + diff --git a/cases/icon-art-test/icontools_remap_lbc_rest_runjob.cfg b/cases/icon-art-oem-test/icontools_remap_lbc_rest_runjob.cfg old mode 100755 new mode 100644 similarity index 100% rename from cases/icon-art-test/icontools_remap_lbc_rest_runjob.cfg rename to cases/icon-art-oem-test/icontools_remap_lbc_rest_runjob.cfg diff --git a/jenkins/scripts/test_icon-art.sh b/jenkins/scripts/test_icon-art-oem.sh old mode 100755 new mode 100644 similarity index 75% rename from jenkins/scripts/test_icon-art.sh rename to jenkins/scripts/test_icon-art-oem.sh index 95e82379..b2d28fe5 --- a/jenkins/scripts/test_icon-art.sh +++ b/jenkins/scripts/test_icon-art-oem.sh @@ -10,4 +10,4 @@ function error { # Check if script is called correctly [[ $(git rev-parse --show-toplevel 2>/dev/null) = $(pwd) ]] || error "$0 not launched from toplevel of repository" -python run_chain.py icon-art-test 2018-01-01 0 24 -j prepare_data icon -f +python run_chain.py icon-art-oem-test 2018-01-01 0 24 -j prepare_data icon -f From 9eea2ac8c3daad2228f07d3c3a61d8f0c5a0671b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Fri, 14 Jul 2023 10:59:33 +0200 Subject: [PATCH 093/108] Small fixes and error handling --- cases/icon-art-oem-test/config.py | 1 + cases/icon-art-oem-test/icon_runjob.cfg | 2 +- .../icontools_remap_00_lbc_runjob.cfg | 2 +- .../icontools_remap_ic_chem_runjob.cfg | 2 +- .../icontools_remap_ic_runjob.cfg | 2 +- .../icontools_remap_lbc_chem_runjob.cfg | 2 +- .../icontools_remap_lbc_rest_runjob.cfg | 2 +- jobs/prepare_data.py | 34 ++----------------- 8 files changed, 9 insertions(+), 38 deletions(-) diff --git a/cases/icon-art-oem-test/config.py b/cases/icon-art-oem-test/config.py index b46574ff..36a3c035 100644 --- a/cases/icon-art-oem-test/config.py +++ b/cases/icon-art-oem-test/config.py @@ -43,6 +43,7 @@ meteo_suffix = '.grb' meteo_inc = 3 +input_root_chem = os.path.join(input_root, 'chem') input_root_icbc = os.path.join(input_root, 'icbc') chem_prefix = 'cams_gqpe' chem_nameformat = chem_prefix + '_%Y%m%d_%H' diff --git a/cases/icon-art-oem-test/icon_runjob.cfg b/cases/icon-art-oem-test/icon_runjob.cfg index 2ff163ab..d53966a9 100644 --- a/cases/icon-art-oem-test/icon_runjob.cfg +++ b/cases/icon-art-oem-test/icon_runjob.cfg @@ -21,7 +21,7 @@ export OMP_SCHEDULE=static,12 export OMP_DYNAMIC="false" export OMP_STACKSIZE=200M -set -x +set -e -x # -- ECCODES path export ECCODES_DEFINITION_PATH={cfg.eccodes_dir}/definitions.edzw-2.12.5-2:{cfg.eccodes_dir}/definitions diff --git a/cases/icon-art-oem-test/icontools_remap_00_lbc_runjob.cfg b/cases/icon-art-oem-test/icontools_remap_00_lbc_runjob.cfg index 107f61ea..190c9871 100644 --- a/cases/icon-art-oem-test/icontools_remap_00_lbc_runjob.cfg +++ b/cases/icon-art-oem-test/icontools_remap_00_lbc_runjob.cfg @@ -13,7 +13,7 @@ ulimit -s unlimited -set -x +set -e -x export ECCODES_DEFINITION_PATH={cfg.eccodes_dir}/definitions.edzw-2.12.5-2:{cfg.eccodes_dir}/definitions diff --git a/cases/icon-art-oem-test/icontools_remap_ic_chem_runjob.cfg b/cases/icon-art-oem-test/icontools_remap_ic_chem_runjob.cfg index 661cc202..0e1850a7 100644 --- a/cases/icon-art-oem-test/icontools_remap_ic_chem_runjob.cfg +++ b/cases/icon-art-oem-test/icontools_remap_ic_chem_runjob.cfg @@ -13,7 +13,7 @@ ulimit -s unlimited -set -x +set -e -x export ECCODES_DEFINITION_PATH={cfg.eccodes_dir}/definitions.edzw-2.12.5-2:{cfg.eccodes_dir}/definitions diff --git a/cases/icon-art-oem-test/icontools_remap_ic_runjob.cfg b/cases/icon-art-oem-test/icontools_remap_ic_runjob.cfg index c169ff10..8ac77d8f 100644 --- a/cases/icon-art-oem-test/icontools_remap_ic_runjob.cfg +++ b/cases/icon-art-oem-test/icontools_remap_ic_runjob.cfg @@ -13,7 +13,7 @@ ulimit -s unlimited -set -x +set -e-x export ECCODES_DEFINITION_PATH={cfg.eccodes_dir}/definitions.edzw-2.12.5-2:{cfg.eccodes_dir}/definitions diff --git a/cases/icon-art-oem-test/icontools_remap_lbc_chem_runjob.cfg b/cases/icon-art-oem-test/icontools_remap_lbc_chem_runjob.cfg index 8b8297c5..2220a271 100644 --- a/cases/icon-art-oem-test/icontools_remap_lbc_chem_runjob.cfg +++ b/cases/icon-art-oem-test/icontools_remap_lbc_chem_runjob.cfg @@ -13,7 +13,7 @@ ulimit -s unlimited -set -x +set -e -x export ECCODES_DEFINITION_PATH={cfg.eccodes_dir}/definitions.edzw-2.12.5-2:{cfg.eccodes_dir}/definitions diff --git a/cases/icon-art-oem-test/icontools_remap_lbc_rest_runjob.cfg b/cases/icon-art-oem-test/icontools_remap_lbc_rest_runjob.cfg index 5800e768..47137956 100644 --- a/cases/icon-art-oem-test/icontools_remap_lbc_rest_runjob.cfg +++ b/cases/icon-art-oem-test/icontools_remap_lbc_rest_runjob.cfg @@ -13,7 +13,7 @@ ulimit -s unlimited -set -x +set -e -x export ECCODES_DEFINITION_PATH={cfg.eccodes_dir}/definitions.edzw-2.12.5-2:{cfg.eccodes_dir}/definitions diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index 2090a0a5..1107dee7 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -322,6 +322,7 @@ def main(starttime, hstart, hstop, cfg, model_cfg): os.path.join(cfg.icon_work, "%s.job" % runscript) ]) exitcode = result.returncode + logging.info(f'EXITCODE: {exitcode}') if exitcode != 0: raise RuntimeError( "sbatch returned exitcode {}".format(exitcode)) @@ -388,40 +389,9 @@ def main(starttime, hstart, hstop, cfg, model_cfg): tools.rename_file(merged_file, meteo_file) #----------------------------------------------------- - # In case of OEM: Copy data and merge chem tracers with meteo-files + # In case of OEM: merge chem tracers with meteo-files #----------------------------------------------------- if cfg.model == 'icon-art-oem': - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_gridded_emissions_nc), - cfg.oae_gridded_emissions_nc_scratch) - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_vertical_profiles_nc), - cfg.oae_vertical_profiles_nc_scratch) - if hasattr(cfg, 'oae_hourofday_nc'): - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_hourofday_nc), - cfg.oae_hourofday_nc_scratch) - if hasattr(cfg, 'oae_dayofweek_nc'): - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_dayofweek_nc), - cfg.oae_dayofweek_nc_scratch) - if hasattr(cfg, 'oae_monthofyear_nc'): - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_monthofyear_nc), - cfg.oae_monthofyear_nc_scratch) - if hasattr(cfg, 'oae_hourofyear_nc'): - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_hourofyear_nc), - cfg.oae_hourofyear_nc_scratch) - if hasattr(cfg, 'oae_ens_reg_nc'): - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_ens_reg_nc), - cfg.oae_ens_reg_nc_scratch) - if hasattr(cfg, 'oae_ens_lambda_nc'): - tools.copy_file( - os.path.join(cfg.oae_dir, cfg.oae_ens_lambda_nc), - cfg.oae_ens_lambda_nc_scratch) - for time in tools.iter_hours(starttime, hstart, hstop, cfg.meteo_inc): if time == starttime: From f3ab535f5eeb4849f57d133bb3e34d4871a4ae4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Fri, 14 Jul 2023 11:10:00 +0200 Subject: [PATCH 094/108] Fixes for cams chem data --- cases/icon-art-oem-test/config.py | 6 +++--- jobs/prepare_data.py | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cases/icon-art-oem-test/config.py b/cases/icon-art-oem-test/config.py index 36a3c035..fca7c2bf 100644 --- a/cases/icon-art-oem-test/config.py +++ b/cases/icon-art-oem-test/config.py @@ -45,9 +45,9 @@ input_root_chem = os.path.join(input_root, 'chem') input_root_icbc = os.path.join(input_root, 'icbc') -chem_prefix = 'cams_gqpe' -chem_nameformat = chem_prefix + '_%Y%m%d_%H' -chem_suffix = '.nc' +chem_prefix = 'cams_gqpe_' +chem_nameformat = chem_prefix + '%Y%m%d_%H' +chem_suffix = '.grb' icontools_runjobs = [ 'icontools_remap_ic_runjob.cfg', diff --git a/jobs/prepare_data.py b/jobs/prepare_data.py index 1107dee7..264afde0 100644 --- a/jobs/prepare_data.py +++ b/jobs/prepare_data.py @@ -322,7 +322,6 @@ def main(starttime, hstart, hstop, cfg, model_cfg): os.path.join(cfg.icon_work, "%s.job" % runscript) ]) exitcode = result.returncode - logging.info(f'EXITCODE: {exitcode}') if exitcode != 0: raise RuntimeError( "sbatch returned exitcode {}".format(exitcode)) From f8a67dc7bf2ef18505be05a6cb4e924bfde11644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Fri, 14 Jul 2023 11:24:00 +0200 Subject: [PATCH 095/108] Fix icontools runjobs --- cases/icon-art-oem-test/icontools_remap_lbc_chem_runjob.cfg | 1 + cases/icon-art-oem-test/icontools_remap_lbc_rest_runjob.cfg | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cases/icon-art-oem-test/icontools_remap_lbc_chem_runjob.cfg b/cases/icon-art-oem-test/icontools_remap_lbc_chem_runjob.cfg index 2220a271..32e0f5c8 100644 --- a/cases/icon-art-oem-test/icontools_remap_lbc_chem_runjob.cfg +++ b/cases/icon-art-oem-test/icontools_remap_lbc_chem_runjob.cfg @@ -33,6 +33,7 @@ cat > NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} << EOF outputname = "CH4_BG" code = 255 intp_method = 3 +/ &input_field_nml ! temperature inputname = "T" outputname = "T" diff --git a/cases/icon-art-oem-test/icontools_remap_lbc_rest_runjob.cfg b/cases/icon-art-oem-test/icontools_remap_lbc_rest_runjob.cfg index 47137956..24f53352 100644 --- a/cases/icon-art-oem-test/icontools_remap_lbc_rest_runjob.cfg +++ b/cases/icon-art-oem-test/icontools_remap_lbc_rest_runjob.cfg @@ -27,7 +27,6 @@ spack load icontools rm -f ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}* cat > NAMELIST_ICONREMAP_FIELDS_{cfg.inidate_yyyymmddhh} << EOF -! &input_field_nml ! temperature inputname = "T" outputname = "T" @@ -105,7 +104,6 @@ for datafilename in {datafile_list_rest} ; do out_type = 2 out_filetype = 4 l_have3dbuffer = .false. -! ncstorage_file = "ncstorage.tmp_lbc_{cfg.inidate_yyyymmddhh}" / EOF_2C From 9a46410639281ad7f44d102a9ddfa8a9022b8277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Fri, 14 Jul 2023 11:42:44 +0200 Subject: [PATCH 096/108] Adapt jenkins test for icon-art-oem --- jenkins/Jenkinsfile | 4 ++-- jenkins/scripts/jenkins.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index 630d4835..a7f4d2eb 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -95,11 +95,11 @@ pipeline { } } } - stage('Build ICON-ART') { + stage('Build ICON-ART-OEM') { steps { sh '''source ${WORKSPACE}/miniconda/etc/profile.d/conda.sh conda activate proc-chain - ./jenkins/scripts/build_icon-art.sh''' + ./jenkins/scripts/build_icon-art-oem.sh''' } post { failure { diff --git a/jenkins/scripts/jenkins.sh b/jenkins/scripts/jenkins.sh index 4c617827..d84f2862 100755 --- a/jenkins/scripts/jenkins.sh +++ b/jenkins/scripts/jenkins.sh @@ -53,7 +53,7 @@ if [[ -f src/icon-art/bin/icon ]]; then echo icon-art executable already exists - skipping build. else echo building icon-art... - ./jenkins/scripts/build_icon-art.sh + ./jenkins/scripts/build_icon-art-oem.sh fi # Test COSMO-GHG From 76362a6c9d3db9cd9b0cbb13639f6ed429f3db50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 26 Jul 2023 14:06:01 +0200 Subject: [PATCH 097/108] Use latest spack-c2sm version --- jenkins/scripts/setup-spack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/scripts/setup-spack.sh b/jenkins/scripts/setup-spack.sh index a42fec6f..326672de 100755 --- a/jenkins/scripts/setup-spack.sh +++ b/jenkins/scripts/setup-spack.sh @@ -10,7 +10,7 @@ function error { # Check if script is called correctly [[ $(git rev-parse --show-toplevel 2>/dev/null) = $(pwd) ]] || error "$0 not launched from toplevel of repository" -BRANCH=v0.18.1.5 +BRANCH=main GIT_REMOTE=https://github.com/C2SM/spack-c2sm.git rm -fr src/spack-c2sm From 15fd6f7d41899183fcb4f2f69c6086d2fa6f8d3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 26 Jul 2023 14:26:20 +0200 Subject: [PATCH 098/108] Fix ICON-ART build and tests --- jenkins/Jenkinsfile | 21 +++++++++++++++++++-- jenkins/scripts/jenkins.sh | 8 ++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index a7f4d2eb..82747a3d 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -95,11 +95,11 @@ pipeline { } } } - stage('Build ICON-ART-OEM') { + stage('Build ICON-ART') { steps { sh '''source ${WORKSPACE}/miniconda/etc/profile.d/conda.sh conda activate proc-chain - ./jenkins/scripts/build_icon-art-oem.sh''' + ./jenkins/scripts/build_icon-art.sh''' } post { failure { @@ -144,6 +144,23 @@ pipeline { } } } + stage('Test ICON-ART (OEM)') { + environment { + PATH = "${WORKSPACE}/miniconda/bin:$PATH" + } + steps { + sh '''source ${WORKSPACE}/miniconda/etc/profile.d/conda.sh + conda activate proc-chain + . ${WORKSPACE}/src/spack-c2sm/setup-env.sh + ./jenkins/scripts/test_icon-art-oem.sh''' + } + post { + failure { + echo 'Cleaning up workspace' + deleteDir() + } + } + } stage('Test ICON-ART (global)') { environment { PATH = "${WORKSPACE}/miniconda/bin:$PATH" diff --git a/jenkins/scripts/jenkins.sh b/jenkins/scripts/jenkins.sh index d84f2862..32d838ca 100755 --- a/jenkins/scripts/jenkins.sh +++ b/jenkins/scripts/jenkins.sh @@ -53,7 +53,7 @@ if [[ -f src/icon-art/bin/icon ]]; then echo icon-art executable already exists - skipping build. else echo building icon-art... - ./jenkins/scripts/build_icon-art-oem.sh + ./jenkins/scripts/build_icon-art.sh fi # Test COSMO-GHG @@ -73,11 +73,11 @@ else fi # Test ICON-ART -if [[ -f work/icon-art-test/2018010100_0_24/checkpoints/finished/icon ]]; then +if [[ -f work/icon-art-oem-test/2018010100_0_24/checkpoints/finished/icon ]]; then echo icon-art test case already finished - skipping test. else - echo running icon-art test case... - ./jenkins/scripts/test_icon-art.sh + echo running icon-art-oem test case... + ./jenkins/scripts/test_icon-art-oem.sh fi # Test ICON-ART-GLOBAL From d743d8998c28ae829ffd25be733e068de4761622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 26 Jul 2023 14:31:15 +0200 Subject: [PATCH 099/108] Replace oae with oem --- cases/cosmo-ghg-11km-test/config.py | 14 +++++++------- cases/cosmo-ghg-11km-test/cosmo_INPUT_GHG.cfg | 10 +++++----- cases/icon-art-oem-test/config.py | 10 +++++----- cases/icon-art-oem-test/icon_runjob.cfg | 10 +++++----- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/cases/cosmo-ghg-11km-test/config.py b/cases/cosmo-ghg-11km-test/config.py index aa536830..0e59d148 100644 --- a/cases/cosmo-ghg-11km-test/config.py +++ b/cases/cosmo-ghg-11km-test/config.py @@ -90,13 +90,13 @@ # OAE ------------------------------------------------------------------------ # Online anthropogenic emissions -oae_dir = os.path.join(input_root, 'oae') -oae_gridded_emissions_nc = 'emissions.nc' -oae_vertical_profiles_nc = 'vertical_profiles.nc' -oae_hourofday_nc = 'hourofday.nc' -oae_hourofyear_nc = 'hourofyear.nc' -oae_dayofweek_nc = 'dayofweek.nc' -oae_monthofyear_nc = 'monthofyear.nc' +oem_dir = os.path.join(input_root, 'oem') +oem_gridded_emissions_nc = 'emissions.nc' +oem_vertical_profiles_nc = 'vertical_profiles.nc' +oem_hourofday_nc = 'hourofday.nc' +oem_hourofyear_nc = 'hourofyear.nc' +oem_dayofweek_nc = 'dayofweek.nc' +oem_monthofyear_nc = 'monthofyear.nc' # BIOFLUXES ------------------------------------------------------------------ # VPRM biogenic fluxes for offline VPRM diff --git a/cases/cosmo-ghg-11km-test/cosmo_INPUT_GHG.cfg b/cases/cosmo-ghg-11km-test/cosmo_INPUT_GHG.cfg index b413b89c..505ba793 100644 --- a/cases/cosmo-ghg-11km-test/cosmo_INPUT_GHG.cfg +++ b/cases/cosmo-ghg-11km-test/cosmo_INPUT_GHG.cfg @@ -2,11 +2,11 @@ in_tracers = {cfg.in_tracers}, tracer_start = {cfg.tracer_start}, iemiss_interp = 1, - gridded_emissions_nc = '../input/oae/{cfg.oae_gridded_emissions_nc}', - vertical_profile_nc = '../input/oae/{cfg.oae_vertical_profiles_nc}', - hour_of_day_nc = '../input/oae/{cfg.oae_hourofday_nc}', - day_of_week_nc = '../input/oae/{cfg.oae_dayofweek_nc}', - month_of_year_nc = '../input/oae/{cfg.oae_monthofyear_nc}', + gridded_emissions_nc = '../input/oem/{cfg.oem_gridded_emissions_nc}', + vertical_profile_nc = '../input/oem/{cfg.oem_vertical_profiles_nc}', + hour_of_day_nc = '../input/oem/{cfg.oem_hourofday_nc}', + day_of_week_nc = '../input/oem/{cfg.oem_dayofweek_nc}', + month_of_year_nc = '../input/oem/{cfg.oem_monthofyear_nc}', modis_reflectances_nc = '../input/vprm/modis.nc', veg_class_frac_nc = '../input/vprm/vegetation.nc', octe_maps_nc = '../input/octe/maps.nc', diff --git a/cases/icon-art-oem-test/config.py b/cases/icon-art-oem-test/config.py index fca7c2bf..40b2fbbb 100644 --- a/cases/icon-art-oem-test/config.py +++ b/cases/icon-art-oem-test/config.py @@ -72,11 +72,11 @@ 'map_file_ana': ['map_file.ana', 'mapping'], 'chemtracer_xml_filename': ['tracers_oh_pntsrc.xml', 'XML'], 'pntSrc_xml_filename': ['pntSrc_example.xml', 'XML'], - 'oae_gridded_emissions_nc': ['tno_3cat.nc', 'OEM'], - 'oae_vertical_profiles_nc': ['vertical_profiles.nc', 'OEM'], - 'oae_hourofday_nc': ['hourofday.nc', 'OEM'], - 'oae_dayofweek_nc': ['dayofweek.nc', 'OEM'], - 'oae_monthofyear_nc': ['monthofyear.nc', 'OEM'], + 'oem_gridded_emissions_nc': ['tno_3cat.nc', 'OEM'], + 'oem_vertical_profiles_nc': ['vertical_profiles.nc', 'OEM'], + 'oem_hourofday_nc': ['hourofday.nc', 'OEM'], + 'oem_dayofweek_nc': ['dayofweek.nc', 'OEM'], + 'oem_monthofyear_nc': ['monthofyear.nc', 'OEM'], } # File names ----------------------------------------------------------------- diff --git a/cases/icon-art-oem-test/icon_runjob.cfg b/cases/icon-art-oem-test/icon_runjob.cfg index d53966a9..a19192ce 100644 --- a/cases/icon-art-oem-test/icon_runjob.cfg +++ b/cases/icon-art-oem-test/icon_runjob.cfg @@ -115,11 +115,11 @@ cat > NAMELIST_NWP << EOF ! oem_nml: online emission module --------------------------------------------- &oemctrl_nml - gridded_emissions_nc = '{cfg.oae_gridded_emissions_nc_scratch}' - vertical_profile_nc = '{cfg.oae_vertical_profiles_nc_scratch}' - hour_of_day_nc = '{cfg.oae_hourofday_nc_scratch}' - day_of_week_nc = '{cfg.oae_dayofweek_nc_scratch}' - month_of_year_nc = '{cfg.oae_monthofyear_nc_scratch}' + gridded_emissions_nc = '{cfg.oem_gridded_emissions_nc_scratch}' + vertical_profile_nc = '{cfg.oem_vertical_profiles_nc_scratch}' + hour_of_day_nc = '{cfg.oem_hourofday_nc_scratch}' + day_of_week_nc = '{cfg.oem_dayofweek_nc_scratch}' + month_of_year_nc = '{cfg.oem_monthofyear_nc_scratch}' / ! diffusion_nml: horizontal (numerical) diffusion ---------------------------- From 40f39f5ce3a4bbd89462869d28c835ed22aaa887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 26 Jul 2023 16:54:17 +0200 Subject: [PATCH 100/108] Replace oae with oem in job --- jobs/oae.py | 58 ++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/jobs/oae.py b/jobs/oae.py index c25209bd..a7680267 100644 --- a/jobs/oae.py +++ b/jobs/oae.py @@ -24,11 +24,11 @@ def main(starttime, hstart, hstop, cfg, model_cfg): Object holding all user-configuration parameters as attributes """ - oae_dir = cfg.oae_dir - oae_gridded_emissions_nc = os.path.join(oae_dir, - cfg.oae_gridded_emissions_nc) - oae_vertical_profiles_nc = os.path.join(oae_dir, - cfg.oae_vertical_profiles_nc) + oem_dir = cfg.oem_dir + oem_gridded_emissions_nc = os.path.join(oem_dir, + cfg.oem_gridded_emissions_nc) + oem_vertical_profiles_nc = os.path.join(oem_dir, + cfg.oem_vertical_profiles_nc) # Temporal profiles can be given as hourofday, dayofweek, monthofyear # AND/OR as hourofyear. We copy all files indicated in cfg, but make @@ -36,13 +36,13 @@ def main(starttime, hstart, hstop, cfg, model_cfg): hod_tps = True hoy_tps = True try: - oae_hourofday_nc = os.path.join(oae_dir, cfg.oae_hourofday_nc) - oae_dayofweek_nc = os.path.join(oae_dir, cfg.oae_dayofweek_nc) - oae_monthofyear_nc = os.path.join(oae_dir, cfg.oae_monthofyear_nc) + oem_hourofday_nc = os.path.join(oem_dir, cfg.oem_hourofday_nc) + oem_dayofweek_nc = os.path.join(oem_dir, cfg.oem_dayofweek_nc) + oem_monthofyear_nc = os.path.join(oem_dir, cfg.oem_monthofyear_nc) except AttributeError: hod_tps = False try: - oae_hourofyear_nc = os.path.join(oae_dir, cfg.oae_hourofyear_nc) + oem_hourofyear_nc = os.path.join(oem_dir, cfg.oem_hourofyear_nc) except AttributeError: hoy_tps = False @@ -54,30 +54,30 @@ def main(starttime, hstart, hstop, cfg, model_cfg): input_dir = cfg.icon_input else: input_dir = cfg.cosmo_input - dest_dir = os.path.join(input_dir, "oae") + dest_dir = os.path.join(input_dir, "oem") tools.create_dir(dest_dir, "online emissions input") - logging.info("Copying oae files from {} to {}".format(oae_dir, dest_dir)) + logging.info("Copying oem files from {} to {}".format(oem_dir, dest_dir)) if hod_tps: - tools.copy_file(oae_gridded_emissions_nc, - os.path.join(dest_dir, cfg.oae_gridded_emissions_nc)) - tools.copy_file(oae_vertical_profiles_nc, - os.path.join(dest_dir, cfg.oae_vertical_profiles_nc)) - tools.copy_file(oae_hourofday_nc, - os.path.join(dest_dir, cfg.oae_hourofday_nc)) - tools.copy_file(oae_dayofweek_nc, - os.path.join(dest_dir, cfg.oae_dayofweek_nc)) - tools.copy_file(oae_monthofyear_nc, - os.path.join(dest_dir, cfg.oae_monthofyear_nc)) + tools.copy_file(oem_gridded_emissions_nc, + os.path.join(dest_dir, cfg.oem_gridded_emissions_nc)) + tools.copy_file(oem_vertical_profiles_nc, + os.path.join(dest_dir, cfg.oem_vertical_profiles_nc)) + tools.copy_file(oem_hourofday_nc, + os.path.join(dest_dir, cfg.oem_hourofday_nc)) + tools.copy_file(oem_dayofweek_nc, + os.path.join(dest_dir, cfg.oem_dayofweek_nc)) + tools.copy_file(oem_monthofyear_nc, + os.path.join(dest_dir, cfg.oem_monthofyear_nc)) if hoy_tps: - tools.copy_file(oae_hourofyear_nc, - os.path.join(dest_dir, cfg.oae_hourofyear_nc)) + tools.copy_file(oem_hourofyear_nc, + os.path.join(dest_dir, cfg.oem_hourofyear_nc)) # Additional files for ICON simulations - if hasattr(cfg, 'oae_ens_reg_nc'): - tools.copy_file(os.path.join(oae_dir, cfg.oae_ens_reg_nc), - os.path.join(dest_dir, cfg.oae_ens_reg_nc)) - if hasattr(cfg, 'oae_ens_lambda_nc'): - tools.copy_file(os.path.join(oae_dir, cfg.oae_ens_lambda_nc), - os.path.join(dest_dir, cfg.oae_ens_lambda_nc)) + if hasattr(cfg, 'oem_ens_reg_nc'): + tools.copy_file(os.path.join(oem_dir, cfg.oem_ens_reg_nc), + os.path.join(dest_dir, cfg.oem_ens_reg_nc)) + if hasattr(cfg, 'oem_ens_lambda_nc'): + tools.copy_file(os.path.join(oem_dir, cfg.oem_ens_lambda_nc), + os.path.join(dest_dir, cfg.oem_ens_lambda_nc)) From 2b7f521eeebd3b16cd00607b53cad3d1ce6ea450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 26 Jul 2023 16:54:46 +0200 Subject: [PATCH 101/108] Rename job --- jobs/{oae.py => oem.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename jobs/{oae.py => oem.py} (100%) diff --git a/jobs/oae.py b/jobs/oem.py similarity index 100% rename from jobs/oae.py rename to jobs/oem.py From d012076a0f50b7ba31f5846acb2454c3e80fec02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 26 Jul 2023 16:55:39 +0200 Subject: [PATCH 102/108] Update models.yaml --- config/models.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/models.yaml b/config/models.yaml index fa7657e0..a01c0854 100644 --- a/config/models.yaml +++ b/config/models.yaml @@ -4,7 +4,7 @@ models: variants: ['spinup'] features: ['restart'] cosmo-ghg: - jobs: ['prepare_data', 'emissions', 'biofluxes', 'oae', 'online_vprm', + jobs: ['prepare_data', 'emissions', 'biofluxes', 'oem', 'online_vprm', 'int2lm', 'post_int2lm', 'cosmo', 'post_cosmo'] variants: ['spinup'] features: ['restart', 'tracers'] From c4c6294bcbb206e6ca91fb3bc83d4562d49dbb62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 26 Jul 2023 16:57:21 +0200 Subject: [PATCH 103/108] Further renaming --- jobs/__init__.py | 2 +- jobs/cosmo.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jobs/__init__.py b/jobs/__init__.py index 22141c94..08cc0cdb 100644 --- a/jobs/__init__.py +++ b/jobs/__init__.py @@ -4,7 +4,7 @@ from . import prepare_data from . import emissions -from . import oae +from . import oem from . import biofluxes from . import int2lm from . import post_int2lm diff --git a/jobs/cosmo.py b/jobs/cosmo.py index 2190b455..75780dc4 100644 --- a/jobs/cosmo.py +++ b/jobs/cosmo.py @@ -163,7 +163,7 @@ def main(starttime, hstart, hstop, cfg, model_cfg): namelist_names = [ 'ART', 'ASS', 'DIA', 'DYN', 'EPS', 'INI', 'IO', 'ORG', 'PHY' ] - if hasattr(cfg, 'oae_dir'): + if hasattr(cfg, 'oem_dir'): # When doing online emissions in COSMO-ART, an additional # namelist is required namelist_names += ['OAE'] From 6b25629c9b849d7eca1409d72e87a5395ffa4d7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 27 Jul 2023 09:22:40 +0200 Subject: [PATCH 104/108] Update README.md --- README.md | 93 +++++++++++++++++++------------------------------------ 1 file changed, 31 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index e8b0bc9f..af7ff9b8 100644 --- a/README.md +++ b/README.md @@ -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, +> 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): @@ -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 @@ -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. @@ -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%nvhpc@21.3 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 From 8bf1df385ca8d877417f8cece359d6dd65b03630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Thu, 27 Jul 2023 09:27:24 +0200 Subject: [PATCH 105/108] Change permissions for jenkins script --- jenkins/scripts/test_icon-art-oem.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 jenkins/scripts/test_icon-art-oem.sh diff --git a/jenkins/scripts/test_icon-art-oem.sh b/jenkins/scripts/test_icon-art-oem.sh old mode 100644 new mode 100755 From 93da1b4067d220f5deec633b970917528e7bb597 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 2 Aug 2023 15:02:14 +0200 Subject: [PATCH 106/108] Add string2char function again for emissions --- jobs/emissions.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jobs/emissions.py b/jobs/emissions.py index 4ca0bf53..8e60fd15 100644 --- a/jobs/emissions.py +++ b/jobs/emissions.py @@ -16,7 +16,6 @@ import os import logging -import shutil from . import tools @@ -80,3 +79,8 @@ def main(starttime, hstart, hstop, cfg, model_cfg): source_path = os.path.join(emis_dir, emis_prefix + filename_ending) dest_path = os.path.join(target_dir, dest_prefix + filename_ending) tools.copy_file(source_path, dest_path) + + # convert grid_mapping_name from string (NF90_STRING) to char + # (NF90_CHAR) (needed for int2lm to work) + if cfg.model.startswith('cosmo'): + tools.string2char.main(dest_path) From 6534a934c84f881afb888c11f1c461354f5aa83b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 2 Aug 2023 15:07:07 +0200 Subject: [PATCH 107/108] Remove ICON part for GHG namelist script --- jobs/tools/write_cosmo_input_ghg.py | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/jobs/tools/write_cosmo_input_ghg.py b/jobs/tools/write_cosmo_input_ghg.py index 89f3d34e..59df37fb 100644 --- a/jobs/tools/write_cosmo_input_ghg.py +++ b/jobs/tools/write_cosmo_input_ghg.py @@ -3,7 +3,6 @@ import csv import sys -import os from .. import tools STR2INT = { @@ -61,13 +60,9 @@ STR2INT_recycling["ytype_ini"] = {'zero': 1, 'file': 1, 'user': 2} -def group2text(group, model, recycling=False): - - if model == "COSMO": - lines = ['&TRACER'] - if model == "ICON": - lines = ['&ghgtracer_nml'] +def group2text(group, recycling=False): + lines = ['&TRACER'] for key, value in group.items(): if key == '' or value == '': @@ -85,10 +80,7 @@ def group2text(group, model, recycling=False): if key == 'ycatl' or key == 'ytpl' or key == 'yvpl': value = value.replace('\'\'', '\'') - if model == "COSMO": - lines.append(' %s = %s,' % (key, value)) - if model == "ICON": - lines.append(' %s = %s' % (key, value)) + lines.append(' %s = %s,' % (key, value)) lines.append('/\n') return '\n'.join(lines) @@ -96,7 +88,7 @@ def group2text(group, model, recycling=False): def main(csv_filename, namelist_filename, cfg=None): """Convert a table (``.csv`` file) to namelist file (``INPUT_GHG``) - read by **COSMO** + read by **COSMO**. Parameters ---------- @@ -106,23 +98,16 @@ def main(csv_filename, namelist_filename, cfg=None): Path to the namelist file that will be created """ - #Distinguish between COSMO and ICON - if cfg.model.startswith('cosmo'): - model = "COSMO" - if cfg.model.startswith('icon'): - model = "ICON" - with open(csv_filename, 'r') as csv_file: reader = csv.DictReader(csv_file, delimiter=',') reader = [r for r in reader if r[''] != '#'] - n_tracers = len(reader) with open(namelist_filename, 'a') as nml_file: for group in reader: if cfg.variant == 'spinup' and not cfg.first_one: - nml_file.write(group2text(group, model, recycling=True)) + nml_file.write(group2text(group, recycling=True)) else: - nml_file.write(group2text(group, model)) + nml_file.write(group2text(group)) if __name__ == '__main__': From 973c0a2c77743976ec0229f2e859a39c542e71d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 2 Aug 2023 15:30:47 +0200 Subject: [PATCH 108/108] Add argparse for jenkins main script --- jenkins/scripts/jenkins.sh | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/jenkins/scripts/jenkins.sh b/jenkins/scripts/jenkins.sh index 32d838ca..d922344c 100755 --- a/jenkins/scripts/jenkins.sh +++ b/jenkins/scripts/jenkins.sh @@ -1,5 +1,21 @@ #!/bin/bash +# Argument parsing +force_execution=false + +while [[ "$#" -gt 0 ]]; do + case $1 in + -f|--force) + force_execution=true + shift + ;; + *) + echo "Unknown parameter: $1" + exit 1 + ;; + esac +done + set -e -x # Activate conda environment @@ -57,7 +73,7 @@ else fi # Test COSMO-GHG -if [[ -f work/cosmo-ghg-11km-test/2015010112_-6_12/checkpoints/finished/post_cosmo ]]; then +if [[ -f work/cosmo-ghg-11km-test/2015010112_-6_12/checkpoints/finished/post_cosmo && "$force_execution" == false ]]; then echo cosmo-ghg test case already finished - skipping test. else echo running cosmo-ghg test case... @@ -65,7 +81,7 @@ else fi # Test ICON -if [[ -f work/icon-test/2018010100_0_24/checkpoints/finished/icon ]]; then +if [[ -f work/icon-test/2018010100_0_24/checkpoints/finished/icon && "$force_execution" == false ]]; then echo icon test case already finished - skipping test. else echo running icon test case... @@ -73,7 +89,7 @@ else fi # Test ICON-ART -if [[ -f work/icon-art-oem-test/2018010100_0_24/checkpoints/finished/icon ]]; then +if [[ -f work/icon-art-oem-test/2018010100_0_24/checkpoints/finished/icon && "$force_execution" == false ]]; then echo icon-art test case already finished - skipping test. else echo running icon-art-oem test case... @@ -81,7 +97,7 @@ else fi # Test ICON-ART-GLOBAL -if [[ -f work/icon-art-global-test/2018010100_0_24/checkpoints/finished/icon ]]; then +if [[ -f work/icon-art-global-test/2018010100_0_24/checkpoints/finished/icon && "$force_execution" == false ]]; then echo icon-art-global test case already finished - skipping test. else echo running icon-art-global test case...