Skip to content

Commit

Permalink
code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
chengzhuzhang authored and forsyth2 committed Feb 23, 2024
1 parent 48b9d19 commit 05cd22d
Showing 1 changed file with 2 additions and 33 deletions.
35 changes: 2 additions & 33 deletions zppy/templates/e3sm_diags.bash
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ param = CoreParameter()
{%- if ("lat_lon" in sets) or ("zonal_mean_xy" in sets) or ("zonal_mean_2d" in sets) or ("polar" in sets) or ("cosp_histogram" in sets) or ("meridional_mean_2d" in sets) or ("annual_cycle_zonal_mean" in sets) or ("zonal_mean_2d_stratosphere" in sets) %}
param.test_data_path = '${climo_dir_primary}'
{%- endif %}
param.test_name = '${case}'
param.short_test_name = short_name
# Ref
{%- if ("lat_lon" in sets) or ("zonal_mean_xy" in sets) or ("zonal_mean_2d" in sets) or ("polar" in sets) or ("cosp_histogram" in sets) or ("meridional_mean_2d" in sets) or ("annual_cycle_zonal_mean" in sets) or ("zonal_mean_2d_stratosphere" in sets) %}
Expand All @@ -300,39 +302,6 @@ if {{ swap_test_ref }}:
{%- endif %}
{%- endif %}
{%- if ("lat_lon" in sets) or ("zonal_mean_xy" in sets) or ("zonal_mean_2d" in sets) or ("polar" in sets) or ("cosp_histogram" in sets) or ("meridional_mean_2d" in sets) or ("annual_cycle_zonal_mean" in sets) or ("zonal_mean_2d_stratosphere" in sets) %}
{% if run_type == "model_vs_obs" %}
# Obs
param.reference_data_path = '{{ reference_data_path }}'
{% elif run_type == "model_vs_model" %}
# Reference
param.reference_data_path = '${climo_dir_ref}'
param.ref_name = '${ref_name}'
param.short_ref_name = '{{ short_ref_name }}'
# Optionally, swap test and reference model
if {{ swap_test_ref }}:
param.test_data_path, param.reference_data_path = param.reference_data_path, param.test_data_path
param.test_name, param.ref_name = param.ref_name, param.test_name
param.short_test_name, param.short_ref_name = param.short_ref_name, param.short_test_name
{%- endif %}
{%- endif %}
{%- if ("lat_lon" in sets) or ("zonal_mean_xy" in sets) or ("zonal_mean_2d" in sets) or ("polar" in sets) or ("cosp_histogram" in sets) or ("meridional_mean_2d" in sets) or ("annual_cycle_zonal_mean" in sets) or ("zonal_mean_2d_stratosphere" in sets) %}
{% if run_type == "model_vs_obs" %}
# Obs
param.reference_data_path = '{{ reference_data_path }}'
{% elif run_type == "model_vs_model" %}
# Reference
param.reference_data_path = '${climo_dir_ref}'
param.ref_name = '${ref_name}'
param.short_ref_name = '{{ short_ref_name }}'
# Optionally, swap test and reference model
if {{ swap_test_ref }}:
param.test_data_path, param.reference_data_path = param.reference_data_path, param.test_data_path
param.test_name, param.ref_name = param.ref_name, param.test_name
param.short_test_name, param.short_ref_name = param.short_ref_name, param.short_test_name
{%- endif %}
{%- endif %}
# Output dir
param.results_dir = '${results_dir}'
Expand Down

0 comments on commit 05cd22d

Please sign in to comment.