[5144] | 1 | SUBROUTINE coefcdrag(klon, knon, nsrf, zxli, & |
---|
| 2 | speed, t, q, zgeop, psol, & |
---|
| 3 | ts, qsurf, rugos, okri, ri1, & |
---|
| 4 | cdram, cdrah, cdran, zri1, pref) |
---|
[5099] | 5 | |
---|
[5144] | 6 | USE indice_sol_mod |
---|
| 7 | USE lmdz_abort_physic, ONLY: abort_physic |
---|
| 8 | USE lmdz_clesphys |
---|
| 9 | USE lmdz_yoethf |
---|
| 10 | USE lmdz_yomcst |
---|
[5099] | 11 | |
---|
[5144] | 12 | IMPLICIT NONE |
---|
| 13 | !------------------------------------------------------------------------- |
---|
| 14 | ! Objet : calcul des cdrags pour le moment (cdram) et les flux de chaleur |
---|
| 15 | ! sensible et latente (cdrah), du cdrag neutre (cdran), |
---|
| 16 | ! du nombre de Richardson entre la surface et le niveau de reference |
---|
| 17 | ! (zri1) et de la pression au niveau de reference (pref). |
---|
[5099] | 18 | |
---|
[5144] | 19 | ! I. Musat, 01.07.2002 |
---|
| 20 | !------------------------------------------------------------------------- |
---|
[1785] | 21 | |
---|
[5144] | 22 | ! klon----input-I- dimension de la grille physique (= nb_pts_latitude X nb_pts_longitude) |
---|
| 23 | ! knon----input-I- nombre de points pour un type de surface |
---|
| 24 | ! nsrf----input-I- indice pour le type de surface; voir indice_sol_mod.F90 |
---|
| 25 | ! zxli----input-L- TRUE si calcul des cdrags selon Laurent Li |
---|
| 26 | ! speed---input-R- module du vent au 1er niveau du modele |
---|
| 27 | ! t-------input-R- temperature de l'air au 1er niveau du modele |
---|
| 28 | ! q-------input-R- humidite de l'air au 1er niveau du modele |
---|
| 29 | ! zgeop---input-R- geopotentiel au 1er niveau du modele |
---|
| 30 | ! psol----input-R- pression au sol |
---|
| 31 | ! ts------input-R- temperature de l'air a la surface |
---|
| 32 | ! qsurf---input-R- humidite de l'air a la surface |
---|
| 33 | ! rugos---input-R- rugosite |
---|
| 34 | ! okri----input-L- TRUE si on veut tester le nb. Richardson entre la sfce |
---|
| 35 | ! et zref par rapport au Ri entre la sfce et la 1ere couche |
---|
| 36 | ! ri1-----input-R- nb. Richardson entre la surface et la 1ere couche |
---|
[1785] | 37 | |
---|
[5144] | 38 | ! cdram--output-R- cdrag pour le moment |
---|
| 39 | ! cdrah--output-R- cdrag pour les flux de chaleur latente et sensible |
---|
| 40 | ! cdran--output-R- cdrag neutre |
---|
| 41 | ! zri1---output-R- nb. Richardson entre la surface et la couche zgeop/RG |
---|
| 42 | ! pref---output-R- pression au niveau zgeop/RG |
---|
[5099] | 43 | |
---|
[5144] | 44 | INTEGER, INTENT(IN) :: klon, knon, nsrf |
---|
| 45 | LOGICAL, INTENT(IN) :: zxli |
---|
| 46 | REAL, DIMENSION(klon), INTENT(IN) :: speed, t, q, zgeop, psol |
---|
| 47 | REAL, DIMENSION(klon), INTENT(IN) :: ts, qsurf, rugos, ri1 |
---|
| 48 | LOGICAL, INTENT(IN) :: okri |
---|
[5099] | 49 | |
---|
[5144] | 50 | REAL, DIMENSION(klon), INTENT(OUT) :: cdram, cdrah, cdran, zri1, pref |
---|
| 51 | !------------------------------------------------------------------------- |
---|
[5099] | 52 | |
---|
[5144] | 53 | ! Quelques constantes : |
---|
| 54 | REAL, parameter :: RKAR = 0.40, CB = 5.0, CC = 5.0, CD = 5.0, cepdu2 = (0.1)**2 |
---|
[5099] | 55 | |
---|
[5144] | 56 | ! Variables locales : |
---|
| 57 | INTEGER :: i |
---|
| 58 | REAL, DIMENSION(klon) :: zdu2, zdphi, ztsolv, ztvd |
---|
| 59 | REAL, DIMENSION(klon) :: zscf, friv, frih, zucf, zcr |
---|
| 60 | REAL, DIMENSION(klon) :: zcfm1, zcfh1 |
---|
| 61 | REAL, DIMENSION(klon) :: zcfm2, zcfh2 |
---|
| 62 | REAL, DIMENSION(klon) :: trm0, trm1 |
---|
[5099] | 63 | |
---|
[5144] | 64 | CHARACTER (LEN = 80) :: abort_message |
---|
| 65 | CHARACTER (LEN = 20) :: modname = 'coefcdra' |
---|
[5099] | 66 | |
---|
[5144] | 67 | !------------------------------------------------------------------------- |
---|
| 68 | REAL :: fsta, fins, x |
---|
| 69 | fsta(x) = 1.0 / (1.0 + 10.0 * x * (1 + 8.0 * x)) |
---|
| 70 | fins(x) = SQRT(1.0 - 18.0 * x) |
---|
| 71 | !------------------------------------------------------------------------- |
---|
[5099] | 72 | |
---|
[5144] | 73 | abort_message = 'obsolete, remplace par cdrag, use at you own risk' |
---|
| 74 | CALL abort_physic(modname, abort_message, 1) |
---|
[2126] | 75 | |
---|
[5144] | 76 | DO i = 1, knon |
---|
[2232] | 77 | |
---|
[5144] | 78 | zdphi(i) = zgeop(i) |
---|
| 79 | zdu2(i) = max(cepdu2, speed(i)**2) |
---|
| 80 | pref(i) = exp(log(psol(i)) - zdphi(i) / (RD * t(i) * & |
---|
| 81 | (1. + RETV * max(q(i), 0.0)))) |
---|
| 82 | ztsolv(i) = ts(i) |
---|
| 83 | ! ztvd(i) = t(i) * (psol(i)/pref(i))**RKAPPA |
---|
| 84 | ! ztvd(i) = (t(i)+zdphi(i)/RCPD/(1.+RVTMP2*q(i))) & |
---|
| 85 | ! *(1.+RETV*q(i)) |
---|
| 86 | ztvd(i) = (t(i) + zdphi(i) / RCPD / (1. + RVTMP2 * q(i))) |
---|
| 87 | trm0(i) = 1. + RETV * max(qsurf(i), 0.0) |
---|
| 88 | trm1(i) = 1. + RETV * max(q(i), 0.0) |
---|
| 89 | ztsolv(i) = ztsolv(i) * trm0(i) |
---|
| 90 | ztvd(i) = ztvd(i) * trm1(i) |
---|
| 91 | zri1(i) = zdphi(i) * (ztvd(i) - ztsolv(i)) / (zdu2(i) * ztvd(i)) |
---|
[2232] | 92 | |
---|
[5144] | 93 | ! on teste zri1 par rapport au Richardson de la 1ere couche ri1 |
---|
[2232] | 94 | |
---|
[5144] | 95 | !IM +++ |
---|
| 96 | IF(1==0) THEN |
---|
| 97 | IF (okri) THEN |
---|
| 98 | IF (ri1(i)>=0.0.AND.zri1(i)<0.0) THEN |
---|
| 99 | zri1(i) = ri1(i) |
---|
| 100 | ELSE IF(ri1(i)<0.0.AND.zri1(i)>=0.0) THEN |
---|
| 101 | zri1(i) = ri1(i) |
---|
| 102 | ENDIF |
---|
| 103 | ENDIF |
---|
| 104 | ENDIF |
---|
| 105 | !IM --- |
---|
[5099] | 106 | |
---|
[5144] | 107 | cdran(i) = (RKAR / log(1. + zdphi(i) / (RG * rugos(i))))**2 |
---|
[5099] | 108 | |
---|
[5144] | 109 | IF (zri1(i) >= 0.) THEN |
---|
[5099] | 110 | |
---|
[5144] | 111 | ! situation stable : pour eviter les inconsistances dans les cas |
---|
| 112 | ! tres stables on limite zri1 a 20. cf Hess et al. (1995) |
---|
[5099] | 113 | |
---|
[5144] | 114 | zri1(i) = min(20., zri1(i)) |
---|
[524] | 115 | |
---|
[5144] | 116 | IF (.NOT.zxli) THEN |
---|
| 117 | zscf(i) = SQRT(1. + CD * ABS(zri1(i))) |
---|
| 118 | friv(i) = max(1. / (1. + 2. * CB * zri1(i) / zscf(i)), f_ri_cd_min) |
---|
| 119 | zcfm1(i) = cdran(i) * friv(i) |
---|
| 120 | frih(i) = max(1. / (1. + 3. * CB * zri1(i) * zscf(i)), f_ri_cd_min) |
---|
| 121 | ! zcfh1(i) = cdran(i) * frih(i) |
---|
| 122 | zcfh1(i) = f_cdrag_ter * cdran(i) * frih(i) |
---|
| 123 | IF(nsrf==is_oce) zcfh1(i) = f_cdrag_oce * cdran(i) * frih(i) |
---|
| 124 | cdram(i) = zcfm1(i) |
---|
| 125 | cdrah(i) = zcfh1(i) |
---|
| 126 | ELSE |
---|
| 127 | cdram(i) = cdran(i) * fsta(zri1(i)) |
---|
| 128 | cdrah(i) = cdran(i) * fsta(zri1(i)) |
---|
| 129 | ENDIF |
---|
[5099] | 130 | |
---|
[5144] | 131 | ELSE |
---|
[5099] | 132 | |
---|
[5144] | 133 | ! situation instable |
---|
[5099] | 134 | |
---|
[5144] | 135 | IF (.NOT.zxli) THEN |
---|
| 136 | zucf(i) = 1. / (1. + 3.0 * CB * CC * cdran(i) * SQRT(ABS(zri1(i)) & |
---|
| 137 | * (1.0 + zdphi(i) / (RG * rugos(i))))) |
---|
| 138 | zcfm2(i) = cdran(i) * max((1. - 2.0 * CB * zri1(i) * zucf(i)), f_ri_cd_min) |
---|
| 139 | ! zcfh2(i) = cdran(i)*max((1.-3.0*CB*zri1(i)*zucf(i)),f_ri_cd_min) |
---|
| 140 | zcfh2(i) = f_cdrag_ter * cdran(i) * max((1. - 3.0 * CB * zri1(i) * zucf(i)), f_ri_cd_min) |
---|
| 141 | cdram(i) = zcfm2(i) |
---|
| 142 | cdrah(i) = zcfh2(i) |
---|
| 143 | ELSE |
---|
| 144 | cdram(i) = cdran(i) * fins(zri1(i)) |
---|
| 145 | cdrah(i) = cdran(i) * fins(zri1(i)) |
---|
| 146 | ENDIF |
---|
[5099] | 147 | |
---|
[5144] | 148 | ! cdrah sur l'ocean cf. Miller et al. (1992) |
---|
[5099] | 149 | |
---|
[5144] | 150 | zcr(i) = (0.0016 / (cdran(i) * SQRT(zdu2(i)))) * ABS(ztvd(i) - ztsolv(i)) & |
---|
| 151 | **(1. / 3.) |
---|
| 152 | ! IF (nsrf.EQ.is_oce) cdrah(i) = cdran(i)*(1.0+zcr(i)**1.25) & |
---|
| 153 | ! **(1./1.25) |
---|
| 154 | IF (nsrf==is_oce) cdrah(i) = f_cdrag_oce * cdran(i) * (1.0 + zcr(i)**1.25) & |
---|
| 155 | **(1. / 1.25) |
---|
| 156 | ENDIF |
---|
[5099] | 157 | |
---|
[5144] | 158 | END DO |
---|
[5099] | 159 | |
---|
[5144] | 160 | END SUBROUTINE coefcdrag |
---|