Skip to content

Commit

Permalink
Stc qbo enso (#495)
Browse files Browse the repository at this point in the history
* updated this script, which I debugged in pursuit of modifying POD to accept daily and monthly input

* updated this to accept sea surface temperature inputs

* some updates

* all files

* adding rst file

* updated changes 2

* updated config

* same files

* copy of good files

* new driver

* copies

* moving config file to right destination

* removed debugging code from this script

* removed debugging code from this script

* removed debugging code from this script

* removed debugging code from this script

* copied in the correct header information for the output webpage

* updated driver

* codeQL fixes: removed uneeded imports and implement some restructing to enso_indexing function to eliminate possiblity that the hemisphere if statements I was using previusly are not met

* same as previous commit. Just adding other files to complete push

* The driver script and helper plotting scripts were revised by removing incomplete if statements. For instance, saying if hemisphere equal to NH was replaced with code that more directly says something like when hemisphere is equal to northern hemisphere, do X. This fix was made to alleviate many of the if statements flagged by CodeQL.

* updated date in version, contact, and license metadata section
  • Loading branch information
delsbury authored Jan 31, 2024
1 parent b1d37ed commit e04154e
Show file tree
Hide file tree
Showing 10 changed files with 3,677 additions and 0 deletions.
125 changes: 125 additions & 0 deletions config_file.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
// Configuration for MDTF-diagnostics driver script self-test.
//
// Copy this file and customize the settings as needed to run the framework on
// your own model output without repeating command-line options. Pass it to the
// framework at the end of the command line (positionally) or with the
// -f/--input-file flag. Any other explicit command line options will override
// what's listed here.
//
// All text to the right of an unquoted "//" is a comment and ignored, as well
// as blank lines (JSONC quasi-standard.)
{
"case_list" : [
// The cases below correspond to the different sample model data sets. Note
// that the MDTF package does not currently support analyzing multiple
// models in a single invocation. Comment out or delete the first entry and
// uncomment the second to run NOAA-GFDL-AM4 only for the MJO_prop_amp POD,
// and likewise for the SM_ET_coupling POD.
{
"CASENAME" : "CESM2-WACCM_CMIP_historical_r1i1p1f1",
"model" : "CESM2-WACCM_CMIP_historical_r1i1p1f1",
"convention" : "CMIP",
"FIRSTYR" : 1979,
"LASTYR" : 2014,
"QBOisobar" : 30,
"pod_list": ["stc_qbo_enso"]
}
// {
// "CASENAME" : "GFDL.CM4.c96L32.am4g10r8",
// "model" : "AM4",
// "convention" : "GFDL",
// "FIRSTYR" : 1,
// "LASTYR" : 10,
// "pod_list" : ["MJO_prop_amp"]
// }
// {
// "CASENAME" : "Lmon_GISS-E2-H_historical_r1i1p1",
// "model" : "CMIP",
// "convention" : "CMIP",
// "FIRSTYR" : 1951,
// "LASTYR" : 2005,
// "pod_list" : ["SM_ET_coupling"]
// }
// {
// "CASENAME" : "NCAR-CAM5.timeslice",
// "model" : "CESM",
// "convention" : "CMIP",
// "FIRSTYR" : 2000,
// "LASTYR" : 2004,
// "pod_list": ["example"]
// }
],
// PATHS ---------------------------------------------------------------------
// Location of supporting data downloaded when the framework was installed.

// If a relative path is given, it's resolved relative to the MDTF-diagnostics
// code directory. Environment variables (eg, $HOME) can be referenced with a
// "$" and will be expended to their current values when the framework runs.

// Parent directory containing observational data used by individual PODs.
"OBS_DATA_ROOT": "../inputdata/obs_data",

// Parent directory containing results from different models.
//"MODEL_DATA_ROOT": "/Volumes/Personal-Folders/CCP-Amy/CMIP6_fromZac/data-for-amy/",
//"MODEL_DATA_ROOT": "/Users/delsbury/Desktop/mdtf/scratch/",
"MODEL_DATA_ROOT": "/Users/delsbury/Desktop/mdtf/inputdata/model/",

// Working directory. Defaults to OUTPUT_DIR if blank.
"WORKING_DIR": "../wkdir",

// Directory to write output. The results of each run of the framework will be
// put in a subdirectory of this directory.
"OUTPUT_DIR": "../wkdir",

// Location of the Anaconda/miniconda installation to use for managing
// dependencies (path returned by running `conda info --base`.) If empty,
// framework will attempt to determine location of system's conda installation.
"conda_root": "/Users/delsbury/opt/anaconda3",

// Directory containing the framework-specific conda environments. This should
// be equal to the "--env_dir" flag passed to conda_env_setup.sh. If left
// blank, the framework will look for its environments in the system default
// location.
"conda_env_root": "/Users/delsbury/opt/anaconda3/envs",

// SETTINGS ------------------------------------------------------------------
// Any command-line option recognized by the mdtf script (type `mdtf --help`)
// can be set here, in the form "flag name": "desired setting".

// Method used to fetch model data.
"data_manager": "Local_File",

// Type of data that POD(s) will analyze
// "single_run" (default) or "multi_run"
"data_type": "single_run",

// Method used to manage dependencies.
"environment_manager": "Conda",

// Settings affecting what output is generated:

// Set to true to have PODs save postscript figures in addition to bitmaps.
"save_ps": false,

// Set to true to have PODs save netCDF files of processed data.
"save_nc": true,

// Set to true to save HTML and bitmap plots in a .tar file.
"make_variab_tar": false,

// Set to true to overwrite results in OUTPUT_DIR; otherwise results saved
// under a unique name.
"overwrite": true,

// Settings used in debugging:

// Log verbosity level.
"verbose": 1,

// Set to true for framework test. Data is fetched but PODs are not run.
"test_mode": false,

// Set to true for framework test. No external commands are run and no remote
// data is copied. Implies test_mode.
"dry_run": false
}
16 changes: 16 additions & 0 deletions data/fieldlist_CMIP.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
"scalar_coord_templates": {"plev": "ua{value}"},
"ndim": 4
},
"u10": {
"standard_name": "10 hPa zonal_wind",
"units": "m s-1",
"scalar_coord_templates": {"plev": "u10{value}"},
"ndim": 3
},
"va": {
"standard_name": "northward_wind",
"units": "m s-1",
Expand Down Expand Up @@ -147,12 +153,22 @@
"units": "Pa",
"ndim": 3
},
"tos": {
"standard_name": "sea_surface_temperature",
"units": "degC",
"ndim": 3
},
"sfcWind": {
"standard_name": "wind_speed",
"units": "m s-1",
"modifier": "atmos_height",
"ndim": 3
},
"tos": {
"standard_name": "sea_surface_temperature",
"units": "K",
"ndim": 3
},
// radiative fluxes:
"rsus": {
"standard_name": "surface_upwelling_shortwave_flux_in_air",
Expand Down
125 changes: 125 additions & 0 deletions diagnostics/stc_qbo_enso/config_file.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
// Configuration for MDTF-diagnostics driver script self-test.
//
// Copy this file and customize the settings as needed to run the framework on
// your own model output without repeating command-line options. Pass it to the
// framework at the end of the command line (positionally) or with the
// -f/--input-file flag. Any other explicit command line options will override
// what's listed here.
//
// All text to the right of an unquoted "//" is a comment and ignored, as well
// as blank lines (JSONC quasi-standard.)
{
"case_list" : [
// The cases below correspond to the different sample model data sets. Note
// that the MDTF package does not currently support analyzing multiple
// models in a single invocation. Comment out or delete the first entry and
// uncomment the second to run NOAA-GFDL-AM4 only for the MJO_prop_amp POD,
// and likewise for the SM_ET_coupling POD.
{
"CASENAME" : "CESM2-WACCM_CMIP_historical_r1i1p1f1",
"model" : "CESM2-WACCM_CMIP_historical_r1i1p1f1",
"convention" : "CMIP",
"FIRSTYR" : 1979,
"LASTYR" : 2014,
"QBOisobar" : 30,
"pod_list": ["stc_qbo_enso"]
}
// {
// "CASENAME" : "GFDL.CM4.c96L32.am4g10r8",
// "model" : "AM4",
// "convention" : "GFDL",
// "FIRSTYR" : 1,
// "LASTYR" : 10,
// "pod_list" : ["MJO_prop_amp"]
// }
// {
// "CASENAME" : "Lmon_GISS-E2-H_historical_r1i1p1",
// "model" : "CMIP",
// "convention" : "CMIP",
// "FIRSTYR" : 1951,
// "LASTYR" : 2005,
// "pod_list" : ["SM_ET_coupling"]
// }
// {
// "CASENAME" : "NCAR-CAM5.timeslice",
// "model" : "CESM",
// "convention" : "CMIP",
// "FIRSTYR" : 2000,
// "LASTYR" : 2004,
// "pod_list": ["example"]
// }
],
// PATHS ---------------------------------------------------------------------
// Location of supporting data downloaded when the framework was installed.

// If a relative path is given, it's resolved relative to the MDTF-diagnostics
// code directory. Environment variables (eg, $HOME) can be referenced with a
// "$" and will be expended to their current values when the framework runs.

// Parent directory containing observational data used by individual PODs.
"OBS_DATA_ROOT": "../inputdata/obs_data",

// Parent directory containing results from different models.
//"MODEL_DATA_ROOT": "/Volumes/Personal-Folders/CCP-Amy/CMIP6_fromZac/data-for-amy/",
//"MODEL_DATA_ROOT": "/Users/delsbury/Desktop/mdtf/scratch/",
"MODEL_DATA_ROOT": "/Users/delsbury/Desktop/mdtf/inputdata/model/",

// Working directory. Defaults to OUTPUT_DIR if blank.
"WORKING_DIR": "../wkdir",

// Directory to write output. The results of each run of the framework will be
// put in a subdirectory of this directory.
"OUTPUT_DIR": "../wkdir",

// Location of the Anaconda/miniconda installation to use for managing
// dependencies (path returned by running `conda info --base`.) If empty,
// framework will attempt to determine location of system's conda installation.
"conda_root": "/Users/delsbury/opt/anaconda3",

// Directory containing the framework-specific conda environments. This should
// be equal to the "--env_dir" flag passed to conda_env_setup.sh. If left
// blank, the framework will look for its environments in the system default
// location.
"conda_env_root": "/Users/delsbury/opt/anaconda3/envs",

// SETTINGS ------------------------------------------------------------------
// Any command-line option recognized by the mdtf script (type `mdtf --help`)
// can be set here, in the form "flag name": "desired setting".

// Method used to fetch model data.
"data_manager": "Local_File",

// Type of data that POD(s) will analyze
// "single_run" (default) or "multi_run"
"data_type": "single_run",

// Method used to manage dependencies.
"environment_manager": "Conda",

// Settings affecting what output is generated:

// Set to true to have PODs save postscript figures in addition to bitmaps.
"save_ps": false,

// Set to true to have PODs save netCDF files of processed data.
"save_nc": true,

// Set to true to save HTML and bitmap plots in a .tar file.
"make_variab_tar": false,

// Set to true to overwrite results in OUTPUT_DIR; otherwise results saved
// under a unique name.
"overwrite": true,

// Settings used in debugging:

// Log verbosity level.
"verbose": 1,

// Set to true for framework test. Data is fetched but PODs are not run.
"test_mode": false,

// Set to true for framework test. No external commands are run and no remote
// data is copied. Implies test_mode.
"dry_run": false
}
Loading

0 comments on commit e04154e

Please sign in to comment.