From cd46dffb473b6b02f9c03f553fdcd2886435d80a Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Wed, 1 Sep 2021 10:11:00 -0500 Subject: [PATCH] snapshot... --- modules/icing/pirep_goes.py | 45 ++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index 65dbbf7b..268c02a5 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -1031,6 +1031,30 @@ def fov_extract(trnfile='/home/rink/fovs_l1b_train.h5', tstfile='/home/rink/fovs for h5f in h5_s_no_icing: h5f.close() +# --------- Throw away code -------------------------------------------------------------------- +jdays= [['070', '071', '072', '073', '074', '075'], ['078', '079', '080', '081', '082', '084', '085', '086', '087', '088'], + ['106', '107', '108', '109', '110', '111', '112', '113', '114'], ['116', '117', '118', '119'], + ['128', '129', '130', '131', '132', '133', '134','135'], ['138', '139', '140'], ['149', '150', '151'], + ['163', '164', '165'], ['202', '203', '204', '205', '206'], ['231', '232', '233'], ['251', '252', '253', '254']] + + +def make_ts_bins(): + nbins = len(jdays) + edges = [[] for k in range(nbins)] + for k in range(nbins): + num = len(jdays[k]) + jd_a = jdays[k][0] + ts_a = get_timestamp('2019-'+jd_a+'_00:00', format_code='%Y-%j_%H:%M') + jd_b = jdays[k][num-1] + ts_b = get_timestamp('2019-'+jd_b+'_23:59', format_code='%Y-%j_%H:%M') + edges[k].append(ts_a) + edges[k].append(ts_b) + + return edges + + +keep_out_edges = make_ts_bins() + def tile_extract(trnfile='/home/rink/tiles_l1b_train.h5', tstfile='/home/rink/tiles_l1b_test.h5', L1B_or_L2='L1B', cld_mask_name='cloud_mask', augment=False, split=0.2): @@ -1679,24 +1703,3 @@ def make_for_full_domain_predict(clvrx_file, name_list=l1b_ds_list): return grd_dct, ll, cc # ------------------------------------------------------------------------------------------- - -# --------- Throw away code -------------------------------------------------------------------- -jdays= [['070', '071', '072', '073', '074', '075'], ['078', '079', '080', '081', '082', '084', '085', '086', '087', '088'], - ['106', '107', '108', '109', '110', '111', '112', '113', '114'], ['116', '117', '118', '119'], - ['128', '129', '130', '131', '132', '133', '134','135'], ['138', '139', '140'], ['149', '150', '151'], - ['163', '164', '165'], ['202', '203', '204', '205', '206'], ['231', '232', '233'], ['251', '252', '253', '254']] - - -def make_ts_bins(): - nbins = len(jdays) - edges = [[] for k in range(nbins)] - for k in range(nbins): - num = len(jdays[k]) - jd_a = jdays[k][0] - ts_a = get_timestamp('2019-'+jd_a+'_00:00', format_code='%Y-%j_%H:%M') - jd_b = jdays[k][num-1] - ts_b = get_timestamp('2019-'+jd_b+'_23:59', format_code='%Y-%j_%H:%M') - edges[k].append(ts_a) - edges[k].append(ts_b) - - return edges -- GitLab