# saturation vapor pressure at leaf temperature (ei)

#### nick

##### Member
Hi, can I please confirm that the saturation vapor pressure at leaf temperature (ei in the CLM5 technote - see section 9.6) is esat_tv in the CLM code? (e.g. when looking at the PhotoSynthesis module).
I thought this was the case until I saw how hs (relative humidity at leaf surface) is calculated in the code:
hs = (gb_mol(p)*ceair + gs_mol(p,iv)*esat_tv(p)) / ((gb_mol(p)+gs_mol(p,iv))*esat_tv(p))
Whereas in the CLM4.5 tech note hs = es/ei (section 8.1), so I'm wondering how these two denominators relate.

On the other hand I see in the CLM5 technote that D = (ei-ea)/1000 and here ei corresponds to esat_tv in the source code (with the addition of a minimum value for the numerator):
rh_can = max((esat_tv(p) - ceair), 50._r8) * 0.001_r8

#### oleson

##### CSEG and Liaisons
Staff member
Yes, ei is saturation vapor pressure at leaf temperature. esat_tv is passed into Photosynthesis through the variable svpts in the call to Photosynthesis in CanopyFluxes. svpts in turn is equal to el, which is solved for in QSat.

#### nick

##### Member
svpts in turn is equal to el
Did you mean ei instead of el? So esat_tv = ei? I just want to be sure I'm not missing a nuance in terminology.

#### oleson

##### CSEG and Liaisons
Staff member
I was just describing the names in the subroutine arguments, but yes esat_tv in the code is equal to ei in the Tech Note:
In CanopyFluxes:

call QSat (t_veg(p), forc_pbot(c), el(p), deldT, qsatl(p), qsatldT(p))

svpts(p) = el(p)

call Photosynthesis (bounds, fn, filterp, &
svpts(begp:endp),...............................

and then in Photosynthesis:

subroutine Photosynthesis ( bounds, fn, filterp, &
esat_tv,.........................

#### nick

##### Member
Oh ok, thanks for clarifying. This helps a lot.