Skip to content

Commit 577da15

Browse files
authored
Make case optional for mvm diags (#524)
1 parent fc6fa66 commit 577da15

File tree

4 files changed

+21
-9
lines changed

4 files changed

+21
-9
lines changed

tests/integration/generated/test_complete_run_chrysalis.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ years = "1850:1854:2", "1850:1854:4",
9393
walltime = "5:00:00"
9494

9595
[[ atm_monthly_180x360_aave_environment_commands ]]
96-
environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20230914"
96+
environment_commands = "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20231027v2"
9797
sets = "qbo",
9898
ts_subsection = "atm_monthly_180x360_aave"
9999

tests/integration/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def get_chyrsalis_expansions(config):
134134
"bundles_walltime": "07:00:00",
135135
"constraint": "",
136136
# To run this test, replace conda environment with your e3sm_diags dev environment
137-
"diags_environment_commands": "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20230914",
137+
"diags_environment_commands": "source /home/ac.forsyth2/miniconda3/etc/profile.d/conda.sh; conda activate e3sm_diags_20231027v2",
138138
"diags_walltime": "5:00:00",
139139
"environment_commands_test": "source /lcrc/soft/climate/e3sm-unified/test_e3sm_unified_1.9.0rc16_chrysalis.sh",
140140
"expected_dir": "/lcrc/group/e3sm/public_html/zppy_test_resources/",

zppy/templates/default.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ dc_obs_climo = string(default="")
124124
# See https://e3sm-project.github.io/e3sm_diags/_build/html/master/available-parameters.html
125125
# Required for run_type="model_vs_model"
126126
diff_title = string(default="Model - Observations")
127+
# Set this to False if the E3SM Diags model-vs-model output path should exclude the case name.
128+
keep_mvm_case_name_in_fig = boolean(default=True)
127129
# See https://e3sm-project.github.io/e3sm_diags/_build/html/master/available-parameters.html
128130
# Required for run_type="model_vs_model" "streamflow" runs
129131
gauges_path = string(default="")

zppy/templates/e3sm_diags.bash

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,16 @@ create_links_ts_rof ${ts_rof_dir_source} ${ts_rof_dir_ref} ${ref_Y1} ${ref_Y2} 8
203203
{%- endif %}
204204
{%- endif %}
205205

206+
{% if run_type == "model_vs_obs" %}
207+
ref_name={{ ref_name }}
208+
{%- endif %}
209+
{% if (run_type == "model_vs_model") and keep_mvm_case_name_in_fig %}
210+
ref_name={{ ref_name }}
211+
{%- endif %}
212+
{% if (run_type == "model_vs_model") and not keep_mvm_case_name_in_fig %}
213+
ref_name=""
214+
{%- endif %}
215+
206216
# Run E3SM Diags
207217
echo
208218
echo ===== RUN E3SM DIAGS =====
@@ -260,7 +270,7 @@ param.reference_data_path = '{{ reference_data_path }}'
260270
{% elif run_type == "model_vs_model" %}
261271
# Reference
262272
param.reference_data_path = '${climo_dir_ref}'
263-
param.ref_name = '{{ ref_name }}'
273+
param.ref_name = '${ref_name}'
264274
param.short_ref_name = '{{ short_ref_name }}'
265275
# Optionally, swap test and reference model
266276
if {{ swap_test_ref }}:
@@ -297,7 +307,7 @@ enso_param.ref_end_yr = ref_start_yr + 10
297307
{% elif run_type == "model_vs_model" %}
298308
# Reference
299309
enso_param.reference_data_path = '${ts_dir_ref}'
300-
enso_param.ref_name = '{{ ref_name }}'
310+
enso_param.ref_name = '${ref_name}'
301311
enso_param.short_ref_name = '{{ short_ref_name }}'
302312
enso_param.ref_start_yr = '{{ ref_start_yr }}'
303313
enso_param.ref_end_yr = '{{ ref_final_yr }}'
@@ -329,7 +339,7 @@ qbo_param.reference_data_path = '{{ obs_ts }}'
329339
{% elif run_type == "model_vs_model" %}
330340
# Reference
331341
qbo_param.reference_data_path = '${ts_dir_ref}'
332-
qbo_param.ref_name = '{{ ref_name }}'
342+
qbo_param.ref_name = '${ref_name}'
333343
qbo_param.short_ref_name = '{{ short_ref_name }}'
334344
# Optionally, swap test and reference model
335345
if {{ swap_test_ref }}:
@@ -353,7 +363,7 @@ ts_param.reference_data_path = '{{ obs_ts }}'
353363
{% elif run_type == "model_vs_model" %}
354364
# Reference
355365
ts_param.reference_data_path = '${ts_dir_ref}'
356-
ts_param.ref_name = '{{ ref_name }}'
366+
ts_param.ref_name = '${ref_name}'
357367
ts_param.short_ref_name = '{{ short_ref_name }}'
358368
# Optionally, swap test and reference model
359369
if {{ swap_test_ref }}:
@@ -376,7 +386,7 @@ dc_param.reference_data_path = '{{ dc_obs_climo }}'
376386
{% elif run_type == "model_vs_model" %}
377387
# Reference
378388
dc_param.reference_data_path = '${climo_diurnal_dir_ref}'
379-
dc_param.ref_name = '{{ ref_name }}'
389+
dc_param.ref_name = '${ref_name}'
380390
dc_param.short_ref_name = '{{ short_ref_name }}'
381391
# Optionally, swap test and reference model
382392
if {{ swap_test_ref }}:
@@ -402,7 +412,7 @@ streamflow_param.ref_end_yr = "1995"
402412
{% elif run_type == "model_vs_model" %}
403413
# Reference
404414
streamflow_param.reference_data_path = '${ts_rof_dir_ref}'
405-
streamflow_param.ref_name = '{{ ref_name }}'
415+
streamflow_param.ref_name = '${ref_name}'
406416
streamflow_param.short_ref_name = '{{ short_ref_name }}'
407417
streamflow_param.ref_start_yr = '{{ ref_start_yr }}'
408418
streamflow_param.ref_end_yr = '{{ ref_final_yr }}'
@@ -432,7 +442,7 @@ tc_param.ref_end_yr = "2018"
432442
{% elif run_type == "model_vs_model" %}
433443
# Reference
434444
tc_param.reference_data_path = '{{ reference_data_path_tc }}'
435-
tc_param.ref_name = '{{ ref_name }}'
445+
tc_param.ref_name = '${ref_name}'
436446
tc_param.short_ref_name = '{{ short_ref_name }}'
437447
tc_param.ref_start_yr = '{{ ref_start_yr }}'
438448
tc_param.ref_end_yr = '{{ ref_final_yr }}'

0 commit comments

Comments
 (0)