From 372c63bcffb545fc44ab254aec56377652cd5b80 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Fri, 19 Mar 2021 16:21:12 -0500 Subject: [PATCH] snapshot... --- modules/icing/pirep_goes.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index 60adf4ff..249d1d6a 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -99,7 +99,7 @@ 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, lon_c, lat_c, time_s, fl_alt_s): +def create_file(filename, data_dct, ds_list, lon_c, lat_c, time_s, fl_alt_s, icing_intensity=None): h5f_expl = h5py.File(a_clvr_file, 'r') h5f = h5py.File(filename, 'w') @@ -123,6 +123,10 @@ def create_file(filename, data_dct, ds_list, lon_c, lat_c, time_s, fl_alt_s): ice_alt_ds.dims[0].label = 'time' ice_alt_ds.attrs.create('units', data='m') + if icing_intensity is not None: + icing_int_ds = h5f.create_dataset('icing_intensity', data=icing_intensity) + icing_int_ds.attrs.create('long_name', data='0:No intensity report, 1:Trace, 2:Light, 3:Light Moderate, 4:Moderate, 5:Moderate Severe, 6:Severe') + # copy relevant attributes for ds_name in ds_list: h5f_ds = h5f[ds_name] -- GitLab