Skip to content
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

TEM diagnostics #250

Merged
merged 24 commits into from
Sep 22, 2023
Merged

TEM diagnostics #250

merged 24 commits into from
Sep 22, 2023

Conversation

justin-richling
Copy link
Collaborator

@justin-richling justin-richling commented Jul 13, 2023

This will calculate TEM files and plots for:

  • uzm - Zonal-Mean zonal wind
  • epfy - northward component of the Eliassen–Palm flux
  • epfz - upward component of the Eliassen–Palm flux
  • vtem - Transformed Eulerian mean northward wind
  • wtem - Transformed Eulerian mean upward wind
  • psitem - Transformed Eulerian mean mass stream function
  • utendepfd - tendency of eastward wind due to Eliassen-Palm flux divergence
  • utendvtem - tendency of eastward wind due to TEM northward wind advection and the coriolis term
  • utendwtem - tendency of eastward wind due to TEM upward wind advection

There are two scripts being added, scripts/averaging/create_TEM_files.py for reading in h4 history files, calculating TEM variables and creating new netcdf files. And scripts/plotting/tem.py for reading in either the newly created netcdf files, or existing TEM netcdf files and plotting.

Update adf_variable_defaults.yaml with TEM variables, including Obs files and variable names.

Update config_cam_baseline_example.yaml for TEM scripts

NOTE: If QBO is present, all variables will be calculated, if not, only uzm epfy epfz vtem wtem psitem and utendepfd will be calculated.

NOTE: If there are different vertical levels between cases, currently the difference plots don't work. I am working towards a vertical and horizontal interpolation for TEM as noted in issue #225

Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! However, I do have some concerns, particularly with making sure we are actually grabbing all of the model history files. If you have any questions or concerns with my change requests just let me know. Thanks!

config_cam_baseline_example.yaml Outdated Show resolved Hide resolved
config_cam_baseline_example.yaml Outdated Show resolved Hide resolved
lib/adf_variable_defaults.yaml Outdated Show resolved Hide resolved
lib/adf_variable_defaults.yaml Outdated Show resolved Hide resolved
scripts/averaging/create_TEM_files.py Outdated Show resolved Hide resolved
scripts/plotting/tem.py Outdated Show resolved Hide resolved
scripts/plotting/tem.py Show resolved Hide resolved
scripts/plotting/tem.py Outdated Show resolved Hide resolved
scripts/plotting/tem.py Outdated Show resolved Hide resolved
scripts/plotting/tem.py Show resolved Hide resolved
@justin-richling
Copy link
Collaborator Author

@nusbaume I think I've tackled all your suggestions and have run a couple tests. Let me know if anything else needs addressing, thanks!

@justin-richling
Copy link
Collaborator Author

@nusbaume Last changes are in place if you want to review this again, thanks!

Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking a lot better! I just have some (hopefully) final config variable checking and cleanup requests.

config_amwg_default_plots.yaml Outdated Show resolved Hide resolved
config_amwg_default_plots.yaml Outdated Show resolved Hide resolved
config_cam_baseline_example.yaml Outdated Show resolved Hide resolved
config_cam_baseline_example.yaml Outdated Show resolved Hide resolved
lib/adf_obs.py Show resolved Hide resolved
scripts/averaging/create_TEM_files.py Outdated Show resolved Hide resolved
scripts/averaging/create_TEM_files.py Outdated Show resolved Hide resolved
scripts/averaging/create_TEM_files.py Outdated Show resolved Hide resolved
scripts/plotting/tem.py Show resolved Hide resolved
scripts/plotting/tem.py Outdated Show resolved Hide resolved
Also remove duplicate code block in adf_info.py
GitHub suggestions
GitHub suggestions
@justin-richling
Copy link
Collaborator Author

justin-richling commented Sep 19, 2023

@nusbaume Can you take another look and see if this is all good now. I ran it with your suggested changes and it appears to work as intended for when tem_opts is included or missing in the config file.

Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks great to me now, so feel free to merge whenever you are ready. Thanks!

Now ADF won't die if missing any TEM files, only skip TEM plotting
@justin-richling justin-richling merged commit 36c3558 into NCAR:main Sep 22, 2023
7 checks passed
@justin-richling justin-richling deleted the tem-diagnostics branch January 10, 2024 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants