[5144] | 1 | SUBROUTINE PPPMER(KPROMA, KSTART, KPROF, PRPRESS, POROG, PTSTAR, PT0, PMSLPPP) |
---|
[2386] | 2 | |
---|
[5144] | 3 | !**** *PPPMER* - POST-PROCESS MSL PRESSURE. |
---|
[2386] | 4 | |
---|
[5144] | 5 | ! PURPOSE. |
---|
| 6 | ! -------- |
---|
| 7 | ! COMPUTES MSL PRESSURE. |
---|
[2386] | 8 | |
---|
[5144] | 9 | !** INTERFACE. |
---|
| 10 | ! ---------- |
---|
[2386] | 11 | |
---|
[5144] | 12 | ! *CALL* *PPPMER(KPROMA,KSTART,KPROF,PRPRESS,POROG,PTSTAR,PT0, |
---|
| 13 | ! S PMSLPPP) |
---|
[2386] | 14 | |
---|
[5144] | 15 | ! EXPLICIT ARGUMENTS |
---|
| 16 | ! -------------------- |
---|
[2386] | 17 | |
---|
| 18 | |
---|
[5144] | 19 | ! KPROMA - HORIZONTAL DIMENSION. (INPUT) |
---|
| 20 | ! KSTART - START OF WORK. (INPUT) |
---|
| 21 | ! KPROF - DEPTH OF WORK. (INPUT) |
---|
| 22 | ! PRPRESS(KPROMA) - SURFACE PRESSURE (INPUT) |
---|
| 23 | ! POROG(KPROMA) - MODEL OROGRAPHY. (INPUT) |
---|
| 24 | ! PTSTAR(KPROMA) - SURFACE TEMPERATURE (INPUT) |
---|
| 25 | ! PT0(KPROMA) - STANDARD SURFACE TEMPERATURE (INPUT) |
---|
| 26 | ! PMSLPPP(KPROMA) - POST-PROCESSED MSL PRESSURE (OUTPUT) |
---|
| 27 | ! IMPLICIT ARGUMENTS : CONSTANTS FROM YOMCST,YOMGEM,YOMSTA. |
---|
| 28 | ! -------------------- |
---|
[2386] | 29 | |
---|
[5144] | 30 | ! METHOD. |
---|
| 31 | ! ------- |
---|
| 32 | ! SEE DOCUMENTATION |
---|
[2386] | 33 | |
---|
[5144] | 34 | ! EXTERNALS. NONE |
---|
| 35 | ! ---------- |
---|
[2386] | 36 | |
---|
[5144] | 37 | ! REFERENCE. |
---|
| 38 | ! ---------- |
---|
| 39 | ! ECMWF Research Department documentation of the IFS |
---|
[2386] | 40 | |
---|
[5144] | 41 | ! AUTHOR. |
---|
| 42 | ! ------- |
---|
| 43 | ! MATS HAMRUD AND PHILIPPE COURTIER *ECMWF* |
---|
[2386] | 44 | |
---|
[5144] | 45 | ! MODIFICATIONS. |
---|
| 46 | ! -------------- |
---|
| 47 | ! ORIGINAL : 89-01-26 |
---|
[2386] | 48 | |
---|
[5144] | 49 | ! E. A-son, J-F Geleyn 920409 Mod. T*, T0 and alpha below surface. |
---|
| 50 | ! M.Hamrud 01-Oct-2003 CY28 Cleaning |
---|
[2386] | 51 | |
---|
[5144] | 52 | ! ------------------------------------------------------------------ |
---|
[2386] | 53 | |
---|
[5144] | 54 | ! USE PARKIND1 |
---|
| 55 | !<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/xrd/module/parkind1.F90.php#parkind1> ,ONLY: JPIM ,JPRB |
---|
| 56 | ! USE YOMHOOK |
---|
| 57 | !<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/xrd/module/yomhook.F90.php#yomhook> ,ONLY: LHOOK, DR_HOOK |
---|
[2386] | 58 | |
---|
[5144] | 59 | !USE YOMCST, ONLY: RG, RD |
---|
| 60 | !<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/arp/module/yomcst.F90.php#yomcst> , ONLY: RG |
---|
[2386] | 61 | |
---|
[5144] | 62 | !<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/xrd/support/rg.F.php#rg> ,RD |
---|
| 63 | ! USE YOMSTA |
---|
| 64 | !<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/arp/module/yomsta.F90.php#yomsta> , ONLY: RDTDZ1 |
---|
[2386] | 65 | |
---|
[5144] | 66 | USE lmdz_yomcst |
---|
| 67 | |
---|
[2386] | 68 | IMPLICIT NONE |
---|
| 69 | |
---|
[5144] | 70 | !IM INTEGER(KIND=JPIM),INTENT(IN) :: KPROMA |
---|
| 71 | !IM INTEGER(KIND=JPIM),INTENT(IN) :: KSTART |
---|
| 72 | !IM INTEGER(KIND=JPIM),INTENT(IN) :: KPROF |
---|
| 73 | INTEGER, INTENT(IN) :: KPROMA |
---|
| 74 | INTEGER, INTENT(IN) :: KSTART |
---|
| 75 | INTEGER, INTENT(IN) :: KPROF |
---|
| 76 | !IM REAL(KIND=JPRB) ,INTENT(IN) :: PRPRESS(KPROMA) |
---|
| 77 | !IM REAL(KIND=JPRB) ,INTENT(IN) :: POROG(KPROMA) |
---|
| 78 | !IM REAL(KIND=JPRB) ,INTENT(IN) :: PTSTAR(KPROMA) |
---|
| 79 | !IM REAL(KIND=JPRB) ,INTENT(IN) :: PT0(KPROMA) |
---|
| 80 | !IM REAL(KIND=JPRB) ,INTENT(OUT) :: PMSLPPP(KPROMA) |
---|
| 81 | !IM REAL(KIND=JPRB) :: ZTSTAR(KPROMA) |
---|
| 82 | !IM REAL(KIND=JPRB) :: ZALPHA(KPROMA) |
---|
| 83 | REAL, INTENT(IN) :: PRPRESS(KPROMA) |
---|
| 84 | REAL, INTENT(IN) :: POROG(KPROMA) |
---|
| 85 | REAL, INTENT(IN) :: PTSTAR(KPROMA) |
---|
| 86 | REAL, INTENT(IN) :: PT0(KPROMA) |
---|
| 87 | REAL, INTENT(OUT) :: PMSLPPP(KPROMA) |
---|
| 88 | REAL :: ZTSTAR(KPROMA) |
---|
| 89 | REAL :: ZALPHA(KPROMA) |
---|
[2386] | 90 | |
---|
[5144] | 91 | !IM INTEGER(KIND=JPIM) :: JL |
---|
| 92 | INTEGER :: JL |
---|
[2386] | 93 | |
---|
[5144] | 94 | !IM REAL(KIND=JPRB) :: ZDTDZSG, ZOROG, ZT0, ZTX, ZTY, ZX, ZY, ZY2 |
---|
| 95 | !IM REAL(KIND=JPRB) :: ZHOOK_HANDLE |
---|
| 96 | REAL :: ZDTDZSG, ZOROG, ZT0, ZTX, ZTY, ZX, ZY, ZY2 |
---|
| 97 | REAL :: ZHOOK_HANDLE |
---|
| 98 | !IM beg |
---|
| 99 | REAL, PARAMETER :: RDTDZ1 = -0.0065 !or USE YOMSTA |
---|
| 100 | !IM end |
---|
[2386] | 101 | |
---|
[5144] | 102 | ! ------------------------------------------------------------------ |
---|
[2386] | 103 | |
---|
[5144] | 104 | !* 1. POST-PROCESS MSL PRESSURE. |
---|
| 105 | ! -------------------------- |
---|
[2386] | 106 | |
---|
[5144] | 107 | !* 1.1 COMPUTATION OF MODIFIED ALPHA AND TSTAR. |
---|
[2386] | 108 | |
---|
[5144] | 109 | !IM IF (LHOOK) CALL DR_HOOK('PPPMER',0,ZHOOK_HANDLE) |
---|
| 110 | !IM ZTX=290.5_JPRB |
---|
| 111 | !IM ZTY=255.0_JPRB |
---|
| 112 | ZTX = 290.5 |
---|
| 113 | ZTY = 255.0 |
---|
| 114 | ZDTDZSG = -RDTDZ1 / RG |
---|
| 115 | !<http://intra.cnrm.meteo.fr/eac/ARPCLI5.2/doci/code/arpcli5.2/xrd/support/rg.F.php#rg> |
---|
| 116 | DO JL = KSTART, KPROF |
---|
[2386] | 117 | |
---|
[5144] | 118 | IF(PTSTAR(JL) < ZTY) THEN |
---|
| 119 | !IM ZTSTAR(JL)=0.5_JPRB*(ZTY+PTSTAR(JL)) |
---|
| 120 | ZTSTAR(JL) = 0.5 * (ZTY + PTSTAR(JL)) |
---|
| 121 | ELSEIF(PTSTAR(JL) < ZTX) THEN |
---|
| 122 | ZTSTAR(JL) = PTSTAR(JL) |
---|
| 123 | ELSE |
---|
| 124 | !IM ZTSTAR(JL)=0.5_JPRB*(ZTX+PTSTAR(JL)) |
---|
| 125 | ZTSTAR(JL) = 0.5 * (ZTX + PTSTAR(JL)) |
---|
| 126 | ENDIF |
---|
[2386] | 127 | |
---|
[5144] | 128 | ZT0 = ZTSTAR(JL) + ZDTDZSG * POROG(JL) |
---|
| 129 | IF(ZTX > ZTSTAR(JL) .AND. ZT0 > ZTX) THEN |
---|
| 130 | ZT0 = ZTX |
---|
| 131 | ELSEIF(ZTX <= ZTSTAR(JL) .AND. ZT0 > ZTSTAR(JL)) THEN |
---|
| 132 | ZT0 = ZTSTAR(JL) |
---|
| 133 | ELSE |
---|
| 134 | ZT0 = PT0(JL) |
---|
| 135 | ENDIF |
---|
[2386] | 136 | |
---|
[5144] | 137 | !IM ZOROG=SIGN(MAX(1.0_JPRB,ABS(POROG(JL))),POROG(JL)) |
---|
| 138 | ZOROG = SIGN(MAX(1.0, ABS(POROG(JL))), POROG(JL)) |
---|
| 139 | ZALPHA(JL) = RD * (ZT0 - ZTSTAR(JL)) / ZOROG |
---|
| 140 | ENDDO |
---|
[2386] | 141 | |
---|
[5144] | 142 | !* 1.2 COMPUTATION OF MSL PRESSURE. |
---|
[2386] | 143 | |
---|
[5144] | 144 | DO JL = KSTART, KPROF |
---|
| 145 | !IM IF (ABS(POROG(JL)) >= 0.001_JPRB) THEN |
---|
| 146 | IF (ABS(POROG(JL)) >= 0.001) THEN |
---|
| 147 | ZX = POROG(JL) / (RD * ZTSTAR(JL)) |
---|
| 148 | ZY = ZALPHA(JL) * ZX |
---|
| 149 | ZY2 = ZY * ZY |
---|
[2386] | 150 | |
---|
[5144] | 151 | !IM PMSLPPP(JL)=PRPRESS(JL)*EXP(ZX*(1.0_JPRB-0.5_JPRB*ZY+1.0_JPRB/3._JPRB*ZY2)) |
---|
| 152 | PMSLPPP(JL) = PRPRESS(JL) * EXP(ZX * (1.0 - 0.5 * ZY + 1.0 / 3. * ZY2)) |
---|
| 153 | ELSE |
---|
| 154 | PMSLPPP(JL) = PRPRESS(JL) |
---|
| 155 | ENDIF |
---|
| 156 | ENDDO |
---|
[2386] | 157 | |
---|
| 158 | |
---|
[5144] | 159 | ! ------------------------------------------------------------------ |
---|
[2386] | 160 | |
---|
[5144] | 161 | !IM IF (LHOOK) CALL DR_HOOK('PPPMER',1,ZHOOK_HANDLE) |
---|
| 162 | END SUBROUTINE PPPMER |
---|