8000 Add Greenland mesh generation test case by trhille · Pull Request #351 · MPAS-Dev/compass · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add Greenland mesh generation test case #351

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 4 commits into from
Apr 19, 2022

Conversation

trhille
Copy link
Collaborator
@trhille trhille commented Apr 4, 2022

Add a test case landice/greenland/high_res_mesh that creates a variable resolution Greenland Ice Sheet mesh. Default settings are for 3–30km resolution, mesh density based on observed ice speed and distance to ice margin, and culling ice-free cells >10 km from the ice sheet margin. Resolution, mesh density functions, and cull distance can be set by the user in high_res_mesh.cfg. This is based on the landice/humboldt/default and landice/thwaites/high_res_mesh test cases.

image
image

trhille added 2 commits April 4, 2022 16:07
Create a variable resolution Greenland Ice Sheet mesh, currently set
to 3-30km resolution based on observed ice speed and distance to the
ice margin.
Update docs for landice/greenland/high_res_mesh test case
@trhille trhille added land ice in progress This PR is not ready for review or merging python package DEPRECATED: PRs and Issues involving the python package (master branch) and removed in progress This PR is not ready for review or merging labels Apr 4, 2022
@trhille trhille requested review from xylar and matthewhoffman April 5, 2022 20:45
@xylar xylar removed the python package DEPRECATED: PRs and Issues involving the python package (master branch) label Apr 5, 2022
@xylar
Copy link
Collaborator
xylar commented Apr 5, 2022

@trhille, this looks pretty amazing! I'll review it tomorrow.

I took off the "python package" tag because every PR from now no will implicitly be for the python package. I don't anticipate allowing any more legacy PRs.

Copy link
Collaborator
@xylar xylar left a comment

Choose a reason for hiding this comment

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

Other than a few things to clean up, this seems good to go!

The results are very cool! Here's my thickness plot (via the ParaView extractor):
thickness

high_res_mesh
-------------

The :py:class:`compass.landice.tests.greenland.high_res_mesh.HighResMesh`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add the new class to the API docs so this link works.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Mesh as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for catching that. I think I did this right in commit 2711d77, but I'm not totally sure.

Cleanup after Xylar's code review.
@xylar
Copy link
Collaborator
xylar commented Apr 8, 2022

@trhille, yes, that looks good!

Copy link
Member
@matthewhoffman matthewhoffman left a comment

Choose a reason for hiding this comment

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

@trhille , it's great to finally capture this workflow in COMPASS. I confirmed I can run it successfully. I also tried using the cfg file to crank out a different resolution, and that was easy to accomplish.

I made a few minor change requests in my review, but nothing that significantly affects the functionality.

@@ -0,0 +1,29 @@
# config options for high_res_mesh test case
[high_res_mesh]
Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering if this should be changed to high_res_GIS_mesh. @xylar , if we ended up having this section for two different test cases, would that lead to problems/ambiguity if a user tried to change any of these options in a user config file?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, I thought about mentioning that earlier but decided to let it be. But these sections should make clear if they are specific to a test group (or test case) or generic to any landice test case that needs high_res_mesh config options.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To be clear, should I change just the section name to high_res_GIS_mesh and leave the test case name as greenland/high_res_mesh? Or should I change all instances of high_res_mesh in this test case to high_res_GIS_mesh?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed the section name in 03f0a46< 8000 /tt>, but left all others of high_res_mesh as they were. Let me know if I should change those too.

Copy link
Member

Choose a reason for hiding this comment

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

I think that is correct. @xylar , can you confirm that makes sense to you?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, that's fine. There is no need for the section name in the config file to match the test-case name. It just is helpful if the section name is unique somehow. Naming the test case high_res_GIS_mesh would be redundant, since it's in the greenland test group.

logger.info('calling interpolate_to_mpasli_grid.py')
args = ['interpolate_to_mpasli_grid.py', '-s',
'greenland_1km_2020_04_20.epsg3413.icesheetonly.nc',
'-d', 'GIS.nc', '-m', 'b', '-t']
Copy link
Member

Choose a reason for hiding this comment

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

Should we interpolate all available fields (e.g. SMB, velo obs) in this final step?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated in 03f0a46. Note that basalHeatFlux ends up with the wrong sign because of the inconsistent conventions, so I will update the gridded dataset on the database.

@xylar xylar added the enhancement New feature or request label Apr 13, 2022
Update documentation, remove outdated comments, and remove unnecessary steps.
@matthewhoffman matthewhoffman merged commit 9a883a9 into MPAS-Dev:master Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request land ice
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0