Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SUEWS interface improvement
calPotEvap(& ! compared with the above subroutine, you may find we put all input and output variables explicitly here
TSurf, Qair, SoilMoist, Res, PET)
! below are pseudo-code and comments:
implict none
real, intent(in):: TSurf, Qair, SoilMoist, Res
real, intent(out):: PET
real:: Rho,Lv ! these are constant values: Rho (air density), Lv (latent heat of vaporization)
PET= soilMoist*Rho*Lv/Res*(qsat(Tsurf)-Qair) ! this is the final result we want
endsubroutine calPotEvap
calPotEvap(day) ! this subroutine calculates potential evaporation of a given day
! below are pseudo-code and comments:
use someModule
implict none
! load met forcing and soil states of the given day:
call loadMet(day) ! by doing this, we can get: TSurf (surface temperature), Qair (air humidity),
call loadSfc(day) ! by doing this, we can get: SoilMoist (soil moisture), Res (aerodynamic resistance)
PET= soilMoist*Rho*Lv/Res*(qsat(Tsurf)-Qair) ! this is the final result we want
endsubroutine calPotEvap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.