MPAS-Dev / MPAS-Tools

MPAS Tools Repository
Other
36 stars 63 forks source link

Create a `landice` module for the `mpas_tools` conda package #569

Closed trhille closed 2 weeks ago

trhille commented 1 month ago

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/

xylar commented 1 month ago

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.

trhille commented 1 month ago

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
trhille commented 1 month ago

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

xylar commented 1 month ago

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 commented 1 month ago

@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 commented 1 month ago

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

xylar commented 3 weeks ago

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

xylar commented 3 weeks ago

@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 commented 2 weeks ago

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

andrewdnolan commented 2 weeks ago

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 commented 2 weeks ago

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