diff --git a/modules/util/util.py b/modules/util/util.py index 7ac24876ccbcbc514b585a097055a7ec93a0e869..aef1d655fb76df524b13329929a46dcdf3b89c63 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