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

snapshot...

parent bd2bae81
No related branches found
No related tags found
No related merge requests found
......@@ -142,5 +142,29 @@ def acspo_sst(filename, stride=2, grid_spacing=2000):
fld_reproj, (y_map_2d, x_map_2d) = reproject(sst, lats, lons, proj, grid_spacing=grid_spacing)
h5f.close()
return fld_reproj, proj, y_map_2d, x_map_2d
def acspo_sst_2(sst, lons, lats, stride=2, grid_spacing=2000):
print('data dims: ', lons.shape, lats.shape)
sst = sst[::stride, ::stride]
lons = lons[::stride, ::stride]
lats = lats[::stride, ::stride]
ylen, xlen = lons.shape
print('final dims: ', ylen, xlen)
cen_lon = lons[ylen // stride, xlen // stride]
cen_lat = lats[ylen // stride, xlen // stride]
print('center latitude/longitude: ', cen_lat, cen_lon)
proj = get_projection('LambertAzimuthalEqualArea', cen_lat, cen_lon)
fld_reproj, (y_map_2d, x_map_2d) = reproject(sst, lats, lons, proj, grid_spacing=grid_spacing)
return fld_reproj, proj, y_map_2d, x_map_2d
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