esm-tools / esm_tools

Simple Infrastructure for Earth System Simulations
https://esm-tools.github.io/
GNU General Public License v2.0
26 stars 12 forks source link

ESM-TOOLS LPJ-GUESS setup #1244

Open hajlaci opened 4 days ago

hajlaci commented 4 days ago

Hi Miguell

We are trying to set up with JAN the AWI-ESM3-v3.4 with LPJ-GUESS (feat/awiesm3-v3.4 branch) and encountering difficulties during the build. We configured (changed) the yaml files (awiesm3.yaml and lpj_guess.yaml) and during the master command we are getting the following error message:

"Traceback (most recent call last): File "/home/a/a270270/.local/bin/esm_master", line 33, in sys.exit(load_entry_point('esm-tools', 'console_scripts', 'esm_master')()) File "/home/a/a270270/esm_tools/src/esm_master/cli.py", line 113, in main main_flow(parsed_args, target) File "/home/a/a270270/esm_tools/src/esm_master/esm_master.py", line 55, in main_flow complete_setup = SimulationSetup(user_config=user_config) File "/home/a/a270270/esm_tools/src/esm_runscripts/sim_objects.py", line 107, in init self.config = prepare.run_job(self.config) File "/home/a/a270270/esm_tools/src/esm_runscripts/prepare.py", line 19, in run_job helpers.evaluate(config, "prepare", "prepare_recipe") File "/home/a/a270270/esm_tools/src/esm_runscripts/helpers.py", line 71, in evaluate config = esm_plugin_manager.work_through_recipe( File "/home/a/a270270/esm_tools/src/esm_plugin_manager/esm_plugin_manager.py", line 159, in work_through_recipe config = getattr(submodule, workitem)(config) File "/home/a/a270270/esm_tools/src/esm_runscripts/prepare.py", line 835, in initialize_coupler config["general"]["coupler"].add_files(config) File "/home/a/a270270/esm_tools/src/esm_runscripts/coupler.py", line 138, in add_files rgrid_info = full_config[model]["grids"][ KeyError: 'grids'"

Regards, Laszlo

mandresm commented 4 days ago

Try defining grids as in here:

https://github.com/esm-tools/esm_tools/blob/595f0b4b1f01dbc9fa7b7a33a9154e1bd3ce1a1d/configs/components/fesom/fesom-2.6.yaml#L616-L624

Any component that is going to be coupled needs to have a grid description.

If that works I will add that to the documentation, I'll make a better error message and I will also add it to the template yaml of components.

JanStreffing commented 4 days ago

Some additional info: LPJG is running on the exact same grid as oifs. We want to reuse atma, which is defined into oifs.yaml. Is that possible?

mandresm commented 4 days ago

It should be possible. Try:

add_grids: ${oifs.grids.atma}

If that doesn't work, I need to refresh my memory on ESM-Tools parser.

If it works it will break standalone lines because it cannot find oifs data. To prevent that you'll need to add something like:

choose_standalone:
    False:
        add_grids: ${oifs.grids.atma}
mandresm commented 4 days ago

I've edited the entry above, the grids where missing in ${oifs.grids.atma}

JanStreffing commented 4 days ago

Can be added in LPJ-Guess section of awiesm3.yaml, then we don't need the choose_standalone, right?

mandresm commented 4 days ago

that is correct

hajlaci commented 3 days ago

Thanks for the help. It worked!

mandresm commented 3 days ago

It still needs the error handling, so I am reopening the issue :)