def test_3d_initialization_is_full_based_on_wildcard(): grid_state = get_grid(nx=10, ny=10, nz=20) rrtmg_shortwave = RRTMGShortwave() instellation = Instellation() state = get_default_state([rrtmg_shortwave, instellation], grid_state=grid_state) for quantity_name, properties in rrtmg_shortwave.input_properties.items(): if '*' in properties['dims']: assert len( state[quantity_name].dims) == len(properties['dims']) + 1 if tuple(properties['dims']) == ('*', ): assert set(state[quantity_name].dims) == {'lat', 'lon'} elif tuple(properties['dims']) == ('mid_levels', '*'): assert state[quantity_name].dims[0] == 'mid_levels' assert set(state[quantity_name].dims[1:]) == {'lat', 'lon'}
def get_component_instance(self, state_modification_func=lambda x: x): return Instellation()
def get_component_instance(self): return Instellation()