From 77cc1efa5e3567231399f2212bfb5336dc75329e Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Mon, 3 Jan 2022 10:11:50 -0600 Subject: [PATCH] snapshot... --- modules/util/util.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/modules/util/util.py b/modules/util/util.py index 7ac24876..aef1d655 100644 --- a/modules/util/util.py +++ b/modules/util/util.py @@ -495,6 +495,25 @@ def get_grid_values(h5f, grid_name, j_c, i_c, half_width, num_j=None, num_i=None return grd_vals + +def concat_dict_s(t_dct_0, t_dct_1): + keys_0 = list(t_dct_0.keys()) + nda_0 = np.array(keys_0) + + keys_1 = list(t_dct_1.keys()) + nda_1 = np.array(keys_1) + + comm_keys, comm0, comm1 = np.intersect1d(nda_0, nda_1, return_indices=True) + + comm_keys = comm_keys.tolist() + + for key in comm_keys: + t_dct_1.pop(key) + t_dct_0.update(t_dct_1) + + return t_dct_0 + + # 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 -- GitLab