Skip to content

Commit 44e05c4

Browse files
authored
Merge pull request #1353 from CliMA/kp/pipeline
Fix bug with observation map in calibration
2 parents 7f41020 + 728ad5e commit 44e05c4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

experiments/calibration/observation_map.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ include(
99
using CairoMakie, GeoMakie, Printf, StatsBase
1010
import ClimaLand.LandSimVis as LandSimVis
1111

12+
# Need access to get_era5_obs_var_dict and get_sim_var_dict
13+
ext = Base.get_extension(ClimaLand, :LandSimulationVisualizationExt)
1214
"""
1315
ClimaCalibrate.observation_map(iteration)
1416
@@ -67,14 +69,14 @@ function process_member_data(
6769
sample_date_ranges = CALIBRATE_CONFIG.sample_date_ranges
6870
nelements = CALIBRATE_CONFIG.nelements
6971
@info "Short names: $short_names"
70-
era5_obs_vars = LandSimVis.get_era5_obs_var_dict()
72+
era5_obs_vars = ext.get_era5_obs_var_dict()
7173
for short_name in short_names
7274
short_name in keys(era5_obs_vars) || error(
7375
"Variable $short_name does not appear in the observation dataset. Add the variable to get_era5_obs_var_dict",
7476
)
7577
end
7678

77-
sim_var_dict = LandSimVis.get_sim_var_dict(diagnostics_folder_path)
79+
sim_var_dict = ext.get_sim_var_dict(diagnostics_folder_path)
7880
vars = map(short_names) do short_name
7981
var = sim_var_dict[short_name]()
8082
var = ClimaAnalysis.average_season_across_time(var, ignore_nan = false)

0 commit comments

Comments
 (0)