-
Notifications
You must be signed in to change notification settings - Fork 40
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
Add Greenland mesh generation test case #351
Conversation
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, 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
high_res_mesh | ||
------------- | ||
|
||
The :py:class:`compass.landice.tests.greenland.high_res_mesh.HighResMesh` |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mesh
as well.
There was a problem hiding this comment.
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.
@trhille, yes, that looks good! |
There was a problem hiding this 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] |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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'] |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Update documentation, remove outdated comments, and remove unnecessary steps.
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 inhigh_res_mesh.cfg
. This is based on thelandice/humboldt/default
andlandice/thwaites/high_res_mesh
test cases.