From 528732babc333651c5d21e6601d4ef4fdd3a463e Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Thu, 5 May 2022 13:41:46 -0500 Subject: [PATCH] snapshot... --- modules/util/viirs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/util/viirs.py b/modules/util/viirs.py index 9791ffbf..ba43e9f5 100644 --- a/modules/util/viirs.py +++ b/modules/util/viirs.py @@ -2,6 +2,7 @@ import numpy as np import h5py from util.util import get_grid_values, get_grid_values_all import glob +from pathlib import Path 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'] @@ -71,7 +72,8 @@ def run(mod_res_filename, img_res_filename, mod_tiles, img_tiles): def run_test(directory): - files = glob.glob(directory + 'clavrx_snpp_viirs*.h5') + # files = glob.glob(directory + 'clavrx_snpp_viirs*.h5') + files = Path(directory).rglob('clavrx_snpp_viirs*.h5') for file in files: h5f = h5py.File(file, 'r') @@ -79,7 +81,6 @@ def run_test(directory): opd_nl = get_grid_values_all(h5f, 'cld_opd_nlcomp') reff_nl = get_grid_values_all(h5f, 'cld_reff_nlcomp') except: - print('PROBLEM with: ', file) continue if np.sum(np.isnan(opd_nl)) < opd_nl.size and np.sum(np.isnan(reff_nl)) < reff_nl.size: -- GitLab