Skip to content
Snippets Groups Projects
Commit a61ac629 authored by tomrink's avatar tomrink
Browse files

add new method...

parent eef271c8
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,7 @@ import h5py
import pickle
from netCDF4 import Dataset
from util.setup import ancillary_path
from scipy.interpolate import RectBivariateSpline
LatLonTuple = namedtuple('LatLonTuple', ['lat', 'lon'])
......@@ -1327,3 +1328,7 @@ def downscale_2x(original, smoothing=False, samples_axis_first=False):
original[:,0::2,1::2],
original[:,1::2,1::2]]),axis=0).squeeze()
return lr
def resample(x, y, z, x_min, x_max, y_min, y_max):
return RectBivariateSpline(x, y, z, [x_min, x_max, y_min, y_max])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment