Skip to content

Commit

Permalink
Work on cosmo job/config
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaehn committed Sep 27, 2023
1 parent 4d32998 commit 23126d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
11 changes: 5 additions & 6 deletions cases/cosmo-ghg-11km-test/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions jobs/cosmo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 23126d5

Please sign in to comment.