-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec03d4e
commit cd56320
Showing
13 changed files
with
187 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import YAML | ||
|
||
""" | ||
AtmosCoveragePerfConfig() | ||
AtmosCoveragePerfConfig(; config_dict) | ||
Creates a model configuration that covers many physics components. | ||
The configuration precedence is as follows: | ||
1. Configuration from the given config file/dict (highest precedence) | ||
2. Default perf configuration (to increase coverage) | ||
3. Default configuration (lowest precedence) | ||
There is an exception for the job `flame_perf_target_edmf`, which requires | ||
`precip_model` and `rad` to be `nothing` and `apply_limiter` to be `false`. | ||
""" | ||
function AtmosCoveragePerfConfig(; config_dict = CA.default_config_dict()) | ||
perf_default_config = perf_config_dict() | ||
config_dict = merge(config_dict, perf_default_config) | ||
if get(config_dict, "job_id", "") == "flame_perf_target_edmf" | ||
config_dict["precip_model"] = nothing | ||
config_dict["rad"] = nothing | ||
config_dict["apply_limiter"] = false | ||
@show config_dict["job_id"] | ||
end | ||
@show config_dict | ||
return CA.AtmosConfig(config_dict) | ||
end | ||
|
||
""" | ||
TargetJobConfig(target_job) | ||
Creates a full model configuration from the given target job. | ||
""" | ||
TargetJobConfig(target_job) = | ||
CA.AtmosConfig(CA.config_from_target_job(target_job)) | ||
|
||
|
||
""" | ||
perf_config_dict() | ||
Loads the default performance configuration from a file into a Dict. | ||
""" | ||
function perf_config_dict() | ||
perf_defaults = joinpath( | ||
dirname(@__FILE__), | ||
"..", | ||
"config", | ||
"default_configs", | ||
"default_perf.yml", | ||
) | ||
return YAML.load_file(perf_defaults) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.