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

snapshot...

parent 508befc6
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ ice_dict = None
no_ice_dict = None
time_keys = None
pirep_file = '/home/rink/data/pireps/pireps_2019010000_2019063023.csv'
#pirep_file = '/home/rink/data/pireps/pireps_20160101_20190630.csv'
#pirep_file = '/home/rink/data/pireps/pireps_20180101_20200331.csv'
ds_list = ['temp_8_5um_nom', 'temp_10_4um_nom', 'temp_11_0um_nom', 'temp_13_3um_nom', 'cld_height_acha',
'supercooled_cloud_fraction', 'cld_temp_acha', 'cld_opd_acha', 'cloud_phase', 'solar_zenith_angle',
......@@ -92,7 +92,7 @@ def get_grid_values(h5f, grid_name, j_c, i_c, half_width, scale_factor_name='sca
def create_file(filename, data_dct, ds_list, lon_c, lat_c, time_s):
#h5f_expl = h5py.File(a_clvr_file, 'r')
h5f_expl = h5py.File(a_clvr_file, 'r')
hf5 = h5py.File(filename, 'w')
for ds_name in ds_list:
......@@ -103,6 +103,11 @@ def create_file(filename, data_dct, ds_list, lon_c, lat_c, time_s):
hf5.create_dataset('latitude', data=lat_c)
hf5.create_dataset('time', data=time_s)
# copy relevant attributes
for ds_name in ds_list:
hf5[ds_name].attrs.create('standard_name', data=h5f_expl[ds_name].attrs.get('standard_name'))
hf5[ds_name].attrs.create('units', data=h5f_expl[ds_name].attrs.get('units'))
hf5.close()
......
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