CIME.compare_namelists.normalized_dict_compare

CIME.compare_namelists.normalized_dict_compare(keyname, data1, data2, case)[source]

Recursively compare contents of dicts, normalize values (but not keys)

>>> data1 = {'averaging_type': 'average', 'fields': {'physics_gll': {'field_names': ['T_mid', 'tracers', 'horiz_winds', 'p_int', 'pseudo_density', 'p_mid']}}, 'filename_prefix': 'ERS_Ln9.ne4_ne4.F2000-SCREAMv1-AQP1.mappy_gnu.eamxx-output-preset-2.G.20250922_110259_eeywbj.scream.phys.h', 'output_control': {'frequency': 9, 'frequency_units': 'nsteps', 'skip_t0_output': False}, 'skip_t0_output': False}
>>> data2 = {'averaging_type': 'average', 'fields': {'physics_gll': {'field_names': ['T_mid', 'p_int', 'tracers', 'horiz_winds', 'pseudo_density', 'p_mid']}}, 'filename_prefix': 'ERS_Ln9.ne4_ne4.F2000-SCREAMv1-AQP1.mappy_gnu.eamxx-output-preset-2.C.20250922_110260_easdfa.scream.phys.h', 'output_control': {'frequency': 9, 'frequency_units': 'nsteps', 'skip_t0_output': False}, 'skip_t0_output': False}
>>> normalized_dict_compare("top-level", data1, data2, 'ERS_Ln9.ne4_ne4.F2000-SCREAMv1-AQP1.mappy_gnu.eamxx-output-preset-2')
''
>>> data2 = {'averaging_type': 'average', 'fields': {'physics_gll': {'field_names': ['T_mid', 'p_int', 'tracers', 'horiz_winds', 'pseudo_density', 'p_mid']}}, 'filename_prefix': 'ERS_Ln9.ne4_ne4.F2000-SCREAMv1-AQP1.mappy_gnu.eamxx-output-preset-2.C.20250922_110260_easdfa.scream.phys.h', 'output_control': {'frequency': 8, 'frequency_units': 'nsteps', 'skip_t0_output': False}, 'skip_t0_output': False}
>>> normalized_dict_compare("top-level", data1, data2, 'ERS_Ln9.ne4_ne4.F2000-SCREAMv1-AQP1.mappy_gnu.eamxx-output-preset-2')
'frequency had mismatched values, baseline=9, case=8\n'
>>>