Interpolating between two datasets #746
-
Hello, Is it possible to generate intermediate datasets via interpolation? For example lets say we have two datasets 1 hour apart, using something like this
From the example here Can we generate interpolated datasets for each minute between now and one hour plus? |
Beta Was this translation helpful? Give feedback.
Answered by
dopplershift
Nov 1, 2023
Replies: 1 comment 1 reply
-
I would take from xarray.backends import NetCDF4DataStore
import xarray as xr
ds = xr.open_dataset(NetCDF4DataStore(data))
ds.resample(time='1min') I'm not an xarray expert, but based on the docs, that looks like it should work, provided the dimension is called "time". |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
dopplershift
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would take
data
and open it with xarray and useDataset.resample
to do the interpolation:I'm not an xarray expert, but based on the docs, that looks like it should work, provided the dimension is called "time".