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

snapshot...

parent 0ee8e671
Branches
No related tags found
No related merge requests found
......@@ -28,6 +28,8 @@ ds_list = ['temp_8_5um_nom', 'temp_10_4um_nom', 'temp_11_0um_nom', 'temp_13_3um_
'cloud_mask']
ds_grd_dct = {name: [] for name in ds_list}
a_clvr_file = '/Users/tomrink/data/clavrx/clavrx_OR_ABI-L1b-RadC-M3C01_G16_s20190020002186.level2.nc'
def setup():
ice_dict, no_ice_dict = pirep_icing(pirep_file)
......@@ -89,6 +91,17 @@ def get_grid_values(h5f, grid_name, j_c, i_c, half_width, scale_factor_name='sca
return grd_vals
def create_file(filename, data_dct, ds_list):
#h5f_expl = h5py.File(a_clvr_file, 'r')
hf5 = h5py.File(filename, 'w')
for ds_name in ds_list:
data = data_dct[ds_name]
hf5.create_dataset(ds_name, data=data)
hf5.close()
def run(pirep_dct, outfile=None):
time_keys = list(pirep_dct.keys())
......@@ -144,8 +157,13 @@ def run(pirep_dct, outfile=None):
cnt += 1
data_dct = {}
for ds_name in ds_list:
data_dct[ds_name] = np.array(ds_grd_dct[ds_name])
print('num images: ', cnt, len(time_keys), miss_a, miss_b)
create_file(outfile, data_dct, ds_list)
def analyze(ice_dct, no_ice_dct):
......@@ -210,5 +228,12 @@ def analyze(ice_dct, no_ice_dct):
print(dt_str[2:])
def create_file(filename, ds_list, ds_types):
pass
\ No newline at end of file
def create_file(filename, data_dct, ds_list):
#h5f_expl = h5py.File(a_clvr_file, 'r')
hf5 = h5py.File(filename, 'w')
for ds_name in ds_list:
data = data_dct[ds_name]
hf5.create_dataset(ds_name, data=data)
hf5.close()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment