diff --git a/zppy/e3sm_diags.py b/zppy/e3sm_diags.py index b3b2f3dd..e911ac80 100644 --- a/zppy/e3sm_diags.py +++ b/zppy/e3sm_diags.py @@ -201,6 +201,7 @@ def e3sm_diags(config, scriptDir, existing_bundles, job_ids_file): # noqa: C901 ("enso_diags" in c["sets"]) or ("qbo" in c["sets"]) or ("area_mean_time_series" in c["sets"]) + or ("mp_partition" in c["sets"]) ): dependencies.append( os.path.join( diff --git a/zppy/templates/e3sm_diags.bash b/zppy/templates/e3sm_diags.bash index 9c16e0ad..1209c35a 100644 --- a/zppy/templates/e3sm_diags.bash +++ b/zppy/templates/e3sm_diags.bash @@ -190,7 +190,7 @@ create_links_climo_diurnal ${climo_diurnal_dir_source} ${climo_diurnal_dir_ref} {%- endif %} {%- endif %} -{%- if ("enso_diags" in sets) or ("qbo" in sets) or ("area_mean_time_series" in sets) %} +{%- if ("enso_diags" in sets) or ("qbo" in sets) or ("mp_partition" in sets) or ("area_mean_time_series" in sets) %} {% if run_type == "model_vs_obs" %} ts_dir_primary=ts {% elif run_type == "model_vs_model" %} @@ -206,6 +206,7 @@ create_links_ts ${ts_dir_source} ${ts_dir_ref} ${ref_Y1} ${ref_Y2} 6 {%- endif %} {%- endif %} + {%- if "streamflow" in sets %} {% if run_type == "model_vs_obs" %} ts_rof_dir_primary=rof @@ -262,6 +263,9 @@ from e3sm_diags.parameter.tc_analysis_parameter import TCAnalysisParameter {%- if "lat_lon_land" in sets %} from e3sm_diags.parameter.lat_lon_land_parameter import LatLonLandParameter {%- endif %} +{%- if "mp_partition" in sets %} +from e3sm_diags.parameter.mp_partition_parameter import MPpartitionParameter +{%- endif %} from e3sm_diags.run import runner @@ -417,6 +421,26 @@ if {{ swap_test_ref }}: params.append(ts_param) {%- endif %} +{%- if "mp_partition" in sets %} +mp_param = MPpartitionParameter() +mp_param.test_data_path = '${ts_dir_source}' +mp_param.test_name = short_name +mp_param.test_start_yr = start_yr +mp_param.test_end_yr = end_yr +{% if run_type == "model_vs_model" %} +# Reference +mp_param.reference_data_path = '${ts_dir_ref}' +mp_param.ref_name = '${ref_name}' +mp_param.short_ref_name = '{{ short_ref_name }}' +# Optionally, swap test and reference model +if {{ swap_test_ref }}: + mp_param.test_data_path, mp_param.reference_data_path = mp_param.reference_data_path, mp_param.test_data_path + mp_param.test_name, mp_param.ref_name = mp_param.ref_name, mp_param.test_name + mp_param.short_test_name, mp_param.short_ref_name = mp_param.short_ref_name, mp_param.short_test_name +{%- endif %} +params.append(mp_param) +{%- endif %} + {%- if "diurnal_cycle" in sets %} dc_param = DiurnalCycleParameter() dc_param.test_data_path = '${climo_diurnal_dir_primary}' diff --git a/zppy/templates/ts.bash b/zppy/templates/ts.bash index 0b03cedd..479e2788 100644 --- a/zppy/templates/ts.bash +++ b/zppy/templates/ts.bash @@ -65,6 +65,11 @@ vars={{ vars }} # https://stackoverflow.com/questions/26457052/remove-a-substring-from-a-bash-variable # Remove U, since it is a 3D variable and thus will not work with rgn_avg vars=${vars//,U} +# Remove more 3D variables: +vars=${vars//,T} +vars=${vars//,CLDICE} +vars=${vars//,CLDLIQ} + {%- else %} vars={{ vars }} {%- endif %}