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

snapshot...

parent cba372a7
No related branches found
No related tags found
No related merge requests found
...@@ -308,6 +308,21 @@ def get_time_interpolated_point(ds_0, ds_1, time0, time1, fld_name, time, lons, ...@@ -308,6 +308,21 @@ def get_time_interpolated_point(ds_0, ds_1, time0, time1, fld_name, time, lons,
return intrp_vals return intrp_vals
def get_time_interpolated_point_s(xr_dataset_s, time_s, fld_name_s, time, lons, lats, method='linear'):
pt_s = []
for ds in xr_dataset_s:
pt = get_point_s(ds, fld_name_s, lons, lats)
pt_s.append(pt)
pt = xr.concat(pt_s, 'time')
pt = pt.assign_coords(time=time_s)
intrp_pt = pt.interp(time=time, method=method)
intrp_pt = intrp_pt.values
return intrp_pt
def get_time_interpolated_voxel(xr_dataset_s, time_s, time, fld_name, lon, lat, press, x_width=5, y_width=5, z_width=3, method='linear'): def get_time_interpolated_voxel(xr_dataset_s, time_s, time, fld_name, lon, lat, press, x_width=5, y_width=5, z_width=3, method='linear'):
vox_s = [] vox_s = []
for ds in xr_dataset_s: for ds in xr_dataset_s:
......
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