albedo=0.2, latitude=34., elevation_of_measurement=2, ) # Set the current_time (0-1) in a year, (calculate as DOY/365). # To see how the magnitude and spatial distribution of radiation and PET changes as a function of DOY we will use two different days, summer and winter solstice. In both cases we will use PET based on the Priestley and Taylor model that requires temperature as input. Temperatures are from cenral NM climatology. In the calculation of PET modeled solar radiation will be used. The Potential Evapotranspiration component of Landlab currently offers several other methods for PET calculation which can be found: http://landlab.readthedocs.io/en/latest/landlab.components.pet.html # # For summer solstice use current_time=0.466 (June 20) and Tmin=14, Tmax=32, Tavg=23 (degree C) # # For summer solstice use current_time=0.997 (December 21) and Tmin=-5, Tmax=11, Tavg=3 (degree C). # As you do this exercise notice when the spatial variability of radiation and PET becomes more pronounced. current_time = 0.466 # 0: beginning of the calender year 0.5: middle of the year rad.update(current_time) PET.update(current_time, Tmin=14, Tmax=32, Tavg=23) # Daily min, max, and average temperature # Let's identify the outputs we can plot and examine sorted(PotentialEvapotranspiration.output_var_names) imshow_grid(watershed, 'radiation__net_shortwave_flux', values_at='cell') plt.show() imshow_grid(watershed, 'surface__potential_evapotranspiration_rate', values_at='cell') plt.show() imshow_grid(watershed, 'radiation__ratio_to_flat_surface', values_at='cell') plt.show() # Now we will run the soil moisuture and vegetation response models on this DEM, driven by a rainfall depth and PET caclulated above.
grid['cell']['vegetation__live_leaf_area_index'] = LiveLAI # Calculate current time in years such that Julian time can be calculated ## For modeled Radiation model current_time = 195/365.25 PET_threshold = 0 # Initial value of PET_threshold = 0 yrs = 0 time_check = 0 # Temporal loop to calculate Potential Evapotranspiration for i in range(0, days_n): ## For modeled Radiation model Rad.update(current_time) rad_factor = grid.at_cell['radiation__ratio_to_flat_surface'] pet_grass.update(Tavg=Tavg_obs[i], obs_radiation=rad_obs[i], relative_humidity=rh_obs[i], wind_speed=ws_obs[i], precipitation=precip[i]) pet_shrub.update(Tavg=Tavg_obs[i], obs_radiation=rad_obs[i], relative_humidity=rh_obs[i], wind_speed=ws_obs[i], precipitation=precip[i]) pet_tree.update(Tavg=Tavg_obs[i], obs_radiation=rad_obs[i], relative_humidity=rh_obs[i], wind_speed=ws_obs[i], precipitation=precip[i]) pet_all = [pet_grass._PET_value, pet_shrub._PET_value, pet_tree._PET_value, 0., pet_shrub._PET_value, pet_tree._PET_value] grid.at_cell['surface__potential_evapotranspiration_rate'] = ( (np.choose(grid.at_cell['vegetation__plant_functional_type'], pet_all)) * rad_factor)