From 23126d535ff071d9f76b94320b01848ccd3d38db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4hn?= Date: Wed, 27 Sep 2023 17:30:57 +0200 Subject: [PATCH] Work on cosmo job/config --- cases/cosmo-ghg-11km-test/config.yaml | 11 +++++------ jobs/cosmo.py | 6 +++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/cases/cosmo-ghg-11km-test/config.yaml b/cases/cosmo-ghg-11km-test/config.yaml index 38057a9d..dd573634 100644 --- a/cases/cosmo-ghg-11km-test/config.yaml +++ b/cases/cosmo-ghg-11km-test/config.yaml @@ -70,23 +70,22 @@ post_int2lm: - CO2_A2 cosmo: - bin: null # Set this value based on your use case - namelist: null # Set this value based on your use case - runjob: null # Set this value based on your use case + binary_file: ./src/cosmo-ghg/cosmo/ACC/cosmo_gpu + namelist_prefix: cosmo_INPUT_ + runjob_filename: cosmo_runjob.cfg walltime: "00:30:00" np_x: 6 np_y: 4 np_io: 0 -# POST-PROCESSING -# REDUCE_OUTPUT reduce_output: convert_gas: true output_levels: 20 -# POST_COSMO post_cosmo: output_root: null # Set this value based on your use case + +verify_chain: reference_dir: null # Set this value based on your use case output_dir: null # Set this value based on your use case values_to_check: diff --git a/jobs/cosmo.py b/jobs/cosmo.py index 3223c1f5..1cb03c42 100644 --- a/jobs/cosmo.py +++ b/jobs/cosmo.py @@ -142,7 +142,7 @@ def main(starttime, hstart, hstop, cfg, model_cfg): tools.create_dir(cfg.cosmo_restart_out, "cosmo_restart_out") # Copy cosmo executable - tools.copy_file(cfg.cosmo_bin, + tools.copy_file(cfg.cosmo['binary_file'], os.path.join(cfg.cosmo_work, cfg.cosmo['execname'])) # Prepare namelist and submit job @@ -162,7 +162,7 @@ def main(starttime, hstart, hstop, cfg, model_cfg): namelist_names += ['OAE'] for section in namelist_names: - with open(cfg.cosmo_namelist + section + ".cfg") as input_file: + with open(cfg.cosmo['namelist_prefix'] + section + ".cfg") as input_file: to_write = input_file.read() output_file = os.path.join(cfg.cosmo_work, "INPUT_" + section) @@ -190,7 +190,7 @@ def main(starttime, hstart, hstop, cfg, model_cfg): write_cosmo_input_ghg.main(tracer_csvfile, input_ghg_filename, cfg) # Write run script (run.job) - with open(cfg.cosmo_runjob) as input_file: + with open(cfg.cosmo['runjob_filename']) as input_file: to_write = input_file.read() output_file = os.path.join(cfg.cosmo_work, "run.job")