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

Add global map plots #34

Merged
merged 6 commits into from
Apr 18, 2023
Merged

Add global map plots #34

merged 6 commits into from
Apr 18, 2023

Conversation

xylar
Copy link
Collaborator

@xylar xylar commented Apr 12, 2023

This merge adds a new MappingFileStep for making mapping files between all the grid types supported by pyremap.

It also adds a function, plot_global, for plotting global arrays on a lon-lat grid.

Finally, this merge adds VizMap and Viz steps to the cosine bell test case to demonstrate the new capabilities. The result are images (with land plotted overtop, though that could easily be removed with a flag to the plotting function) from both the beginning and end of each simulation.

Checklist

  • User's Guide has been updated
  • Developer's Guide has been updated
  • API documentation in the Developer's Guide (api.md) has any new or modified class, method and/or functions listed
  • Documentation has been built locally and changes look as expected
  • Testing comment in the PR documents testing used to verify the changes

@xylar
Copy link
Collaborator Author

xylar commented Apr 12, 2023

Testing

I ran a reduced-resolution version of the cosine bell QU test on my laptop, resulting in plots like the following:

QU210 init:
init

QU210 final:
final

QU300 final:
final

@xylar xylar force-pushed the add-global-map-plots branch from 596741a to 01f2195 Compare April 13, 2023 06:30
Copy link
Collaborator

@cbegeman cbegeman left a comment

Choose a reason for hiding this comment

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

Once all the instances of plot_land are False, I'm happy to have this merged! Thanks for getting this in! I think this will be so helpful for the hackathon.

polaris/remap/mapping_file_step.py Outdated Show resolved Hide resolved
polaris/ocean/tests/global_convergence/cosine_bell/viz.py Outdated Show resolved Hide resolved
@xylar
Copy link
Collaborator Author

xylar commented Apr 16, 2023

@cbegeman, thanks for the review. I started writing documentation for this and felt pretty dissatisfied with the way that remapping is handled (specifically the clunky way that I had to make up a name for the mapping file before knowing things like the output grid resolution). If time permits before the hackathon, I'm going to do some other work first, then come back to this. I'll make sure your review is incorporated.

@xylar xylar marked this pull request as draft April 16, 2023 20:24
@xylar xylar added framework Changes relating to the polaris framework as opposed to individual tests or analysis in progress This PR is not ready for review or merging ocean Related to ocean tests or analysis labels Apr 16, 2023
@xylar xylar mentioned this pull request Apr 16, 2023
4 tasks
@xylar xylar force-pushed the add-global-map-plots branch from 01f2195 to bccd5e7 Compare April 16, 2023 21:52
@xylar xylar mentioned this pull request Apr 16, 2023
5 tasks
@xylar
Copy link
Collaborator Author

xylar commented Apr 16, 2023

Re-testing

This has been tested in conjunction with #39 and #40. The new VizMap and Viz steps run as expected on a sequence of resolutions on my laptop (210, 240, 270 and 300 km).

@xylar xylar force-pushed the add-global-map-plots branch from bccd5e7 to 7970111 Compare April 17, 2023 15:20
@xylar xylar removed the in progress This PR is not ready for review or merging label Apr 17, 2023
@xylar xylar marked this pull request as ready for review April 17, 2023 15:22
@xylar
Copy link
Collaborator Author

xylar commented Apr 17, 2023

@cbegeman, okay, just letting you know that I'm going ahead with this one as soon as CI passes.

@xylar xylar merged commit 3c19e3d into E3SM-Project:main Apr 18, 2023
@xylar xylar deleted the add-global-map-plots branch April 18, 2023 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
framework Changes relating to the polaris framework as opposed to individual tests or analysis ocean Related to ocean tests or analysis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants