Open billsacks opened 5 years ago
A note from David Noone:
Just took a quick look at the Bareground fluxes (canopyfluxes are similar)
The original code is:
! compute latent heat fluxes individually
qflx_ev_soil(p) = -raiw*(forc_q(c) - qg_soil(c))
For the tracers, one could write (excuse my pseudo code, and variable names):
Rtopsoil = tracer_h2osoi(p,1)/tracer_h2osoi(p,1)
if (water_isotopes) then ! proper fractionation
raiwt = raiw*alpha_kinetic ! different conductance
tr_soil = qg_soil(c) * Rtopsoil/alpha_equilibrium ! different saturation
! Same expression as above, but for isotope
tracer_qflx_ev_soil(p) = -raiwt*(tracer_forc_q(c) - tr_soil)
else ! donor ratio.
tracer_qflx_ev_soil(p) = Rtopsoil*qflx_ev_soil(p)
endif
What I had in mind was setting up the code infrustructure to allow this type of calculation, with the elegance of the way you're coding it up.
I will also reach out to @rfiorella as we start working on fractionation parameterizations.
Note that BareGroundFluxes is the first place where we need to deal with fractionation.