Ignore:
Timestamp:
Mar 12, 2018, 3:37:19 PM (7 years ago)
Author:
lfita
Message:

Adding:

`psl_ecmwf': sea-level pressure computation following ECMWF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/module_ForDiagnosticsVars.f90

    r1785 r1795  
    2828! var_cllmh: low, medium, high-cloud [0,1]
    2929! var_clt: total cloudiness [0,1]
     30! var_psl_ecmwf: sea level pressure using ECMWF method following Mats Hamrud and Philippe Courtier [Pa]
    3031! var_zmla_generic: Subroutine to compute pbl-height following a generic method
    3132! var_zwind: Subroutine to extrapolate the wind at a given height following the 'power law' methodology
     
    127128  END FUNCTION var_clt
    128129
     130  SUBROUTINE var_psl_ecmwf(PRPRESS, hgt, PTB, PRESBH, PRESBF, psl)
     131    ! Subroutine to compute sea level pressure using ECMWF method following Mats Hamrud and Philippe Courtier
     132    !   method found in LMDZ in phylmd/pppmer.F90 in combination with phylmd/ctsar.F90
     133
     134!        IMPLICIT ARGUMENTS :  CONSTANTS FROM YOMCST,YOMGEM,YOMSTA.
     135!        --------------------
     136
     137    IMPLICIT NONE
     138
     139    REAL, INTENT(in)                                     :: PRPRESS, hgt, PTB, PRESBH, PRESBF
     140    REAL, INTENT(out)                                    :: psl
     141
     142! Local
     143    REAL                                                 :: ghgt, PTSTAR, PT0, ZTSTAR
     144    REAL                                                 :: ZALPHA, POROG
     145    REAL                                                 :: ZDTDZSG, ZOROG, ZT0, ZTX, ZTY, ZX, ZY, ZY2
     146    REAL, PARAMETER                                      :: RDTDZ1 = -gammav
     147
     148!!!!!!! Variables
     149! PRPRESS: Surface pressure [Pa]
     150! hgt: Terrain height [m]
     151! PTB: Temperature first half-level [K]
     152! PRESBH: Pressure first half-level [Pa]
     153! PRESBF: Pressure second full-level [Pa]
     154! psl: sea-level pressure
     155
     156    fname = 'var_psl_ecmwf'
     157   
     158    ! Height by gravity
     159    POROG = hgt*g
     160
     161    !* 1. COMPUTES SURFACE TEMPERATURE
     162    !*   THEN STANDARD SURFACE TEMPERATURE.
     163
     164    ZDTDZSG=-RDTDZ1/g
     165    ZALPHA=ZDTDZSG*r_d
     166
     167    PTSTAR=PTB*(1.0+ZALPHA*(PRESBH/PRESBF-1.0))
     168    PT0=PTSTAR+ZDTDZSG*POROG
     169
     170    !* 2.    POST-PROCESS MSL PRESSURE.
     171    !  --------------------------
     172
     173    !* 2.1   COMPUTATION OF MODIFIED ALPHA AND TSTAR.
     174
     175    ZTX=290.5
     176    ZTY=255.0
     177
     178    IF (PTSTAR < ZTY) THEN
     179      ZTSTAR=0.5*(ZTY+PTSTAR)
     180    ELSEIF (PTSTAR < ZTX) THEN
     181      ZTSTAR=PTSTAR
     182    ELSE
     183      ZTSTAR=0.5*(ZTX+PTSTAR)
     184    ENDIF
     185
     186    ZT0=ZTSTAR+ZDTDZSG*POROG
     187    IF (ZTX > ZTSTAR .AND. ZT0 > ZTX) THEN
     188      ZT0=ZTX
     189    ELSEIF (ZTX <= ZTSTAR .AND. ZT0 > ZTSTAR) THEN
     190      ZT0=ZTSTAR
     191    ELSE
     192      ZT0=PT0
     193    ENDIF
     194
     195    ZOROG=SIGN(MAX(1.0,ABS(POROG)),POROG)
     196    ZALPHA=r_d*(ZT0-ZTSTAR)/ZOROG
     197
     198    !* 2.2   COMPUTATION OF MSL PRESSURE.
     199
     200    IF (ABS(POROG) >= 0.001) THEN
     201      ZX=POROG/(r_d*ZTSTAR)
     202      ZY=ZALPHA*ZX
     203      ZY2=ZY*ZY
     204
     205      psl=PRPRESS*EXP(ZX*(1.0-0.5*ZY+1.0/3.*ZY2))
     206    ELSE
     207      psl=PRPRESS
     208    ENDIF
     209
     210    RETURN
     211
     212  END SUBROUTINE var_psl_ecmwf
    129213
    130214  SUBROUTINE compute_psl_ptarget4d2(press, ps, hgt, ta, qv, ptarget, psl, d1, d2, d3, d4)
Note: See TracChangeset for help on using the changeset viewer.