From d58a98b7480bf32c59bb431a999df232868a1aee Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Fri, 12 Mar 2021 10:59:42 -0600
Subject: [PATCH] snapshot...

---
 modules/icing/pirep_goes.py | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py
index b9bedf80..0a1ed0c6 100644
--- a/modules/icing/pirep_goes.py
+++ b/modules/icing/pirep_goes.py
@@ -31,7 +31,8 @@ l1b_grd_dct = {name: [] for name in l1b_ds_list}
 
 ds_list = ['cld_height_acha', 'cld_geo_thick', 'cld_press_acha', 'sensor_zenith_angle', 'cloud_type', 'supercooled_prob_acha',
            'supercooled_cloud_fraction', 'cld_temp_acha', 'cld_opd_acha', 'cloud_phase', 'solar_zenith_angle',
-           'cloud_mask', 'cld_reff_acha']
+           'cloud_mask', 'cld_reff_acha', 'cld_reff_dcomp', 'cld_reff_dcomp_1', 'cld_reff_dcomp_2', 'cld_reff_dcomp_3',
+           'cld_opd_dcomp', 'cld_opd_dcomp_1', 'cld_opd_dcomp_2', 'cld_opd_dcomp_3', 'cld_cwp_dcomp']
 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'
@@ -112,12 +113,13 @@ def create_file(filename, data_dct, ds_list, lon_c, lat_c, 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('long_name', data=h5f_expl[ds_name].attrs.get('long_name'))
         hf5[ds_name].attrs.create('units', data=h5f_expl[ds_name].attrs.get('units'))
 
     hf5.close()
 
 
-def run(pirep_dct, outfile=None):
+def run(pirep_dct, outfile=None, outfile_l1b=None):
     time_keys = list(pirep_dct.keys())
 
     nav = GEOSNavigation(sub_lon=-75.0, CFAC=5.6E-05, COFF=-0.101332, LFAC=-5.6E-05, LOFF=0.128212, num_elems=2500, num_lines=1500)
@@ -186,13 +188,15 @@ def run(pirep_dct, outfile=None):
     lat_c = np.array(lat_c)
     time_s = np.array(time_s)
 
-    create_file(outfile, data_dct, ds_list, lon_c, lat_c, time_s)
+    if outfile is not None:
+        create_file(outfile, data_dct, ds_list, lon_c, lat_c, time_s)
 
     data_dct = {}
     for ds_name in ds_list:
         data_dct[ds_name] = np.array(l1b_grd_dct[ds_name])
 
-    create_file(outfile, data_dct, l1b_ds_list, lon_c, lat_c, time_s)
+    if outfile_l1b is not None:
+        create_file(outfile_l1b, data_dct, l1b_ds_list, lon_c, lat_c, time_s)
 
 
 def analyze(ice_dct, no_ice_dct):
@@ -255,4 +259,8 @@ def analyze(ice_dct, no_ice_dct):
         filename = os.path.split(files[i])[1]
         so = re.search('_s\\d{11}', filename)
         dt_str = so.group()
-        print(dt_str[2:])
\ No newline at end of file
+        print(dt_str[2:])
+
+
+def apply_qc_icing_pireps():
+    pass
\ No newline at end of file
-- 
GitLab