subroutine mhuaesgd(pesg,phug,pttg,ppsg,ppt,kni,knj,knk) 2 #if defined (DOC) *** S/R mhuaesgd - CALCULATE ES=T-TD FROM T AND Q. Grid-point version. * NO ICE PHASE.... * *Author * L. Fillion -ARMA/AES - 11 dec 98 * *Revision * Y.J. Rochon and Cecilien Charette - SMC - Sept 2004 * - Use of new function FOTW8 FOEFQ8 (in fintern8.cdk). * Still follow WMO convention on T-Td vs HU relationship. * *Arguments: * - Output - * zesg : Grid-point analysis increment of (T-Td) * * - Input - * phug : Grid-point basic-state specific-humidity. (Kg/Kg) * pttg : Grid-point basic-state Temperature (K) * ppsg : Grid-point basic-state Surface-pressure (Pa). * ppt : Grid-point top pressure level of the analysis domain. * kni : X-dimension of input grid-point fields. * knj : Y-dimension of input grid-point fields. * knk : Vertical-dimension of input grid-point fields. * * ------------------- * *Object: For postprocessing in variational analysis: * calculate the dew point depression from specific * humidity, temperature and pressure. No ice phase * is permitted. * #endif IMPLICIT NONE integer kni,knj,knk real*8 pesg(kni,knk,knj),phug(kni,knk,knj),pttg(kni,knk,knj) real*8 ppsg(kni,knj),ppt(kni,knj) * *IMPLICITS #include "pardim.cdk"
#include "comdim.cdk"
#include "comgd0.cdk"
#include "comgem.cdk"
* INTEGER ji,jj,jlev,jij REAL*8 ZE, ZTD, ZPRES INTEGER IERR,ILEN EXTERNAL HPDEALLC, HPALLOC real*8 zpresa,zpresb C * #include "comphy.cdk"
#include "dinternv.cdk"
#include "dintern8.cdk"
#include "fintern8.cdk"
#include "finternv.cdk"
* ** do jlev=1,knk do ji=1,kni do jj=1,knj jij=(ji-1)*knj+jj zpresb = ((vhybinc(jlev) - rptopinc/rprefinc) & /(1.0-rptopinc/rprefinc))**rcoefinc zpresa = rprefinc * (vhybinc(jlev)-zpresb) zpres = zpresa + zpresb*ppsg(ji,jj) c c zpres = ppt(ji,jj) + vlev(jlev)*(ppsg(ji,jj)-ppt(ji,jj)) c c Get the saturated vapor pressure from q (specific humidity) c ZE = FOEFQ8(phug(ji,jlev,jj),zpres) c c Now the dewpoint temperature c ZTD=FOTW8(ZE) c c Finally the dewpoint depression c pesg(ji,jlev,jj) = pttg(ji,jlev,jj) - ZTD enddo enddo enddo c return end