diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index 61f009c35f08657225fcf0d5e39f3bda68d6ba40..bf47973a94ffd425ab04125aabfe84e2172f6695 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -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()