def try1(): radiation = climt.GrayLongwaveRadiation() surface = climt.SlabSurface() state = climt.get_default_state([radiation, surface]) tendencies, diagnostics = radiation(state) print tendencies.keys() print print tendencies['air_temperature']
model_time_step = timedelta(seconds=600) # Create components convection = climt.EmanuelConvection() simple_physics = TimeDifferencingWrapper(climt.SimplePhysics()) constant_duration = 6 radiation_lw = UpdateFrequencyWrapper( climt.RRTMGLongwave(), constant_duration*model_time_step) radiation_sw = UpdateFrequencyWrapper( climt.RRTMGShortwave(), constant_duration*model_time_step) slab_surface = climt.SlabSurface() dycore = climt.GFSDynamicalCore( [simple_physics, slab_surface, radiation_sw, radiation_lw, convection], number_of_damped_levels=5 ) grid = climt.get_grid(nx=NUM_COLS, ny=NUM_ROWS) # Create model state my_state = climt.get_default_state([dycore], grid_state=grid) # Set initial/boundary conditions latitudes = my_state['latitude'].values longitudes = my_state['longitude'].values zenith_angle = np.radians(latitudes)
def get_component_instance(self): return climt.SlabSurface()