Last active
August 10, 2017 05:01
-
-
Save sunt05/6d5cc5556e6c2799c99d32a2065cf450 to your computer and use it in GitHub Desktop.
SUEWS interface improvement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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