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

Create a landice module for the mpas_tools conda package #569

Merged
merged 9 commits into from
Jul 3, 2024

Conversation

trhille
Copy link
Collaborator

@trhille trhille commented May 24, 2024

Create a landice module for the mpas_tools conda package, and add a visualization submodule containing plot_transect(), plot_map(), plot_grounding_lines(), and various helper functions.

Note: Currently these tools are designed for fields defined on cells. Plotting fields on edges will require some changes.

Documentation can be found here: https://portal.nersc.gov/cfs/fanssie/trhille/mpas-tools-docs-landice_module/

Create a landice module for the mpas_tools conda package, and
add a visualization submodule containing plot_transect().
@trhille trhille marked this pull request as draft May 24, 2024 02:53
@xylar
Copy link
Collaborator

xylar commented May 24, 2024

Exciting! You also need to add an empty __init__.py in the landice directory so that directory gets recognized as part of the mpas_tools package.

Add plot_map(), plot_grounding_line() and helper functions to
mpas_tools.landice.visualization.
@trhille trhille marked this pull request as ready for review May 24, 2024 20:30
@trhille
Copy link
Collaborator Author

trhille commented May 24, 2024

Testing

Creating a map of bedTopography with the grounding line contoured in white:
image

Adding grounding lines from multiple files to a map of bedTopography:
image

Creating maps of surfaceSpeed on a log scale, with grounding lines contoured in white:
image

Transects down Thwaites Glacier from ISMIP6 expAE02 at 2200-2204 (I still need to work out coloring by time when using multiple input files for this one):
image

Transects of geometry and temperature down Thwaites Glacier from ISMIP6 expAE02 at 2015, 2100, 2200, and 2300:
image

Plot a map of a pre-computed field (here, thickness change between 2015 and 2300), along with grounding lines:
image

Add ability to plot map of pre-computed field, rather than providing
the name of a MALI variable. For example, you can calculate thickness
change between two time levels or output files and pass that as the
variable argument to landice.plot_map().
@trhille
Copy link
Collaborator Author

trhille commented Jun 14, 2024

@xylar and @andrewdnolan, will either of you be able to review this soon?

@xylar
Copy link
Collaborator

xylar commented Jun 14, 2024

Sorry, I missed that it was ready for review. I think you need to also ping the reviewers again when you mark the PR as ready for review.

I will be at FRISP most of next week so I'm not sure how soon I can review.

@xylar
Copy link
Collaborator

xylar commented Jun 14, 2024

@trhille, could you also add some documentation to https://github.com/MPAS-Dev/MPAS-Tools/tree/master/conda_package/docs and make sure it builds locally?

https://mpas-dev.github.io/MPAS-Tools/stable/building_docs.html

@trhille
Copy link
Collaborator Author

trhille commented Jun 18, 2024

@xylar, I've added and built the documentation. Everything looks as expected.

@trhille trhille force-pushed the landice/add_landice_conda_package branch from ceb9983 to 677346f Compare June 18, 2024 18:09
Use current data file instead of general mesh file to calculate
grounding line masks.
Add norm argument to plot_map() and plot_grounding_lines(), which
is helpful for customizing colorbars. For example, asymmetric and
discrete colorbars require passing TwoSlopeNorm and BoundaryNorm,
respectively.
@xylar
Copy link
Collaborator

xylar commented Jun 21, 2024

@trhille, this looks good to me. @andrewdnolan, I'll count on you testing this to make sure it works for you.

@xylar xylar self-assigned this Jun 21, 2024
@xylar
Copy link
Collaborator

xylar commented Jun 28, 2024

@andrewdnolan and @trhille, how is this coming along? I need to make a new MPAS-Tools release that includes #571 pretty soon. It would also be nice to have #567 in a release (since I promised to do that almost 2 months ago).

@andrewdnolan
Copy link
Contributor

Sorry about the delay with this! I will do some testing first thing on Monday morning and report back!

@andrewdnolan
Copy link
Contributor

Testing

@trhille Sorry this look so long to review, but it's looking great! I've tested this on perlmutter with output from Exp05 from ISMIP6 Greenland and everything seems to work as expected.

plotmap / plot_grounding_lines:

Screenshot 2024-07-01 at 1 53 53 PM

P.S. I also tested plotting the grounding line directly from plotmap with the plot_grounding_line kwarg, which worked for me aswell.

Custom field for plotmap:

Screenshot 2024-07-01 at 1 57 00 PM

plot_transect

I will admit I had limited success with line plots for transect from multiple files, but I don't think that should hold up the PR.

image

But, the transect of 3D field worked great for me!

Screenshot 2024-07-01 at 2 00 59 PM

@xylar xylar merged commit ddfc572 into MPAS-Dev:master Jul 3, 2024
7 checks passed
@xylar
Copy link
Collaborator

xylar commented Jul 3, 2024

Nice @trhille! Thanks for the review, @andrewdnolan!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants