diff --git a/modules/util/viirs_surfrad.py b/modules/util/viirs_surfrad.py index 34392d10e215b5a6ce62f715cf01aeab61991026..6135e29ecc452f39768c8b09717abdc450f18905 100644 --- a/modules/util/viirs_surfrad.py +++ b/modules/util/viirs_surfrad.py @@ -29,15 +29,15 @@ keep_out_opd = ['/ships19/cloud/scratch/cphillips/clavrx/run_viirs_superres/site keep_out = keep_out_opd -# target_param = 'cloud_probability' -target_param = 'cld_opd_dcomp' +target_param = 'cloud_probability' +# target_param = 'cld_opd_dcomp' group_name_i = 'super/' group_name_m = 'orig/' solzen_name = group_name_m + 'solar_zenith' -params_i = [group_name_i+'refl_0_65um', group_name_i+target_param] +params_i = [group_name_m+'temp_11_0um', group_name_i+'refl_0_65um', group_name_i+target_param] params_m = [group_name_m+'temp_11_0um', group_name_m+'refl_0_65um', group_name_m+target_param] param_idx_m = params_m.index(group_name_m + target_param) @@ -85,21 +85,9 @@ def process_cld_opd(grd_k): frac_cld = np.sum(keep_cld)/num_keep if not (0.20 < frac_cld < 0.85): return None - grd_k = np.where(np.invert(keep), 0, grd_k) + grd_k = np.where(np.invert(keep), 0, grd_k) # Convert NaN to 0 return grd_k -# def process_cld_opd(grd_k): -# keep = np.invert(np.isnan(grd_k)) -# num_keep = np.sum(keep) -# keep_thin = np.where(keep, np.logical_and(grd_k > 0.1, grd_k < 4.0), False) -# keep_thik = np.where(keep, np.logical_and(grd_k > 4.0, grd_k < 40.0), False) -# frac_thin = np.sum(keep_thin) / num_keep -# frac_thik = np.sum(keep_thik) / num_keep -# if not (frac_thin >= 0.20 and frac_thik >= 0.20): -# return None -# grd_k = np.where(np.invert(keep), 0, grd_k) -# return grd_k - def run_all(directory, out_directory, day_night='ANY', pattern='clavrx_*.nc', start=10): cnt = start