landlab

Radiation: Calculate solar radiation on topography given latitude, date, and time

class Radiation(self, grid, method='Grid', cloudiness=0.2, latitude=34.0, albedo=0.2, solar_constant=1366.67, clearsky_turbidity=2.0, opt_airmass=0.0, **kwds)[source]

Bases: landlab.core.model_component.Component

Compute 1D and 2D total incident shortwave radiation.

Landlab component that computes 1D and 2D total incident shortwave radiation. This code also computes relative incidence shortwave radiation compared to a flat surface. Ref: Bras, Rafael L. Hydrology: an introduction to hydrologic science. Addison Wesley Publishing Company, 1990.

Code author: Sai Nudurupati & Erkan Istanbulluoglu

Examples

>>> from landlab import RasterModelGrid
>>> from landlab.components import Radiation
>>> import numpy as np
>>> grid = RasterModelGrid((5, 4), xy_spacing=(0.2, 0.2))
>>> rad = Radiation(grid)
>>> rad.name
'Radiation'
>>> rad.input_var_names
('topographic__elevation',)
>>> sorted(rad.output_var_names) 
['radiation__incoming_shortwave_flux',
 'radiation__net_shortwave_flux',
 'radiation__ratio_to_flat_surface']
>>> sorted(rad.units) 
[('radiation__incoming_shortwave_flux', 'W/m^2'),
 ('radiation__net_shortwave_flux', 'W/m^2'),
 ('radiation__ratio_to_flat_surface', 'None'),
 ('topographic__elevation', 'm')]
>>> rad.grid.number_of_node_rows
5
>>> rad.grid.number_of_node_columns
4
>>> rad.grid is grid
True
>>> np.all(grid.at_cell['radiation__ratio_to_flat_surface'] == 0.)
True
>>> np.all(grid.at_node['topographic__elevation'] == 0.)
True
>>> grid['node']['topographic__elevation'] = np.array([
...       0., 0., 0., 0.,
...       1., 1., 1., 1.,
...       2., 2., 2., 2.,
...       3., 4., 4., 3.,
...       4., 4., 4., 4.])
>>> current_time = 0.5
>>> rad.update(current_time)
>>> np.all(grid.at_cell['radiation__ratio_to_flat_surface'] == 0.)
False
Parameters
  • grid (RasterModelGrid) – A grid.

  • method ({'Grid'}, optional) – Currently, only default is available.

  • cloudiness (float, optional) – Cloudiness.

  • latitude (float, optional) – Latitude (radians).

  • albedo (float, optional) – Albedo.

  • solar_constant (float, optional) – Solar Constant (W/m^2).

  • clearsky_turbidity (float, optional) – Clear sky turbidity.

  • opt_airmass (float, optional) – Optical air mass.

update(current_time, hour=12.0, **kwds)[source]

Update fields with current loading conditions.

Parameters
  • current_time (float) – Current time (years).

  • hour (float, optional) – Hour of the day.