diff --git a/modules/util/viirs.py b/modules/util/viirs.py index 9791ffbf2262a106cc9f013c21e47e4c403adfcc..ba43e9f52253f85982ec12d5f4d8eae3c58c460a 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: