10000 Several updates to ocean transects by xylar · Pull Request #613 · MPAS-Dev/MPAS-Tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Several updates to ocean transects #613

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

Merged
merged 5 commits into from
Apr 9, 2025

Conversation

xylar
Copy link
Collaborator
@xylar xylar commented Apr 4, 2025

This merge adds support for:

  • transects of fields with nVertLevelsP1 as the vertical dimension
  • plotting transects on a quad mesh, rather than on triangles. This has various advantages:
    • quads are more intuitive
    • we can plot contours with labels
    • the matplotlib functionality for plotting fields on quads
      is a lot more robust, mature, and intuitive than that for triangles
  • interpolation from gridded transect to MPAS-Ocean transect

This pull request includes significant changes to the documentation and code structure related to transect plotting and interpolation in the mpas_tools package. The changes involve updates to the documentation to reflect the new module structure, the addition of new functions, and the removal of outdated code.

Documentation Updates:

  • Updated conda_package/docs/api.rst to reflect changes in module names and added new functions for transect plotting and interpolation. [1] [2]
  • Added detailed descriptions of new interpolation functions in conda_package/docs/ocean/visualization.rst and conda_package/docs/visualization.rst. [1] [2]

Code Structure Changes:

  • Removed the old plot_ocean_transects function and related code from conda_package/mpas_tools/ocean/viz/transects.py.
  • Added imports for new plotting and interpolation functions in conda_package/mpas_tools/ocean/viz/transect/__init__.py.

Test Updates:

  • Updated conda_package/mpas_tools/tests/test_viz_transects.py to use the new module structure and functions for transect-related tests.

@xylar xylar changed the title Add support for ocean transect fields on layer interfaces Several updates to ocean transects Apr 4, 2025
@xylar xylar force-pushed the transects-general-vertical-coord branch from aeabbe4 to 9a38b60 Compare April 4, 2025 22:08
@xylar xylar force-pushed the transects-general-vertical-coord branch from 9a38b60 to 6b9af29 Compare April 6, 2025 03:12
xylar added 5 commits April 5, 2025 21:13
The primary change is that transects are plotted using quads,
rather than triangles.  This has various advantages:

* quads are more intuitive
* we can plot contours with labels
* the `matplotlib` functionality for plotting fields on quads
  is a lot more robust, mature, and intuitive than that for triangles

This merge also adds some missing documentation on public
transect-related functions.
If a vertical coordinate for a gridded transect is supplied,
interpolation weights are pre-computed that allow interpolation
from the original transect to the corresponding MPAS-Ocean transect
nodes.  This is useful for comparing observations or other data
fields with MPAS-Ocean values.
These are fields with dimension `nVertLevelsP1`.
@xylar xylar force-pushed the transects-general-vertical-coord branch from 6b9af29 to 397b4d4 Compare April 6, 2025 03:14
@xylar
Copy link
Collaborator Author
xylar commented Apr 9, 2025

Testing

I tested these in both Polaris (E3SM-Project/polaris#295) and MPAS-Analysis (MPAS-Dev/MPAS-Analysis#1085). Things seem to be working as expected.

@xylar xylar marked this pull request as ready for review April 9, 2025 02:46
@xylar xylar merged commit 9e209ba into MPAS-Dev:master Apr 9, 2025
11 of 12 checks passed
@xylar xylar deleted the transects-general-vertical-coord branch April 9, 2025 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0