From 929e1382c48fd64b37890bf2831c979696feb6c6 Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Fri, 13 May 2022 12:47:32 -0500
Subject: [PATCH] snapshot...

---
 modules/util/viirs.py | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/modules/util/viirs.py b/modules/util/viirs.py
index d4c5bbe3..e75f74eb 100644
--- a/modules/util/viirs.py
+++ b/modules/util/viirs.py
@@ -4,6 +4,7 @@ from util.util import get_grid_values, get_grid_values_all
 import glob
 from pathlib import Path
 import os
+import pickle
 
 mod_res_params = ['M07', 'M08', 'M10', 'M12', 'M13', 'M14', 'M15', 'M16']
 img_res_params = ['M07_highres', 'M08_highres', 'M10_highres', 'M12_highres', 'M13_highres', 'M14_highres', 'M15_highres', 'M16_highres']
@@ -107,7 +108,7 @@ def run_mean_std(directory):
         mod_files = glob.glob(directory+p.name+'/'+'VNP02MOD*.uwssec.nc')
 
         for idx, mfile in enumerate(mod_files):
-            if idx % 8 == 0:
+            if idx % 16 == 0:
                 h5f = h5py.File(mfile, 'r')
                 for param in mod_res_params:
                     name = 'observation_data/'+param
@@ -123,6 +124,14 @@ def run_mean_std(directory):
         mean_dct[param] = np.nanmean(data)
         std_dct[param] = np.nanstd(data)
 
+    f = open('/home/rink/emis_rad_mean.pkl', 'wb')
+    pickle.dump(mean_dct, f)
+    f.close()
+
+    f = open('/home/rink/emis_rad_std.pkl', 'wb')
+    pickle.dump(std_dct, f)
+    f.close()
+
     print(mean_dct)
     print(std_dct)
 
-- 
GitLab