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

snapshot...

parent dddd7c0a
Branches
No related tags found
No related merge requests found
...@@ -682,19 +682,26 @@ def run_evaluate_static(in_file, out_file, ckpt_dir): ...@@ -682,19 +682,26 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
def analyze(): def analyze():
h5f = h5py.File('/Users/tomrink/clavrx_snpp_viirs.A2019071.0000.001.2019071061610.uwssec_B00038187.level2.h5', 'r') h5f = h5py.File('/Users/tomrink/clavrx_snpp_viirs.A2019071.0000.001.2019071061610.uwssec_B00038187.level2.h5', 'r')
grd = get_grid_values_all(h5f, 'cloud_fraction') grd = get_grid_values_all(h5f, 'cloud_fraction')
grd = grd[::2, ::2] grd = np.where(np.isnan(grd), 0, grd)
grd = grd[1600:, 400:1200]
print(grd.shape) print(grd.shape)
leny, lenx = grd.shape
grd_lr = grd[::2, ::2]
print(grd_lr.shape)
leny, lenx = grd_lr.shape
x = np.arange(lenx) x = np.arange(lenx)
y = np.arange(leny) y = np.arange(leny)
x_up = np.arange(0, lenx, 0.5) x_up = np.arange(0, lenx, 0.5)
y_up = np.arange(0, leny, 0.5) y_up = np.arange(0, leny, 0.5)
grd_a = resample_2d_linear_one(x, y, grd, x_up, y_up) grd_hr = resample_2d_linear_one(x, y, grd_lr, x_up, y_up)
print(grd_a.shape) print(grd_hr.shape)
h5f.close() h5f.close()
return grd, grd_hr
if __name__ == "__main__": if __name__ == "__main__":
nn = SRCNN() nn = SRCNN()
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment