subroutine teten(tk, es) ! This routine calculates the saturation vapor pressure using ! Teten's formula ! input: tk = temperature (K) ! output: es = saturation vapor pressure (Pa) ! Modifications: ! 4/20/21 (J. Dostalek) Started this Fortran 90 version !------------------------------------------------------------------------------- implicit none real, intent(in) :: tk real, intent(out) :: es real, parameter :: c1 = 610.78 real, parameter :: c2 = 17.269 real, parameter :: c3 = 35.86 ! Check for valid temperature if (tk < 40.0) then es = 0.0 return end if es = c1*exp(c2*(tk - 273.16)/(tk - c3)) return end subroutine teten