Skip to content

Commit a9095b5

Browse files
author
Lenka Novakova
committed
configs
1 parent 65f84d0 commit a9095b5

File tree

3 files changed

+27
-7
lines changed

3 files changed

+27
-7
lines changed

experiments/ClimaEarth/components/atmosphere/climaatmos.jl

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ function hasmoisture(integrator)
2929
return !(integrator.p.atmos.moisture_model isa CA.DryModel)
3030
end
3131

32-
function atmos_init(::Type{FT}, atmos_config_dict::Dict) where {FT}
32+
function atmos_init(::Type{FT}, atmos_config) where {FT}
3333
# By passing `parsed_args` to `AtmosConfig`, `parsed_args` overwrites the default atmos config
34-
atmos_config = CA.AtmosConfig(atmos_config_dict)
3534
simulation = CA.get_simulation(atmos_config)
3635
(; integrator) = simulation
3736
Y = integrator.u

experiments/ClimaEarth/run_amip.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ config_dict = merge(parsed_args, config_dict)
105105

106106
## get component model dictionaries (if applicable)
107107
config_dict_atmos = get_atmos_config_dict(config_dict)
108+
atmos_config_object = CA.AtmosConfig(config_dict_atmos)
108109

109110
## merge dictionaries of command line arguments, coupler dictionary and component model dictionaries
110111
## (if there are common keys, the last dictionary in the `merge` arguments takes precedence)
@@ -182,7 +183,7 @@ This uses the `ClimaAtmos.jl` model, with parameterization options specified in
182183
Utilities.show_memory_usage(comms_ctx)
183184

184185
## init atmos model component
185-
atmos_sim = atmos_init(FT, config_dict_atmos);
186+
atmos_sim = atmos_init(FT, atmos_config_object);
186187
Utilities.show_memory_usage(comms_ctx)
187188

188189
thermo_params = get_thermo_params(atmos_sim) # TODO: this should be shared by all models #610

experiments/ClimaEarth/run_dry_held_suarez.jl

+24-4
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ config_dict = Dict(
8484
"coupler_output_dir" => coupler_output_dir,
8585
"mode_name" => "",
8686
"run_name" => run_name,
87+
"atmos_config_repo" => "ClimaAtmos",
8788
# timestepping
8889
"dt" => "$(Δt_cpl)secs",
8990
"dt_save_to_sol" => "1days",
@@ -109,7 +110,27 @@ config_dict = Dict(
109110
"surface_setup" => "PrescribedSurface",
110111
# diagnostic (nested wirh period and short_name)
111112
"output_default_diagnostics" => false,
112-
"diagnostics" => [Dict("short_name" => ["mse", "lr", "mass_streamfunction", "stab", "vT", "egr", "ua", "va", "wa", "ta", "rhoa", "pfull", "stab"], "period" => "1days", "reduction" => "inst"),],
113+
"diagnostics" => [
114+
Dict(
115+
"short_name" => [
116+
"mse",
117+
"lr",
118+
"mass_strf",
119+
"stab",
120+
"vt",
121+
"egr",
122+
"ua",
123+
"va",
124+
"wa",
125+
"ta",
126+
"rhoa",
127+
"pfull",
128+
"stab",
129+
],
130+
"period" => "1days",
131+
"reduction" => "inst",
132+
),
133+
],
113134
# held-suarez specific
114135
"forcing" => "held_suarez",
115136
)
@@ -239,8 +260,7 @@ checkpoint_cb =
239260
HourlyCallback(dt = FT(480), func = checkpoint_sims, ref_date = [dates.date[1]], active = hourly_checkpoint) # 20 days TODO: not GPU friendly
240261
update_firstdayofmonth!_cb =
241262
MonthlyCallback(dt = FT(1), func = update_firstdayofmonth!, ref_date = [dates.date1[1]], active = true)
242-
callbacks =
243-
(; checkpoint = checkpoint_cb, update_firstdayofmonth! = update_firstdayofmonth!_cb)
263+
callbacks = (; checkpoint = checkpoint_cb, update_firstdayofmonth! = update_firstdayofmonth!_cb)
244264

245265
coupler_online_diagnostics = ()
246266

@@ -323,4 +343,4 @@ solve_coupler!(cs);
323343
# Postprocessing
324344
anim = true
325345
energy_check = false
326-
# include("postprocessing.jl")
346+
# include("postprocessing.jl")

0 commit comments

Comments
 (0)