Skip to content
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

After interpolation, 0s show up on edges #20

Closed
ahuang11 opened this issue Jun 11, 2018 · 2 comments
Closed

After interpolation, 0s show up on edges #20

ahuang11 opened this issue Jun 11, 2018 · 2 comments

Comments

@ahuang11
Copy link

ahuang11 commented Jun 11, 2018

Is it possible to have it return np.nan instead?

image
image

!wget https://www.ncei.noaa.gov/data/outgoing-longwave-radiation-daily/access/olr-daily_v01r02-preliminary_20170101_20171231.nc

import numpy as np
import xarray as xr
import xesmf

ds = xr.open_dataset('olr-daily_v01r02-preliminary_20170101_20171231.nc').olr
ds_out = xr.Dataset({'lat': (['lat'], np.arange(-90, 92.5, 2.5)),
                     'lon': (['lon'], np.arange(0, 360, 2.5)),
                    }
                   )
regridder = xe.Regridder(ds, clim_u_ds, 'bilinear')
regridder(ds).isel(time=0).plot()
@ahuang11
Copy link
Author

Actually probably a duplicate of #15

@JiaweiZhuang
Copy link
Owner

For global grid, try periodic=True when building the regridder

aulemahal referenced this issue in Ouranosinc/xESMF Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants