[5099] | 1 | |
---|
[1279] | 2 | !$Id: clcdrag.F90 5111 2024-07-24 10:17:33Z abarral $ |
---|
[5099] | 3 | |
---|
[1067] | 4 | SUBROUTINE clcdrag(knon, nsrf, paprs, pplay,& |
---|
| 5 | u1, v1, t1, q1, & |
---|
| 6 | tsurf, qsurf, rugos, & |
---|
| 7 | pcfm, pcfh) |
---|
| 8 | |
---|
| 9 | USE dimphy |
---|
[1785] | 10 | USE indice_sol_mod |
---|
[5111] | 11 | USE lmdz_abort_physic, ONLY: abort_physic |
---|
[1785] | 12 | |
---|
[1067] | 13 | IMPLICIT NONE |
---|
[524] | 14 | ! ================================================================= c |
---|
[5099] | 15 | |
---|
[524] | 16 | ! Objet : calcul des cdrags pour le moment (pcfm) et |
---|
| 17 | ! les flux de chaleur sensible et latente (pcfh). |
---|
[5099] | 18 | |
---|
[524] | 19 | ! ================================================================= c |
---|
[5099] | 20 | |
---|
[524] | 21 | ! knon----input-I- nombre de points pour un type de surface |
---|
[1785] | 22 | ! nsrf----input-I- indice pour le type de surface; voir indice_sol_mod.F90 |
---|
[1067] | 23 | ! u1-------input-R- vent zonal au 1er niveau du modele |
---|
| 24 | ! v1-------input-R- vent meridien au 1er niveau du modele |
---|
| 25 | ! t1-------input-R- temperature de l'air au 1er niveau du modele |
---|
| 26 | ! q1-------input-R- humidite de l'air au 1er niveau du modele |
---|
| 27 | ! tsurf------input-R- temperature de l'air a la surface |
---|
[524] | 28 | ! qsurf---input-R- humidite de l'air a la surface |
---|
| 29 | ! rugos---input-R- rugosite |
---|
[5099] | 30 | |
---|
[524] | 31 | ! pcfm---output-R- cdrag pour le moment |
---|
| 32 | ! pcfh---output-R- cdrag pour les flux de chaleur latente et sensible |
---|
[5099] | 33 | |
---|
[1071] | 34 | INTEGER, INTENT(IN) :: knon, nsrf |
---|
| 35 | REAL, DIMENSION(klon,klev+1), INTENT(IN) :: paprs |
---|
| 36 | REAL, DIMENSION(klon,klev), INTENT(IN) :: pplay |
---|
| 37 | REAL, DIMENSION(klon), INTENT(IN) :: u1, v1, t1, q1 |
---|
| 38 | REAL, DIMENSION(klon), INTENT(IN) :: tsurf, qsurf |
---|
| 39 | REAL, DIMENSION(klon), INTENT(IN) :: rugos |
---|
| 40 | REAL, DIMENSION(klon), INTENT(OUT) :: pcfm, pcfh |
---|
[5099] | 41 | |
---|
[524] | 42 | ! ================================================================= c |
---|
[5099] | 43 | |
---|
[1071] | 44 | INCLUDE "YOMCST.h" |
---|
| 45 | INCLUDE "YOETHF.h" |
---|
| 46 | INCLUDE "clesphys.h" |
---|
[5099] | 47 | |
---|
[524] | 48 | ! Quelques constantes et options: |
---|
| 49 | !!$PB REAL, PARAMETER :: ckap=0.35, cb=5.0, cc=5.0, cd=5.0, cepdu2=(0.1)**2 |
---|
[1067] | 50 | REAL, PARAMETER :: ckap=0.40, cb=5.0, cc=5.0, cd=5.0, cepdu2=(0.1)**2 |
---|
[5099] | 51 | |
---|
[524] | 52 | ! Variables locales : |
---|
[1067] | 53 | INTEGER :: i |
---|
| 54 | REAL :: zdu2, ztsolv |
---|
| 55 | REAL :: ztvd, zscf |
---|
| 56 | REAL :: zucf, zcr |
---|
| 57 | REAL :: friv, frih |
---|
| 58 | REAL, DIMENSION(klon) :: zcfm1, zcfm2 |
---|
| 59 | REAL, DIMENSION(klon) :: zcfh1, zcfh2 |
---|
| 60 | REAL, DIMENSION(klon) :: zcdn |
---|
| 61 | REAL, DIMENSION(klon) :: zri |
---|
| 62 | REAL, DIMENSION(klon) :: zgeop1 ! geopotentiel au 1er niveau du modele |
---|
| 63 | LOGICAL, PARAMETER :: zxli=.FALSE. ! calcul des cdrags selon Laurent Li |
---|
[2232] | 64 | |
---|
| 65 | CHARACTER (LEN=80) :: abort_message |
---|
| 66 | CHARACTER (LEN=20) :: modname = 'clcdrag' |
---|
| 67 | |
---|
[524] | 68 | ! Fonctions thermodynamiques et fonctions d'instabilite |
---|
[1067] | 69 | REAL :: fsta, fins, x |
---|
| 70 | fsta(x) = 1.0 / (1.0+10.0*x*(1+8.0*x)) |
---|
| 71 | fins(x) = SQRT(1.0-18.0*x) |
---|
| 72 | |
---|
[2232] | 73 | abort_message='obsolete, remplace par cdrag, use at you own risk' |
---|
[2311] | 74 | CALL abort_physic(modname,abort_message,1) |
---|
[2232] | 75 | |
---|
| 76 | |
---|
| 77 | |
---|
[524] | 78 | ! ================================================================= c |
---|
[5099] | 79 | |
---|
[1067] | 80 | ! Calculer le geopotentiel du premier couche de modele |
---|
[5099] | 81 | |
---|
[1067] | 82 | DO i = 1, knon |
---|
| 83 | zgeop1(i) = RD * t1(i) / (0.5*(paprs(i,1)+pplay(i,1))) & |
---|
| 84 | * (paprs(i,1)-pplay(i,1)) |
---|
| 85 | END DO |
---|
| 86 | ! ================================================================= c |
---|
[5099] | 87 | |
---|
[524] | 88 | ! Calculer le frottement au sol (Cdrag) |
---|
[5099] | 89 | |
---|
[1067] | 90 | DO i = 1, knon |
---|
| 91 | zdu2 = MAX(cepdu2,u1(i)**2+v1(i)**2) |
---|
| 92 | ztsolv = tsurf(i) * (1.0+RETV*qsurf(i)) |
---|
| 93 | ztvd = (t1(i)+zgeop1(i)/RCPD/(1.+RVTMP2*q1(i))) & |
---|
| 94 | *(1.+RETV*q1(i)) |
---|
| 95 | zri(i) = zgeop1(i)*(ztvd-ztsolv)/(zdu2*ztvd) |
---|
| 96 | zcdn(i) = (ckap/LOG(1.+zgeop1(i)/(RG*rugos(i))))**2 |
---|
| 97 | |
---|
[524] | 98 | !!$ IF (zri(i) .ge. 0.) THEN ! situation stable |
---|
[5082] | 99 | IF (zri(i) > 0.) THEN ! situation stable |
---|
[1067] | 100 | zri(i) = MIN(20.,zri(i)) |
---|
| 101 | IF (.NOT.zxli) THEN |
---|
| 102 | zscf = SQRT(1.+cd*ABS(zri(i))) |
---|
[2126] | 103 | FRIV = AMAX1(1. / (1.+2.*CB*zri(i)/ZSCF), f_ri_cd_min) |
---|
[1067] | 104 | zcfm1(i) = zcdn(i) * FRIV |
---|
[2126] | 105 | FRIH = AMAX1(1./ (1.+3.*CB*zri(i)*ZSCF), f_ri_cd_min ) |
---|
[524] | 106 | !!$ PB zcfh1(i) = zcdn(i) * FRIH |
---|
[1279] | 107 | !!$ PB zcfh1(i) = f_cdrag_stable * zcdn(i) * FRIH |
---|
| 108 | zcfh1(i) = f_cdrag_ter * zcdn(i) * FRIH |
---|
[5082] | 109 | IF(nsrf==is_oce) zcfh1(i) = f_cdrag_oce * zcdn(i) * FRIH |
---|
[1279] | 110 | !!$ PB |
---|
[1067] | 111 | pcfm(i) = zcfm1(i) |
---|
| 112 | pcfh(i) = zcfh1(i) |
---|
| 113 | ELSE |
---|
| 114 | pcfm(i) = zcdn(i)* fsta(zri(i)) |
---|
| 115 | pcfh(i) = zcdn(i)* fsta(zri(i)) |
---|
| 116 | ENDIF |
---|
| 117 | ELSE ! situation instable |
---|
| 118 | IF (.NOT.zxli) THEN |
---|
| 119 | zucf = 1./(1.+3.0*cb*cc*zcdn(i)*SQRT(ABS(zri(i)) & |
---|
| 120 | *(1.0+zgeop1(i)/(RG*rugos(i))))) |
---|
[2126] | 121 | zcfm2(i) = zcdn(i)*amax1((1.-2.0*cb*zri(i)*zucf),f_ri_cd_min) |
---|
| 122 | !!$PB zcfh2(i) = zcdn(i)*amax1((1.-3.0*cb*zri(i)*zucf),f_ri_cd_min) |
---|
| 123 | zcfh2(i) = f_cdrag_ter*zcdn(i)*amax1((1.-3.0*cb*zri(i)*zucf),f_ri_cd_min) |
---|
[1067] | 124 | pcfm(i) = zcfm2(i) |
---|
| 125 | pcfh(i) = zcfh2(i) |
---|
| 126 | ELSE |
---|
| 127 | pcfm(i) = zcdn(i)* fins(zri(i)) |
---|
| 128 | pcfh(i) = zcdn(i)* fins(zri(i)) |
---|
[524] | 129 | ENDIF |
---|
[2278] | 130 | IF(iflag_gusts==0) THEN |
---|
| 131 | ! cdrah sur l'ocean cf. Miller et al. (1992) - only active when gustiness parameterization is not active |
---|
| 132 | zcr = (0.0016/(zcdn(i)*SQRT(zdu2)))*ABS(ztvd-ztsolv)**(1./3.) |
---|
[5082] | 133 | IF(nsrf==is_oce) pcfh(i) =f_cdrag_oce* zcdn(i)*(1.0+zcr**1.25)**(1./1.25) |
---|
[2278] | 134 | ENDIF |
---|
[1067] | 135 | ENDIF |
---|
| 136 | END DO |
---|
| 137 | |
---|
| 138 | ! ================================================================= c |
---|
| 139 | |
---|
| 140 | ! IM cf JLD : on seuille cdrag_m et cdrag_h |
---|
| 141 | IF (nsrf == is_oce) THEN |
---|
| 142 | DO i=1,knon |
---|
| 143 | pcfm(i)=MIN(pcfm(i),cdmmax) |
---|
| 144 | pcfh(i)=MIN(pcfh(i),cdhmax) |
---|
| 145 | END DO |
---|
| 146 | END IF |
---|
| 147 | |
---|
| 148 | END SUBROUTINE clcdrag |
---|