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

snapshot...

parent c5272e38
No related merge requests found
...@@ -4,6 +4,7 @@ from util.util import get_grid_values, get_grid_values_all ...@@ -4,6 +4,7 @@ from util.util import get_grid_values, get_grid_values_all
import glob import glob
from pathlib import Path from pathlib import Path
import os import os
import pickle
mod_res_params = ['M07', 'M08', 'M10', 'M12', 'M13', 'M14', 'M15', 'M16'] mod_res_params = ['M07', 'M08', 'M10', 'M12', 'M13', 'M14', 'M15', 'M16']
img_res_params = ['M07_highres', 'M08_highres', 'M10_highres', 'M12_highres', 'M13_highres', 'M14_highres', 'M15_highres', 'M16_highres'] img_res_params = ['M07_highres', 'M08_highres', 'M10_highres', 'M12_highres', 'M13_highres', 'M14_highres', 'M15_highres', 'M16_highres']
...@@ -107,7 +108,7 @@ def run_mean_std(directory): ...@@ -107,7 +108,7 @@ def run_mean_std(directory):
mod_files = glob.glob(directory+p.name+'/'+'VNP02MOD*.uwssec.nc') mod_files = glob.glob(directory+p.name+'/'+'VNP02MOD*.uwssec.nc')
for idx, mfile in enumerate(mod_files): for idx, mfile in enumerate(mod_files):
if idx % 8 == 0: if idx % 16 == 0:
h5f = h5py.File(mfile, 'r') h5f = h5py.File(mfile, 'r')
for param in mod_res_params: for param in mod_res_params:
name = 'observation_data/'+param name = 'observation_data/'+param
...@@ -123,6 +124,14 @@ def run_mean_std(directory): ...@@ -123,6 +124,14 @@ def run_mean_std(directory):
mean_dct[param] = np.nanmean(data) mean_dct[param] = np.nanmean(data)
std_dct[param] = np.nanstd(data) std_dct[param] = np.nanstd(data)
f = open('/home/rink/emis_rad_mean.pkl', 'wb')
pickle.dump(mean_dct, f)
f.close()
f = open('/home/rink/emis_rad_std.pkl', 'wb')
pickle.dump(std_dct, f)
f.close()
print(mean_dct) print(mean_dct)
print(std_dct) print(std_dct)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment