[416] | 1 | SUBROUTINE stdlevvar(klon, knon, nsrf, zxli, & |
---|
| 2 | u1, v1, t1, q1, z1, & |
---|
| 3 | ts1, qsurf, rugos, psol, pat1, & |
---|
| 4 | t_2m, q_2m, u_10m) |
---|
| 5 | IMPLICIT NONE |
---|
| 6 | !------------------------------------------------------------------------- |
---|
| 7 | ! |
---|
| 8 | ! Objet : calcul de la temperature et l'humidite relative a 2m et du |
---|
| 9 | ! module du vent a 10m a partir des relations de Dyer-Businger et |
---|
| 10 | ! des equations de Louis. |
---|
| 11 | ! |
---|
| 12 | ! Reference : Hess, Colman et McAvaney (1995) |
---|
| 13 | ! |
---|
| 14 | ! I. Musat, 01.07.2002 |
---|
| 15 | !------------------------------------------------------------------------- |
---|
| 16 | ! |
---|
| 17 | ! klon----input-I- dimension de la grille physique (= nb_pts_latitude X nb_pts_longitude) |
---|
| 18 | ! knon----input-I- nombre de points pour un type de surface |
---|
| 19 | ! nsrf----input-I- indice pour le type de surface; voir indicesol.inc |
---|
| 20 | ! zxli----input-L- TRUE si calcul des cdrags selon Laurent Li |
---|
| 21 | ! u1------input-R- vent zonal au 1er niveau du modele |
---|
| 22 | ! v1------input-R- vent meridien au 1er niveau du modele |
---|
| 23 | ! t1------input-R- temperature de l'air au 1er niveau du modele |
---|
| 24 | ! q1------input-R- humidite relative au 1er niveau du modele |
---|
| 25 | ! z1------input-R- geopotentiel au 1er niveau du modele |
---|
| 26 | ! ts1-----input-R- temperature de l'air a la surface |
---|
| 27 | ! qsurf---input-R- humidite relative a la surface |
---|
| 28 | ! rugos---input-R- rugosite |
---|
| 29 | ! psol----input-R- pression au sol |
---|
| 30 | ! pat1----input-R- pression au 1er niveau du modele |
---|
| 31 | ! |
---|
| 32 | ! t_2m---output-R- temperature de l'air a 2m |
---|
| 33 | ! q_2m---output-R- humidite relative a 2m |
---|
| 34 | ! u_10m--output-R- vitesse du vent a 10m |
---|
| 35 | ! |
---|
| 36 | INTEGER, intent(in) :: klon, knon, nsrf |
---|
| 37 | LOGICAL, intent(in) :: zxli |
---|
| 38 | REAL, dimension(klon), intent(in) :: u1, v1, t1, q1, z1, ts1 |
---|
| 39 | REAL, dimension(klon), intent(in) :: qsurf, rugos |
---|
| 40 | REAL, dimension(klon), intent(in) :: psol, pat1 |
---|
| 41 | ! |
---|
| 42 | REAL, dimension(klon), intent(out) :: t_2m, q_2m, u_10m |
---|
| 43 | !------------------------------------------------------------------------- |
---|
| 44 | #include "YOMCST.inc" |
---|
| 45 | !IM PLUS |
---|
| 46 | #include "YOETHF.inc" |
---|
| 47 | ! |
---|
| 48 | ! Quelques constantes et options: |
---|
| 49 | ! |
---|
| 50 | ! RKAR : constante de von Karman |
---|
| 51 | REAL, PARAMETER :: RKAR=0.40 |
---|
| 52 | ! niter : nombre iterations calcul "corrector" |
---|
| 53 | INTEGER, parameter :: niter=6, ncon=niter-1 |
---|
| 54 | ! |
---|
| 55 | ! Variables locales |
---|
| 56 | INTEGER :: i, n |
---|
| 57 | REAL :: zref |
---|
| 58 | REAL, dimension(klon) :: speed |
---|
| 59 | ! tpot : temperature potentielle |
---|
| 60 | REAL, dimension(klon) :: tpot |
---|
| 61 | REAL, dimension(klon) :: zri1, cdran |
---|
| 62 | REAL, dimension(klon) :: cdram, cdrah |
---|
| 63 | ! ri1 : nb. de Richardson entre la surface --> la 1ere couche |
---|
| 64 | REAL, dimension(klon) :: ri1 |
---|
| 65 | REAL, dimension(klon) :: ustar, testar, qstar |
---|
| 66 | REAL, dimension(klon) :: zdte, zdq |
---|
| 67 | ! lmon : longueur de Monin-Obukhov selon Hess, Colman and McAvaney |
---|
| 68 | DOUBLE PRECISION, dimension(klon) :: lmon |
---|
| 69 | DOUBLE PRECISION, parameter :: eps=1.0D-20 |
---|
| 70 | REAL, dimension(klon) :: delu, delte, delq |
---|
| 71 | REAL, dimension(klon) :: u_zref, te_zref, q_zref |
---|
| 72 | REAL, dimension(klon) :: temp, pref |
---|
| 73 | LOGICAL :: okri |
---|
| 74 | REAL, dimension(klon) :: u_zref_p, te_zref_p, temp_p, q_zref_p |
---|
| 75 | REAL, dimension(klon) :: u_zref_c, te_zref_c, temp_c, q_zref_c |
---|
| 76 | REAL, dimension(klon) :: ok_pred, ok_corr |
---|
| 77 | REAL, dimension(klon) :: conv_te, conv_q |
---|
| 78 | !------------------------------------------------------------------------- |
---|
| 79 | DO i=1, knon |
---|
| 80 | speed(i)=SQRT(u1(i)**2+v1(i)**2) |
---|
| 81 | ri1(i) = 0.0 |
---|
| 82 | ENDDO |
---|
| 83 | ! |
---|
| 84 | okri=.FALSE. |
---|
| 85 | CALL coefcdrag(klon, knon, nsrf, zxli, & |
---|
| 86 | speed, t1, q1, z1, psol, & |
---|
| 87 | ts1, qsurf, rugos, okri, ri1, & |
---|
| 88 | cdram, cdrah, cdran, zri1, pref) |
---|
| 89 | ! |
---|
| 90 | !---------Star variables---------------------------------------------------- |
---|
| 91 | ! |
---|
| 92 | DO i = 1, knon |
---|
| 93 | ri1(i) = zri1(i) |
---|
| 94 | tpot(i) = t1(i)* (psol(i)/pat1(i))**RKAPPA |
---|
| 95 | ustar(i) = sqrt(cdram(i) * speed(i) * speed(i)) |
---|
| 96 | zdte(i) = tpot(i) - ts1(i) |
---|
| 97 | zdq(i) = max(q1(i),0.0) - max(qsurf(i),0.0) |
---|
| 98 | ! |
---|
| 99 | testar(i) = (cdrah(i) * zdte(i) * speed(i))/ustar(i) |
---|
| 100 | qstar(i) = (cdrah(i) * zdq(i) * speed(i))/ustar(i) |
---|
| 101 | lmon(i) = (ustar(i) * ustar(i) * tpot(i))/ & |
---|
| 102 | (RKAR * RG * testar(i)) |
---|
| 103 | ENDDO |
---|
| 104 | ! |
---|
| 105 | !----------First aproximation of variables at zref -------------------------- |
---|
| 106 | zref = 2.0 |
---|
| 107 | CALL screenp(klon, knon, nsrf, speed, tpot, q1, & |
---|
| 108 | ts1, qsurf, rugos, lmon, & |
---|
| 109 | ustar, testar, qstar, zref, & |
---|
| 110 | delu, delte, delq) |
---|
| 111 | ! |
---|
| 112 | DO i = 1, knon |
---|
| 113 | u_zref(i) = delu(i) |
---|
| 114 | q_zref(i) = max(qsurf(i),0.0) + delq(i) |
---|
| 115 | te_zref(i) = ts1(i) + delte(i) |
---|
| 116 | temp(i) = te_zref(i) * (psol(i)/pat1(i))**(-RKAPPA) |
---|
| 117 | ! q_zref_p(i) = q_zref(i) |
---|
| 118 | ! te_zref_p(i) = te_zref(i) |
---|
| 119 | temp_p(i) = temp(i) |
---|
| 120 | ENDDO |
---|
| 121 | ! |
---|
| 122 | ! Iteration of the variables at the reference level zref : corrector calculation ; see Hess & McAvaney, 1995 |
---|
| 123 | ! |
---|
| 124 | DO n = 1, niter |
---|
| 125 | ! |
---|
| 126 | okri=.TRUE. |
---|
| 127 | CALL screenc(klon, knon, nsrf, zxli, & |
---|
| 128 | u_zref, temp, q_zref, zref, & |
---|
| 129 | ts1, qsurf, rugos, psol, & |
---|
| 130 | ustar, testar, qstar, okri, ri1, & |
---|
| 131 | pref, delu, delte, delq) |
---|
| 132 | ! |
---|
| 133 | DO i = 1, knon |
---|
| 134 | u_zref(i) = delu(i) |
---|
| 135 | q_zref(i) = delq(i) + max(qsurf(i),0.0) |
---|
| 136 | te_zref(i) = delte(i) + ts1(i) |
---|
| 137 | ! |
---|
| 138 | ! return to normal temperature |
---|
| 139 | ! |
---|
| 140 | temp(i) = te_zref(i) * (psol(i)/pref(i))**(-RKAPPA) |
---|
| 141 | ! temp(i) = te_zref(i) - (zref* RG)/RCPD/ & |
---|
| 142 | ! (1 + RVTMP2 * max(q_zref(i),0.0)) |
---|
| 143 | ! |
---|
| 144 | IF(temp(i).GT.350.) THEN |
---|
| 145 | WRITE(*,*) 'temp(i) GT 350 K !!',i,nsrf,temp(i) |
---|
| 146 | ENDIF |
---|
| 147 | ! |
---|
| 148 | IF(n.EQ.ncon) THEN |
---|
| 149 | te_zref_p(i) = te_zref(i) |
---|
| 150 | q_zref_p(i) = q_zref(i) |
---|
| 151 | ENDIF |
---|
| 152 | ! |
---|
| 153 | ENDDO |
---|
| 154 | ! |
---|
| 155 | ENDDO |
---|
| 156 | ! |
---|
| 157 | ! verifier le critere de convergence : 0.25% pour te_zref et 5% pour qe_zref |
---|
| 158 | ! |
---|
| 159 | DO i = 1, knon |
---|
| 160 | conv_te(i) = (te_zref(i) - te_zref_p(i))/te_zref_p(i) |
---|
| 161 | conv_q(i) = (q_zref(i) - q_zref_p(i))/q_zref_p(i) |
---|
[433] | 162 | ! IF(abs(conv_te(i)).GE.0.0025.AND.abs(conv_q(i)).GE.0.05) THEN |
---|
| 163 | ! PRINT*,'DIV','i=',i,te_zref_p(i),te_zref(i),conv_te(i), & |
---|
| 164 | ! q_zref_p(i),q_zref(i),conv_q(i) |
---|
| 165 | ! ENDIF |
---|
[416] | 166 | ENDDO |
---|
| 167 | ! |
---|
| 168 | DO i = 1, knon |
---|
| 169 | q_zref_c(i) = q_zref(i) |
---|
| 170 | temp_c(i) = temp(i) |
---|
| 171 | ! |
---|
| 172 | IF(zri1(i).LT.0.) THEN |
---|
| 173 | IF(nsrf.EQ.1) THEN |
---|
| 174 | ok_pred(i)=1. |
---|
| 175 | ok_corr(i)=0. |
---|
| 176 | ELSE |
---|
| 177 | ok_pred(i)=0. |
---|
| 178 | ok_corr(i)=1. |
---|
| 179 | ENDIF |
---|
| 180 | ELSE |
---|
| 181 | ok_pred(i)=0. |
---|
| 182 | ok_corr(i)=1. |
---|
| 183 | ENDIF |
---|
| 184 | ! |
---|
| 185 | t_2m(i) = temp_p(i) * ok_pred(i) + temp_c(i) * ok_corr(i) |
---|
| 186 | q_2m(i) = q_zref_p(i) * ok_pred(i) + q_zref_c(i) * ok_corr(i) |
---|
| 187 | ENDDO |
---|
| 188 | ! |
---|
| 189 | ! |
---|
| 190 | !----------First aproximation of variables at zref -------------------------- |
---|
| 191 | ! |
---|
| 192 | zref = 10.0 |
---|
| 193 | CALL screenp(klon, knon, nsrf, speed, tpot, q1, & |
---|
| 194 | ts1, qsurf, rugos, lmon, & |
---|
| 195 | ustar, testar, qstar, zref, & |
---|
| 196 | delu, delte, delq) |
---|
| 197 | ! |
---|
| 198 | DO i = 1, knon |
---|
| 199 | u_zref(i) = delu(i) |
---|
| 200 | q_zref(i) = max(qsurf(i),0.0) + delq(i) |
---|
| 201 | te_zref(i) = ts1(i) + delte(i) |
---|
| 202 | temp(i) = te_zref(i) * (psol(i)/pat1(i))**(-RKAPPA) |
---|
| 203 | ! temp(i) = te_zref(i) - (zref* RG)/RCPD/ & |
---|
| 204 | ! (1 + RVTMP2 * max(q_zref(i),0.0)) |
---|
| 205 | u_zref_p(i) = u_zref(i) |
---|
| 206 | ENDDO |
---|
| 207 | ! |
---|
| 208 | ! Iteration of the variables at the reference level zref : corrector ; see Hess & McAvaney, 1995 |
---|
| 209 | ! |
---|
| 210 | DO n = 1, niter |
---|
| 211 | ! |
---|
| 212 | okri=.TRUE. |
---|
| 213 | CALL screenc(klon, knon, nsrf, zxli, & |
---|
| 214 | u_zref, temp, q_zref, zref, & |
---|
| 215 | ts1, qsurf, rugos, psol, & |
---|
| 216 | ustar, testar, qstar, okri, ri1, & |
---|
| 217 | pref, delu, delte, delq) |
---|
| 218 | ! |
---|
| 219 | DO i = 1, knon |
---|
| 220 | u_zref(i) = delu(i) |
---|
| 221 | q_zref(i) = delq(i) + max(qsurf(i),0.0) |
---|
| 222 | te_zref(i) = delte(i) + ts1(i) |
---|
| 223 | temp(i) = te_zref(i) * (psol(i)/pref(i))**(-RKAPPA) |
---|
| 224 | ! temp(i) = te_zref(i) - (zref* RG)/RCPD/ & |
---|
| 225 | ! (1 + RVTMP2 * max(q_zref(i),0.0)) |
---|
| 226 | ENDDO |
---|
| 227 | ! |
---|
| 228 | ENDDO |
---|
| 229 | ! |
---|
| 230 | DO i = 1, knon |
---|
| 231 | u_zref_c(i) = u_zref(i) |
---|
| 232 | ! |
---|
| 233 | u_10m(i) = u_zref_p(i) * ok_pred(i) + u_zref_c(i) * ok_corr(i) |
---|
| 234 | ENDDO |
---|
| 235 | ! |
---|
| 236 | RETURN |
---|
| 237 | END subroutine stdlevvar |
---|