-
Notifications
You must be signed in to change notification settings - Fork 13
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
Updates xesmf docs #432
Updates xesmf docs #432
Conversation
Codecov ReportPatch and project coverage have no change.
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #432 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 14 14
Lines 1308 1308
=========================================
Hits 1308 1308
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
@pochedls @lee1043 @chengzhuzhang @tomvothecoder |
@taylor13 - Is there a concise summary of regrid2 (for code docstrings)? It looks like CDAT had:
If I remember correctly, ESMF does not treat grid cell latitude bounds as constant in longitude and regrid2 does this? Is there a situation where a user would definitely want to use regrid2 over ESMF? |
Yes, your recall is essentially correct. As described here, ESMF assumes the vertices of grid cells are connected by great circles (which is inconsistent with most model latxlon grids). regrid2, on the other hand, assumes that the vertices are connected by lines of longitude or lines of latitude (consistent with models). So regrid2 is more accurate in regridding from one latxlon grid to another latxlon grid. [All of this discussion applies to conservative regridding.] regrid2, however, can only handle latxlon grids and does not offer the variety of regridding methods that ESMF does. regrid2 is restricted to the conservative regridding method. For moderate to high resolution latxlon grids, the distortions found in the ESMF conservatively regridded fields may be negligible, but for coarser grids they may not always be. If a conservative regridding algorithm does not correctly reconstruct grid cell shapes, "adjustments" must be made to maintain conservation, which are not strictly local, so this effectively disperses the quantity being conserved elsewhere (though usual by an amount that is negligible). The main case where regrid2 offers a distinct advantage is when the target grid is quite coarse. Consider, for example, computing zonal means across ocean basins. You can do this by masking the land values on the original grid and then regridding to a target grid of desired latitude width and cells that span the entire ocean basin longitudinally. The reason ESMF cells give incorrect values is that each cell spanning the ocean basin arcs toward the pole in the middle of the basin (following a great circle). So the zonal mean in this case is actually getting contributions from higher latitudes in the middle of the basin than it is at the edges. For further information about the original fortran code, which was translated into C as regrid2 see sections 2.3, 2.4, and 3.7 of the EzGet documentation. The area-averaging example of section 2.4 shows how regridding can be used to compute an area-mean over N. America. |
@taylor13 Thanks so much for all the great info. |
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.
Hi @jasonb5, I made one minor edit which is noted in my PR review comment. Everything looks good. Thanks!
Description
This PR updates the documentation for xESMF regridder.
Checklist
If applicable: