CliMA/Land

Integration over wavelength

Closed this issue · 4 comments

zmoon commented

Given the way the wavelengths and wavelength band/bin widths are defined,

# Wave length lists
"Standard wave length `[nm]`"
sWL::Array{FT,1} = [collect(FT(400.0):FT(10.0):FT( 650.1));
collect(FT(655.0):FT( 5.0):FT( 770.1));
collect(FT(780.0):FT(25.0):FT(2400.1))]
"Differential wavelength"
dWL::Array{FT,1} = diff(sWL)

and the fast∫ definition, it seems to be set up for left Riemann sum. If you define the included bands this way (both bounds inclusive),

"index of wlPAR in WL"
iPAR::Array{Int,1} = findall( (WL .>= minwlPAR) .& (WL .<= maxwlPAR) )

extra energy is included in the integral, since the 700.0 nm band has its left edge at 700.0 but right edge at 705.0.

If you dig up into the code more, you will find that

sWL = [400, 410, 420, ..., 640, 650, 655, 660, ..., 690, 695, 700, 705, ...]
dWL = [10, 10, 10, ..., 5, 5, 5, ...]
WL  = [405, 415, ..., 645, 652.5, 657.5, ..., 692.5, 697.5, 702.5, ...]

and PAR covers the range from 400 to 700 nm, namely the bin of WL from 405 to 697.5 nm.

zmoon commented

Ah, ok, so it moves to bin centers, in CanopyLayers/initialize/leafopticals.jl? Sorry I couldn't find that part when I was browsing.

zmoon commented

Ah, ok, so it moves to bin centers, in CanopyLayers/initialize/leafopticals.jl?

@Yujie-W is this interpretation/attribution correct? Just want to confirm. Thanks for the assistance.

Ah, ok, so it moves to bin centers, in CanopyLayers/initialize/leafopticals.jl?

@Yujie-W is this interpretation/attribution correct? Just want to confirm. Thanks for the assistance.

Yes.