Skip to content

Conversation

@seb-wahl
Copy link
Contributor

This merge request has the following changes. I started by merging v6.54.5 into geomar_dev:

  • adjusted all the yaml files after the removal of the environment_changes stuff.
  • allow more flexibility in echam when it comes to restarts: the output streams and restart streams can now differ. I defined the default output streams to match the restart streams. Removes a lot of confusing warnings for our setups
  • fixed a bug with a dr_hook_...* var not found anymore after the removal of the environment_changes stuff.
  • remove deprecated env var declarations that caused a lot of warnings
  • updated slurm.yaml to allow for the usage of mpirun (which we currently need on glogin), please check but I can't see any problems merging this
  • included our modifications to oasis.py. This needs to be reviewed carefully. Please see my comments in oasis.py.
  • includes foci-mops_lmu, a setup that includes an updated version of JSBACH 3.20p1 used and LMU Munich and now in Kiel within the RESCUE project. It allows to simulate carbon dioxide removal methods in JSBACH using a 12th tile. This means I had to make the static 11 tiles in jsbach.yaml a variable ${tiles}

Known bugs:

  • a -finished_config.yaml remains in the directory where I run esm_master and I get the following "error" message:
Build command finished on Wed May 14 08:37:43 2025.
/mnt/vast-nhr/home/sebastian.wahl01/u11179/esm/models/test/foci-mops_lmu/nemo-ORCA05_LIM2_FOCI_MOPS_OASISMCT4/CONFIG
/mnt/vast-nhr/home/sebastian.wahl01/u11179/esm/models/test/foci-mops_lmu
Problems moving ``./foci-mops_lmu-finished_config.yaml`` to ``./foci-mops_lmu/finished_config.yaml``
(esm-tools) [shk00060] u11179@glogin6 test $ ls
-finished_config.yaml  foci-mops_lmu

seb-wahl and others added 30 commits December 10, 2024 12:17
compiles and starts, but misses (as expected) information in existing
JSBACH restart files. Cold start not yet implemented
links all currently known files correctly
running not yet tested as info from Shradda is still missing
draft version of ECHAM76-LMU that start up correctly
but still fails due to land sea mask mismatch
fixed restart setup in a hacky way (see foci.yaml)
added a new runscript for FOCIOIFS
This should be the only difference between geomar_dev and release that matters
allow different streams for restart and output for ECHAM and JSBACH
with FOCI-MOPS with the 12 tile edition
merge geomar dev into geomar branch
separate echam6 namlist templates for foci and foci_lmu
before merging this branch into geomar_dev
differences where too large for an efficient direct merge
see runscripts/foci/README_important.txt for details
add temraw output for SOLVe project in foci-moz
compiling, running and restart now work
added missing coupling dir for foci-moz
… to CMakeLists.txt)

XIOS still failing
fixed RESCUE postprocessing by adding the mandatory new option -l and -a to
echam_postprocessing_RESCUE.sh that came in when MOZ was added
Copy link
Contributor

@mandresm mandresm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seb-wahl, as mentioned in our in-person meeting, I finished this review even if this is not meant to be merged in release so that we can use some of this comments as a basis for the PR og geomar branch into release.

active: ${lcarbon}

choose_jsbach_with_hd:
yes:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to change this to true/false? Just to remain consistent to all of our other switches that normally use booleans.

Comment on lines +502 to +509
choose_icon.version:
2.6.6-nwp:
input_dir: /pool/data/ICON
icon_pool: ${input_dir}/grids/private/mpim/icon_preprocessing/source
grid_dir: ${input_dir}/grids
aerosol_dir: ${icon_pool}/aerosol_29-06-2018/kinne/${resolution}_${icon.grid_label}
jsbach_ic_dir: ${input_dir}/grids/private/jsbach/mpim/${grid_id}/land/r0002
jsbach_forcing_dir: ${jsbach_ic_dir}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move most of this block into the icon section itself, instead of keeping it inside computer. The only parameter that seems computer-dependent is input_dir and that could probably be made independent by making it be:

    input_dir: ${computer.pool_dir}/ICON

destination: oifs-48r1
with_xios: false
major_version: 48r1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Comment on lines +1319 to +1322
uwavein: uwavein
specwavein: specwavein
sfcwindin: sfcwindin
cdwavein: cdwavein
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uwavein: uwavein
specwavein: specwavein
sfcwindin: sfcwindin
cdwavein: cdwavein

These files shouldn't be needed here as they are added when wam is turned on:

choose_wam:
1:
wam_number: "1"
add_input_files:
wam_grid_tables: wam_grid_tables
wam_subgrid_0: wam_subgrid_0
wam_subgrid_1: wam_subgrid_1
wam_subgrid_2: wam_subgrid_2
uwavein: uwavein
specwavein: specwavein
sfcwindin: sfcwindin
cdwavein: cdwavein

OIFS_CFLAGS: '"-fp-model precise -O3 -g -traceback -qopt-report=0 -fpe0 -qopenmp -march=core-avx2 -mtune=core-avx2"' # -qoverride-limits -fast-transcendentals -m64 -fma -pc64"'
OIFS_CCDEFS: '"LINUX LITTLE INTEGER_IS_INT _ABI64 BLAS _OPENMP"'
choose_compiler_mpi:
intel2022_openmpi:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check that this does not break anything for AWICM3 (in the esm_tests in GitHub)

Comment on lines +163 to +171
# due to duplicate namelists (occur with ICON) we get an
# IndexError: list index out of range
# workaround by seb-wahl
# TODO: find a better solution
provenance_comment = f"no provenance info"
if 0 <= indx < len(config):
provenance = getattr(config[indx], "provenance", [None])[-1]
if provenance:
provenance_comment = f"{provenance['yaml_file']},line:{provenance['line']},col:{provenance['col']}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to debug this, there might be a way of getting rid of this problem. It's strange that this does not happen for ECHAM

Comment on lines +359 to +389
# Search for ``post_run_commands``s in the components
for component in config.keys():
post_run_commands = config[component].get("post_run_commands")
if isinstance(post_run_commands, list):
for pr_command in post_run_commands:
if isinstance(pr_command, str):
extras.append(pr_command)
else:
user_error(
'Invalid type for "post_run_commands"',
(
f'"{type(pr_command)}" type is not supported for '
+ f'elements of the "post_run_commands", defined in '
+ f'"{component}". Please, define '
+ '"post_run_commands" as a "list" of "strings" or a "list".'
),
)
elif isinstance(post_run_commands, str):
extras.append(post_run_commands)
elif post_run_commands == None:
continue
else:
user_error(
'Invalid type for "post_run_commands"',
(
f'"{type(post_run_commands)}" type is not supported for '
+ f'"post_run_commands" defined in "{component}". Please, define '
+ '"post_run_commands" as a "string" or a "list" of "strings".'
),
)
return extras
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Search for ``post_run_commands``s in the components
for component in config.keys():
post_run_commands = config[component].get("post_run_commands")
if isinstance(post_run_commands, list):
for pr_command in post_run_commands:
if isinstance(pr_command, str):
extras.append(pr_command)
else:
user_error(
'Invalid type for "post_run_commands"',
(
f'"{type(pr_command)}" type is not supported for '
+ f'elements of the "post_run_commands", defined in '
+ f'"{component}". Please, define '
+ '"post_run_commands" as a "list" of "strings" or a "list".'
),
)
elif isinstance(post_run_commands, str):
extras.append(post_run_commands)
elif post_run_commands == None:
continue
else:
user_error(
'Invalid type for "post_run_commands"',
(
f'"{type(post_run_commands)}" type is not supported for '
+ f'"post_run_commands" defined in "{component}". Please, define '
+ '"post_run_commands" as a "string" or a "list" of "strings".'
),
)
return extras
# Search for ``post_run_commands``s in the components
for component in config.keys():
post_run_commands = config[component].get("post_run_commands")
if isinstance(post_run_commands, str):
post_run_commands = [post_run_commands]
elif isinstance(post_run_commands, list):
pass
elif post_run_commands == None:
continue
else:
user_error(
'Invalid type for "post_run_commands"',
(
f'"{type(post_run_commands)}" type is not supported for '
+ f'"post_run_commands" defined in "{component}". Please, define '
+ '"post_run_commands" as a "string" or a "list" of "strings".'
),
)
for pr_command in post_run_commands:
if isinstance(pr_command, str):
extras.append(pr_command)
else:
user_error(
'Invalid type for "post_run_commands"',
(
f'"{type(pr_command)}" type is not supported for '
+ f'elements of the "post_run_commands", defined in '
+ f'"{component}". Please, define '
+ '"post_run_commands" as a "list" of "strings" or a "list".'
),
)
return extras

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO for @mandresm: make it the same for pre_run_commands and generalize it in a single function that can be called both for pre and post run.

]["next_submit"]

# extra entries for each subjob
post_run_commands = batch_system.get_post_run_commands(config)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
post_run_commands = batch_system.get_post_run_commands(config)
post_run_commands = batch_system.get_commands(config, "post_run_commands")

TODO for @mandresm: change it to something like this.

Comment on lines +15 to +30
self.process_ordering = full_config[name]["process_ordering"]
self.coupled_execs = []
for exe in self.process_ordering:
self.coupled_execs.append(full_config[exe]["executable"])
self.runtime = full_config["general"]["runtime"][5]
self.nb_of_couplings = 0
if "coupling_target_fields" in full_config[self.name]:
for restart_file in list(full_config[self.name]["coupling_target_fields"]):
self.nb_of_couplings += len(
list(full_config[self.name]["coupling_target_fields"][restart_file])
)
if "coupling_input_fields" in full_config[self.name]:
for restart_file in list(full_config[self.name]["coupling_input_fields"]):
self.nb_of_couplings += len(
list(full_config[self.name]["coupling_input_fields"])
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO for @mandresm: if this belongs exclusively to oasis, move it to the oasis.py

if coupler_name == "yac":
couplingfile = "coupling.xml"
else:
couplingfile = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO @mandresm: check for attributes in self. If none, then just return (make it oasis independend)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants