-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stc_qbo_enso #492
stc_qbo_enso #492
Conversation
…accept daily and monthly input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@delsbury Thanks for submitting your POD to the MDTF-diagnostics repo. The documentation and POD scripts are in good shape-there is just some minor cleanup needed before I can merge the stc_qbo_enso POD into the main branch. In addition to the unused variables and imports identified by CodeQL, please make the requested changes to your PR.
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this file to diagnostics/stc_qbo_enso
@@ -54,6 +54,7 @@ def main(argv): | |||
return 0 # will actually exit from print_help | |||
else: | |||
# case where we run the actual framework | |||
print ('HERE') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove debug print statement from framework code
@@ -1049,6 +1049,8 @@ class MDTFTopLevelArgParser(MDTFArgParser): | |||
"""Class for constructing the command-line interface, parsing the options, | |||
and handing off execution to the selected subcommand. | |||
""" | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove debugging print statement from framework code
@@ -616,7 +616,10 @@ def build_axes(self, *coords, verify=True): | |||
# validate that we don't have duplicate axes | |||
d = util.WormDict() | |||
verify_d = util.WormDict() | |||
print (verify_d, "verify_d") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove debugging print statements from framework code
@@ -483,6 +483,7 @@ def _iter_shallow_alternates(var): | |||
for alts in v.alternates: | |||
linked_alts.append([vlist_vars[v_name] for v_name in alts]) | |||
v.alternates = linked_alts | |||
print (list(vlist_vars.values()), "list(vlist_vars.values())") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove debugging print statement from framework code
@@ -873,6 +874,7 @@ def from_struct(cls, pod_name, d, parent, **kwargs): | |||
pod_name) from exc | |||
try: | |||
pod.varlist = Varlist.from_struct(d, parent=pod) | |||
print (pod.varlist, "pod.varlist") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove debugging print statement from framework code
The names of any environment variables set for the diagnostic (enclosed in | ||
curly braces) will be replaced by the same values they had when the diagnostic | ||
was run. For example, this diagnostic's favorite color is "{{EXAMPLE_FAV_COLOR}}." | ||
</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove template lines
<title>MDTF example diagnostic</title> | ||
<img src="../mdtf_diag_banner.png"> | ||
<h3>Example diagnostic: time-averaged near-surface temperature</h3> | ||
<p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change title and short description to match your POD
This driver script (stc_qbo_enso.py) and its associated helper script (stc_qbo_enso_plottingcodeqbo.py and stc_qbo_enso_plottingcodeenso.py) do calculations to assess the representation of stratospheric teleconnections associated with the Quasi-Biennial Oscillation (QBO) and the El Nino Southern Oscillation (ENSO).
Associated issue # (replace this phrase and parentheses with the issue number)
How Has This Been Tested?
The POD has been tested with 1979-2014 data from "CESM2-WACCM_CMIP_historical_r1i1p1f1," the historical simulation for the first CESM2-WACCM ensemble member. The "run script" is called "config_file.jsonc." Running the POD produces six plots (3 for each hemisphere, north vs. south) that show the atmospheric response to the Quasi-Biennial Oscillation (QBO) and six plots (3 for each hemisphere) that show the atmospheric response to the El Nino Southern Oscillation. Observational equivalents are also produced using ERA5 data. The POD saves the model output file in the model/netCDF folder. The run time for the entire POD is ~ 25 minutes. Much of the POD code was written using Python 3.8.18, but has been tested and runs successfully with the active MDTF Python environments that use Python 3.11 >. The POD uses the following Python packages, with their versions shown in parentheses: xarray (20231.1.0), numpy (1.24.3), xesmf (0.6.0), matplotlib (3.2.2), cartopy (0.18.0), and scipy (1.9.1). Note that the POD runs successfuly with the MDTF conda environments activated, which means its robust to different versions of the aforementioned packages. All of this work was done of Mac OSX (current version: 12.7.1)
Checklist:
YES
YES
YES
conda_env_setup.sh
YES
YES
YES
YES
YES
YES
CESM2-WACCM_CMIP_historical_r1i1p1f1-1979-2014-qbo30hPa-metrics.txt