diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index 360c06c3bd94920501a9dd4e847e3c7ec009bb16..1f9244998da487beb28aff3d684469a817df71a4 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -3,7 +3,7 @@ import numpy as np import pickle import matplotlib.pyplot as plt import os -from util.util import get_time_tuple_utc, GenericException, add_time_range_to_filename, is_night +from util.util import get_time_tuple_utc, GenericException, add_time_range_to_filename, is_night, is_day from aeolus.datasource import CLAVRx, GOESL1B from util.geos_nav import GEOSNavigation import h5py @@ -32,12 +32,12 @@ ds_list = ['cld_height_acha', 'cld_geo_thick', 'cld_press_acha', 'sensor_zenith_ 'supercooled_cloud_fraction', 'cld_temp_acha', 'cld_opd_acha', 'solar_zenith_angle', 'cld_reff_acha', 'cld_reff_dcomp', 'cld_reff_dcomp_1', 'cld_reff_dcomp_2', 'cld_reff_dcomp_3', 'cld_opd_dcomp', 'cld_opd_dcomp_1', 'cld_opd_dcomp_2', 'cld_opd_dcomp_3', 'cld_cwp_dcomp', 'iwc_dcomp', - 'lwc_dcomp', 'cloud_type', 'cloud_phase', 'cloud_mask'] -ds_types = ['f4' for i in range(21)] + ['i4' for i in range(3)] + 'lwc_dcomp', 'cld_emiss_acha', 'conv_cloud_fraction', 'cloud_type', 'cloud_phase', 'cloud_mask'] +ds_types = ['f4' for i in range(23)] + ['i4' for i in range(3)] -#a_clvr_file = '/home/rink/data/clavrx/clavrx_OR_ABI-L1b-RadC-M3C01_G16_s20190020002186.level2.nc' -a_clvr_file = '/Users/tomrink/data/clavrx/clavrx_OR_ABI-L1b-RadC-M3C01_G16_s20190020002186.level2.nc' +a_clvr_file = '/home/rink/data/clavrx/clavrx_OR_ABI-L1b-RadC-M3C01_G16_s20190020002186.level2.nc' +#a_clvr_file = '/Users/tomrink/data/clavrx/clavrx_OR_ABI-L1b-RadC-M3C01_G16_s20190020002186.level2.nc' data_dir = '/Users/tomrink/data/icing/' icing_files = ['icing_2018010600_2018033022_QC_DAY.h5', 'icing_2018040100_2018063021_QC_DAY.h5', 'icing_2018070101_2018093022_QC_DAY.h5', @@ -48,8 +48,11 @@ no_icing_files = ['no_icing_2018010600_2018033022_DAY.h5', 'no_icing_2018040100_ 'no_icing_2018100115_2018123022_DAY.h5', 'no_icing_2019010100_2019033023_DAY.h5'] no_icing_l1b_files = [] -train_params_day = ['cld_height_acha', 'cld_geo_thick', 'supercooled_cloud_fraction', 'cld_temp_acha', 'solar_zenith_angle', - 'cld_reff_dcomp', 'cld_opd_dcomp', 'iwc_dcomp', 'lwc_dcomp', 'cloud_phase', 'cloud_mask'] +train_params_day = ['cld_height_acha', 'cld_geo_thick', 'supercooled_cloud_fraction', 'cld_temp_acha', 'cld_press_acha', + 'solar_zenith_angle', 'cld_reff_dcomp', 'cld_opd_dcomp', 'cld_cwp_dcomp', 'iwc_dcomp', 'lwc_dcomp', 'cloud_phase', 'cloud_mask'] + +train_params_night = ['cld_height_acha', 'cld_geo_thick', 'supercooled_cloud_fraction', 'cld_temp_acha', 'cld_press_acha', + 'solar_zenith_angle', 'cld_reff_acha', 'cld_opd_acha', 'cloud_phase', 'cloud_mask'] def setup(): @@ -98,6 +101,7 @@ def get_grid_values(h5f, grid_name, j_c, i_c, half_width, scale_factor_name='sca grd_vals = hfds[j_l:j_r, i_l:i_r] grd_vals = np.where(grd_vals == -999, np.nan, grd_vals) + grd_vals = np.where(grd_vals == -127, np.nan, grd_vals) grd_vals = np.where(grd_vals == -32768, np.nan, grd_vals) if attrs is None: @@ -764,10 +768,10 @@ def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask, idxs = [] for i in range(num_obs): if day_night == 'NIGHT': - if not is_night(solzen[i,]): + if is_day(solzen[i,]): continue elif day_night == 'DAY': - if is_night(solzen[i,]): + if not is_day(solzen[i,]): continue keep_0 = np.logical_or(cld_mask[i,] == 2, cld_mask[i,] == 3) # cloudy