-
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
4f8a838
commit e2fc12b
Showing
13 changed files
with
50 additions
and
44 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
Binary file removed
BIN
-850 KB
calibration/experiments/sphere_held_suarez_rhoe_equilmoist/day200.0.hdf5
Binary file not shown.
4 changes: 2 additions & 2 deletions
4
calibration/experiments/sphere_held_suarez_rhoe_equilmoist/experiment_config.yml
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
prior: prior.toml | ||
ensemble_size: 10 | ||
n_iterations: 2 | ||
observations: obs_mean.jld2 | ||
noise: obs_noise_cov.jld2 | ||
observations: /groups/esm/ClimaArtifacts/artifacts/atmos_held_suarez_obs/obs_mean.jld2 | ||
noise: /groups/esm/ClimaArtifacts/artifacts/atmos_held_suarez_obs/obs_noise_cov.jld2 | ||
output_dir: output/sphere_held_suarez_rhoe_equilmoist |
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
Binary file removed
BIN
-800 Bytes
calibration/experiments/sphere_held_suarez_rhoe_equilmoist/obs_mean.jld2
Binary file not shown.
Binary file removed
BIN
-808 Bytes
calibration/experiments/sphere_held_suarez_rhoe_equilmoist/obs_noise_cov.jld2
Binary file not shown.
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 |
---|---|---|
@@ -1,39 +1,24 @@ | ||
# Tests for ensuring that the calibration/model interface sets AtmosConfig correctly. | ||
|
||
# To run: julia --project=calibration/experiments/sphere_held_suarez_rhoe_equilmoist test/calibration_interface.jl | ||
import ClimaCalibrate | ||
using Test | ||
|
||
experiment_id = "sphere_held_suarez_rhoe_equilmoist" | ||
experiment_dir = dirname(Base.active_project()) | ||
include(joinpath("..", "calibration", "model_interface.jl")) | ||
|
||
member_path = joinpath("test_output", "iteration_001", "member_001") | ||
member_path = joinpath("output", "sphere_held_suarez_rhoe_equilmoist", "iteration_001", "member_001") | ||
file_path = joinpath(member_path, "parameters.toml") | ||
mkpath(dirname(file_path)) | ||
touch(file_path) | ||
|
||
config_dict = Dict{Any, Any}( | ||
"restart_file" => joinpath( | ||
"..", | ||
"calibration", | ||
"experiments", | ||
"sphere_held_suarez_rhoe_equilmoist", | ||
"day200.0.hdf5", | ||
), | ||
"dt_save_to_disk" => "100days", | ||
"moist" => "equil", | ||
"forcing" => "held_suarez", | ||
"output_dir" => "test_output", | ||
) | ||
|
||
physical_model = ClimaCalibrate.get_forward_model(Val(Symbol(experiment_id))) | ||
atmos_config = ClimaCalibrate.get_config(physical_model, 1, 1, config_dict) | ||
atmos_config = ClimaCalibrate.set_up_forward_model(1, 1, experiment_dir) | ||
(; parsed_args) = atmos_config | ||
|
||
@testset "Atmos Configuration" begin | ||
@test parsed_args["moist"] == "equil" | ||
@test parsed_args["toml"] == [file_path] | ||
@test parsed_args["output_dir"] == member_path | ||
@test parsed_args["restart_file"] == config_dict["restart_file"] | ||
@test parsed_args["restart_file"] == "/groups/esm/ClimaArtifacts/artifacts/atmos_held_suarez_obs/day200.0.hdf5" | ||
end | ||
|
||
rm(file_path) |