The AHA Model
Revision: 12809
Reference implementation 04 (HEDG02_04)
|
Calculate surface light intensity (that is subject to diel variation) for specific time step of the model. Irradiance can be stochastic if an optionallogical stochastic
flag is set to TRUE
.
More...
Public Member Functions | |
elemental real(srp) function | light_surface_deterministic (tstep) |
Calculate deterministic surface light at specific time step of the model. Light (surlig ) is calculated from a sine function. Light intensity just beneath the surface is modelled by assuming a 50 % loss by scattering at the surface: More... | |
real(srp) function | light_surface_stochastic_scalar (tstep, is_stochastic) |
Calculate stochastic surface light at specific time step of the model. Light (surlig ) is calculated from a sine function. Light intensity just beneath the surface is modelled by assuming a 50 % loss by scattering at the surface: More... | |
real(srp) function, dimension(size(tstep)) | light_surface_stochastic_vector (tstep, is_stochastic) |
Calculate stochastic surface light at specific time step of the model. More... | |
Calculate surface light intensity (that is subject to diel variation) for specific time step of the model. Irradiance can be stochastic if an optionallogical stochastic
flag is set to TRUE
.
Light (surlig
) is calculated from a sine function. Light intensity just beneath the surface is modelled by assuming a 50 % loss by scattering at the surface:
Usage:
random_number
is never pure but elemental can only work with all pure functions. elemental real(srp) function the_environment::light_surface::light_surface_deterministic | ( | integer, intent(in), optional | tstep | ) |
Calculate deterministic surface light at specific time step of the model. Light (surlig
) is calculated from a sine function. Light intensity just beneath the surface is modelled by assuming a 50 % loss by scattering at the surface:
.
tstep | time step of the model, limited by maximum commondata::lifespan. |
real(srp) function the_environment::light_surface::light_surface_stochastic_scalar | ( | integer, intent(in), optional | tstep, |
logical, intent(in) | is_stochastic | ||
) |
Calculate stochastic surface light at specific time step of the model. Light (surlig
) is calculated from a sine function. Light intensity just beneath the surface is modelled by assuming a 50 % loss by scattering at the surface:
. This deterministic value sets the mean for the stochastic final value, which is Gaussian with CV equal to DAYLIGHT_CV
.
tstep | time step of the model, limited by maximum commondata::lifespan. |
is_stochastic | logical indicator for stochastic light intensity if TRUE, then Gaussian stochastic version is used, if FALSE, deterministic is used. Code for wxMaxima for quickcalc: surlig(a, span) := 500*0.5*(1.01+sin(3.14*2.*50*a/(1.*span)));
wxplot2d(surlig(a, 14000), [a,0, 1400]);
|
Definition at line 5399 of file m_env.f90.
real(srp) function, dimension(size(tstep)) the_environment::light_surface::light_surface_stochastic_vector | ( | integer, dimension(:), intent(in) | tstep, |
logical, intent(in) | is_stochastic | ||
) |
Calculate stochastic surface light at specific time step of the model.
tstep | time step of the model, limited by maximum commondata::lifespan. |
is_stochastic | logical indicator for stochastic light intensity if TRUE, then Gaussian stochastic version is used, if FALSE, deterministic is used. |
tstep
array parameter is mandatory here (otherwise the generic interface is ambiguous). Definition at line 5447 of file m_env.f90.