Skip to content

Commit 0244635

Browse files
committed
fix atmos dt parsing
1 parent 0cf77cc commit 0244635

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

experiments/ClimaEarth/components/atmosphere/climaatmos.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,10 @@ function get_atmos_config_dict(coupler_dict::Dict, job_id::String, atmos_output_
453453

454454
# The Atmos `get_simulation` function expects the atmos config to contains its timestep size
455455
# in the `dt` field. If there is a `dt_atmos` field in coupler_dict, we add it to the atmos config as `dt`
456-
dt_atmos = haskey(coupler_dict, "dt_atmos") ? coupler_dict["dt_atmos"] : coupler_dict["dt"]
457-
atmos_config["dt"] = dt_atmos
456+
component_dt_dict = coupler_dict["component_dt_dict"]
457+
dt_atmos = haskey(component_dt_dict, "dt_atmos") ? component_dt_dict["dt_atmos"] : component_dt_dict["dt"]
458+
# convert from number of seconds to a string that atmos can parse
459+
atmos_config["dt"] = string(dt_atmos) * "secs"
458460

459461
# set restart file to the initial file saved in this location if it is not nothing
460462
# TODO this is hardcoded and should be fixed once we have a better restart system

0 commit comments

Comments
 (0)