From 848a6a59c6f8b1a9beccac85d7ba9b334fd84c79 Mon Sep 17 00:00:00 2001 From: llsuo Date: Wed, 12 Nov 2025 17:26:41 +0100 Subject: [PATCH 1/2] Fix: add safe error handling in Taylor diagram and global mean plots; --- config_noresm_ipcc.yaml | 428 --------------------- scripts/plotting/cam_taylor_diagram.py | 8 +- scripts/plotting/global_mean_timeseries.py | 8 +- 3 files changed, 11 insertions(+), 433 deletions(-) delete mode 100644 config_noresm_ipcc.yaml diff --git a/config_noresm_ipcc.yaml b/config_noresm_ipcc.yaml deleted file mode 100644 index 79c71220f..000000000 --- a/config_noresm_ipcc.yaml +++ /dev/null @@ -1,428 +0,0 @@ -#============================== -#config_cam_baseline_example.yaml - -#This is the main CAM diagnostics config file -#for doing comparisons of a CAM run against -#another CAM run, or a CAM baseline simulation. - -#Currently, if one is on NCAR's Casper or -#Cheyenne machine, then only the diagnostic output -#paths are needed, at least to perform a quick test -#run (these are indicated with "MUST EDIT" comments). -#Running these diagnostics on a different machine, -#or with a different, non-example simulation, will -#require additional modifications. -# -# On sigma2 NIRD, please see the discussion on github -# https://github.com/NorESMhub/noresm3_dev_simulations/discussions/17 -# for details -# -#Config file Keywords: -#-------------------- -# -#1. Using ${xxx} will substitute that text with the -# variable referenced by xxx. For example: -# -# cam_case_name: cool_run -# cam_climo_loc: /some/where/${cam_case_name} -# -# will set "cam_climo_loc" in the diagnostics package to: -# /some/where/cool_run -# -# Please note that currently this will only work if the -# variable only exists in one location in the file. -# -#2. Using ${.xxx} will do the same as -# keyword 1 above, but specifies which sub-section the -# variable is coming from, which is necessary for variables -# that are repeated in different subsections. For example: -# -# diag_basic_info: -# cam_climo_loc: /some/where/${diag_cam_climo.start_year} -# -# diag_cam_climo: -# start_year: 1850 -# -# will set "cam_climo_loc" in the diagnostics package to: -# /some/where/1850 -# -#Finally, please note that for both 1 and 2 the keywords must be lowercase. -#This is because future developments will hopefully use other keywords -#that are uppercase. Also please avoid using periods (".") in variable -#names, as this will likely cause issues with the current file parsing -#system. -#-------------------- -user: 'your_user_name' -# -##============================== -# -# This file doesn't (yet) read environment variables, so the user must -# set this themselves. It is also a good idea to search the doc for 'user' -# to see what default paths are being set for output/working files. -# -# Note that the string 'USER-NAME-NOT-SET' is used in the jupyter script -# to check for a failure to customize -# - -#------------------------------------------------------------------------------------- -#This first set of variables specify basic info used by all diagnostic runs: -#------------------------------------------------------------------------------------- -diag_basic_info: - - #History file string to match (eg. cam.h0 or ocn.pop.h.ecosys.nday1) - # Only affects timeseries as everything else uses timeseries - # Leave off trailing '.' - #Default: cam.h0a - hist_str: cam.h0a - - #Is this a model vs observations comparison? - #If "false" or missing, then a model-model comparison is assumed: - compare_obs: true - - #Generate HTML website (assumed false if missing): - #Note: The website files themselves will be located in the path - #specified by "cam_diag_plot_loc", under the "/website" subdirectory, - #where "" is the subdirectory created for this particular diagnostics run - #(usually "case_vs_obs_XXX" or "case_vs_baseline_XXX"). - create_html: true - - #Location of observational datasets: - #Note: this only matters if "compare_obs" is true and the path - #isn't specified in the variable defaults file. - obs_data_loc: /diagnostics/ADF/obs - - #Location where re-gridded and interpolated CAM climatology files are stored: - cam_regrid_loc: /scratch/${user}/diagnostics/ADF/regrid - - #Overwrite CAM re-gridded files? - #If false, or missing, then regridding will be skipped for regridded variables - #that already exist in "cam_regrid_loc": - cam_overwrite_regrid: true - - #Location where diagnostic plots are stored: - cam_diag_plot_loc: /projects/NS2345K-datalake/www/diagnostics/ADF/plots - - #Location of ADF variable plotting defaults YAML file: - #If left blank or missing, ADF/lib/adf_variable_defaults.yaml will be used - #Uncomment and change path for custom variable defaults file - #defaults_file: /some/path/to/defaults/file.yaml - - #Vertical pressure levels (in hPa) on which to plot 3-D variables - #when using horizontal (e.g. lat/lon) map projections. - #If this config option is missing, then no 3-D variables will be plotted on - #horizontal maps. Please note too that pressure levels must currently match - #what is available in the observations file in order to be plotted in a - #model vs obs run: - plot_press_levels: [200,500,850] - - #Longitude line on which to center all lat/lon maps. - #If this config option is missing then the central - #longitude will default to 180 degrees E. - central_longitude: 180 - - #Number of processors on which to run the ADF. - #If this config variable isn't present then - #the ADF defaults to one processor. Also, if - #you set it to "*" then it will default - #to all of the processors available on a - #single node/machine: - num_procs: 8 - - #If set to true, then redo all plots even if they already exist. - #If set to false, then if a plot is found it will be skipped: - redo_plot: true - -#------------------------------------------------------------------------------------- -#This second set of variables provides info for the CAM simulation(s) being diagnosed: -#------------------------------------------------------------------------------------- -diag_cam_climo: - - # History file list of strings to match - # eg. cam.h0 or ocn.pop.h.ecosys.nday1 or hist_str: [cam.h2,cam.h0] - # Only affects timeseries as everything else uses the created timeseries - # Default: - hist_str: cam.h0a - - #Calculate climatologies? - #If false, the climatology files will not be created: - calc_cam_climo: true - - #Overwrite CAM climatology files? - #If false, or not prsent, then already existing climatology files will be skipped: - #cam_overwrite_climo: true - cam_overwrite_climo: true - - #Name of CAM case (or CAM run name): - cam_case_name: n1850.ne30_tn14.hybrid_fatessp.20241219 - - #Case nickname - #NOTE: if nickname starts with '0' - nickname must be in quotes! - # ie '026a' as opposed to 026a - #If missing or left blank, will default to cam_case_name - case_nickname: #cool nickname - - #Location of CAM history (h0a) files: - #Example test files - cam_hist_loc: /projects/NS9560K-datalake/noresm3/cases/${diag_cam_climo.cam_case_name}/atm/hist - - #Location of CAM climatologies (to be created and then used by this script) - cam_climo_loc: /scratch/${user}/diagnostics/ADF/climo/${diag_cam_climo.cam_case_name}/atm/climo - - #model year when time series files should start: - #Note: Leaving this entry blank will make time series - # start at earliest available year. - start_year: 100 - - #model year when time series files should end: - #Note: Leaving this entry blank will make time series - # end at latest available year. - end_year: 110 - - #Do time series files exist? - #If True, then diagnostics assumes that model files are already time series. - #If False, or if simply not present, then diagnostics will attempt to create - #time series files from history (time-slice) files: - cam_ts_done: false - - #Save interim time series files? - #WARNING: This can take up a significant amount of space, - # but will save processing time the next time - cam_ts_save: false - - #Overwrite time series files, if found? - #If set to false, then time series creation will be skipped if files are found: - cam_overwrite_ts: false - - #Location where time series files are (or will be) stored: - cam_ts_loc: /scratch/${user}/diagnostics/ADF/${diag_cam_climo.cam_case_name}/atm/tseries - -#------------------------------------------------------------------------------------- -#This third set of variables provide info for the CAM baseline climatologies. -#------------------------------------------------------------------------------------- -#This only matters if "compare_obs" is false: -diag_cam_baseline_climo: - - # History file list of strings to match - # eg. cam.h0 or ocn.pop.h.ecosys.nday1 or hist_str: [cam.h2,cam.h0] - # Only affects timeseries as everything else uses the created timeseries - # Default: - hist_str: cam.h0a - - #Calculate cam baseline climatologies? - #If false, the climatology files will not be created: - calc_cam_climo: true - - #Overwrite CAM climatology files? - #If false, or not present, then already existing climatology files will be skipped: - cam_overwrite_climo: true - - #Name of CAM baseline case: - cam_case_name: n1850.ne30_tn14.hybrid_fatessp.20241204 - - #Baseline case nickname - #NOTE: if nickname starts with '0' - nickname must be in quotes! - # ie '026a' as opposed to 026a - #If missing or left blank, will default to cam_case_name - case_nickname: - - #Location of CAM baseline history (h0a) files: - #Example test files - cam_hist_loc: /projects/NS9560K-datalake/noresm3/cases/${diag_cam_baseline_climo.cam_case_name}/atm/hist - - #Location of baseline CAM climatologies: - cam_climo_loc: /scratch/${user}/diagnostics/ADF/${diag_cam_baseline.cam_case_name}/atm/climo - - #model year when time series files should start: - #Note: Leaving this entry blank will make time series - # start at earliest available year. - start_year: 52 - - #model year when time series files should end: - #Note: Leaving this entry blank will make time series - # end at latest available year. - end_year: 71 - - #Do time series files need to be generated? - #If True, then diagnostics assumes that model files are already time series. - #If False, or if simply not present, then diagnostics will attempt to create - #time series files from history (time-slice) files: - cam_ts_done: false - - #Save interim time series files for baseline run? - #WARNING: This can take up a significant amount of space: - cam_ts_save: false - - #Overwrite baseline time series files, if found? - #If set to false, then time series creation will be skipped if files are found: - cam_overwrite_ts: false - - #Location where time series files are (or will be) stored: - cam_ts_loc: /scratch/${user}/diagnostics/ADF/${diag_cam_baseline.cam_case_name}/atm/tseries - -#------------------------------------------------------------------------------------- -#This fourth set of variables provides settings for calling the Climate Variability -#------------------------------------------------------------------------------------- -# Diagnostics Package (CVDP). If cvdp_run is set to true the CVDP will be set up and -# run in background mode, likely completing after the ADF has completed. -# If CVDP is to be run PSL, TREFHT, TS and PRECT (or PRECC and PRECL) should be listed -# in the diag_var_list variable listing. -# For more CVDP information: https://www.cesm.ucar.edu/working_groups/CVC/cvdp/ -diag_cvdp_info: - - # Run the CVDP on the listed run(s)? - cvdp_run: false - - # CVDP code path, sets the location of the CVDP codebase - # CGD systems path = /home/asphilli/CESM-diagnostics/CVDP/Release/v5.2.0/ - # CISL systems path = /glade/u/home/asphilli/CESM-diagnostics/CVDP/Release/v5.2.0/ - # github location = https://github.com/NCAR/CVDP-ncl - cvdp_codebase_loc: /glade/u/home/asphilli/CESM-diagnostics/CVDP/Release/v5.2.0/ - - # Location where cvdp codebase will be copied to and diagnostic plots will be stored - cvdp_loc: /glade/scratch/asphilli/ADF-Sandbox/cvdp/ #MUST EDIT! - - # tar up CVDP results? - cvdp_tar: false - - -#+++++++++++++++++++++++++++++++++++++++++++++++++++ -#These variables below only matter if you are using -#a non-standard method, or are adding your own -#diagnostic scripts. -#+++++++++++++++++++++++++++++++++++++++++++++++++++ - -#Note: If you want to pass arguments to a particular script, you can -#do it like so (using the "averaging_example" script in this case): -# - {create_climo_files: {kwargs: {clobber: true}}} - -#Name of time-averaging scripts being used to generate climatologies. -#These scripts must be located in "scripts/averaging": -time_averaging_scripts: - - create_climo_files - #- create_TEM_files #To generate TEM files, please un-comment - -#Name of regridding scripts being used. -#These scripts must be located in "scripts/regridding": -regridding_scripts: - - regrid_and_vert_interp - -#List of analysis scripts being used. -#These scripts must be located in "scripts/analysis": -analysis_scripts: - - amwg_table - -#List of plotting scripts being used. -#These scripts must be located in "scripts/plotting": -plotting_scripts: - - global_mean_timeseries - - global_latlon_map - - zonal_mean - - meridional_mean - - polar_map - - global_latlon_vect_map - - cam_taylor_diagram - - qbo - #- tape_recorder - #- tem #To plot TEM, please un-comment fill-out the "tem_info" section below - -#List of CAM variables that will be processesd: -#If CVDP is to be run PSL, TREFHT, TS and PRECT (or PRECC and PRECL) should be listed -diag_var_list: - - AODVIS - - cb_SULFATE - - cb_isoprene - - cb_monoterp - - cb_DUST - - cb_DMS - - cb_BC - - cb_OM - - cb_H2O2 - - cb_H2SO4 - - cb_SALT - - SFmonoterp - - SFisoprene - - SFSS - - SFDUST - - SFSOA - - SFSO4 - - SFSO2_net - - SFOM - - SFBC - - SFDMS - - SFH2O2 - - SFH2SO4 - - cb_SO2 - - D550_BC - - D550_DU - - D550_POM - - D550_SO4 - - D550_SS - - CLDHGH - - CLDICE - - CLDLIQ - - CLDLOW - - CLDMED - - CLDTOT - - CLOUD - - RESTOM - - FLNS - - FLNT - - FLNTC - - FSNS - - FSNT - - FSNTC - - LHFLX - - LWCF - - PBLH - - PRECT - - PS - - PSL - - QFLX - - RELHUM - - SHFLX - - SWCF - - T - - TAUX - - TAUY - - TGCLDIWP - - TGCLDLWP - - TMQ - - TREFHT - - TS - - U - - U10 - # - ICEFRAC - # - OCNFRAC - # - LANDFRAC - # 2d fields - # - SFSO2 0 => 1.4e-10 kg/m2/s (SO2 surface flux) - # - WD_DMS -4.5e-15 => 1.7e-22 kg/m2/s (vertical integrated wet deposition flux) - # - WD_SO2 -1.5e-10 => 3.8e-16 kg/m2/s (vertical integrated wet deposition flux) - # - DF_DMS -4.5e-21 => 5.1e-13 kg/m2/s (vertical integrated dry deposition flux) - # - DF_H2O2 6.6e-26 => 2.7e-11 kg/m2/s (vertical integrated dry deposition flux) - # - DF_SO2 1.5e-27 => 7.0e-10 kg/m2/s (vertical integrated dry deposition flux) - # 3d fields - # - sum_BC 1.8e-14 => 1.2e-8 kg/kg (sum of BC concentrations) - # - sum_DST 6.3e-20 => 7.9e-6 kg/kg - # - sum_OM 6.3e-15 => 7.2e-8 kt/kg - -# - -# Options for TEM diagnostics (./averaging/create_TEM_files.py and ./plotting/temp.py) -#tem_info: - #Location where TEM files are stored: - #If path not specified or commented out, TEM calculation/plots will be skipped - #tem_loc: /glade/scratch/richling/adf-output/ADF-data/TEM/ - - #TEM history file number - #If missing or blank, ADF will default to h4 - #hist_num: h4 - - #Overwrite TEM files, if found? - #If set to false, then TEM creation will be skipped if files are found: - #overwrite_tem_case: false - - #overwrite_tem_case: - #overwrite_tem_base: false - -#END OF FILE diff --git a/scripts/plotting/cam_taylor_diagram.py b/scripts/plotting/cam_taylor_diagram.py index 41a1e7c27..454d39f6d 100644 --- a/scripts/plotting/cam_taylor_diagram.py +++ b/scripts/plotting/cam_taylor_diagram.py @@ -164,7 +164,11 @@ def cam_taylor_diagram(adfobj): # LOOP OVER VARIABLES # for v in var_list: - base_x = _retrieve(adfobj, v, data_name, data_loc) # get the baseline field + try: + base_x = _retrieve(adfobj, v, data_name, data_loc) # get the baseline field + except Exception as e: + print(f"[WARN] Skipping variable '{v}' due to error: {e}") + continue for casenumber, case in enumerate(case_names): # LOOP THROUGH CASES case_x = _retrieve(adfobj, v, case, case_climo_loc[casenumber]) # ASSUMING `time` is 1-12, get the current season: @@ -590,4 +594,4 @@ def taylor_plot_finalize(wks, test_nicknames, casecolors, syear_cases, eyear_cas bias_legend_labels = ["> 20%", "10-20%", "5-10%", "1-5%", "< 1%"] wks.legend(handles=bias_legend_elements, labels=bias_legend_labels, loc='upper left', handler_map={tuple: HandlerTuple(ndivide=None, pad=2.)}, labelspacing=2, handletextpad=2, frameon=False, title=" - / + Bias", title_fontsize=18) - return wks \ No newline at end of file + return wks diff --git a/scripts/plotting/global_mean_timeseries.py b/scripts/plotting/global_mean_timeseries.py index 31b5f0f2f..a151281ed 100644 --- a/scripts/plotting/global_mean_timeseries.py +++ b/scripts/plotting/global_mean_timeseries.py @@ -304,9 +304,11 @@ def make_plot(ref_ts_da, case_ts, var, label=None): ax.set_title(var, loc="left") ax.set_xlabel("YEAR") # Place the legend - ax.legend( - bbox_to_anchor=(0.5, -0.15), loc="upper center", ncol=min(len(case_ts), 3) - ) + handles, labels = ax.get_legend_handles_labels() + if handles and labels: + ax.legend( + bbox_to_anchor=(0.5, -0.15),loc="upper center", ncol=min(len(handles), 3), + ) plt.tight_layout(pad=2, w_pad=1.0, h_pad=1.0) return fig, ax From 9e9707e4d844a58f08f01a98bbf6d55d412b503d Mon Sep 17 00:00:00 2001 From: llsuo Date: Wed, 12 Nov 2025 17:40:53 +0100 Subject: [PATCH 2/2] Resolve conflict: keep upstream config_noresm_ipcc.yaml --- config_noresm_ipcc.yaml | 523 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 523 insertions(+) create mode 100644 config_noresm_ipcc.yaml diff --git a/config_noresm_ipcc.yaml b/config_noresm_ipcc.yaml new file mode 100644 index 000000000..48e5a2a44 --- /dev/null +++ b/config_noresm_ipcc.yaml @@ -0,0 +1,523 @@ +#============================== +#config_noresm_default.yaml +# modified from config_amwg_default_plots.yaml + +# This config file contains the standard set of variables and plots used for +# evaluating CAM simulations in the AMWG working group. + +#Currently, if one is on NCAR's Casper or +#Cheyenne machine, then only the diagnostic output +#paths are needed, at least to perform a quick test +#run (these are indicated with "MUST EDIT" comments). +#Running these diagnostics on a different machine, +#or with a different, non-example simulation, will +#require additional modifications. +# +# On sigma2 NIRD, please see the discussion on github +# https://github.com/NorESMhub/noresm3_dev_simulations/discussions/17 +# for details +# +#Config file Keywords: +#-------------------- +# +#1. Using ${xxx} will substitute that text with the +# variable referenced by xxx. For example: +# +# cam_case_name: cool_run +# cam_climo_loc: /some/where/${cam_case_name} +# +# will set "cam_climo_loc" in the diagnostics package to: +# /some/where/cool_run +# +# Please note that currently this will only work if the +# variable only exists in one location in the file. +# +#2. Using ${.xxx} will do the same as +# keyword 1 above, but specifies which sub-section the +# variable is coming from, which is necessary for variables +# that are repeated in different subsections. For example: +# +# diag_basic_info: +# cam_climo_loc: /some/where/${diag_cam_climo.start_year} +# +# diag_cam_climo: +# start_year: 1850 +# +# will set "cam_climo_loc" in the diagnostics package to: +# /some/where/1850 +# +#Finally, please note that for both 1 and 2 the keywords must be lowercase. +#This is because future developments will hopefully use other keywords +#that are uppercase. Also please avoid using periods (".") in variable +#names, as this will likely cause issues with the current file parsing +#system. +#-------------------- +user: 'USER-NAME-NOT-SET' +# +##============================== +# +# This file doesn't (yet) read environment variables, so the user must +# set this themselves. It is also a good idea to search the doc for 'user' +# to see what default paths are being set for output/working files. +# +# Note that the string 'USER-NAME-NOT-SET' is used in the jupyter script +# to check for a failure to customize +# + +#------------------------------------------------------------------------------------- +#This first set of variables specify basic info used by all diagnostic runs: +#------------------------------------------------------------------------------------- +diag_basic_info: + + #History file string to match (eg. cam.h0 or ocn.pop.h.ecosys.nday1) + # Only affects timeseries as everything else uses timeseries + # Leave off trailing '.' + #Default: cam.h0a + hist_str: cam.h0a + + #Is this a model vs observations comparison? + #If "false" or missing, then a model-model comparison is assumed: + compare_obs: false + + #Generate HTML website (assumed false if missing): + #Note: The website files themselves will be located in the path + #specified by "cam_diag_plot_loc", under the "/website" subdirectory, + #where "" is the subdirectory created for this particular diagnostics run + #(usually "case_vs_obs_XXX" or "case_vs_baseline_XXX"). + create_html: true + + #Location of observational datasets: + #Note: this only matters if "compare_obs" is true and the path + #isn't specified in the variable defaults file. + obs_data_loc: /diagnostics/ADF-obs + + #Location where re-gridded and interpolated CAM climatology files are stored: + cam_regrid_loc: /scratch/${user}/noresm3/${diag_cam_climo.cam_case_name}/atm/proc/tseries/regrid + + #Overwrite CAM re-gridded files? + #If false, or missing, then regridding will be skipped for regridded variables + #that already exist in "cam_regrid_loc": + cam_overwrite_regrid: false + + #Location where diagnostic plots are stored: + cam_diag_plot_loc: /nird/datalake/NS2345K/www/diagnostics/ADF/${user} + + #Location of ADF variable plotting defaults YAML file: + #If left blank or missing, ADF/lib/adf_variable_defaults.yaml will be used + #Uncomment and change path for custom variable defaults file + #defaults_file: /some/path/to/defaults/file.yaml + + #Vertical pressure levels (in hPa) on which to plot 3-D variables + #when using horizontal (e.g. lat/lon) map projections. + #If this config option is missing, then no 3-D variables will be plotted on + #horizontal maps. Please note too that pressure levels must currently match + #what is available in the observations file in order to be plotted in a + #model vs obs run: + plot_press_levels: [200,500,850] + + #Longitude line on which to center all lat/lon maps. + #If this config option is missing then the central + #longitude will default to 180 degrees E. + central_longitude: 180 + + #Number of processors on which to run the ADF. + #If this config variable isn't present then + #the ADF defaults to one processor. Also, if + #you set it to "*" then it will default + #to all of the processors available on a + #single node/machine: + num_procs: 8 + + #If set to true, then redo all plots even if they already exist. + #If set to false, then if a plot is found it will be skipped: + redo_plot: true + +#------------------------------------------------------------------------------------- +#This second set of variables provides info for the CAM simulation(s) being diagnosed: +#------------------------------------------------------------------------------------- +diag_cam_climo: + + # History file list of strings to match + # eg. cam.h0 or ocn.pop.h.ecosys.nday1 or hist_str: [cam.h2,cam.h0] + # Only affects timeseries as everything else uses the created timeseries + # Default: + hist_str: cam.h0a + + #Calculate climatologies? + #If false, the climatology files will not be created: + calc_cam_climo: true + + #Overwrite CAM climatology files? + #If false, or not prsent, then already existing climatology files will be skipped: + cam_overwrite_climo: false + + #Name of CAM case (or CAM run name): + cam_case_name: n1850.ne30_tn14.hybrid_fatessp.20241219 + + #Case nickname + #NOTE: if nickname starts with '0' - nickname must be in quotes! + # ie '026a' as opposed to 026a + #If missing or left blank, will default to cam_case_name + case_nickname: #cool nickname + + #Location of CAM history (h0a) files: + #Example test files + cam_hist_loc: /nird/datalake/NS9560K/noresm3/cases/${diag_cam_climo.cam_case_name}/atm/hist + + #Location of CAM climatologies (to be created and then used by this script) + cam_climo_loc: /scratch/${user}/noresm3/${diag_cam_climo.cam_case_name}/atm/proc/climo + + #model year when time series files should start: + #Note: Leaving this entry blank will make time series + # start at earliest available year. + start_year: 100 + + #model year when time series files should end: + #Note: Leaving this entry blank will make time series + # end at latest available year. + end_year: 110 + + #Do time series files exist? + #If True, then diagnostics assumes that model files are already time series. + #If False, or if simply not present, then diagnostics will attempt to create + #time series files from history (time-slice) files: + cam_ts_done: false + + #Save interim time series files? + #WARNING: This can take up a significant amount of space, + # but will save processing time the next time + cam_ts_save: true + + #Overwrite time series files, if found? + #If set to false, then time series creation will be skipped if files are found: + cam_overwrite_ts: false + + #Location where time series files are (or will be) stored: + cam_ts_loc: /scratch/${user}/noresm3/${diag_cam_climo.cam_case_name}/atm/proc/tseries + +#------------------------------------------------------------------------------------- + #TEM diagnostics + #--------------- + #TEM history file number + #If missing or blank, ADF will default to h4 + tem_hist_str: cam.h4 + + #Location where TEM files are stored: + #NOTE: If path not specified or commented out, TEM calculation/plots will be skipped! + cam_tem_loc: /scratch/${user}/noresm3/ADF/${diag_cam_climo.cam_case_name}/tem/ + + #Overwrite TEM files, if found? + #If set to false, then TEM creation will be skipped if files are found: + overwrite_tem: false + + #---------------------- + +#This third set of variables provide info for the CAM baseline climatologies. +#------------------------------------------------------------------------------------- +#This only matters if "compare_obs" is false: +diag_cam_baseline_climo: + + # History file list of strings to match + # eg. cam.h0 or ocn.pop.h.ecosys.nday1 or hist_str: [cam.h2,cam.h0] + # Only affects timeseries as everything else uses the created timeseries + # Default: + hist_str: cam.h0a + + #Calculate cam baseline climatologies? + #If false, the climatology files will not be created: + calc_cam_climo: true + + #Overwrite CAM climatology files? + #If false, or not present, then already existing climatology files will be skipped: + cam_overwrite_climo: false + + #Name of CAM baseline case: + cam_case_name: n1850.ne30_tn14.hybrid_fatessp.20241204 + + #Baseline case nickname + #NOTE: if nickname starts with '0' - nickname must be in quotes! + # ie '026a' as opposed to 026a + #If missing or left blank, will default to cam_case_name + case_nickname: + + #Location of CAM baseline history (h0a) files: + #Example test files + cam_hist_loc: /nird/datalake/NS9560K/noresm3/cases/${diag_cam_baseline_climo.cam_case_name}/atm/hist + + #Location of baseline CAM climatologies: + cam_climo_loc: /scratch/${user}/noresm3/${diag_cam_baseline_climo.cam_case_name}/atm/proc/climo + + #model year when time series files should start: + #Note: Leaving this entry blank will make time series + # start at earliest available year. + start_year: 52 + + #model year when time series files should end: + #Note: Leaving this entry blank will make time series + # end at latest available year. + end_year: 71 + + #Do time series files need to be generated? + #If True, then diagnostics assumes that model files are already time series. + #If False, or if simply not present, then diagnostics will attempt to create + #time series files from history (time-slice) files: + cam_ts_done: false + + #Save interim time series files for baseline run? + #WARNING: This can take up a significant amount of space: + cam_ts_save: true + + #Overwrite baseline time series files, if found? + #If set to false, then time series creation will be skipped if files are found: + cam_overwrite_ts: false + + #Location where time series files are (or will be) stored: + cam_ts_loc: /scratch/${user}/diagnostics/ADF/${diag_cam_baseline_climo.cam_case_name}/atm/tseries + + #TEM diagnostics + #--------------- + #TEM history file number + #If missing or blank, ADF will default to h4 + tem_hist_str: cam.h4 + + #Location where TEM files are stored: + #NOTE: If path not specified or commented out, TEM calculation/plots will be skipped! + cam_tem_loc: /scratch/${user}/${diag_cam_baseline_climo.cam_case_name}/tem/ + + #Overwrite TEM files, if found? + #If set to false, then TEM creation will be skipped if files are found: + overwrite_tem: false + +#------------------------------------------------------------------------------------- +#This fourth set of variables provides settings for calling the Climate Variability +#------------------------------------------------------------------------------------- +# Diagnostics Package (CVDP). If cvdp_run is set to true the CVDP will be set up and +# run in background mode, likely completing after the ADF has completed. +# If CVDP is to be run PSL, TREFHT, TS and PRECT (or PRECC and PRECL) should be listed +# in the diag_var_list variable listing. +# For more CVDP information: https://www.cesm.ucar.edu/working_groups/CVC/cvdp/ +diag_cvdp_info: + + # Run the CVDP on the listed run(s)? + cvdp_run: false + + # CVDP code path, sets the location of the CVDP codebase + # CGD systems path = /home/asphilli/CESM-diagnostics/CVDP/Release/v5.2.0/ + # CISL systems path = /glade/u/home/asphilli/CESM-diagnostics/CVDP/Release/v5.2.0/ + # github location = https://github.com/NCAR/CVDP-ncl + cvdp_codebase_loc: /glade/u/home/asphilli/CESM-diagnostics/CVDP/Release/v5.2.0/ + + # Location where cvdp codebase will be copied to and diagnostic plots will be stored + cvdp_loc: /glade/scratch/asphilli/ADF-Sandbox/cvdp/ #MUST EDIT! + + # tar up CVDP results? + cvdp_tar: false + +# This set of variables provides settings for calling NOAA's +# Model Diagnostic Task Force (MDTF) diagnostic package. +# https://github.com/NOAA-GFDL/MDTF-diagnostics +# +# If mdtf_run: true, the MDTF will be set up and +# run in background mode, likely completing after the ADF has completed. +# +# WARNING: This currently only runs on CASPER (not derecho) +# +# The variables required depend on the diagnostics (PODs) selected. +# AMWG-developed PODS and their required variables: +# (Note that PRECT can be computed from PRECC & PRECL) +# - MJO_suite: daily PRECT, FLUT, U850, U200, V200 (all required) +# - Wheeler-Kiladis Wavenumber Frequency Spectra: daily PRECT, FLUT, U200, U850, OMEGA500 +# (will use what is available) +# - Blocking (Rich Neale): daily OMEGA500 +# - Precip Diurnal Cycle (Rich Neale): 3-hrly PRECT +# +# Many other diagnostics are available; see +# https://mdtf-diagnostics.readthedocs.io/en/main/sphinx/start_overview.html + +# +diag_mdtf_info: + # Run the MDTF on the model cases + mdtf_run: false + + # The file that will be written by ADF to input to MDTF. Call this whatever you want. + mdtf_input_settings_filename : mdtf_input.json + + ## MDTF code path, sets the location of the MDTF codebase and pre-compiled conda envs + # CHANGE if you have any: your own MDTF code, installed conda envs and/or obs_data + + mdtf_codebase_path : /glade/campaign/cgd/amp/amwg/mdtf + mdtf_codebase_loc : ${mdtf_codebase_path}/MDTF-diagnostics.v3.1.20230817.ADF + conda_root : /glade/u/apps/opt/conda + conda_env_root : ${mdtf_codebase_path}/miniconda2/envs.MDTFv3.1.20230412/ + OBS_DATA_ROOT : ${mdtf_codebase_path}/obs_data + + # SET this to a writable dir. The ADF will place ts files here for the MDTF to read (adds the casename) + MODEL_DATA_ROOT : ${diag_cam_climo.cam_ts_loc}/mdtf/inputdata/model + + # Choose diagnostics (PODs). Full list of available PODs: https://github.com/NOAA-GFDL/MDTF-diagnostics + pod_list : [ "MJO_suite" ] + + # Intermediate/output file settings + make_variab_tar: false # tar up MDTF results + save_ps : false # save postscript figures in addition to bitmaps + save_nc : false # save netCDF files of processed data (recommend true when starting with new model data) + overwrite: true # overwrite results in OUTPUT_DIR; otherwise results will be saved under a unique name + + # Settings used in debugging: + verbose : 3 # Log verbosity level. + test_mode: false # Set to true for framework test. Data is fetched but PODs are not run. + dry_run : false # Framework test. No external commands are run and no remote data is copied. Implies test_mode. + + # Settings that shouldn't change in ADF implementation for now + data_type : single_run # single_run or multi_run (only works with single right now) + data_manager : Local_File # Fetch data or it is local? + environment_manager : Conda # Manage dependencies + + + +#+++++++++++++++++++++++++++++++++++++++++++++++++++ +#These variables below only matter if you are using +#a non-standard method, or are adding your own +#diagnostic scripts. +#+++++++++++++++++++++++++++++++++++++++++++++++++++ + +#Note: If you want to pass arguments to a particular script, you can +#do it like so (using the "averaging_example" script in this case): +# - {create_climo_files: {kwargs: {clobber: true}}} + +#Name of time-averaging scripts being used to generate climatologies. +#These scripts must be located in "scripts/averaging": +time_averaging_scripts: + - {create_climo_files: {kwargs: {clobber: false}}} + #- create_TEM_files #To generate TEM files, please un-comment + +#Name of regridding scripts being used. +#These scripts must be located in "scripts/regridding": +regridding_scripts: + - regrid_and_vert_interp + +#List of analysis scripts being used. +#These scripts must be located in "scripts/analysis": +analysis_scripts: + - amwg_table + +#List of plotting scripts being used. +#These scripts must be located in "scripts/plotting": +plotting_scripts: + - global_mean_timeseries + - global_latlon_map + - global_latlon_vect_map + - zonal_mean + - meridional_mean + - polar_map + - cam_taylor_diagram + - ozone_diagnostics + - qbo + #- tape_recorder + #- tem #To plot TEM, please un-comment fill-out the "tem_info" section below + +#List of CAM variables that will be processesd: +#If CVDP is to be run PSL, TREFHT, TS and PRECT (or PRECC and PRECL) should be listed +diag_var_list: + - AODDUST + - AODVIS + - cb_SULFATE + - cb_isoprene + - cb_monoterp + - cb_DUST + - cb_DMS + - cb_BC + - cb_OM + - cb_H2O2 + - cb_H2SO4 + - cb_SALT + - SFmonoterp + - SFisoprene + - SFSS + - SFDUST + - SFSOA + - SFSO4 + - SFSO2_net + - SFOM + - SFBC + - SFDMS + - SFH2O2 + - SFH2SO4 + - cb_SO2 + - D550_BC + - D550_DU + - D550_POM + - D550_SO4 + - D550_SS + - CLDHGH + - CLDICE + - CLDLIQ + - CLDLOW + - CLDMED + - CLDTOT + - CLOUD + - RESTOM + - FLNS + - FLNT + - FLNTC + - FSNS + - FSNT + - FSNTC + - LHFLX + - LWCF + - OMEGA500 + - PBLH + - PRECT + - PS + - PSL + - QFLX + - RELHUM + - SHFLX + - SST + - SWCF + - T + - TAUX + - TAUY + - TGCLDIWP + - TGCLDLWP + - TMQ + - TREFHT + - TS + - U + - U10 + - ICEFRAC + - OCNFRAC + - LANDFRAC + - O3 + # 2d fields + # - SFSO2 0 => 1.4e-10 kg/m2/s (SO2 surface flux) + # - WD_DMS -4.5e-15 => 1.7e-22 kg/m2/s (vertical integrated wet deposition flux) + # - WD_SO2 -1.5e-10 => 3.8e-16 kg/m2/s (vertical integrated wet deposition flux) + # - DF_DMS -4.5e-21 => 5.1e-13 kg/m2/s (vertical integrated dry deposition flux) + # - DF_H2O2 6.6e-26 => 2.7e-11 kg/m2/s (vertical integrated dry deposition flux) + # - DF_SO2 1.5e-27 => 7.0e-10 kg/m2/s (vertical integrated dry deposition flux) + # 3d fields + # - sum_BC 1.8e-14 => 1.2e-8 kg/kg (sum of BC concentrations) + # - sum_DST 6.3e-20 => 7.9e-6 kg/kg + # - sum_OM 6.3e-15 => 7.2e-8 kt/kg + +# + +# Options for TEM diagnostics (./averaging/create_TEM_files.py and ./plotting/temp.py) +#tem_info: + #Location where TEM files are stored: + #If path not specified or commented out, TEM calculation/plots will be skipped + #tem_loc: /glade/scratch/richling/adf-output/ADF-data/TEM/ + + #TEM history file number + #If missing or blank, ADF will default to h4 + #hist_num: h4 + + #Overwrite TEM files, if found? + #If set to false, then TEM creation will be skipped if files are found: + #overwrite_tem_case: false + + #overwrite_tem_case: + #overwrite_tem_base: false + +#END OF FILE