Commit a5cbdbb 1 parent 9c1fef7 commit a5cbdbb Copy full SHA for a5cbdbb
File tree 4 files changed +13
-12
lines changed
4 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ FluxCalculator.get_surface_params(sim::ClimaAtmosSimulation) = CAP.surface_fluxe
298
298
get_atmos_config_dict(coupler_dict::Dict)
299
299
300
300
Returns the specified atmospheric configuration (`atmos_config`) overwitten by arguments
301
- in the coupler dictionary (`config_dict`). The returned dictionary will then be passed to CA.AtmosConfig().
301
+ in the coupler dictionary (`config_dict`). The returned `atmos_config` dictionary will then be passed to CA.AtmosConfig().
302
302
The `atmos_config_repo` flag allows us to
303
303
use a configuration specified within the ClimaCoupler repo, which is useful for direct
304
304
coupled/atmos-only comparisons.
@@ -351,14 +351,18 @@ function get_atmos_config_dict(coupler_dict)
351
351
joinpath (coupler_dict[" mode_name" ], coupler_dict[" run_name" ]),
352
352
" clima_atmos" ,
353
353
)
354
+
355
+ # merge configs
356
+ # (if there are common keys, the last dictionary in the `merge` arguments takes precedence)
354
357
atmos_config = merge (atmos_config, Dict (" output_dir" => atmos_output_dir))
358
+ coupler_config = merge (config_dict_atmos, config_dict)
355
359
356
360
# set restart file to the initial file saved in this location if it is not nothing
357
361
# TODO this is hardcoded and should be fixed once we have a better restart system
358
362
if ! isnothing (atmos_config[" restart_file" ])
359
363
atmos_config[" restart_file" ] = replace (atmos_config[" restart_file" ], " active" => " 0000" )
360
364
end
361
- return atmos_config
365
+ return atmos_config, coupler_config
362
366
end
363
367
364
368
Original file line number Diff line number Diff line change @@ -99,16 +99,13 @@ if isinteractive()
99
99
parsed_args[" config_file" ]
100
100
end
101
101
102
- # # read in config dictionary from file, overriding the coupler defaults
103
- # # (if there are common keys, the last dictionary in the `merge` arguments takes precedence)
102
+ # # read in config dictionary from file, overriding the coupler defaults in `parsed_args`
104
103
config_dict = YAML. load_file (parsed_args[" config_file" ])
105
104
config_dict = merge (parsed_args, config_dict)
106
105
107
106
# # get component model dictionaries (if applicable)
108
- config_dict = get_atmos_config_dict (config_dict)
109
-
110
- # # merge dictionaries of command line arguments, coupler dictionary and component model dictionaries
111
- atmos_config_object = CA. AtmosConfig (config_dict)
107
+ atmos_config_dict, config_dict = get_atmos_config_dict (config_dict)
108
+ atmos_config_object = CA. AtmosConfig (atmos_config_dict)
112
109
113
110
# # read in some parsed command line arguments, required by this script
114
111
mode_name = config_dict[" mode_name" ]
Original file line number Diff line number Diff line change @@ -118,8 +118,8 @@ config_dict = Dict(
118
118
)
119
119
120
120
# # merge dictionaries of command line arguments, coupler dictionary and component model dictionaries
121
- config_dict = get_atmos_config_dict (config_dict)
122
- atmos_config_object = CA. AtmosConfig (config_dict )
121
+ atmos_config_dict, config_dict = get_atmos_config_dict (config_dict)
122
+ atmos_config_object = CA. AtmosConfig (atmos_config_dict )
123
123
124
124
#=
125
125
## Setup Communication Context
Original file line number Diff line number Diff line change @@ -135,8 +135,8 @@ config_dict = Dict(
135
135
# TODO : need to change moist HS params?
136
136
137
137
# # merge dictionaries of command line arguments, coupler dictionary and component model dictionaries
138
- config_dict = get_atmos_config_dict (config_dict)
139
- atmos_config_object = CA. AtmosConfig (config_dict )
138
+ atmos_config_dict, config_dict = get_atmos_config_dict (config_dict)
139
+ atmos_config_object = CA. AtmosConfig (atmos_config_dict )
140
140
141
141
#=
142
142
## Setup Communication Context
You can’t perform that action at this time.
0 commit comments