From 1cd93f1f4bafa95891b4cebbe543bc37c6d5fbc2 Mon Sep 17 00:00:00 2001
From: rink <rink@ssec.wisc.edu>
Date: Thu, 17 Sep 2020 18:38:15 -0500
Subject: [PATCH] add hook for 'fitting_mie_sr'

---
 modules/util/sss1day_FMB_py3.py | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/modules/util/sss1day_FMB_py3.py b/modules/util/sss1day_FMB_py3.py
index 74441eba..fcc9fc86 100644
--- a/modules/util/sss1day_FMB_py3.py
+++ b/modules/util/sss1day_FMB_py3.py
@@ -25,8 +25,6 @@ print(files)
 
 nfile  = len(files)
 allobs = 0
-ntot   = 0
-ntotm  = 0
 wind_err_thresh = 50
 
 f66=open('./ray1day.out', 'w+')
@@ -55,6 +53,9 @@ for n, filename in enumerate(files):
   mie_valid0  = coda.fetch(product, 'mie_hloswind',-1, 'windresult/validity_flag')
   mie_wind0 = coda.fetch(product, 'mie_hloswind',-1, 'windresult/mie_wind_velocity')
 
+  # new field for Mie scattering ratio
+  # sr0 = coda.fetch(product, 'mie_wind_prod_conf_data', -1, 'mie_wind_qc', 'fitting_mie_sr')
+
 	#klukens
 #  mie_pppp0  = coda.fetch(product, 'mie_hloswind',-1, 'windresult/reference_pressure')
 #  mie_pppp0  = coda.get_field_names(product,'mie_geolocation[0]/windresult_geolocation')
@@ -167,12 +168,6 @@ for n, filename in enumerate(files):
           if mie_valid[i, m] > 0.0:
            totlevs = totlevs + 1
 
-     ntotm = ntotm + 1
-
-#       profile number from 0 --> nprofm
-# ------------------------------------------------------
-#    f60=open('./test/mie.dat.'+ str(ntotm).zfill(5), 'w+')
-# ------------------------------------------------------
      if totlevs > 0:
       if typ_id[i] == 1:
 #     cloudy type Mie winds
@@ -273,9 +268,6 @@ for n, filename in enumerate(files):
      min  = timestep.strftime('%M')
      sec  = timestep.strftime('%S')	#klukens
 
-     ntot = ntot + 1
-#    print >>f4, str(rid[i, :])
-
      totlevs = 0
      for m in range(nlev):
        if rid[i, m] > 0:
@@ -283,8 +275,6 @@ for n, filename in enumerate(files):
          if ray_valid[i, m] > 0.0:
           totlevs = totlevs + 1
 
-#    profile number from 0 --> nprof
-#    f66=open('./test/ray.dat.'+ str(ntot).zfill(5), 'w+')
 #  for clear sky Rayleigh winds ----------
      if totlevs > 0:
       if typ_id[i] == 2:
-- 
GitLab