-
Notifications
You must be signed in to change notification settings - Fork 37
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
Landice interpolation unification #817
Landice interpolation unification #817
Conversation
Testing
Command Run :
Results
|
32bb814
to
f50b00d
Compare
CI seems to be broken. I'm going to close and reopen to see if that jump-starts it. |
0971531
to
21afbfd
Compare
@andrewdnolan, the
Any idea what might be causing this? |
Added a single function that should incorporate all the functionality of the exisiting `compass.landice.mesh.interp_ais_bedmachine()` and `compass.landice.mesh.interp_ais_measures()` functions, but that is general enough to work for both GIS and AIS, as well as for MEASURES and BedMachine datasets.
Add the list of requested variables to the `args` list by concating. Previously I was manually creating the space seperated list (i.e string) when a list of variables was passed to the girdded inerpolator function. This space seperated string was not correctly parsed by the `mpas_tool.logging.check_call` function resulting in the variables not being inerpolated.
21afbfd
to
b281644
Compare
Testing (Part One)NOTE: Testing needs to be done in two stages. With the addition of globally sorted cell ID's (4bdc715) there's no easy way difference against the mesh generated on So, the baseline against Tested on
Which results in (for the PR branch):
So both test pass but unfortunately the baseline comparison fails. To investigate things a little further, I've written my own mesh differencing script following compass's baseline approach: https://gist.github.com/andrewdnolan/162339430d602229379c83c5f72200f9 Running that script on the mesh produced from @matthewhoffman has OKed these difference offline, but might be worth double checking on this. |
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.
@andrewdnolan, this is looking really good! I have a lot of comments but they are all tiny. I'm running tests now.
compass/landice/mesh.py
Outdated
@@ -441,7 +443,7 @@ def get_dist_to_edge_and_gl(self, thk, topg, x, y, | |||
elif window_size < min(high_dist, high_dist_bed): | |||
logger.info('WARNING: window_size was set to a value smaller' | |||
' than high_dist and/or high_dist_bed. Resetting' | |||
f' window_size to {max(high_dist, high_dist_bed)},' | |||
f' window_size to {max(high_dist, high_dist_bed)}, ' |
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.
Inadvertent extra space?
@andrewdnolan, would you be able to report the L-inf norm for these diffs as well? |
Excellent, thanks. I'm not worried about these diffs at all. |
Sorting the global indicies will improve memory performance of `cellsOnCell` and such. Additionally, sorting will help with PIO decompostion and ice-sheet-coupler communication.
4bdc715
to
4338977
Compare
Co-authored-by: Trevor Hillebrand <[email protected]>
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.
Awesome work, @andrewdnolan! I've confirmed that both test cases pass and that the edge sorting issue is resolved. I visually inspected all the important fields, but am relying on the diffs you provided above in order to bless changes.
With PRs #803 and #750 the
mesh_gen
testcases in thegreenland
andantarctica
test groups now make better use of mesh generation utilities within the landice framework (e.g.compass.landice.mesh
). But there is still some redundant code as it relates to interpolation (e.g.interp_ais_bedmachine
andinterp_ais_bedmachine
could be generalized tointerp_ais
). Continuing along that line, there is no real need to have separate interpolation functions for Antarctica (interp_ais
) and Greenland (interp_gis
).The purpose of the PR is generalize the existing interpolation functions to be applicable the standard datasets (i.e. measures and bedmachine) and standard icesheets (Antarctica and Greenland). With the generalized interpolation routine, the respective
mesh_gen
testcases are cleaned up and unified as much as possible.Checklist
api.rst
) has any new or modified class, method and/or functions listedTesting
in this PR) any testing that was used to verify the changes