From 950537da2da07b478abaf179f5bd45a3ab9808e0 Mon Sep 17 00:00:00 2001 From: pmeurer Date: Mon, 30 Mar 2026 11:53:47 +0200 Subject: [PATCH 01/11] Create test.txt --- mkforcing_dream/test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 mkforcing_dream/test.txt diff --git a/mkforcing_dream/test.txt b/mkforcing_dream/test.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/mkforcing_dream/test.txt @@ -0,0 +1 @@ + From ef86747437b07292799a7c43677fcf29861b3e03 Mon Sep 17 00:00:00 2001 From: pmeurer Date: Tue, 31 Mar 2026 13:15:33 +0200 Subject: [PATCH 02/11] Add files via upload --- mkforcing_dream/create_forcing.py | 306 +++++++++++++++++++++++ mkforcing_dream/create_init_icon_eclm.sh | 178 +++++++++++++ 2 files changed, 484 insertions(+) create mode 100644 mkforcing_dream/create_forcing.py create mode 100644 mkforcing_dream/create_init_icon_eclm.sh diff --git a/mkforcing_dream/create_forcing.py b/mkforcing_dream/create_forcing.py new file mode 100644 index 0000000..ecb3bbc --- /dev/null +++ b/mkforcing_dream/create_forcing.py @@ -0,0 +1,306 @@ +#!/usr/bin/env python3 + +import os +import re +import subprocess +import argparse +import shutil + +BASE_URL = "https://opendata.dwd.de/climate_environment/REA/ICON-DREAM-EU/hourly" +VARS = ["T", "WS", "QV", "P", "TOT_PREC", "ASWDIFD_S", "ASWDIR_S"] + +HEIGHT_VARS = ["T", "WS", "QV", "P"] + +# -------------------------------------------------- +# Helper +# -------------------------------------------------- +def run(cmd): + print(">>", " ".join(cmd)) + subprocess.run(cmd, check=True) + +def cleanup(paths): + for p in paths: + if os.path.isfile(p): + print(f" deleting file: {p}") + os.remove(p) + elif os.path.isdir(p): + print(f" deleting directory: {p}") + shutil.rmtree(p, ignore_errors=True) + +# -------------------------------------------------- +# DOWNLOAD +# -------------------------------------------------- +def download_month(year, month, outdir): + ym = f"{year}{month:02d}" + os.makedirs(outdir, exist_ok=True) + + files = {} + + for var in VARS: + fname = f"ICON-DREAM-EU_{ym}_{var}_hourly.grb" + url = f"{BASE_URL}/{var}/{fname}" + path = os.path.join(outdir, fname) + + run(["wget", "-c", url, "-O", path]) + files[var] = path + + return files + +# -------------------------------------------------- +# HEIGHT SELECTION +# -------------------------------------------------- +def process_variable(var, infile, outfile, level=74): + if var in HEIGHT_VARS: + print(f"{var}: selecting height {level}") + try: + run(["cdo", f"sellevel,{level}", infile, outfile]) + except subprocess.CalledProcessError: + print(f" Level {level} not found → using interpolation") + run(["cdo", f"intlevel,{level}", infile, outfile]) + else: + print(f"{var}: no height → copy") + run(["cdo", "copy", infile, outfile]) + +# -------------------------------------------------- +# MERGE +# -------------------------------------------------- +def merge_all(files, outfile): + print("Merging final file →", outfile) + run(["cdo", "merge"] + files + [outfile]) + +# -------------------------------------------------- +# PATCH ICON SCRIPT +# -------------------------------------------------- +def patch_icon_script( + template, + output, + year, + month, + datadir, + outdir, + tools_workdir, + ingrid, + localgrid, + account +): + with open(template) as f: + content = f.read() + + def replace_var(text, var, value): + return re.sub(rf"^{var}=.*$", f"{var}={value}", text, flags=re.MULTILINE) + + def replace_slurm(text, key, value): + return re.sub(rf"^#SBATCH --{key}=.*$", f"#SBATCH --{key}={value}", text, flags=re.MULTILINE) + + content = replace_slurm(content, "account", account) + + content = replace_var(content, "yy", year) + content = replace_var(content, "mm", f"{month:02d}") + content = replace_var(content, "tools_WORKDIR", tools_workdir) + content = replace_var(content, "ICONTOOLS_DIR", "${tools_WORKDIR}/icontools") + content = replace_var(content, "INGRID", ingrid) + content = replace_var(content, "LOCALGRID", localgrid) + content = replace_var(content, "DATADIR", datadir) + content = replace_var(content, "OUTDIR", outdir) + + datafile = f"${{DATADIR}}/ICON_{year}{month:02d}.grb" + content = replace_var(content, "DATAFILELIST", datafile) + + if "SLURM_JOB_ID" not in os.environ: + content = re.sub(r"^srun=.*$", 'srun=""', content, flags=re.MULTILINE) + + # wichtig: sicherstellen dass Verzeichnis existiert + os.makedirs(os.path.dirname(output), exist_ok=True) + + print("Writing script to:", os.path.abspath(output)) + + with open(output, "w") as f: + f.write(content) + + os.chmod(output, 0o755) + +# -------------------------------------------------- +# ICON RUN +# -------------------------------------------------- +def run_icon(script): + if "SLURM_JOB_ID" in os.environ: + run(["sbatch", script]) + else: + run(["bash", script]) + +# -------------------------------------------------- +# PROCESSING +# -------------------------------------------------- +def reconstruct_icon_fsds(da): + import xarray as xr + + M = da + + H = xr.where( + (M.time.dt.hour % 3) == 1, + M, + xr.where( + (M.time.dt.hour % 3) == 2, + 2*M - M.shift(time=1), + xr.where( + (M.time.dt.hour % 3) == 0, + 3*M - 2*M.shift(time=1), + M + ) + ) + ) + + return H.clip(min=0).fillna(0) + + +def process_icon_dream(path_file, y, m, output_path): + import xarray as xr + import numpy as np + import os + + print(f"Processing: {path_file}") + + ds = xr.open_dataset(path_file) + + if "height" in ds.dims: + ds = ds.sel(height=74.5) + + ncells = ds.sizes["ncells"] + lon = np.degrees(ds["clon"].values) + lat = np.degrees(ds["clat"].values) + + TBOT = ds["t"] + SHUM = ds["q"] + FSDS_1 = ds["ASWDIFD_S"] + ds["ASWDIR_S"] + FSDS = reconstruct_icon_fsds(FSDS_1) + WIND = ds['ws'] + PRECTmms = ds["tp"] / 3600.0 + PSRF = ds['pres'] + + ZBOT = xr.DataArray(10*np.ones(ncells), dims=("ncells")) + def expand_var(var): + return var.expand_dims({"nj": [1]}, axis=1) + + ds['FSDS'] = expand_var(FSDS) + ds['WIND'] = expand_var(WIND) + ds['PRECTmms'] = expand_var(PRECTmms) + ds['PSRF'] = expand_var(PSRF) + ds['TBOT'] = expand_var(TBOT) + ds['SHUM'] = expand_var(SHUM) + ds['ZBOT'] = expand_var(ZBOT) + + ds['xc'] = expand_var(ds.clon) + ds['yc'] = expand_var(ds.clat) + + ds = ds.set_coords(["xc", "yc"]) + + keep_vars = ["FSDS", "WIND", "PRECTmms", "PSRF", "TBOT", "SHUM", "ZBOT"] + ds = ds[keep_vars] + + ds = ds.drop_vars(['nj', 'height', 'clon', 'clat']) + + ds = ds.rename({"ncells": "ni"}) + + ds.time.attrs.pop("units", None) + + ds.time.encoding = { + "units": "seconds since 1970-01-01", + "calendar": "proleptic_gregorian", + "dtype": "float64" + } + + target_ni = 2437848 + if ds.sizes["ni"] > target_ni: + ds = ds.isel(ni=slice(-target_ni, None)) + for coord in ["xc", "yc"]: + ds[coord] = ds[coord].isel(ni=slice(-target_ni, None)) + + out_file = f"{y}-{m:02d}.nc" + ds.to_netcdf(os.path.join(output_path, out_file)) + + print(f"Processed monthly file saved to {out_file}") + + print(f"Saved → {out_file}") + +# -------------------------------------------------- +# MAIN +# -------------------------------------------------- +def main(): + parser = argparse.ArgumentParser() + + parser.add_argument("--year", type=int, required=True) + parser.add_argument("--months", nargs="+", type=int, required=True) + + parser.add_argument("--base_dir", required=True) + parser.add_argument("--icon_template", required=True) + + parser.add_argument("--tools_workdir", required=True) + parser.add_argument("--ingrid", required=True) + parser.add_argument("--localgrid", required=True) + parser.add_argument("--account", required=True) + + args = parser.parse_args() + + for m in args.months: + + print(f"\n===== {args.year}-{m:02d} =====") + + raw = f"{args.base_dir}/raw/{m:02d}" + prep = f"{args.base_dir}/prep/{m:02d}" + merged_dir = f"{args.base_dir}/merged" + remap_out = f"{args.base_dir}/remap/{m:02d}" + + os.makedirs(prep, exist_ok=True) + os.makedirs(merged_dir, exist_ok=True) + os.makedirs(remap_out, exist_ok=True) + + temp_paths = [] + + files = download_month(args.year, m, raw) + temp_paths.append(raw) + + processed_files = [] + + for var, path in files.items(): + out = f"{prep}/{var}.grb" + process_variable(var, path, out, level=74) + processed_files.append(out) + + temp_paths.append(prep) + + merged = f"{merged_dir}/ICON_{args.year}{m:02d}.grb" + merge_all(processed_files, merged) + + script = os.path.join(args.base_dir, f"run_icon_{m:02d}.sh") + + patch_icon_script( + args.icon_template, + script, + args.year, + m, + merged_dir, + remap_out, + args.tools_workdir, + args.ingrid, + args.localgrid, + args.account + ) + + run_icon(script) + + for f in os.listdir(remap_out): + if f.endswith(".nc"): + process_icon_dream( + os.path.join(remap_out, f), + args.year, + m, + args.base_dir + ) + + cleanup(temp_paths) + + print("\n done") + + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/mkforcing_dream/create_init_icon_eclm.sh b/mkforcing_dream/create_init_icon_eclm.sh new file mode 100644 index 0000000..46ca2f1 --- /dev/null +++ b/mkforcing_dream/create_init_icon_eclm.sh @@ -0,0 +1,178 @@ +#!/bin/bash +# ===== SLURM settings ======================================================== +#SBATCH --account=detectrea2 +#SBATCH --job-name=create_eclm_forcing +#SBATCH --partition=batch +#SBATCH --nodes=1 +#SBATCH --threads-per-core=2 +#SBATCH --output=LOG.create_eclm_forcing.run.%j.o +#SBATCH --error=LOG.create_eclm_forcing.run.%j.o +#SBATCH --time=24:00:00 +#============================================================================= + +#------------------------------------------yy----------------------------------- +# Run script template for interpolation of inital data onto +# limited area grid +# 01/2017 : F. Prill, DWD +# 06/2021: SPo modifications for JUWELS +# +# Usage: Submit this PBS runs script with "qsub" +# Do not forget to fill in the file name settings below! +# +#----------------------------------------------------------------------------- + +# ===== srun options ========================================================== +#srun="srun -l --propagate=STACK --cpu_bind=verbose,cores --distribution=block:block" + +#test -r /etc/ksh.kshrc && . /etc/ksh.kshrc +set -x + +# OpenMP settings +export OMP_SCHEDULE="static" +export OMP_DYNAMIC="false" +export OMP_NUM_THREADS=8 + +#----------------------------------------------------------------------------- +# MPI variables +# ---------------------------- +mpi_root=/p/software/juwels/stages/2024/software/psmpi/5.9.2-1-GCC-12.3.0 +no_of_nodes=${SLURM_JOB_NUM_NODES:-1} +mpi_procs_pernode=6 +mpi_total_procs=$((no_of_nodes * mpi_procs_pernode)) +srun="srun --kill-on-bad-exit=1 --nodes=${SLURM_JOB_NUM_NODES:-1} --ntasks-per-node=${mpi_procs_pernode}" + + +module purge +module load Stages/2024 GCC/12.3.0 ParaStationMPI/5.9.2-1 +module load netCDF-C++4/4.3.1 netCDF-Fortran/4.6.1 HDF5/1.14.2 ecCodes/2.31.0 Szip/.2.1.1 netCDF/4.9.2 + +module list + +# SETTINGS: DIRECTORIES AND INPUT/OUTPUT FILE NAMES -------------------------- + +# Basic settings: + yy=2021 + mm=12 #05 #09 + dd=01 #18 + hh=00 + +tools_WORKDIR=/p/scratch/detectrea2/meurer1/dwd_icon_tools + +ICONTOOLS_DIR=${tools_WORKDIR}/icontools + +INGRID=/p/scratch/detectrea2/meurer1/dream_grids/ICON-DREAM-EU_grid.nc + +LOCALGRID=/p/scratch/detectrea2/meurer1/simexp_DETECT_EUR-3-iic_DWD-ICONglobe_forecast_r1i1p1_FZJ-ICON2024-07-eCLM0-4-0-ParFlow3-14-0_v1/dta/geo/icon/static/EUR-R13B07_2473796_grid_inclbrz_v1.nc + +DATADIR=/p/scratch/detectrea2/meurer1/eCLM_atm-forcing-generator/mkforcing/dream/merged/ +DATAFILELIST=$(find ${DATADIR}/*) + +OUTDIR=/p/scratch/detectrea2/meurer1/eCLM_atm-forcing-generator/mkforcing/dream/out/ + +#----------------------------------------------------------------------------- + +BINARY_ICONSUB=iconsub +BINARY_REMAP=iconremap +AUXGRID=auxgrid + + +#----------------------------------------------------------------------------- +# Remap inital data onto local (limited-area) grid +#----------------------------------------------------------------------------- + +mkdir -p ${OUTDIR} +cd ${tools_WORKDIR} + + +set +x + +cat >> NAMELIST_ICONREMAP_FIELDS << EOF_2B +! +! U,V - horizontal velocity components +&input_field_nml + inputname = "ws" + outputname = "ws" + intp_method = 3 +/ +! 2m temperature +&input_field_nml + inputname = "t" + outputname = "t" + intp_method = 3 +/ +! pressure +&input_field_nml + inputname = "pres" + outputname = "pres" + intp_method = 3 +/ +! shortwave radiation +&input_field_nml + inputname = "ASWDIFD_S" + outputname = "ASWDIFD_S" + intp_method = 3 +/ +! shortwave radiation +&input_field_nml + inputname = "ASWDIR_S" + outputname = "ASWDIR_S" + intp_method = 3 +/ +! total precipitation +&input_field_nml + inputname = "tp" + outputname = "tp" + intp_method = 3 +/ +! specific humidity +&input_field_nml + inputname = "q" + outputname = "q" + intp_method = 3 +/ +EOF_2B + +landmask="lsm" ! "FR_LAND" + + +#----------------------------------------------------------------------------- +# loop over file list: + +echo ${DATAFILELIST} +for datafilename in ${DATAFILELIST} ; do + +datafile="${datafilename##*/}" # get filename without path +outdatafile=${datafile%.*} # get filename without suffix + +cat > NAMELIST_ICONREMAP << EOF_2E +&remap_nml + in_grid_filename = '${INGRID}' + in_filename = '${DATADIR}/${datafile}' + in_type = 2 + out_grid_filename = '${LOCALGRID}' + out_filename = '${OUTDIR}/${outdatafile}.nc' + out_type = 2 + out_filetype = 4 + l_have3dbuffer = .false. + ncstorage_file = "ncstorage.tmp" +/ +EOF_2E + + +${srun} ${ICONTOOLS_DIR}/${BINARY_REMAP} -vv \ + --remap_nml NAMELIST_ICONREMAP \ + --input_field_nml NAMELIST_ICONREMAP_FIELDS + + +done + +#----------------------------------------------------------------------------- +# clean-up + +rm -f ncstorage.tmp* +rm -f nml.log NAMELIST_SUB NAMELIST_ICONREMAP NAMELIST_ICONREMAP_FIELDS + +#----------------------------------------------------------------------------- +exit +#----------------------------------------------------------------------------- + From 0687d228c44e0ea3928e1cabb12931159f85a1fb Mon Sep 17 00:00:00 2001 From: pmeurer Date: Tue, 31 Mar 2026 13:15:51 +0200 Subject: [PATCH 03/11] Delete mkforcing_dream/test.txt --- mkforcing_dream/test.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 mkforcing_dream/test.txt diff --git a/mkforcing_dream/test.txt b/mkforcing_dream/test.txt deleted file mode 100644 index 8b13789..0000000 --- a/mkforcing_dream/test.txt +++ /dev/null @@ -1 +0,0 @@ - From fbb01101ae92eb62501a301a726f115b47f04d7e Mon Sep 17 00:00:00 2001 From: pmeurer Date: Tue, 31 Mar 2026 13:16:07 +0200 Subject: [PATCH 04/11] Create Readme.md --- mkforcing_dream/Readme.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 mkforcing_dream/Readme.md diff --git a/mkforcing_dream/Readme.md b/mkforcing_dream/Readme.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/mkforcing_dream/Readme.md @@ -0,0 +1 @@ + From 9e640279c50f355e9f406436bc163eb6326145d8 Mon Sep 17 00:00:00 2001 From: pmeurer Date: Tue, 31 Mar 2026 13:23:39 +0200 Subject: [PATCH 05/11] Add files via upload --- mkforcing_dream/README.md | 70 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 mkforcing_dream/README.md diff --git a/mkforcing_dream/README.md b/mkforcing_dream/README.md new file mode 100644 index 0000000..d815fae --- /dev/null +++ b/mkforcing_dream/README.md @@ -0,0 +1,70 @@ +# Creation of Forcing Data from ICON-DREAM Reanalysis + +> ⚠️ **Status:** Experimental – workflow may change in future versions. + +## Overview + +This project provides a workflow to generate forcing data for **eCLM** based on **ICON-DREAM reanalysis data** from the DWD OpenData platform. + +The process includes: +- Downloading ICON-DREAM data +- Remapping the data using DWD ICON tools +- Post-processing adjustments to ensure compatibility with eCLM + +## Workflow + +1. **Download data** + - Obtain ICON-DREAM reanalysis data from the DWD OpenData server. + +2. **Remapping** + - Remap the data using DWD ICON tools. + - ⚠️ Note: This step is planned to be replaced by a CDO-based workflow in future versions. + +3. **Post-processing** + - Adjust variables to match eCLM requirements. + - Recalculate incoming solar radiation: + - In ICON-DREAM: accumulated variable + - In eCLM: instantaneous variable + +## Requirements + +- DWD ICON tools +- Python environment +- HPC environment (JSC) + +## Setup + +Before running the script, load the required environment: + +```bash +source +source jsc.2024_Intel.sh +``` + +## Usage + +Run the Python script as follows: + +```bash +python .py [options] +``` + +*(Replace `` and options accordingly.)* + +## Credits + +- Original DWD ICON tools script: F. Prill +- Modifications: S. Poll, P. Meurer +- Python script: + - Initial version: Pascal Meurer + - Further development: ChatGPT v5.2 (LLM-assisted) + +- eCLM adaptation code: + - Based primarily on work by S. Poll + - Alternative (slower) version available from P. Meurer + +## Notes + +- The workflow is under active development. +- Migration to CDO is planned. +- Further validation of physical consistency (e.g., radiation variables) is ongoing. From 69ed943c358e99ba8f1b9103505b503016fecd61 Mon Sep 17 00:00:00 2001 From: pmeurer Date: Tue, 31 Mar 2026 13:23:53 +0200 Subject: [PATCH 06/11] Delete mkforcing_dream/Readme.md --- mkforcing_dream/Readme.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 mkforcing_dream/Readme.md diff --git a/mkforcing_dream/Readme.md b/mkforcing_dream/Readme.md deleted file mode 100644 index 8b13789..0000000 --- a/mkforcing_dream/Readme.md +++ /dev/null @@ -1 +0,0 @@ - From 5f4117a28468692d7e90f39faf366993073dece1 Mon Sep 17 00:00:00 2001 From: pmeurer Date: Tue, 31 Mar 2026 13:25:29 +0200 Subject: [PATCH 07/11] Update README.md --- mkforcing_dream/README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mkforcing_dream/README.md b/mkforcing_dream/README.md index d815fae..5249dab 100644 --- a/mkforcing_dream/README.md +++ b/mkforcing_dream/README.md @@ -1,6 +1,6 @@ # Creation of Forcing Data from ICON-DREAM Reanalysis -> ⚠️ **Status:** Experimental – workflow may change in future versions. +> **Status:** Experimental – workflow may change in future versions. ## Overview @@ -18,7 +18,7 @@ The process includes: 2. **Remapping** - Remap the data using DWD ICON tools. - - ⚠️ Note: This step is planned to be replaced by a CDO-based workflow in future versions. + - Note: This step is planned to be replaced by a CDO-based workflow in future versions. 3. **Post-processing** - Adjust variables to match eCLM requirements. @@ -46,10 +46,9 @@ source jsc.2024_Intel.sh Run the Python script as follows: ```bash -python .py [options] +python .py [options] ``` - -*(Replace `` and options accordingly.)* +*(Replace directories and options accordingly.)* ## Credits From aecde9f13c501410c90fd2a79fb75e2a5d930d22 Mon Sep 17 00:00:00 2001 From: pmeurer Date: Tue, 31 Mar 2026 13:26:13 +0200 Subject: [PATCH 08/11] Update README.md --- mkforcing_dream/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkforcing_dream/README.md b/mkforcing_dream/README.md index 5249dab..f2902fd 100644 --- a/mkforcing_dream/README.md +++ b/mkforcing_dream/README.md @@ -46,7 +46,7 @@ source jsc.2024_Intel.sh Run the Python script as follows: ```bash -python .py [options] +python3 create_forcing.py --year 2022 --months 6 --base_dir /p/scratch/detectrea2/meurer1 --icon_template create_init_icon_eclm.sh --tools_workdir /p/scratch/detectrea2/meurer1/dwd_icon_tools --ingrid /p/scratch/detectrea2/meurer1/dream_grids/ICON-DREAM-EU_grid.nc --localgrid /p/scratch/detectrea2/meurer1/simexp_DETECT_EUR-3-iic_DWD-ICONglobe_forecast_r1i1p1_FZJ-ICON2024-07-eCLM0-4-0-ParFlow3-14-0_v1/dta/geo/icon/static/EUR-R13B07_2473796_grid_inclbrz_v1.nc --account detectrea2 ``` *(Replace directories and options accordingly.)* From 5b627b065a6a91925b3bfbc69ae2a192a100f141 Mon Sep 17 00:00:00 2001 From: pmeurer Date: Tue, 2 Jun 2026 13:35:53 +0200 Subject: [PATCH 09/11] Update create_forcing.py --- mkforcing_dream/create_forcing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkforcing_dream/create_forcing.py b/mkforcing_dream/create_forcing.py index ecb3bbc..65b4a5f 100644 --- a/mkforcing_dream/create_forcing.py +++ b/mkforcing_dream/create_forcing.py @@ -209,7 +209,7 @@ def expand_var(var): "dtype": "float64" } - target_ni = 2437848 + target_ni = 189976 if ds.sizes["ni"] > target_ni: ds = ds.isel(ni=slice(-target_ni, None)) for coord in ["xc", "yc"]: @@ -303,4 +303,4 @@ def main(): if __name__ == "__main__": - main() \ No newline at end of file + main() From c09a61cc2603e0c1d33da0379fa44dd99d3a535f Mon Sep 17 00:00:00 2001 From: pmeurer Date: Tue, 2 Jun 2026 13:39:18 +0200 Subject: [PATCH 10/11] Update README.md --- mkforcing_dream/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkforcing_dream/README.md b/mkforcing_dream/README.md index f2902fd..50b5210 100644 --- a/mkforcing_dream/README.md +++ b/mkforcing_dream/README.md @@ -46,7 +46,7 @@ source jsc.2024_Intel.sh Run the Python script as follows: ```bash -python3 create_forcing.py --year 2022 --months 6 --base_dir /p/scratch/detectrea2/meurer1 --icon_template create_init_icon_eclm.sh --tools_workdir /p/scratch/detectrea2/meurer1/dwd_icon_tools --ingrid /p/scratch/detectrea2/meurer1/dream_grids/ICON-DREAM-EU_grid.nc --localgrid /p/scratch/detectrea2/meurer1/simexp_DETECT_EUR-3-iic_DWD-ICONglobe_forecast_r1i1p1_FZJ-ICON2024-07-eCLM0-4-0-ParFlow3-14-0_v1/dta/geo/icon/static/EUR-R13B07_2473796_grid_inclbrz_v1.nc --account detectrea2 +python3 create_forcing.py --year 2022 --months 6 --base_dir /p/scratch/detectrea2/meurer1 --icon_template create_init_icon_eclm.sh --tools_workdir /p/scratch/detectrea2/meurer1/dwd_icon_tools --ingrid /p/scratch/detectrea2/meurer1/dream_grids/ICON-DREAM-EU_grid.nc --localgrid /p/scratch/detectrea2/meurer1/TSMP2_workflow-engine/dta/geo/icon/static/europe011_DOM01.nc --account detectrea2 ``` *(Replace directories and options accordingly.)* From e33e3a4328b18407ca7d8f111ee91211d1fb2cc2 Mon Sep 17 00:00:00 2001 From: pmeurer Date: Tue, 2 Jun 2026 13:41:17 +0200 Subject: [PATCH 11/11] Add files via upload --- mkforcing_dream/jsc.2024_Intel.sh | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 mkforcing_dream/jsc.2024_Intel.sh diff --git a/mkforcing_dream/jsc.2024_Intel.sh b/mkforcing_dream/jsc.2024_Intel.sh new file mode 100644 index 0000000..0d8d69d --- /dev/null +++ b/mkforcing_dream/jsc.2024_Intel.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +# Load modules +module --force purge +module use $OTHERSTAGES +module load Stages/2024 +module load Intel/2023.2.1 +module load ParaStationMPI/5.9.2-1 +module load ESMF/8.5.0 +# +module load Hypre/2.29.0 +module load Silo/4.11 +module load Tcl/8.6.13 +# +module load ecCodes/2.31.0 +module load netCDF/4.9.2 +module load netCDF-Fortran/4.6.1 +module load PnetCDF/1.12.3 +module load cURL/8.0.1 +module load Perl/5.36.1 +module load Python/3.11.3 +module load NCO/5.1.8 +module load CDO/2.3.0 +module load CMake/3.26.3 +module load UnZip/6.0 +# +module load xarray/2023.8.0 +module load dask/2023.9.2 +module li + +# Export LIB- and INC-NETCDF +export LIB_NETCDF=${EBROOTNETCDFMINFORTRAN}/lib +export INC_NETCDF=${EBROOTNETCDFMINFORTRAN}/include +