diff --git a/modules/util/util.py b/modules/util/util.py index bca827668643e06b0e799990eb7ddcca5f786fc8..4cb825316a0e4da6477ea93e2c9776655fd008f6 100644 --- a/modules/util/util.py +++ b/modules/util/util.py @@ -411,32 +411,30 @@ def get_cartopy_crs(satellite, domain): return geos, xlen, xmin, xmax, ylen, ymin, ymax -# ------------ This code will not be needed when we implement a Fully Connected CNN ----------------------------------- # Example GOES file to retrieve GEOS parameters in MetPy form (CONUS) exmp_file_conus = '/Users/tomrink/data/OR_ABI-L1b-RadC-M6C14_G16_s20193140811215_e20193140813588_c20193140814070.nc' # Full Disk exmp_file_fd = '/Users/tomrink/data/OR_ABI-L1b-RadF-M6C16_G16_s20212521800223_e20212521809542_c20212521809596.nc' +# keep for reference +# if domain == 'CONUS': +# exmpl_ds = xr.open_dataset(exmp_file_conus) +# elif domain == 'FD': +# exmpl_ds = xr.open_dataset(exmp_file_fd) +# mdat = exmpl_ds.metpy.parse_cf('Rad') +# geos = mdat.metpy.cartopy_crs +# xlen = mdat.x.values.size +# ylen = mdat.y.values.size +# exmpl_ds.close() + +# ------------ This code will not be needed when we implement a Fully Connected CNN ----------------------------------- def make_for_full_domain_predict(h5f, name_list=None, satellite='GOES16', domain='FD'): w_x = 16 w_y = 16 - # keep for reference - # if domain == 'CONUS': - # exmpl_ds = xr.open_dataset(exmp_file_conus) - # elif domain == 'FD': - # exmpl_ds = xr.open_dataset(exmp_file_fd) - # mdat = exmpl_ds.metpy.parse_cf('Rad') - # geos = mdat.metpy.cartopy_crs - # xlen = mdat.x.values.size - # ylen = mdat.y.values.size - # exmpl_ds.close() - geos, xlen, xmin, xmax, ylen, ymin, ymax = get_cartopy_crs(satellite, domain) - #h5f = h5py.File(clvrx_file, 'r') - grd_dct = {name: None for name in name_list} cnt_a = 0 @@ -474,7 +472,5 @@ def make_for_full_domain_predict(h5f, name_list=None, satellite='GOES16', domain for didx, ds_name in enumerate(name_list): grd_dct[ds_name] = np.stack(grd_dct_n[ds_name]) - #h5f.close() - return grd_dct, ll, cc # ------------------------------------------------------------------------------------------- \ No newline at end of file