-
Notifications
You must be signed in to change notification settings - Fork 48
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
Conservative remapping yields ESMC_FieldRegridStoreFile #60
Comments
Thanks for the complete code!
You can make the ESMF log file more informative by setting import ESMF
ESMF.Manager(debug=True) The log shows:
It says that the source grid plt.scatter(ds['lon_b'], ds['lat_b'], s=0.1, alpha=0.2) # plot the input grid mesh
plt.plot(-40+360, 72, 'ro') # plot the problematic point
plt.xlabel('lon')
plt.ylabel('lat') Because the grid cell near the red "pole" has very close corners (you can see two corners are exactly I think this error can be skipped by setting |
See #61 for a quick fix. |
Return objects consistent with ds_out coordinates
I'm working on conservative remapping of air-sea CO2 fluxes on ocean grids. The goal is to remap from an arbitrary curvilinear grid to a 180x360 rectilinear grid. I've followed advice from #14 and #32, but am getting stuck.
As mentioned in those issues, typical ocean output has lat/lon bounds on
(N, M, 4)
dimensions, where 4 are the grid cell corners. I created a function following @JiaweiZhuang's advice (#14 (comment)) to convert from that convention to(N+1, M+1)
:When I feed this into the
xESMF
regridder with'conservative'
, I get the following error:The log file isn't very enlightening here:
However, my modified dataset with lat/lon bounds works with bilinear remapping. I've gotten conservative remapping to work with NCL with the native corners, but am looking to use
xESMF
/python exclusively.Any help here is appreciated. Sorry for duplicate issues on conservative remapping. I'd be happy to help implement some utility functions to help out with this for future releases, since it seems to be a persistent issue.
Here is a notebook with my attempt: https://nbviewer.jupyter.org/gist/bradyrx/421627385666eefdb0a20567c2da9976
Here is a dropbox with the notebook and the native CESM2 output: https://www.dropbox.com/sh/lef7i2v88sfke3d/AACNPgjIrXBV35ejLYTRFvqxa?dl=0
The text was updated successfully, but these errors were encountered: