CanopyLayers
Structures
CanopyLayers.Canopy4RT — Typemutable struct Canopy4RTA canopy struct for the radiation transfer module
Fields
nLayer::Int64Number of canopy layers
LAI::AbstractFloatLeaf Area Index
Ω::AbstractFloatClumping factor
clump_a::AbstractFloatStructure factor a
clump_b::AbstractFloatStructure factor b
leaf_width::AbstractFloatLeaf width
hc::AbstractFloatVegetation height
LIDFa::AbstractFloatLeaf Inclination
LIDFb::AbstractFloatVariation in leaf inclination
hot::AbstractFloatHotSpot parameter (still need to check!)
height::AbstractFloatCanopy height
[m]z0m::AbstractFloatCanopy roughness
[m]z0h::AbstractFloatTree roughtnes
[m]d::AbstractFloatCanopy displacement height
[m]Cd::AbstractFloatm/sqrt(s) turbulent transfer coefficient
litab::Vector{FT} where FT<:AbstractFloatList of mean inclination angles
[°]litab_bnd::Matrix{FT} where FT<:AbstractFloatList of inclination angle boundaries
[°]lazitab::Vector{FT} where FT<:AbstractFloatList of mean azimuth angles
[°]cos_ttlo::Vector{FT} where FT<:AbstractFloatCosine of lazitab
cos_philo::Vector{FT} where FT<:AbstractFloatCosine of lazitab - raa (relative azimuth angle), update with time
cos_ttli::Vector{FT} where FT<:AbstractFloatCosine of litab
sin_ttli::Vector{FT} where FT<:AbstractFloatSine of litab
vol_scatt::Vector{FT} where FT<:AbstractFloatCache for volome scatter function
lidf::Vector{FT} where FT<:AbstractFloatInclination angles weight distribution
xl::Vector{FT} where FT<:AbstractFloatList of level location (level = layer + 1)
dx::AbstractFloat1/nLayer
nAzi::Int64Number of azimuth angles
nIncl::Int64Number of inclination angles
CanopyLayers.CanopyOpticals — Typemutable struct CanopyOpticals{FT}A struct for canopy optical properties
Fields
nAzi::Int64Number of azimuth angles
nIncl::Int64Number of inclination agles
nLayer::Int64Number of canopy layers
nWL::Int64Number of wave lengths
sdb::AnySolar -> Diffuse backscatter weight
sdf::AnySolar -> Diffuse forward scatter weight
dob::AnyDiffuse -> Directional backscatter weight
dof::AnyDiffuse -> Directional forward scatter weight
ddb::AnyDiffuse -> Diffuse backscatter weight
ddf::AnyDiffuse -> Diffuse forward scatter weight
ks::AnySolar beam extinction coefficient weight
ko::AnyOutgoing beam extinction coefficient weight
bf::Any?
sob::AnyWeight of specular2directional backscatter coefficient
sof::AnyWeight of specular2directional forward coefficient
Ps::VectorProbability of directly viewing a leaf in solar direction
Po::VectorProbability of directly viewing a leaf in viewing direction
Pso::VectorBi-directional probability of directly viewing a leaf (solar->canopy->viewing)
fs::Matrixconversion factor fs to compute irradiance on inclined leaf
absfs::Matrixabs(fs)
absfsfo::Matrixabs(fs*fo)
fsfo::Matrixfs*fo
fo::Matrixconversion factor fo for angle towards observer (not sun like fs)
absfo::Matrixabs(fo)
cosΘ_l::MatrixCosine of leaf azimuths
cos2Θ_l::Matrixcos of leaf azimuth sqared
sigb::Matrixdiffuse backscatter scattering coefficient for diffuse incidence
sigf::Matrixdiffuse forward scattering coefficient for diffuse incidence
sb::Matrixdiffuse backscatter scattering coefficient for specular incidence
sf::Matrixdiffuse forward scattering coefficient for specular incidence
vb::Matrixdirectional backscatter scattering coefficient for diffuse incidence
vf::Matrixdirectional forward scattering coefficient for diffuse incidence
w::Matrixbidirectional scattering coefficent (directional-directional)
a::Matrixattenuation
Xsd::MatrixEffective layer transmittance (direct->diffuse)
Xdd::MatrixEffective layer transmittance (diffuse->diffuse)
R_sd::MatrixEffective layer reflectance (direct->diffuse)
R_dd::MatrixEffective layer reflectance (diffuse->diffuse)
Es_::MatrixSolar direct radiation per layer)
CanopyLayers.CanopyRads — Typemutable struct CanopyRads{FT}A struct for canopy radiation information
Fields
nAzi::Int64Number of azimuth angles
nIncl::Int64Number of inclination agles
nLayer::Int64Number of canopy layers
nLevel::Int64Number of canopy levels
nWL::Int64Number of wave lengths
nWLF::Int64Number of wave lengths for SIF
intEout::AnyIntegrated TOC outgoing flux
[W m⁻²]incomingPAR::AnyIncident spectrally integrated total PAR
[mol m⁻² s⁻¹]incomingPAR_direct::AnyIncident spectrally integrated direct PAR
[mol m⁻² s⁻¹]incomingPAR_diffuse::AnyIncident spectrally integrated diffuse PAR
[mol m⁻² s⁻¹]RnSoil_diffuse::AnyNet radiation of shaded soil
[W m⁻²]RnSoil_direct::AnyNet Short-wave radiation of sunlit soil
[W m⁻²]RnSoil::AnyNet Short-wave radiation of soil (shaded + sunlit)
[W m⁻²]RnSoilLW::AnyNet long-wave radiation of soil (shaded + sunlit)
[W m⁻²]absPAR_shade::VectorNet PAR of shaded leaves
[mol m⁻² s⁻¹]absPAR_shadeCab::VectorNet PAR by Cab+Car of shaded leaves
[moles m⁻² s⁻¹]intNetSW_sunlit::VectorSpectrally integrated net absorbed direct radiation in each layer per leaf area
[W m⁻²]intNetSW_shade::VectorSpectrally integrated net absorbed diffuse radiation in each layer per leaf area
[W m⁻²]intNetLW_sunlit::VectorSpectrally integrated net absorbed direct radiation in each layer per leaf area
[W m⁻²]intNetLW_shade::VectorSpectrally integrated net absorbed diffuse radiation in each layer per leaf area
[W m⁻²]T_sun::VectorLeaf temperature (sunlit)
[K]T_shade::VectorLeaf temperature (shaded)
[K]ϕ_shade::VectorFluorescence yield for shaded leaves
H_shade::VectorSensible Heat flux H of shaded leaves
[W m⁻²]LE_shade::VectorLatent Heat flux LE of shaded leaves
[W m⁻²]NPQ_shade::VectorNPQ of shaded leaves
GPP_shade::VectorGPP of shaded leaves
[μmol m⁻² s⁻¹]gs_shade::Vectorgs of shaded leaves
[mol m⁻² s⁻¹]ψl_shade::VectorLeaf water potential of shaded leaves
[MPa]Cc_shade::VectorCc of shaded leaves
[µmol/mol]Pi_shade::Vectorinternal CO₂ concentration of shaded leaves
[µmol/mol]Lo::VectorShort-wave TOC outgoing radiance in observation direction
[mW m⁻² nm⁻¹ sr⁻¹]Eout::VectorShort-wave TOC outgoing radiation
[mW m⁻² nm⁻¹]alb_obs::VectorShort-wave Albedo in viewing direction
alb_direct::VectorShort-wave Albedo for direct incoming radiation
alb_diffuse::VectorShort-wave Albedo for diffuse incoming radiation
E_up::MatrixUpwelling diffuse short-wave radiation within canopy
[mW m⁻² nm⁻¹]E_down::MatrixDownwelling diffuse short-wave radiation within canopy
[mW m⁻² nm⁻¹]netSW_sunlit::MatrixNet absorbed direct radiation in each layer
[mW m⁻² nm⁻¹]netSW_shade::Matrixnet absorbed diffuse radiation in each layer
[mW m⁻² nm⁻¹]absPAR_sun::Array{FT, 3} where FTnet PAR of sunlit leaves
[mol m⁻² s⁻¹]absPAR_sunCab::Array{FT, 3} where FTnet PAR by Cab+Car of sunlit leaves
[mol m⁻² s⁻¹]T_sun3D::Array{FT, 3} where FTLeaf temperature (sunlit)
[K]ϕ_sun::Array{FT, 3} where FTFluorescence yield for sunlit leaves
H_sun::Array{FT, 3} where FTSensible Heat flux H of sunlit leaves
[W m⁻²]LE_sun::Array{FT, 3} where FTLatent Heat flux LE of sunlit leaves
[W m⁻²]NPQ_sun::Array{FT, 3} where FTNPQ of sunlit leaves
GPP_sun::Array{FT, 3} where FTGPP of sunlit leaves
[μmol m⁻² s⁻¹]gs_sun::Array{FT, 3} where FTgs of sunlit leaves
[mol m⁻² s⁻¹]ψl_sun::Array{FT, 3} where FTLeaf water potential of sunlit leaves
[MPa]Cc_sun::Array{FT, 3} where FTCc of sunlit leaves
[µmol/mol]Pi_sun::Array{FT, 3} where FTInternal CO₂ concentration of sunlit leaves
[µmol/mol]SIF_hemi::VectorHemispheric total outgoing SIF flux
[mW m⁻² nm⁻¹])SIF_obs::VectorObserver-direction outgoing SIF radiance (mW m⁻² nm⁻¹ sr⁻¹))
SIF_obs_sunlit::VectorObserver-direction outgoing SIF radiance, sunlit leaves (mW m⁻² nm⁻¹ sr⁻¹)
SIF_obs_shaded::VectorObserver-direction outgoing SIF radiance, shaded leaves (mW m⁻² nm⁻¹ sr⁻¹)
SIF_obs_scattered::VectorObserver-direction outgoing SIF radiance, scattered (mW m⁻² nm⁻¹ sr⁻¹)
SIF_obs_soil::VectorObserver-direction outgoing SIF radiance, soil-reflected (mW m⁻² nm⁻¹ sr⁻¹)
SIF_sum::VectorTotal SIF sum of layer sources
[mW m⁻² nm⁻¹])
CanopyLayers.IncomingRadiation — Typemutable struct IncomingRadiation{FT}Incoming radiation information
Fields
E_direct::VectorDirect incoming radiation
[mW m⁻² nm⁻¹]E_diffuse::VectorDiffuse incoming radiation
[mW m⁻² nm⁻¹]
CanopyLayers.LeafBios — Typemutable struct LeafBios{FT}A struct of leaf biological parameters
Fields
nWL::Int64Number of wave length
nWLE::Int64Number of wave length for excitation
nWLF::Int64Number of wave length for SIF
N::AnyLeaf structure parameter
Cab::AnyChlorophyll a+b content
[µg cm⁻²]Car::AnyCarotenoid content
[µg cm⁻²]Ant::AnyAnthocynanin content
[µg cm⁻²]Cs::AnySenescent material fraction
Cw::AnyEquivalent water thickness
[cm]Cm::AnyDry matter content (dry leaf mass per unit area)
[g cm⁻²]Cx::AnyFractionation between Zeaxanthin and Violaxanthin in Car (1=all Zeaxanthin) (-)
fqe::AnyLeaf fluorescence efficiency (Fo standard)
ρ_LW::AnyBroadband thermal reflectance (-)
τ_LW::AnyBroadband thermal transmission (-)
ρ_SW::VectorShortwave leaf reflectance
τ_SW::VectorShortwave leaf transmission
α_SW::VectorShortwave absorption
kChlrel::VectorRelative absorbtion by Chlorophyll+Car
kChlrel_old::VectorRelative absorbtion by Chlorophyll
Mb::MatrixFluorescence excitation matrix backwards
Mf::MatrixFluorescence excitation matrix forwards
ndub::Int64Doubling adding layers
CanopyLayers.LeafOpticals — Typemutable struct LeafOpticals{FT}Struct for leaf optical properties
Fields
nr::VectorKm::VectorKab::VectorKant::VectorKcar::VectorKw::VectorKBrown::Vectorphi::VectorKcaV::VectorKcaZ::Vectorlambda::VectorWave length
[nm], same asWLinWaveLengths`
CanopyLayers.RTDimensions — Typemutable struct RTDimensionsStruct that stores matrix dimension information
Fields
nAzi::Int64Number of azimuth angles
nIncl::Int64Number of inclination agles
nLayer::Int64Number of canopy layers
nLevel::Int64Number of canopy layer boundaries nLayer+1
nPAR::Int64Number of PAR wave lengths
nWL::Int64Number of wave lengths
nWLE::Int64Number of wave length for excitation
nWLF::Int64Number of wave lengths for SIF
CanopyLayers.SoilOpticals — Typemutable struct SoilOpticals{FT}A struct of soil optical parameters
Fields
T::AnySoil surface temperature
color::Int64Soil color class
ρ_NIR::AnyShortwave albedo for NIR
ρ_PAR::AnyShortwave albedo for PAR
ρ_SW::VectorShortwave albedo that matches
WLfromWavelengthsρ_SW_SIF::VectorShortwave albedo that matches
WLFfromWavelengthsε_SW::VectorShortwave absorption that equals
1 - ρ_SWSW_mat_raw_4::MatrixShortwave albedo matrix from 4 bands, wavelengths are 400:10:2500 nm
SW_mat_raw_2::MatrixShortwave albedo matrix from 2 bands, wavelengths are 400:10:2500 nm
SW_mat_4::MatrixShortwave albedo matrix from 4 bands with
WLfromWavelengthsSW_mat_2::MatrixShortwave albedo matrix from 2 bands with
WLfromWavelengthsSW_vec_4::VectorShortwave albedo weight from 4 bands
SW_vec_2::VectorShortwave albedo weight from 2 bands
ρ_SW_raw::VectorShortwave albedo, wavelengths are 400:10:2500 nm
ρ_LW::VectorLongtwave albedo
dry_NIR::AnyMean value for day band 1 in NIR region
dry_PAR::AnyMean value for day band 1 in PAR region
wet_NIR::AnyMean value for day band 1 in NIR region
wet_PAR::AnyMean value for day band 1 in PAR region
CanopyLayers.SolarAngles — Typestruct SolarAngles{FT}Struct for observation and solar angles
Fields
hza::AnyHill zenith angle
[°], hill slope anglehaa::AnyHill azimuth angle
[°], 0 for North, 180 for southsaa::AnySolar azimuth angle
[°], a function of timesza::AnySolar zenith angle
[°], a function of lat and timevaa::AnyViewing azimuth angle
[°]vza::AnyViewing zenith angle
[°]raa::AnyRelative azimuth angle
[°], difference between saa and vaa
CanopyLayers.WaveLengths — Typemutable struct WaveLengths{FT}Struct for pre-set wave length parameters
Fields
minwlPAR::AnyMinimal WL for PAR
[nm]maxwlPAR::AnyMaximal WL for PAR
[nm]maxwlNIR::AnyMaximal WL for NIR
[nm]minwle::AnyMinimal WL for SIF excitation
[nm]maxwle::AnyMaximal WL for SIF excitation
[nm]minwlf::AnyMinimal WL for SIF emission/fluorescence
[nm]maxwlf::AnyMaximal WL for SIF emission/fluorescence
[nm]sWL::VectorStandard wave length
[nm]dWL::VectorDifferential wavelength
optis::LeafOpticalsLeaf optical parameter set
WL::VectorWave length
[nm]iWLE::Vector{Int64}Index of WLE in WL
iWLF::Vector{Int64}Index of WLF in WL
iPAR::Vector{Int64}index of wlPAR in WL
iNIR::Vector{Int64}index of wlNIR in WL
WLE::Vectorexcitation wave length
[nm]WLF::VectorFluorescence wave length
[nm]WL_iPAR::VectorWave length for PAR
dWL_iPAR::VectorDifferential wave length for PAR
dWL_iWLE::VectorDifferential wave length for iWLE
nPAR::Int64Length of WL_iPAR
nWL::Int64Length of WL
nWLE::Int64length of WLE
nWLF::Int64length of WLF
Caches
CanopyLayers.CFCache — Typemutable struct CFCache{FT}Cache to speed canopy_fluxes! by pre-allocating arrays
Fields
abs_wave::Vectorabsorbed energy from wave lengths
absfs_lidf::Vectorabsfs' * lidf [nAzi]
E_all::Vectorwave length energy [same as dWL]
E_iPAR::Vectorwave length energy [same as iPAR]
lPs::VectorlPs [nLayer]
kChlrel::VectorkChlrel [same as iPAR]
PAR_diff::Vectordiffusive PAR [same as iPAR]
PAR_diffCab::Vectordiffusive PAR for photosynthesis [same as iPAR]
PAR_dir::Vectordirect PAR [same as iPAR]
PAR_dirCab::Vectordiffusive PAR for photosynthesis [same as iPAR]
CanopyLayers.create_cf_cache — Functioncreate_cf_cache(FT, rt_dim::RTDimensions)Create a CFCache type struct, given
FTFloating number typert_dimRTDimensionstype struct
CanopyLayers.CGCache — Typemutable struct CGCache{FT}Cache to speed canopy_geometry! by pre-allocating arrays
Fields
_Co::Vectorcos_ttli .* cos(vza) dim: nIncl
_Cs::Vectorcos_ttli .* cos(sza) dim: nIncl
_So::Vectorsin_ttli .* sin(vza) dim: nIncl
_Ss::Vectorsin_ttli .* sin(sza) dim: nIncl
_1s::Matrixmaxtrix filled with 1 dim: (1, nAzi)
_2d::Matrix2D array to speed up _cds and _cdo dim: (nIncl, nAzi)
_cdo::MatrixCo * _1s .+ _So * cosphilo' dim: (nIncl, nAzi)
_cds::MatrixCs * _1s .+ _Ss * costtlo' dim: (nIncl, nAzi)
CanopyLayers.create_cg_cache — Functioncreate_cg_cache(FT, rt_dim::RTDimensions)Create a CGCache type struct, given
FTFloating number typert_dimRTDimensionstype struct
CanopyLayers.SFCache — Typemutable struct SFCache{FT}Cache to speed SIF_fluxes! by pre-allocating arrays
Fields
M⁻_sun::VectorM⁺_sun::VectorwfEs::VectorsfEs::VectorsbEs::VectorM⁺⁻::VectorM⁺⁺::VectorM⁻⁺::VectorM⁻⁻::Vectorsun_dwl_iWlE::Vectortmp_dwl_iWlE::Vectorϕ_cosΘ_lidf::VectorvfEplu_shade::VectorvbEmin_shade::VectorvfEplu_sun::VectorvbEmin_sun::VectorsigfEmin_shade::VectorsigbEmin_shade::VectorsigfEmin_sun::VectorsigbEmin_sun::VectorsigfEplu_shade::VectorsigbEplu_shade::VectorsigfEplu_sun::VectorsigbEplu_sun::VectorzeroB::Vectortmp_1d_nWlF::Vectortmp_1d_nLayer::Vectordnorm::Vectorτ_dd::Matrixtransmission of diffusive light?
ρ_dd::Matrixextinction of diffuse light?
Xdd::MatrixRdd::MatrixY::MatrixU::MatrixS⁻::MatrixS⁺::MatrixpiLs::MatrixpiLd::MatrixFsmin::MatrixFsplu::MatrixFdmin::MatrixFdplu::MatrixFemo::MatrixM⁺::MatrixM⁻::Matrixϕ_cosΘ::MatrixF⁻::MatrixF⁺::Matrixnet_diffuse::Matrixtmp_2d_nWlF_nLayer::Matrixtmp_2d_nWlF_nLayer_2::Matrix
CanopyLayers.create_sf_cache — Functioncreate_sf_cache(FT, rt_dim::RTDimensions)Create a SFCache type struct, given
FTFloating number typert_dimRTDimensionstype struct
CanopyLayers.SWCache — Typemutable struct SWCache{FT}Cache to speed short_wave! by pre-allocating arrays
Fields
dnorm::Vectordnorm?
piLo::Vectorpi * Lo
piLoc::Vectorpi * Lo from canopy
piLos::Vectorpi * Lo from soil
piLoc2::Matrixpi * Lo from canopy 2D matrix
ρ_dd::Matrixextinction of diffuse light?
ρ_sd::Matrixextinction of direct light?
τ_dd::Matrixtransmission of diffusive light?
τ_sd::Matrixtransmission of direct light?
CanopyLayers.create_sw_cache — Functioncreate_sw_cache(FT, rt_dim::RTDimensions)Create a CGCache type struct, given
FTFloating number typert_dimRTDimensionstype struct
CanopyLayers.RTCache — Typemutable struct RTCache{FT}Collection of caches to speed up RT module
Fields
CanopyLayers.create_rt_cache — Functioncreate_rt_cache(FT, rt_dim::RTDimensions)Create an RTCache, given
FTFloating number typert_dimRTDimensionstype struct
Initialization of Structures
CanopyLayers.create_canopy_opticals — Functioncreate_canopy_opticals( FT, rt_dim::RTDimensions)Create a CanopyOpticals struct, given
FTFloating number typert_dimRTDimensionstype struct
CanopyLayers.create_canopy_rads — Functioncreate_canopy_rads(FT, rt_dim::RTDimensions)Create a CanopyRads struct, given
FTFloating number typert_dimRTDimensionstype struct
CanopyLayers.create_canopy_rt — Functioncreate_canopy_rt(FT; nLayer::Int = 20, LAI::Number = FT(3))Create Canopy4RT, given
FTFloating number typenLayerNumber of canopy layersLAILeaf area index
CanopyLayers.create_incoming_radiation — Functioncreate_incoming_radiation(
wls::WaveLengths{FT},
wlfn::String = FILE_SUN
) where {FT<:AbstractFloat}Create an AbstractIncomingRadiation struct, given
wlsWaveLengthstype structwlfnFile that saves incoming wave information
CanopyLayers.create_leaf_bios — Functioncreate_leaf_bios(FT, rt_dim::RTDimensions)Create a LeafBios type struct, given
FTFloating number typert_dimRTDimensionstype struct
CanopyLayers.create_leaf_opticals — Functioncreate_leaf_opticals(
sWL::Array{FT,1},
file::String = OPTI_2021
) where {FT<:AbstractFloat}Create an AbstractLeafOptiPara struct, given
sWLStandard wave lengthopfnFile that saves optical parameters
CanopyLayers.create_rt_dims — Functioncreate_rt_dims(
can::Canopy4RT{FT},
wls::WaveLengths{FT}
) where {FT<:AbstractFloat}Create RTDimensions, given
canCanopy4RTtype structwlsWaveLengthstype struct
CanopyLayers.create_wave_length — Functioncreate_wave_length(
FT,
sWLs = [collect(400.0:10.0: 650.1);
collect(655.0: 5.0: 770.1);
collect(780.0:25.0:2400.1)])Create WaveLengths type struct, given
FTFloating number type
CanopyLayers.initialize_rt_module — Functioninitialize_rt_module(FT; nLayer::Int = 20, LAI::Number = FT(3))Initialize the RT module and return the sturctures, given
FTFloating number typenLayerNumber of canopy layersLAILeaf area index
This function initializes and returns
anglesSolarAnglescanCanopy4RTcan_optCanopyOpticalscan_radCanopyRadsin_radIncomingRadiationleavesArray{LeafBios,1}rt_conRTCachert_dimRTDimensionssoilSoilOpticalswlsWaveLengths
Big Leaf Model
CanopyLayers.big_leaf_partition — Functionbig_leaf_partition(
lai::FT,
zenith::FT,
r_all::FT,
r_dir::FT = FT(0.8)
) where {FT<:AbstractFloat}Partition the big-leaf canopy into sunlit and shaded layers, given
laiLeaf area indexzenithZenith angle in degreer_allTotal radiation in[W m⁻²]r_dirDirect radiation partition inr_all
The function returns
ratioratio of sunlit leaves out of all leavesq_slmMean sunlit layer PARq_shmMean shaded layer PARe_slMean sunlit layer absorbed total energye_shMean shaded layer absorbed total energy
SCOPE Model
CanopyLayers.canopy_fluxes! — Functioncanopy_fluxes!(
can::Canopy4RT{FT},
can_opt::CanopyOpticals{FT},
can_rad::CanopyRads{FT},
in_rad::IncomingRadiation{FT},
soil::SoilOpticals{FT},
leaves::Array{LeafBios{FT},1},
wls::WaveLengths{FT},
rt_con::RTCache{FT}
) where {FT<:AbstractFloat}Computes a variety of integrated fluxes from the spectrally resolved computations in the short-wave Canopy RT (e.g. absorbed soil radiation, absorbed direct and diffuse PAR by layer (and angles for direct), net direct and diffuse energy balance per layer), given
canCanopy4RTtype structcan_optCanopyOpticalstype structcan_radCanopyRadstype structin_radIncomingRadiationtype structsoilSoilOpticalstype structleavesArray ofLeafBiostype structwlsWaveLengthstype structrt_conRTCachetype cache
CanopyLayers.canopy_geometry! — Functioncanopy_geometry!(
can::Canopy4RT{FT},
angles::SolarAngles{FT},
can_opt::CanopyOpticals{FT},
rt_con::RTCache{FT}
) where {FT<:AbstractFloat}Computes canopy optical properties (extinction coefficients for direct and diffuse light) based on the SAIL model. Most important input parameters are leaf inclination and azimuth distribution functions and sun-sensor geometry. Canopy clumping Ω is implemented as in Pinty et al (2015), given
canCanopy4RTtype structanglesSolarAnglestype structcan_optCanopyOpticalstype structrt_conRTCachetype cache
CanopyLayers.canopy_matrices! — Functioncanopy_matrices!(
leaves::Array{LeafBios{FT},1},
can_opt::CanopyOpticals{FT}
) where {FT<:AbstractFloat}Compute scattering coefficient matrices for direct and diffuse light given geometry dependent overall extinction coefficients and pigment dependent leaf reflectance and transmission (computed via fluspect). This function has to be called before short_wave! can be used.
leavesArray ofLeafBiostype structcan_optCanopyOpticalstype struct
CanopyLayers.clumping_factor! — Functionclumping_factor!(
can::Canopy4RT{FT},
angles::SolarAngles{FT}
) where {FT<:AbstractFloat}Calculate the clumping factor, given
canCanopy4RTtype structanglesSolarAnglestype struct
CanopyLayers.diffusive_S — Functiondiffusive_S(τ_dd::Array{FT},
ρ_dd::Array{FT},
S⁻::Array{FT},
S⁺::Array{FT},
boundary_top::Array{FT},
boundary_bottom::Array{FT},
rsoil::Array{FT}
) where {FT<:AbstractFloat}Computes 2-stream diffusive radiation transport (used for thermal and SIF) given:
τ_ddA 2D Array with layer reflectancesρ_ddA 2D Array with layer transmissionsS⁻A 2D Array with layer source terms in the downwelling directionS⁺A 2D Array with layer source terms in the upwelling directionboundary_topA 1D array with downwelling radiation at the top (top of canopy)boundary_bottomA 1D array with upwnwelling radiation at the bottom (soil)rsoilA 1D array with soil reflectance
CanopyLayers.diffusive_S! — Functiondiffusive_S!(
sf_con::SFCache{FT},
soil::SoilOpticals{FT},
rt_dim::RTDimensions
) where {FT<:AbstractFloat}Computes 2-stream diffusive radiation transport (used for thermal and SIF), given
sf_conSFCachetype cachesoilSoilOpticalstype structrt_dimRTDimensionstype struct
CanopyLayers.fluspect! — Functionfluspect!(leaf::LeafBios{FT},
wls::WaveLengths{FT};
APAR_car::Bool = true
) where {FT<:AbstractFloat}Computes leaf optical properties (reflectance and transittance) based on pigment concentrations. Also computes Fluorescence excitation matrices. Mostly based on PROSPECT-D for leaf reflectance/transmission and FluSpec for fluorescence.
leafLeafBiostype structwlsWaveLengthstype structAPAR_carIf true, include Car absorption in APAR for photosynthesis
CanopyLayers.short_wave! — Functionshort_wave!(can::Canopy4RT{FT},
can_opt::CanopyOpticals{FT},
can_rad::CanopyRads{FT},
in_rad::IncomingRadiation{FT},
soil::SoilOpticals{FT},
rt_con::RTCache{FT}
) where {FT<:AbstractFloat}Simulate the short wave radiation through the canopy, given
canCanopy4RTtype structcan_optCanopyOpticalstype structcan_radCanopyRadstype structin_radIncomingRadiationtype structsoilSoilOpticalstype structrt_conRTCachetype cache
CanopyLayers.SIF_fluxes! — FunctionSIF_fluxes!(leaves::Array{LeafBios{FT},1},
can_opt::CanopyOpticals{FT},
can_rad::CanopyRads{FT},
can::Canopy4RT{FT},
soil::SoilOpticals{FT},
wls::WaveLengths{FT},
rt_con::RTCache{FT},
rt_dim::RTDimensions;
photon::Bool = true
) where {FT<:AbstractFloat}Computes 2-stream diffusive radiation transport for SIF radiation (calls [diffusive_S!] internally). Layer reflectance and transmission is computed from SW optical properties, layer sources from absorbed light and SIF efficiencies. Boundary conditions are zero SIF incoming from atmosphere or soil.
leavesArray ofLeafBiostype structcan_optCanopyOpticalstype structcan_radCanopyRadstype structcanCanopy4RTtype structsoilSoilOpticalstype structwlsWaveLengthstype structrt_conRTCachetype cachert_dimRTDimensionstype structphotonIf true, use photon unit in the matrix conversion
SIF_fluxes!(leaf::LeafBios{FT},
in_rad::IncomingRadiation{FT},
wls::WaveLengths{FT},
rt_con::RTCache{FT},
fqe::FT = FT(0.01);
photon::Bool = true
) where {FT<:AbstractFloat}Leaf level SIF, given
leafLeafBiotype structin_radIncomingRadiationtype structwlsWaveLengthstype structrt_conRTCachetype cachefqeFluorescence quantum yield (default at 1%)photonIf true, use photon unit in the matrix conversion
Note that in_rad assumes direct light with zenith angle of 0, and a zenith angle correction needs to be made before passing it to this function. The up- and down-ward SIF are stored in sf_con as M⁻_sun and M⁺_sun.
CanopyLayers.thermal_fluxes! — Functionthermal_fluxes!(
leaves::Array{LeafBios{FT},1},
can_opt::CanopyOpticals{FT},
can_rad::CanopyRads{FT},
can::Canopy4RT{FT},
soil::SoilOpticals{FT},
incLW::Array{FT},
wls::WaveLengths{FT}
) where {FT<:AbstractFloat}Computes 2-stream diffusive radiation transport for thermal radiation (calls [diffusive_S] internally). Layer reflectance and transmission is computed from LW optical properties, layer sources from temperature and Planck law, boundary conditions from the atmosphere and soil emissivity and temperature. Currently only uses Stefan Boltzmann law to compute spectrally integrated LW but can be easily adjusted to be spectrally resolved.
leavesArray ofLeafBiostype structcan_optCanopyOpticalstype structcan_radCanopyRadstype structcanCanopy4RTtype structsoilSoilOpticalstype structincLWA 1D array with incoming long-wave radiationwlsWaveLengthstype struct
Indicies
CanopyLayers.BLUE — FunctionBLUE(can_rad::CanopyRads{FT},
wls::WaveLengths{FT}
) where {FT<:AbstractFloat}Return the BLUE @ 469 nm, given
can_radCanopyRadstype structwlsWaveLengthstype struct
CanopyLayers.EVI — FunctionEVI(can_rad::CanopyRads{FT},
wls::WaveLengths{FT}
) where {FT<:AbstractFloat}Return the EVI, given
can_radCanopyRadstype structwlsWaveLengthstype struct
CanopyLayers.EVI2 — FunctionEVI2(can_rad::CanopyRads{FT},
wls::WaveLengths{FT}
) where {FT<:AbstractFloat}Return the EVI2, given
can_radCanopyRadstype structwlsWaveLengthstype struct
CanopyLayers.LSWI — FunctionLSWI(can_rad::CanopyRads{FT},
wls::WaveLengths{FT}
) where {FT<:AbstractFloat}Return the LSWI, given
can_radCanopyRadstype structwlsWaveLengthstype struct
CanopyLayers.NDVI — FunctionNDVI(can_rad::CanopyRads{FT},
wls::WaveLengths{FT}
) where {FT<:AbstractFloat}Return the NDVI, given
can_radCanopyRadstype structwlsWaveLengthstype struct
CanopyLayers.NIR — FunctionNIR(can_rad::CanopyRads{FT},
wls::WaveLengths{FT}
) where {FT<:AbstractFloat}Return the NIR @ 858.5 nm, given
can_radCanopyRadstype structwlsWaveLengthstype struct
CanopyLayers.NIRv — FunctionNIRv(can_rad::CanopyRads{FT},
wls::WaveLengths{FT}
) where {FT<:AbstractFloat}Return the NIRv, given
can_radCanopyRadstype structwlsWaveLengthstype struct
CanopyLayers.NIRvES — FunctionNIRvES(can_rad::CanopyRads{FT},
wls::WaveLengths{FT}
) where {FT<:AbstractFloat}Return the NIRv from the energy spectrum, given
can_radCanopyRadstype structwlsWaveLengthstype struct
CanopyLayers.RED — FunctionRED(can_rad::CanopyRads{FT},
wls::WaveLengths{FT}
) where {FT<:AbstractFloat}Return the RED @ 645 nm, given
can_radCanopyRadstype structwlsWaveLengthstype struct
CanopyLayers.REF_WL — FunctionREF_WL(wls::WaveLengths{FT},
can_rad::CanopyRads{FT}
wls::WaveLengths{FT},
twl::FT
) where {FT<:AbstractFloat}Return the Reflectance, given
can_radCanopyRadstype structwlsWaveLengthstype structtwlTarget wave length in nm
CanopyLayers.SIF_683 — FunctionSIF_683(can_rad::CanopyRads{FT},
wls::WaveLengths{FT}
) where {FT<:AbstractFloat}Return the SIF @ 682.5 nm, given
can_radCanopyRadstype structwlsWaveLengthstype struct
CanopyLayers.SIF_740 — FunctionSIF_740(can_rad::CanopyRads{FT},
wls::WaveLengths{FT}
) where {FT<:AbstractFloat}Return the SIF @ 740 nm, given
can_radCanopyRadstype structwlsWaveLengthstype struct
CanopyLayers.SIF_757 — FunctionSIF_757(can_rad::CanopyRads{FT},
wls::WaveLengths{FT};
oco::Int = 2
) where {FT<:AbstractFloat}Return the SIF @ 758.68 (OCO2) or 758.77 (OCO3) nm, given
can_radCanopyRadstype structwlsWaveLengthstype structocoInteger to indentify OCO2 or OCO3
CanopyLayers.SIF_771 — FunctionSIF_771(can_rad::CanopyRads{FT},
wls::WaveLengths{FT};
oco::Int = 2
) where {FT<:AbstractFloat}Return the SIF @ 769.94 (OCO2) or 770.005 (OCO3) nm, given
can_radCanopyRadstype structwlsWaveLengthstype structocoInteger to indentify OCO2 or OCO3
CanopyLayers.SIF_WL — FunctionSIF_WL(wls::WaveLengths{FT},
can_rad::CanopyRads{FT}
wls::WaveLengths{FT},
twl::FT
) where {FT<:AbstractFloat}Return the SIF, given
can_radCanopyRadstype structwlsWaveLengthstype structtwlTarget SIF wave length in nm
CanopyLayers.SPECTRUM_WL — FunctionSPECTRUM_WL(wls::WaveLengths{FT},
can_rad::CanopyRads{FT}
wls::WaveLengths{FT},
twl::FT
) where {FT<:AbstractFloat}Return the Reflectance, given
can_radCanopyRadstype structwlsWaveLengthstype structtwlTarget wave length in nm
CanopyLayers.SWIR — FunctionSWIR(can_rad::CanopyRads{FT},
wls::WaveLengths{FT}
) where {FT<:AbstractFloat}Return the SWIR @ 2130 nm, given
can_radCanopyRadstype structwlsWaveLengthstype struct
Utils
CanopyLayers.calctav — Functioncalctav(α::FT, nr::FT) where {FT<:AbstractFloat}Computes transmission of isotropic radiation across an interface between two dielectrics (Stern F., 1964; Allen W.A., 1973)). From calctav.m in PROSPECT-D
αangle of incidencenrIndex of refraction
CanopyLayers.dcum — Functiondcum(a::FT, b::FT, t::FT) where {FT<:AbstractFloat}TODO Add function description
CanopyLayers.dladgen — Functiondladgen(a::FT, b::FT, litab_bnd::Array{FT,2}) where {FT<:AbstractFloat}TODO Calculate the freqency of WHAT?
CanopyLayers.e2phot — Functione2phot(λ::Array{FT}, E::Array{FT}) where {FT<:AbstractFloat}Calculates the number of moles of photons, given
λAn array of wave length in[nm], converted to[m]by _FACEJoules of energy
CanopyLayers.e2phot! — Functione2phot!(
λ::Array{FT,1},
E::Array{FT,1},
cache::Array{FT,1}
) where {FT<:AbstractFloat}Calculates the number of moles of photons, given
λAn array of wave length in[nm], converted to[m]by _FACEJoules of energycacheCache to avoid memory allocations
CanopyLayers.psofunction — Functionpsofunction(K::FT,
k::FT,
Ω::FT,
LAI::FT,
q::FT,
dso::FT,
xl::FT
) where {FT<:AbstractFloat}TODO explain the variables
Return the probability of observing a sunlit leaf at depth xl (pso, see eq 31 in vdT 2009), given
xlLeaf depth in the canopy
CanopyLayers.volscatt! — Functionvolscatt!(cache::Array{FT,1},
sza::FT,
vza::FT,
raa::FT,
ttl::FT
) where {FT<:AbstractFloat}Calculate interception parameters (chi_s and chi_s) and leaf reflectance multiplier (frho) and transmittance multiplier (ftau), given
cacheArray cache for resultsszaSolar zenith anglevzaViewing zenith angleraaRelative azimuth anglettlLeaf inclination angle