From 2a01aa9324acd72ea5583013dbe652e18476d4c6 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Mon, 27 Nov 2023 12:38:47 -0600 Subject: [PATCH] snapshot... --- modules/icing/pirep_goes.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index e7febb52..f49aabdd 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -2571,14 +2571,16 @@ def tiles_info(filename): def analyze(preds_file, labels, prob_avg, test_file): if preds_file is not None: - labels, prob_avg, cm_avg = np.load(preds_file, allow_pickle=True) + labels, prob_avg = np.load(preds_file, allow_pickle=True) h5f = h5py.File(test_file, 'r') nda = h5f['flight_altitude'][:] + num_obs = nda.shape[0] iint = h5f['icing_intensity'][:] cld_hgt = h5f['cld_height_acha'][:] cld_dz = h5f['cld_geo_thick'][:] cld_tmp = h5f['cld_temp_acha'][:] + # cld_top_hgt = cld_hgt.reshape((num_obs, -1)) print('report altitude (m): ', np.histogram(nda, bins=12)) @@ -2587,9 +2589,9 @@ def analyze(preds_file, labels, prob_avg, test_file): iint = np.where(iint == -1, 0, iint) iint = np.where(iint != 0, 1, iint) - nda[np.logical_and(nda >= 300, nda < 4000)] = 0 - nda[np.logical_and(nda >= 4000, nda < 7000)] = 1 - nda[np.logical_and(nda >= 7000, nda < 15000)] = 2 + nda[np.logical_and(nda >= 100, nda < 5000)] = 0 + nda[np.logical_and(nda >= 5000, nda < 15000)] = 1 + nda[np.logical_and(nda >= 15000, nda < 20000)] = 2 # nda[np.logical_and(nda >= 6000, nda < 8000)] = 3 # nda[np.logical_and(nda >= 8000, nda < 15000)] = 4 -- GitLab