diff --git a/modules/util/viirs_l1b_l2.py b/modules/util/viirs_l1b_l2.py index 3946186573eb26c1c1bb6aca6155b568d8f2ca11..14fc1e38a2b68c63d97502934e6b428437a822a0 100644 --- a/modules/util/viirs_l1b_l2.py +++ b/modules/util/viirs_l1b_l2.py @@ -223,7 +223,12 @@ def scan(directory): for idx, file in enumerate(files): h5f = h5py.File(file, 'r') - solzen = get_grid_values_all(h5f, 'solar_zenith_angle') + try: + solzen = get_grid_values_all(h5f, 'solar_zenith_angle') + except Exception as e: + print(e) + h5f.close() + continue if is_night(solzen): print(file) h5f.close()