Changeset 1067
- Timestamp:
- Dec 17, 2008, 2:30:13 PM (16 years ago)
- Location:
- LMDZ4/trunk/libf/phylmd
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/trunk/libf/phylmd/calcul_fluxs_mod.F90
r793 r1067 1 !2 ! $Header$3 1 ! 4 2 MODULE calcul_fluxs_mod … … 243 241 ! 244 242 END SUBROUTINE calcul_fluxs 245 243 ! 244 !**************************************************************************************** 245 ! 246 SUBROUTINE calcul_flux_wind(knon, dtime, & 247 u0, v0, u1, v1, cdrag_m, & 248 AcoefU, AcoefV, BcoefU, BcoefV, & 249 p1lay, t1lay, & 250 flux_u1, flux_v1) 251 252 USE dimphy 253 INCLUDE "YOMCST.h" 254 255 ! Input arguments 256 !**************************************************************************************** 257 INTEGER, INTENT(IN) :: knon 258 REAL, INTENT(IN) :: dtime 259 REAL, DIMENSION(klon), INTENT(IN) :: u0, v0 ! u and v at niveau 0 260 REAL, DIMENSION(klon), INTENT(IN) :: u1, v1 ! u and v at niveau 1 261 REAL, DIMENSION(klon), INTENT(IN) :: cdrag_m ! cdrag pour momentum 262 REAL, DIMENSION(klon), INTENT(IN) :: AcoefU, AcoefV, BcoefU, BcoefV 263 REAL, DIMENSION(klon), INTENT(IN) :: p1lay ! pression 1er niveau (milieu de couche) 264 REAL, DIMENSION(klon), INTENT(IN) :: t1lay ! temperature 265 ! Output arguments 266 !**************************************************************************************** 267 REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1 268 REAL, DIMENSION(klon), INTENT(OUT) :: flux_v1 269 270 ! Local variables 271 !**************************************************************************************** 272 INTEGER :: i 273 REAL :: mod_wind, buf 274 275 !**************************************************************************************** 276 ! Calculate the surface flux 277 ! 278 !**************************************************************************************** 279 DO i=1,knon 280 mod_wind = 1.0 + SQRT((u1(i) - u0(i))**2 + (v1(i)-v0(i))**2) 281 buf = cdrag_m(i) * mod_wind * p1lay(i)/(RD*t1lay(i)) 282 flux_u1(i) = (AcoefU(i) - u0(i)) / (1/buf - BcoefU(i)*dtime ) 283 flux_v1(i) = (AcoefV(i) - v0(i)) / (1/buf - BcoefV(i)*dtime ) 284 END DO 285 286 END SUBROUTINE calcul_flux_wind 287 ! 288 !**************************************************************************************** 289 ! 246 290 END MODULE calcul_fluxs_mod -
LMDZ4/trunk/libf/phylmd/clcdrag.F90
r793 r1067 1 1 ! 2 ! $Header$ 3 ! 4 SUBROUTINE clcdrag(klon, knon, nsrf, zxli, &5 u, v, t, q, zgeop, &6 ts, qsurf, rugos, & 7 pcfm, pcfh)8 2 SUBROUTINE clcdrag(knon, nsrf, paprs, pplay,& 3 u1, v1, t1, q1, & 4 tsurf, qsurf, rugos, & 5 pcfm, pcfh) 6 7 USE dimphy 8 IMPLICIT NONE 9 9 ! ================================================================= c 10 10 ! … … 14 14 ! ================================================================= c 15 15 ! 16 ! klon----input-I- dimension de la grille physique (= nb_pts_latitude X nb_pts_longitude)17 16 ! knon----input-I- nombre de points pour un type de surface 18 17 ! nsrf----input-I- indice pour le type de surface; voir indicesol.h 19 ! zxli----input-L- calcul des cdrags selon Laurent Li 20 ! u-------input-R- vent zonal au 1er niveau du modele 21 ! v-------input-R- vent meridien au 1er niveau du modele 22 ! t-------input-R- temperature de l'air au 1er niveau du modele 23 ! q-------input-R- humidite de l'air au 1er niveau du modele 24 ! zgeop---input-R- geopotentiel au 1er niveau du modele 25 ! ts------input-R- temperature de l'air a la surface 18 ! u1-------input-R- vent zonal au 1er niveau du modele 19 ! v1-------input-R- vent meridien au 1er niveau du modele 20 ! t1-------input-R- temperature de l'air au 1er niveau du modele 21 ! q1-------input-R- humidite de l'air au 1er niveau du modele 22 ! tsurf------input-R- temperature de l'air a la surface 26 23 ! qsurf---input-R- humidite de l'air a la surface 27 24 ! rugos---input-R- rugosite … … 44 41 ! Quelques constantes et options: 45 42 !!$PB REAL, PARAMETER :: ckap=0.35, cb=5.0, cc=5.0, cd=5.0, cepdu2=(0.1)**2 46 43 REAL, PARAMETER :: ckap=0.40, cb=5.0, cc=5.0, cd=5.0, cepdu2=(0.1)**2 47 44 ! 48 45 ! Variables locales : 49 INTEGER :: i 50 REAL :: zdu2, ztsolv, ztvd, zscf 51 REAL :: zucf, zcr 52 REAL :: friv, frih 53 REAL, dimension(klon) :: zcfm1, zcfm2 54 REAL, dimension(klon) :: zcfh1, zcfh2 55 REAL, dimension(klon) :: zcdn 56 REAL, dimension(klon) :: zri 46 INTEGER :: i 47 REAL :: zdu2, ztsolv 48 REAL :: ztvd, zscf 49 REAL :: zucf, zcr 50 REAL :: friv, frih 51 REAL, DIMENSION(klon) :: zcfm1, zcfm2 52 REAL, DIMENSION(klon) :: zcfh1, zcfh2 53 REAL, DIMENSION(klon) :: zcdn 54 REAL, DIMENSION(klon) :: zri 55 REAL, DIMENSION(klon) :: zgeop1 ! geopotentiel au 1er niveau du modele 56 LOGICAL, PARAMETER :: zxli=.FALSE. ! calcul des cdrags selon Laurent Li 57 57 ! 58 58 ! Fonctions thermodynamiques et fonctions d'instabilite 59 REAL :: fsta, fins, x 60 fsta(x) = 1.0 / (1.0+10.0*x*(1+8.0*x)) 61 fins(x) = SQRT(1.0-18.0*x) 59 REAL :: fsta, fins, x 60 fsta(x) = 1.0 / (1.0+10.0*x*(1+8.0*x)) 61 fins(x) = SQRT(1.0-18.0*x) 62 63 ! ================================================================= c 64 ! 65 ! Calculer le geopotentiel du premier couche de modele 66 ! 67 DO i = 1, knon 68 zgeop1(i) = RD * t1(i) / (0.5*(paprs(i,1)+pplay(i,1))) & 69 * (paprs(i,1)-pplay(i,1)) 70 END DO 62 71 ! ================================================================= c 63 72 ! 64 73 ! Calculer le frottement au sol (Cdrag) 65 74 ! 66 67 zdu2 = max(cepdu2,u(i)**2+v(i)**2)68 ztsolv = ts(i) * (1.0+RETV*qsurf(i))69 ztvd = (t(i)+zgeop(i)/RCPD/(1.+RVTMP2*q(i))) &70 *(1.+RETV*q(i))71 zri(i) = zgeop(i)*(ztvd-ztsolv)/(zdu2*ztvd)72 zcdn(i) = (ckap/log(1.+zgeop(i)/(RG*rugos(i))))**273 ! 75 DO i = 1, knon 76 zdu2 = MAX(cepdu2,u1(i)**2+v1(i)**2) 77 ztsolv = tsurf(i) * (1.0+RETV*qsurf(i)) 78 ztvd = (t1(i)+zgeop1(i)/RCPD/(1.+RVTMP2*q1(i))) & 79 *(1.+RETV*q1(i)) 80 zri(i) = zgeop1(i)*(ztvd-ztsolv)/(zdu2*ztvd) 81 zcdn(i) = (ckap/LOG(1.+zgeop1(i)/(RG*rugos(i))))**2 82 74 83 !!$ IF (zri(i) .ge. 0.) THEN ! situation stable 75 IF (zri(i) .gt. 0.) THEN ! situation stable76 zri(i) = min(20.,zri(i))77 78 79 80 81 84 IF (zri(i) .GT. 0.) THEN ! situation stable 85 zri(i) = MIN(20.,zri(i)) 86 IF (.NOT.zxli) THEN 87 zscf = SQRT(1.+cd*ABS(zri(i))) 88 FRIV = AMAX1(1. / (1.+2.*CB*zri(i)/ZSCF), 0.1) 89 zcfm1(i) = zcdn(i) * FRIV 90 FRIH = AMAX1(1./ (1.+3.*CB*zri(i)*ZSCF), 0.1 ) 82 91 !!$ PB zcfh1(i) = zcdn(i) * FRIH 83 84 85 86 87 88 89 90 91 92 93 *(1.0+zgeop(i)/(RG*rugos(i)))))94 92 zcfh1(i) = 0.8 * zcdn(i) * FRIH 93 pcfm(i) = zcfm1(i) 94 pcfh(i) = zcfh1(i) 95 ELSE 96 pcfm(i) = zcdn(i)* fsta(zri(i)) 97 pcfh(i) = zcdn(i)* fsta(zri(i)) 98 ENDIF 99 ELSE ! situation instable 100 IF (.NOT.zxli) THEN 101 zucf = 1./(1.+3.0*cb*cc*zcdn(i)*SQRT(ABS(zri(i)) & 102 *(1.0+zgeop1(i)/(RG*rugos(i))))) 103 zcfm2(i) = zcdn(i)*amax1((1.-2.0*cb*zri(i)*zucf),0.1) 95 104 !!$PB zcfh2(i) = zcdn(i)*amax1((1.-3.0*cb*zri(i)*zucf),0.1) 96 zcfh2(i) = 0.8 * zcdn(i)*amax1((1.-3.0*cb*zri(i)*zucf),0.1) 97 pcfm(i) = zcfm2(i) 98 pcfh(i) = zcfh2(i) 99 ELSE 100 pcfm(i) = zcdn(i)* fins(zri(i)) 101 pcfh(i) = zcdn(i)* fins(zri(i)) 102 ENDIF 103 zcr = (0.0016/(zcdn(i)*SQRT(zdu2)))*ABS(ztvd-ztsolv)**(1./3.) 104 IF(nsrf.EQ.is_oce) pcfh(i) =0.8* zcdn(i)*(1.0+zcr**1.25)**(1./1.25) 105 zcfh2(i) = 0.8 * zcdn(i)*amax1((1.-3.0*cb*zri(i)*zucf),0.1) 106 pcfm(i) = zcfm2(i) 107 pcfh(i) = zcfh2(i) 108 ELSE 109 pcfm(i) = zcdn(i)* fins(zri(i)) 110 pcfh(i) = zcdn(i)* fins(zri(i)) 105 111 ENDIF 106 END DO 107 RETURN 108 END SUBROUTINE clcdrag 112 zcr = (0.0016/(zcdn(i)*SQRT(zdu2)))*ABS(ztvd-ztsolv)**(1./3.) 113 IF(nsrf.EQ.is_oce) pcfh(i) =0.8* zcdn(i)*(1.0+zcr**1.25)**(1./1.25) 114 ENDIF 115 END DO 116 117 ! ================================================================= c 118 119 ! IM cf JLD : on seuille cdrag_m et cdrag_h 120 IF (nsrf == is_oce) THEN 121 DO i=1,knon 122 pcfm(i)=MIN(pcfm(i),cdmmax) 123 pcfh(i)=MIN(pcfh(i),cdhmax) 124 END DO 125 END IF 126 127 END SUBROUTINE clcdrag -
LMDZ4/trunk/libf/phylmd/clesphys.h
r1054 r1067 1 1 ! 2 ! $Header$3 2 ! 4 3 ! … … 48 47 REAL freq_ISCCP, ecrit_ISCCP 49 48 INTEGER :: ip_ebil_phy, iflag_rrtm 50 LOGICAL ok_slab_sicOBS51 49 LOGICAL :: ok_strato 52 50 LOGICAL :: ok_hines … … 64 62 & , ecrit_mth, ecrit_tra, ecrit_reg & 65 63 & , freq_ISCCP, ecrit_ISCCP, ip_ebil_phy & 66 & , ok_ slab_sicOBS, ok_lic_melt, cvl_corr&64 & , ok_lic_melt, cvl_corr & 67 65 & , qsol0, iflag_rrtm, ok_strato,ok_hines,ecrit_LES 68 66 -
LMDZ4/trunk/libf/phylmd/climb_hq_mod.F90
r1066 r1067 17 17 REAL, DIMENSION(:,:), ALLOCATABLE :: Ccoef_H, Dcoef_H 18 18 !$OMP THREADPRIVATE(Ccoef_H, Dcoef_H) 19 REAL, DIMENSION(:), ALLOCATABLE :: Acoef_Q, Bcoef_Q 20 !$OMP THREADPRIVATE(Acoef_Q, Bcoef_Q) 21 REAL, DIMENSION(:), ALLOCATABLE :: Acoef_H, Bcoef_H 22 !$OMP THREADPRIVATE(Acoef_H, Bcoef_H) 19 23 REAL, DIMENSION(:,:), ALLOCATABLE :: Kcoefhq 20 24 !$OMP THREADPRIVATE(Kcoefhq) … … 26 30 SUBROUTINE climb_hq_down(knon, coefhq, paprs, pplay, & 27 31 delp, temp, q, dtime, & 28 petAcoef, peqAcoef, petBcoef, peqBcoef)32 Acoef_H_out, Acoef_Q_out, Bcoef_H_out, Bcoef_Q_out) 29 33 30 34 INCLUDE "YOMCST.h" … … 45 49 ! Output arguments 46 50 !**************************************************************************************** 47 REAL, DIMENSION(klon), INTENT(OUT) :: petAcoef48 REAL, DIMENSION(klon), INTENT(OUT) :: peqAcoef49 REAL, DIMENSION(klon), INTENT(OUT) :: petBcoef50 REAL, DIMENSION(klon), INTENT(OUT) :: peqBcoef51 REAL, DIMENSION(klon), INTENT(OUT) :: Acoef_H_out 52 REAL, DIMENSION(klon), INTENT(OUT) :: Acoef_Q_out 53 REAL, DIMENSION(klon), INTENT(OUT) :: Bcoef_H_out 54 REAL, DIMENSION(klon), INTENT(OUT) :: Bcoef_Q_out 51 55 52 56 ! Local variables 53 57 !**************************************************************************************** 54 REAL, DIMENSION(klon,klev) :: dels, local_H 55 REAL, DIMENSION(klon) :: psref, delz, pkh 58 LOGICAL, SAVE :: first=.TRUE. 59 REAL, DIMENSION(klon,klev) :: local_H 60 REAL, DIMENSION(klon) :: psref 61 REAL :: delz, pkh 56 62 INTEGER :: k, i, ierr 57 63 58 64 ! Include 59 65 !**************************************************************************************** 60 INCLUDE "compbl.h"66 INCLUDE "compbl.h" 61 67 62 68 63 69 !**************************************************************************************** 64 70 ! 1) 65 ! Allocation 71 ! Allocation at first time step only 66 72 ! 67 73 !**************************************************************************************** 68 74 69 ALLOCATE(Ccoef_Q(klon,klev), STAT=ierr) 70 IF ( ierr /= 0 ) PRINT*,' pb in allloc Ccoef_Q, ierr=', ierr 71 72 ALLOCATE(Dcoef_Q(klon,klev), STAT=ierr) 73 IF ( ierr /= 0 ) PRINT*,' pb in allloc Dcoef_Q, ierr=', ierr 74 75 ALLOCATE(Ccoef_H(klon,klev), STAT=ierr) 76 IF ( ierr /= 0 ) PRINT*,' pb in allloc Ccoef_H, ierr=', ierr 77 78 ALLOCATE(Dcoef_H(klon,klev), STAT=ierr) 79 IF ( ierr /= 0 ) PRINT*,' pb in allloc Dcoef_H, ierr=', ierr 80 81 ALLOCATE(Kcoefhq(klon,klev), STAT=ierr) 82 IF ( ierr /= 0 ) PRINT*,' pb in allloc Kcoefhq, ierr=', ierr 83 84 ALLOCATE(gamaq(1:klon,2:klev), STAT=ierr) 85 IF ( ierr /= 0 ) PRINT*,' pb in allloc gamaq, ierr=', ierr 86 87 ALLOCATE(gamah(1:klon,2:klev), STAT=ierr) 88 IF ( ierr /= 0 ) PRINT*,' pb in allloc gamah, ierr=', ierr 89 75 IF (first) THEN 76 first=.FALSE. 77 ALLOCATE(Ccoef_Q(klon,klev), STAT=ierr) 78 IF ( ierr /= 0 ) PRINT*,' pb in allloc Ccoef_Q, ierr=', ierr 79 80 ALLOCATE(Dcoef_Q(klon,klev), STAT=ierr) 81 IF ( ierr /= 0 ) PRINT*,' pb in allloc Dcoef_Q, ierr=', ierr 82 83 ALLOCATE(Ccoef_H(klon,klev), STAT=ierr) 84 IF ( ierr /= 0 ) PRINT*,' pb in allloc Ccoef_H, ierr=', ierr 85 86 ALLOCATE(Dcoef_H(klon,klev), STAT=ierr) 87 IF ( ierr /= 0 ) PRINT*,' pb in allloc Dcoef_H, ierr=', ierr 88 89 ALLOCATE(Acoef_Q(klon), Bcoef_Q(klon), Acoef_H(klon), Bcoef_H(klon), STAT=ierr) 90 IF ( ierr /= 0 ) PRINT*,' pb in allloc Acoef_X and Bcoef_X, ierr=', ierr 91 92 ALLOCATE(Kcoefhq(klon,klev), STAT=ierr) 93 IF ( ierr /= 0 ) PRINT*,' pb in allloc Kcoefhq, ierr=', ierr 94 95 ALLOCATE(gamaq(1:klon,2:klev), STAT=ierr) 96 IF ( ierr /= 0 ) PRINT*,' pb in allloc gamaq, ierr=', ierr 97 98 ALLOCATE(gamah(1:klon,2:klev), STAT=ierr) 99 IF ( ierr /= 0 ) PRINT*,' pb in allloc gamah, ierr=', ierr 100 END IF 90 101 91 102 !**************************************************************************************** … … 98 109 DO i = 1, knon 99 110 Kcoefhq(i,k) = & 100 coefhq(i,k)*RG /(pplay(i,k-1)-pplay(i,k)) &111 coefhq(i,k)*RG*RG*dtime /(pplay(i,k-1)-pplay(i,k)) & 101 112 *(paprs(i,k)*2/(temp(i,k)+temp(i,k-1))/RD)**2 102 Kcoefhq(i,k) = Kcoefhq(i,k) * dtime*RG103 113 ENDDO 104 114 ENDDO … … 112 122 psref(:) = paprs(:,1) 113 123 114 ! definition of start value forgama124 ! definition of gama 115 125 IF (iflag_pbl == 1) THEN 116 126 gamaq(:,:) = 0.0 117 127 gamah(:,:) = -1.0e-03 118 128 gamah(:,2) = -2.5e-03 129 130 ! conversion de gama 131 DO k = 2, klev 132 DO i = 1, knon 133 delz = RD * (temp(i,k-1)+temp(i,k)) / & 134 2.0 / RG / paprs(i,k) * (pplay(i,k-1)-pplay(i,k)) 135 pkh = (psref(i)/paprs(i,k))**RKAPPA 136 137 ! convertie gradient verticale d'humidite specifique en difference d'humidite specifique entre centre de couches 138 gamaq(i,k) = gamaq(i,k) * delz 139 ! convertie gradient verticale de temperature en difference de temperature potentielle entre centre de couches 140 gamah(i,k) = gamah(i,k) * delz * RCPD * pkh 141 ENDDO 142 ENDDO 143 119 144 ELSE 120 145 gamaq(:,:) = 0.0 … … 122 147 ENDIF 123 148 124 ! calculation of gama125 DO k = 2, klev126 DO i = 1, knon127 delz(i) = RD * (temp(i,k-1)+temp(i,k)) / &128 2.0 / RG / paprs(i,k) * (pplay(i,k-1)-pplay(i,k))129 pkh(i) = (psref(i)/paprs(i,k))**RKAPPA130 131 gamaq(i,k) = gamaq(i,k) * delz(i)132 gamah(i,k) = gamah(i,k) * delz(i) * RCPD * pkh(i)133 ENDDO134 ENDDO135 149 136 150 !**************************************************************************************** … … 139 153 ! 140 154 !**************************************************************************************** 141 dels(:,:) = delp(:,:)142 155 143 CALL calc_coef(knon, Kcoefhq(:,:), gamaq(:,:), del s(:,:), q(:,:), &144 Ccoef_Q(:,:), Dcoef_Q(:,:) )156 CALL calc_coef(knon, Kcoefhq(:,:), gamaq(:,:), delp(:,:), q(:,:), & 157 Ccoef_Q(:,:), Dcoef_Q(:,:), Acoef_Q, Bcoef_Q) 145 158 146 159 !**************************************************************************************** … … 149 162 ! 150 163 !**************************************************************************************** 151 dels(:,:) = 0.0152 164 local_H(:,:) = 0.0 153 165 154 166 DO k=1,klev 155 167 DO i = 1, knon 156 !bug dels(i,k) = (pplay(i,k)/psref(i))**RKAPPA * delp(i,k) 157 dels(i,k) = delp(i,k) 168 ! convertie la temperature en entalpie potentielle 158 169 local_H(i,k) = RCPD * temp(i,k) * & 159 170 (psref(i)/pplay(i,k))**RKAPPA … … 161 172 ENDDO 162 173 163 164 CALL calc_coef(knon, Kcoefhq(:,:), gamah(:,:), dels(:,:), local_H(:,:), & 165 Ccoef_H(:,:), Dcoef_H(:,:)) 174 CALL calc_coef(knon, Kcoefhq(:,:), gamah(:,:), delp(:,:), local_H(:,:), & 175 Ccoef_H(:,:), Dcoef_H(:,:), Acoef_H, Bcoef_H) 166 176 167 177 !**************************************************************************************** … … 170 180 ! 171 181 !**************************************************************************************** 172 petAcoef(1:knon) = Ccoef_H(1:knon,1)173 peqAcoef(1:knon) = Ccoef_Q(1:knon,1)174 petBcoef(1:knon) = Dcoef_H(1:knon,1)175 peqBcoef(1:knon) = Dcoef_Q(1:knon,1)182 Acoef_H_out = Acoef_H 183 Bcoef_H_out = Bcoef_H 184 Acoef_Q_out = Acoef_Q 185 Bcoef_Q_out = Bcoef_Q 176 186 177 187 END SUBROUTINE climb_hq_down … … 179 189 !**************************************************************************************** 180 190 ! 181 SUBROUTINE calc_coef(knon, Kcoef, gama, del s, X, Ccoef, Dcoef)191 SUBROUTINE calc_coef(knon, Kcoef, gama, delp, X, Ccoef, Dcoef, Acoef, Bcoef) 182 192 ! 183 193 ! Calculate the coefficients C and D in : X(k) = C(k) + D(k)*X(k-1) … … 188 198 !**************************************************************************************** 189 199 INTEGER, INTENT(IN) :: knon 190 REAL, DIMENSION(klon,klev), INTENT(IN) :: Kcoef, del s200 REAL, DIMENSION(klon,klev), INTENT(IN) :: Kcoef, delp 191 201 REAL, DIMENSION(klon,klev), INTENT(IN) :: X 192 202 REAL, DIMENSION(klon,2:klev), INTENT(IN) :: gama … … 194 204 ! Output arguments 195 205 !**************************************************************************************** 196 REAL, DIMENSION(klon ,klev), INTENT(OUT) :: Ccoef197 REAL, DIMENSION(klon,klev), INTENT(OUT) :: Dcoef206 REAL, DIMENSION(klon), INTENT(OUT) :: Acoef, Bcoef 207 REAL, DIMENSION(klon,klev), INTENT(OUT) :: Ccoef, Dcoef 198 208 199 209 ! Local variables … … 210 220 211 221 DO i = 1, knon 212 buf = del s(i,klev) + Kcoef(i,klev)213 214 Ccoef(i,klev) = (X(i,klev)*del s(i,klev) - Kcoef(i,klev)*gama(i,klev))/buf222 buf = delp(i,klev) + Kcoef(i,klev) 223 224 Ccoef(i,klev) = (X(i,klev)*delp(i,klev) - Kcoef(i,klev)*gama(i,klev))/buf 215 225 Dcoef(i,klev) = Kcoef(i,klev)/buf 216 226 END DO … … 224 234 DO k=(klev-1),2,-1 225 235 DO i = 1, knon 226 buf = del s(i,k) + Kcoef(i,k) + Kcoef(i,k+1)*(1.-Dcoef(i,k+1))227 Ccoef(i,k) = (X(i,k)*del s(i,k) + Kcoef(i,k+1)*Ccoef(i,k+1) + &236 buf = delp(i,k) + Kcoef(i,k) + Kcoef(i,k+1)*(1.-Dcoef(i,k+1)) 237 Ccoef(i,k) = (X(i,k)*delp(i,k) + Kcoef(i,k+1)*Ccoef(i,k+1) + & 228 238 Kcoef(i,k+1)*gama(i,k+1) - Kcoef(i,k)*gama(i,k))/buf 229 239 Dcoef(i,k) = Kcoef(i,k)/buf … … 237 247 238 248 DO i = 1, knon 239 buf = del s(i,1) + Kcoef(i,2)*(1.-Dcoef(i,2))240 Ccoef(i,1) = (X(i,1)*dels(i,1) + Kcoef(i,2)*(gama(i,2)+Ccoef(i,2)))/buf241 Dcoef(i,1) = -1. * RG / buf249 buf = delp(i,1) + Kcoef(i,2)*(1.-Dcoef(i,2)) 250 Acoef(i) = (X(i,1)*delp(i,1) + Kcoef(i,2)*(gama(i,2)+Ccoef(i,2)))/buf 251 Bcoef(i) = -1. * RG / buf 242 252 END DO 243 253 … … 247 257 ! 248 258 SUBROUTINE climb_hq_up(knon, dtime, t_old, q_old, & 249 flx_q1, flx_ t1, paprs, pplay, &259 flx_q1, flx_h1, paprs, pplay, & 250 260 flux_q, flux_h, d_q, d_t) 251 261 ! … … 262 272 REAL, INTENT(IN) :: dtime 263 273 REAL, DIMENSION(klon,klev), INTENT(IN) :: t_old, q_old 264 REAL, DIMENSION(klon), INTENT(IN) :: flx_q1, flx_ t1274 REAL, DIMENSION(klon), INTENT(IN) :: flx_q1, flx_h1 265 275 REAL, DIMENSION(klon,klev+1), INTENT(IN) :: paprs 266 276 REAL, DIMENSION(klon,klev), INTENT(IN) :: pplay … … 272 282 ! Local variables 273 283 !**************************************************************************************** 274 REAL, DIMENSION(klon,klev) :: zx_pkh, zx_pkf284 LOGICAL, SAVE :: last=.FALSE. 275 285 REAL, DIMENSION(klon,klev) :: h_new, q_new 276 286 REAL, DIMENSION(klon) :: psref … … 289 299 psref(1:knon) = paprs(1:knon,1) 290 300 291 DO k = 1, klev292 DO i = 1, knon293 zx_pkh(i,k) = (psref(i)/paprs(i,k))**RKAPPA294 zx_pkf(i,k) = (psref(i)/pplay(i,k))**RKAPPA295 END DO296 END DO297 301 !**************************************************************************************** 298 302 ! 2) … … 302 306 303 307 !- First layer 304 q_new(1:knon,1) = Ccoef_Q(1:knon,1) + Dcoef_Q(1:knon,1)*flx_q1(1:knon)*dtime305 h_new(1:knon,1) = Ccoef_H(1:knon,1) + Dcoef_H(1:knon,1)*flx_t1(1:knon)*dtime308 q_new(1:knon,1) = Acoef_Q(1:knon) + Bcoef_Q(1:knon)*flx_q1(1:knon)*dtime 309 h_new(1:knon,1) = Acoef_H(1:knon) + Bcoef_H(1:knon)*flx_h1(1:knon)*dtime 306 310 307 !- All the restlayers311 !- All the other layers 308 312 DO k = 2, klev 309 313 DO i = 1, knon … … 320 324 !- The flux at first layer, k=1 321 325 flux_q(1:knon,1)=flx_q1(1:knon) 322 flux_h(1:knon,1)=flx_ t1(1:knon)326 flux_h(1:knon,1)=flx_h1(1:knon) 323 327 324 328 !- The flux at all layers above surface … … 329 333 330 334 flux_h(i,k) = (Kcoefhq(i,k)/RG/dtime) * & 331 (h_new(i,k)-h_new(i,k-1)+gamah(i,k)) / & 332 zx_pkh(i,k) 335 (h_new(i,k)-h_new(i,k-1)+gamah(i,k)) 333 336 END DO 334 337 END DO … … 342 345 DO k = 1, klev 343 346 DO i = 1, knon 344 d_t(i,k) = h_new(i,k)/ zx_pkf(i,k)/RCPD - t_old(i,k)347 d_t(i,k) = h_new(i,k)/(psref(i)/pplay(i,k))**RKAPPA/RCPD - t_old(i,k) 345 348 d_q(i,k) = q_new(i,k) - q_old(i,k) 346 349 END DO … … 351 354 ! 352 355 !**************************************************************************************** 353 DEALLOCATE(Ccoef_Q, Dcoef_Q, Ccoef_H, Dcoef_H,stat=ierr) 354 IF ( ierr /= 0 ) PRINT*,' pb in dealllocate Ccoef_Q, Dcoef_Q, Ccoef_H, Dcoef_H, ierr=', ierr 355 DEALLOCATE(gamaq, gamah,stat=ierr) 356 IF ( ierr /= 0 ) PRINT*,' pb in dealllocate gamaq, gamah, ierr=', ierr 357 DEALLOCATE(Kcoefhq,stat=ierr) 358 IF ( ierr /= 0 ) PRINT*,' pb in dealllocate Kcoefhq, ierr=', ierr 359 356 IF (last) THEN 357 DEALLOCATE(Ccoef_Q, Dcoef_Q, Ccoef_H, Dcoef_H,stat=ierr) 358 IF ( ierr /= 0 ) PRINT*,' pb in dealllocate Ccoef_Q, Dcoef_Q, Ccoef_H, Dcoef_H, ierr=', ierr 359 DEALLOCATE(Acoef_Q, Bcoef_Q, Acoef_H, Bcoef_H,stat=ierr) 360 IF ( ierr /= 0 ) PRINT*,' pb in dealllocate Acoef_Q, Bcoef_Q, Acoef_H, Bcoef_H, ierr=', ierr 361 DEALLOCATE(gamaq, gamah,stat=ierr) 362 IF ( ierr /= 0 ) PRINT*,' pb in dealllocate gamaq, gamah, ierr=', ierr 363 DEALLOCATE(Kcoefhq,stat=ierr) 364 IF ( ierr /= 0 ) PRINT*,' pb in dealllocate Kcoefhq, ierr=', ierr 365 END IF 360 366 END SUBROUTINE climb_hq_up 361 367 ! … … 364 370 END MODULE climb_hq_mod 365 371 366 367 368 369 372 373 374 375 376 -
LMDZ4/trunk/libf/phylmd/climb_wind_mod.F90
r793 r1067 1 !2 ! $Header$3 1 ! 4 2 MODULE climb_wind_mod … … 21 19 REAL, DIMENSION(:,:), ALLOCATABLE :: Ccoef_V, Dcoef_V 22 20 !$OMP THREADPRIVATE(Ccoef_V, Dcoef_V) 21 REAL, DIMENSION(:), ALLOCATABLE :: Acoef_U, Bcoef_U 22 !$OMP THREADPRIVATE(Acoef_U, Bcoef_U) 23 REAL, DIMENSION(:), ALLOCATABLE :: Acoef_V, Bcoef_V 24 !$OMP THREADPRIVATE(Acoef_V, Bcoef_V) 23 25 LOGICAL :: firstcall=.TRUE. 24 26 !$OMP THREADPRIVATE(firstcall) 25 27 26 28 27 PUBLIC :: climb_wind_down, c alcul_wind_flux, climb_wind_up29 PUBLIC :: climb_wind_down, climb_wind_up 28 30 29 31 CONTAINS … … 62 64 IF (ierr /= 0) CALL abort_gcm(modname,'Pb in allocation Dcoef_V',1) 63 65 66 ALLOCATE(Acoef_U(klon), Bcoef_U(klon), Acoef_V(klon), Bcoef_V(klon), STAT=ierr) 67 IF ( ierr /= 0 ) PRINT*,' pb in allloc Acoef_U and Bcoef_U, ierr=', ierr 68 64 69 firstcall=.FALSE. 65 70 … … 68 73 !**************************************************************************************** 69 74 ! 70 SUBROUTINE climb_wind_down(knon, dtime, coef_in, pplay, paprs, temp, delp, u_old, v_old) 75 SUBROUTINE climb_wind_down(knon, dtime, coef_in, pplay, paprs, temp, delp, u_old, v_old, & 76 Acoef_U_out, Acoef_V_out, Bcoef_U_out, Bcoef_V_out) 71 77 ! 72 78 ! This routine calculates for the wind components u and v, … … 88 94 REAL, DIMENSION(klon,klev), INTENT(IN) :: v_old 89 95 96 ! Output arguments 97 !**************************************************************************************** 98 REAL, DIMENSION(klon), INTENT(OUT) :: Acoef_U_out 99 REAL, DIMENSION(klon), INTENT(OUT) :: Acoef_V_out 100 REAL, DIMENSION(klon), INTENT(OUT) :: Bcoef_U_out 101 REAL, DIMENSION(klon), INTENT(OUT) :: Bcoef_V_out 102 90 103 ! Local variables 91 104 !**************************************************************************************** … … 102 115 ! 103 116 !**************************************************************************************** 104 105 117 ! - Define alpha (alf1 and alf2) 106 118 alf1(:) = 1.0 107 119 alf2(:) = 1.0 - alf1(:) 108 120 109 ! - Calculte the wind components for the first layer 110 u1lay(1:knon) = u_old(1:knon,1)*alf1(1:knon) + u_old(1:knon,2)*alf2(1:knon) 111 v1lay(1:knon) = v_old(1:knon,1)*alf1(1:knon) + v_old(1:knon,2)*alf2(1:knon) 112 113 ! - Calculate K 121 ! - Calculate the coefficients K 114 122 Kcoefm(:,:) = 0.0 115 DO i = 1, knon116 Kcoefm(i,1) = coef_in(i,1) * (1.0+SQRT(u1lay(i)**2+v1lay(i)**2))* &117 pplay(i,1)/(RD*temp(i,1))118 Kcoefm(i,1) = Kcoefm(i,1) * dtime*RG119 END DO120 121 123 DO k = 2, klev 122 124 DO i=1,knon 123 Kcoefm(i,k) = coef_in(i,k)*RG /(pplay(i,k-1)-pplay(i,k)) &125 Kcoefm(i,k) = coef_in(i,k)*RG*RG*dtime/(pplay(i,k-1)-pplay(i,k)) & 124 126 *(paprs(i,k)*2/(temp(i,k)+temp(i,k-1))/RD)**2 125 Kcoefm(i,k) = Kcoefm(i,k) * dtime*RG126 127 END DO 127 128 END DO … … 130 131 CALL calc_coef(knon, Kcoefm(:,:), delp(:,:), & 131 132 u_old(:,:), alf1(:), alf2(:), & 132 Ccoef_U(:,:), Dcoef_U(:,:) )133 Ccoef_U(:,:), Dcoef_U(:,:), Acoef_U(:), Bcoef_U(:)) 133 134 134 135 ! - Calculate the coefficients C and D, component "v" 135 136 CALL calc_coef(knon, Kcoefm(:,:), delp(:,:), & 136 137 v_old(:,:), alf1(:), alf2(:), & 137 Ccoef_V(:,:), Dcoef_V(:,:)) 138 Ccoef_V(:,:), Dcoef_V(:,:), Acoef_V(:), Bcoef_V(:)) 139 140 !**************************************************************************************** 141 ! 6) 142 ! Return the first layer in output variables 143 ! 144 !**************************************************************************************** 145 Acoef_U_out = Acoef_U 146 Bcoef_U_out = Bcoef_U 147 Acoef_V_out = Acoef_V 148 Bcoef_V_out = Bcoef_V 138 149 139 150 END SUBROUTINE climb_wind_down … … 141 152 !**************************************************************************************** 142 153 ! 143 SUBROUTINE calc_coef(knon, Kcoef, del s, X, alfa1, alfa2, Ccoef, Dcoef)144 ! 145 ! Find the coefficients C and D in fonction of alfa, K and del s154 SUBROUTINE calc_coef(knon, Kcoef, delp, X, alfa1, alfa2, Ccoef, Dcoef, Acoef, Bcoef) 155 ! 156 ! Find the coefficients C and D in fonction of alfa, K and delp 146 157 ! 147 158 ! Input arguments 148 159 !**************************************************************************************** 149 160 INTEGER, INTENT(IN) :: knon 150 REAL, DIMENSION(klon,klev), INTENT(IN) :: Kcoef, del s161 REAL, DIMENSION(klon,klev), INTENT(IN) :: Kcoef, delp 151 162 REAL, DIMENSION(klon,klev), INTENT(IN) :: X 152 163 REAL, DIMENSION(klon), INTENT(IN) :: alfa1, alfa2 … … 154 165 ! Output arguments 155 166 !**************************************************************************************** 167 REAL, DIMENSION(klon), INTENT(OUT) :: Acoef, Bcoef 156 168 REAL, DIMENSION(klon,klev), INTENT(OUT) :: Ccoef, Dcoef 157 169 … … 161 173 REAL :: buf 162 174 175 INCLUDE "YOMCST.h" 163 176 !**************************************************************************************** 164 177 ! 165 ! Niveau au sommet, k=klev 178 179 ! Calculate coefficients C and D at top level, k=klev 166 180 ! 167 181 Ccoef(:,:) = 0.0 … … 169 183 170 184 DO i = 1, knon 171 buf = del s(i,klev) + Kcoef(i,klev)172 173 Ccoef(i,klev) = X(i,klev)*del s(i,klev)/buf185 buf = delp(i,klev) + Kcoef(i,klev) 186 187 Ccoef(i,klev) = X(i,klev)*delp(i,klev)/buf 174 188 Dcoef(i,klev) = Kcoef(i,klev)/buf 175 189 END DO 176 190 177 191 ! 178 ! Niveau(klev-1) <= k <= 2192 ! Calculate coefficients C and D at top level (klev-1) <= k <= 2 179 193 ! 180 194 DO k=(klev-1),2,-1 181 195 DO i = 1, knon 182 buf = dels(i,k) + Kcoef(i,k) + & 183 Kcoef(i,k+1)*(1.-Dcoef(i,k+1)) 196 buf = delp(i,k) + Kcoef(i,k) + Kcoef(i,k+1)*(1.-Dcoef(i,k+1)) 184 197 185 Ccoef(i,k) = X(i,k)*dels(i,k) + & 186 Kcoef(i,k+1)*Ccoef(i,k+1) 187 Ccoef(i,k) = Ccoef(i,k)/buf 198 Ccoef(i,k) = (X(i,k)*delp(i,k) + Kcoef(i,k+1)*Ccoef(i,k+1))/buf 188 199 Dcoef(i,k) = Kcoef(i,k)/buf 189 200 END DO 190 201 END DO 191 202 192 ! 193 ! Niveau k=1203 ! 204 ! Calculate coeffiecent A and B at surface 194 205 ! 195 206 DO i = 1, knon 196 buf = dels(i,1) + & 197 (alfa1(i) + alfa2(i)*Dcoef(i,2)) * Kcoef(i,1) + & 198 (1.-Dcoef(i,2))*Kcoef(i,2) 199 200 Ccoef(i,1) = X(i,1)*dels(i,1) + & 201 (Kcoef(i,2)-Kcoef(i,1)*alfa2(i)) * Ccoef(i,2) 202 Ccoef(i,1) = Ccoef(i,1)/buf 203 Dcoef(i,1) = Kcoef(i,1)/buf 207 buf = delp(i,1) + Kcoef(i,2)*(1-Dcoef(i,2)) 208 Acoef(i) = (X(i,1)*delp(i,1) + Kcoef(i,2)*Ccoef(i,2))/buf 209 Bcoef(i) = -RG/buf 204 210 END DO 205 211 … … 208 214 !**************************************************************************************** 209 215 ! 210 SUBROUTINE calcul_wind_flux(knon, dtime, & 211 flux_u, flux_v) 212 213 INCLUDE "YOMCST.h" 214 215 ! Input arguments 216 !**************************************************************************************** 217 INTEGER, INTENT(IN) :: knon 218 REAL, INTENT(IN) :: dtime 219 220 ! Output arguments 221 !**************************************************************************************** 222 REAL, DIMENSION(klon), INTENT(OUT) :: flux_u 223 REAL, DIMENSION(klon), INTENT(OUT) :: flux_v 224 225 ! Local variables 226 !**************************************************************************************** 227 INTEGER :: i 228 REAL, DIMENSION(klon) :: u0, v0 ! u and v at niveau 0 229 REAL, DIMENSION(klon) :: u1, v1 ! u and v at niveau 1 230 REAL, DIMENSION(klon) :: u2, v2 ! u and v at niveau 2 231 232 233 !**************************************************************************************** 234 ! Les vents de surface sont supposes nuls 235 ! 236 !**************************************************************************************** 237 u0(:) = 0.0 238 v0(:) = 0.0 239 240 !**************************************************************************************** 241 ! On calcule les vents du couhes 1 et 2 recurviement 242 ! 243 !**************************************************************************************** 244 DO i = 1, knon 245 u1(i) = Ccoef_U(i,1) + Dcoef_U(i,1)*u0(i) 246 v1(i) = Ccoef_V(i,1) + Dcoef_V(i,1)*v0(i) 247 u2(i) = Ccoef_U(i,2) + Dcoef_U(i,2)*u1(i) 248 v2(i) = Ccoef_V(i,2) + Dcoef_V(i,2)*v1(i) 249 END DO 250 251 !**************************************************************************************** 252 ! On calcule le flux 253 ! 254 !**************************************************************************************** 255 flux_u(:) = 0.0 256 flux_v(:) = 0.0 257 258 DO i=1,knon 259 flux_u(i) = Kcoefm(i,1)/RG/dtime * (u1(i)*alf1(i) + u2(i)*alf2(i) - u0(i)) 260 flux_v(i) = Kcoefm(i,1)/RG/dtime * (v1(i)*alf1(i) + v2(i)*alf2(i) - v0(i)) 261 END DO 262 263 END SUBROUTINE calcul_wind_flux 264 ! 265 !**************************************************************************************** 266 ! 267 SUBROUTINE climb_wind_up(knon, dtime, u_old, v_old, & 216 217 SUBROUTINE climb_wind_up(knon, dtime, u_old, v_old, flx_u1, flx_v1, & 268 218 flx_u_new, flx_v_new, d_u_new, d_v_new) 269 219 ! 270 ! Diffuse the wind components from the surface and up to the top layer. Coefficents 271 ! C and D are known from before. The values for U and V at surface are supposed to be 272 ! zero (this could be modified). 273 ! 274 ! u(k) = Cu(k) + Du(k)*u(k-1) 275 ! v(k) = Cv(k) + Dv(k)*v(k-1) 276 ! [1 <= k <= klev] 220 ! Diffuse the wind components from the surface layer and up to the top layer. 221 ! Coefficents A, B, C and D are known from before. Start values for the diffusion are the 222 ! momentum fluxes at surface. 223 ! 224 ! u(k=1) = A + B*flx*dtime 225 ! u(k) = C(k) + D(k)*u(k-1) [2 <= k <= klev] 277 226 ! 278 227 !**************************************************************************************** … … 285 234 REAL, DIMENSION(klon,klev), INTENT(IN) :: u_old 286 235 REAL, DIMENSION(klon,klev), INTENT(IN) :: v_old 236 REAL, DIMENSION(klon), INTENT(IN) :: flx_u1, flx_v1 ! momentum flux 287 237 288 238 ! Output arguments … … 294 244 !**************************************************************************************** 295 245 REAL, DIMENSION(klon,klev) :: u_new, v_new 296 REAL, DIMENSION(klon) :: u0, v0297 246 INTEGER :: k, i 298 247 … … 300 249 !**************************************************************************************** 301 250 302 ! Niveau 0303 u0(1:knon) = 0.0304 v0(1:knon) = 0.0305 306 251 ! Niveau 1 307 252 DO i = 1, knon 308 u_new(i,1) = Ccoef_U(i,1) + Dcoef_U(i,1) * u0(i)309 v_new(i,1) = Ccoef_V(i,1) + Dcoef_V(i,1) * v0(i)253 u_new(i,1) = Acoef_U(i) + Bcoef_U(i)*flx_u1(i)*dtime 254 v_new(i,1) = Acoef_V(i) + Bcoef_V(i)*flx_v1(i)*dtime 310 255 END DO 311 256 … … 329 274 flx_v_new(:,:) = 0.0 330 275 331 ! Niveau 1 332 DO i = 1, knon 333 flx_u_new(i,1) = Kcoefm(i,1)/RG/dtime * & 334 (u_new(i,1)*alf1(i)+u_new(i,2)*alf2(i) - u0(i)) 335 flx_v_new(i,1) = Kcoefm(i,1)/RG/dtime * & 336 (v_new(i,1)*alf1(i)+v_new(i,2)*alf2(i) - v0(i)) 337 END DO 276 flx_u_new(1:knon,1)=flx_u1(1:knon) 277 flx_v_new(1:knon,1)=flx_v1(1:knon) 338 278 339 279 ! Niveau 2->klev -
LMDZ4/trunk/libf/phylmd/cltracrn.F
r766 r1067 1 !2 ! $Header$3 1 ! 4 2 SUBROUTINE cltracrn( itr, dtime,u1lay, v1lay, 5 e c oef,t,ftsol,pctsrf,3 e cdrag,coef,t,ftsol,pctsrf, 6 4 e tr,trs,paprs,pplay,delp, 7 5 e masktr,fshtr,hsoltr,tautr,vdeptr, … … 26 24 c u1lay----input-R- vent u de la premiere couche (m/s) 27 25 c v1lay----input-R- vent v de la premiere couche (m/s) 28 c coef-----input-R- le coefficient d'echange (m**2/s) l>1 26 c cdrag----input-R- cdrag 27 c coef-----input-R- le coefficient d'echange (m**2/s) l>1, valable uniquement pour k entre 2 et klev 29 28 c t--------input-R- temperature (K) 30 29 c paprs----input-R- pression a inter-couche (Pa) … … 50 49 REAL dtime 51 50 REAL u1lay(klon), v1lay(klon) 51 REAL cdrag(klon) 52 52 REAL coef(klon,klev) 53 53 REAL t(klon,klev), ftsol(klon,nbsrf), pctsrf(klon,nbsrf) … … 119 119 c====================================================================== 120 120 DO i = 1, klon 121 zx_coef(i,1) = c oef(i,1)121 zx_coef(i,1) = cdrag(i) 122 122 . * (1.0+SQRT(u1lay(i)**2+v1lay(i)**2)) 123 123 . * pplay(i,1)/(RD*t(i,1)) -
LMDZ4/trunk/libf/phylmd/coef_diff_turb_mod.F90
r878 r1067 1 !2 ! $Header$3 1 ! 4 2 MODULE coef_diff_turb_mod … … 8 6 ! at surface(cdrag) 9 7 ! 10 USE dimphy11 12 8 IMPLICIT NONE 13 9 … … 17 13 ! 18 14 SUBROUTINE coef_diff_turb(dtime, nsrf, knon, ni, & 19 ypaprs, ypplay, yu, yv, yq, yt, yts, yrugos, yqsurf, &15 ypaprs, ypplay, yu, yv, yq, yt, yts, yrugos, yqsurf, ycdragm, & 20 16 ycoefm, ycoefh ,yq2) 21 ! 17 18 USE dimphy 19 ! 22 20 ! Calculate coefficients(ycoefm, ycoefh) for turbulent diffusion in the 23 ! atmosphere and coefficients for turbulent diffusion at surface - cdrag 24 ! (ycoefm(:,1), ycoefh(:,1)). 21 ! atmosphere 22 ! NB! No values are calculated between surface and the first model layer. 23 ! ycoefm(:,1) and ycoefh(:,1) are not valid !!! 25 24 ! 26 25 ! … … 35 34 REAL, DIMENSION(klon,klev), INTENT(IN) :: yq, yt 36 35 REAL, DIMENSION(klon), INTENT(IN) :: yts, yrugos, yqsurf 37 REAL, DIMENSION(klon,klev+1) :: yq2 36 REAL, DIMENSION(klon), INTENT(IN) :: ycdragm 37 38 ! InOutput arguments 39 !**************************************************************************************** 40 REAL, DIMENSION(klon,klev+1), INTENT(INOUT):: yq2 38 41 39 42 ! Output arguments … … 47 50 REAL, DIMENSION(klon,klev) :: ycoefm0, ycoefh0, yzlay, yteta 48 51 REAL, DIMENSION(klon,klev+1) :: yzlev, q2diag, ykmm, ykmn, ykmq 49 REAL, DIMENSION(klon) :: y_cd_h, y_cd_m50 52 REAL, DIMENSION(klon) :: yustar 51 53 … … 59 61 INCLUDE "YOMCST.h" 60 62 61 !****************************************************************************************62 ! Start calculation63 ! - Initilalize output variables64 !****************************************************************************************65 66 ycoefm(:,:) = 0.067 ycoefh(:,:) = 0.068 69 63 70 64 !**************************************************************************************** 71 ! Methode 1 : 65 ! Calcul de coefficients de diffusion turbulent de l'atmosphere : 66 ! ycoefm(:,2:klev), ycoefh(:,2:klev) 72 67 ! 73 68 !**************************************************************************************** … … 80 75 81 76 !**************************************************************************************** 82 ! Methode 2 : 77 ! Eventuelle recalcule des coeffeicients de diffusion turbulent de l'atmosphere : 78 ! ycoefm(:,2:klev), ycoefh(:,2:klev) 83 79 ! 84 80 !**************************************************************************************** … … 96 92 ENDIF 97 93 98 !****************************************************************************************99 ! IM cf JLD : on seuille ycoefm et ycoefh100 !101 !****************************************************************************************102 IF (nsrf.EQ.is_oce) THEN103 DO j=1,knon104 ycoefm(j,1)=MIN(ycoefm(j,1),cdmmax)105 ycoefh(j,1)=MIN(ycoefh(j,1),cdhmax)106 ENDDO107 ENDIF108 94 109 95 !**************************************************************************************** … … 112 98 !**************************************************************************************** 113 99 IF (ok_kzmin) THEN 114 CALL coefkzmin(knon,ypaprs,ypplay,yu,yv,yt,yq,yc oefm, &100 CALL coefkzmin(knon,ypaprs,ypplay,yu,yv,yt,yq,ycdragm, & 115 101 ycoefm0,ycoefh0) 116 102 … … 127 113 !**************************************************************************************** 128 114 ! MELLOR ET YAMADA adapte a Mars Richard Fournier et Frederic Hourdin 129 ! Methode 3 :115 ! 130 116 !**************************************************************************************** 131 117 … … 159 145 END DO 160 146 161 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 162 ! Pour memoire, le papier Hourdin et al. 2002 a ete obtenur avec un 163 ! bug sur les coefficients de surface : 164 ! y_cd_h(1:knon) = ycoefm(1:knon,1) 165 ! y_cd_m(1:knon) = ycoefh(1:knon,1) 166 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 167 168 y_cd_m(1:knon) = ycoefm(1:knon,1) 169 y_cd_h(1:knon) = ycoefh(1:knon,1) 170 171 CALL ustarhb(knon,yu,yv,y_cd_m, yustar) 147 !!$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 148 !!$! Pour memoire, le papier Hourdin et al. 2002 a ete obtenur avec un 149 !!$! bug sur les coefficients de surface : 150 !!$! ycdragh(1:knon) = ycoefm(1:knon,1) 151 !!$! ycdragm(1:knon) = ycoefh(1:knon,1) 152 !!$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 153 CALL ustarhb(knon,yu,yv,ycdragm, yustar) 172 154 173 155 IF (prt_level > 9) THEN … … 179 161 CALL vdif_kcay(knon,dtime,RG,RD,ypaprs,yt, & 180 162 yzlev,yzlay,yu,yv,yteta, & 181 y _cd_m,yq2,q2diag,ykmm,ykmn,yustar, &163 ycdragm,yq2,q2diag,ykmm,ykmn,yustar, & 182 164 iflag_pbl) 183 165 ELSE 184 166 CALL yamada4(knon,dtime,RG,RD,ypaprs,yt, & 185 167 yzlev,yzlay,yu,yv,yteta, & 186 y _cd_m,yq2,ykmm,ykmn,ykmq,yustar, &168 ycdragm,yq2,ykmm,ykmn,ykmq,yustar, & 187 169 iflag_pbl) 188 170 ENDIF 189 171 190 ycoefm(1:knon,1)=y_cd_m(1:knon)191 ycoefh(1:knon,1)=y_cd_h(1:knon)192 172 ycoefm(1:knon,2:klev)=ykmm(1:knon,2:klev) 193 173 ycoefh(1:knon,2:klev)=ykmn(1:knon,2:klev) … … 206 186 pcfm, pcfh) 207 187 188 USE dimphy 189 208 190 !====================================================================== 209 191 ! Auteur(s) F. Hourdin, M. Forichon, Z.X. Li (LMD/CNRS) date: 19930922 … … 236 218 ! 237 219 INTEGER, INTENT(IN) :: knon, nsrf 220 REAL, INTENT(IN) :: ksta, ksta_ter 238 221 REAL, DIMENSION(klon), INTENT(IN) :: ts 239 REAL, DIMENSION(klon,klev+1), INTENT(IN) :: 240 REAL, DIMENSION(klon,klev), INTENT(IN) :: 222 REAL, DIMENSION(klon,klev+1), INTENT(IN) :: paprs 223 REAL, DIMENSION(klon,klev), INTENT(IN) :: pplay 241 224 REAL, DIMENSION(klon,klev), INTENT(IN) :: u, v, t, q 242 225 REAL, DIMENSION(klon), INTENT(IN) :: rugos 226 REAL, DIMENSION(klon), INTENT(IN) :: qsurf 243 227 244 228 REAL, DIMENSION(klon,klev), INTENT(OUT) :: pcfm, pcfh 245 229 246 247 ! Local variables 248 249 ! numero de couche du sommet de la couche limite 250 INTEGER, DIMENSION(klon) :: itop 230 ! 231 ! Local variables: 232 ! 233 INTEGER, DIMENSION(klon) :: itop ! numero de couche du sommet de la couche limite 251 234 ! 252 235 ! Quelques constantes et options: 253 236 ! 254 REAL cepdu2, ckap, cb, cc, cd, clam 255 PARAMETER (cepdu2 =(0.1)**2) 256 PARAMETER (CKAP=0.4) 257 PARAMETER (cb=5.0) 258 PARAMETER (cc=5.0) 259 PARAMETER (cd=5.0) 260 PARAMETER (clam=160.0) 261 REAL ratqs ! largeur de distribution de vapeur d'eau 262 PARAMETER (ratqs=0.05) 263 LOGICAL richum ! utilise le nombre de Richardson humide 264 PARAMETER (richum=.TRUE.) 265 REAL ric ! nombre de Richardson critique 266 PARAMETER(ric=0.4) 267 REAL prandtl 268 PARAMETER (prandtl=0.4) 237 REAL, PARAMETER :: cepdu2=0.1**2 238 REAL, PARAMETER :: CKAP=0.4 239 REAL, PARAMETER :: cb=5.0 240 REAL, PARAMETER :: cc=5.0 241 REAL, PARAMETER :: cd=5.0 242 REAL, PARAMETER :: clam=160.0 243 REAL, PARAMETER :: ratqs=0.05 ! largeur de distribution de vapeur d'eau 244 LOGICAL, PARAMETER :: richum=.TRUE. ! utilise le nombre de Richardson humide 245 REAL, PARAMETER :: ric=0.4 ! nombre de Richardson critique 246 REAL, PARAMETER :: prandtl=0.4 269 247 REAL kstable ! diffusion minimale (situation stable) 270 248 ! GKtest 271 249 ! PARAMETER (kstable=1.0e-10) 272 REAL ksta, ksta_ter273 250 !IM: 261103 REAL kstable_ter, kstable_sinon 274 251 !IM: 211003 cf GK PARAMETER (kstable_ter = 1.0e-6) … … 277 254 !IM: 261103 PARAMETER (kstable_sinon = 1.0e-10) 278 255 ! fin GKtest 279 REAL mixlen ! constante controlant longueur de melange 280 PARAMETER (mixlen=35.0) 256 REAL, PARAMETER :: mixlen=35.0 ! constante controlant longueur de melange 281 257 INTEGER isommet ! le sommet de la couche limite 282 LOGICAL tvirtu ! calculer Ri d'une maniere plus performante 283 PARAMETER (tvirtu=.TRUE.) 284 LOGICAL opt_ec ! formule du Centre Europeen dans l'atmosphere 285 PARAMETER (opt_ec=.FALSE.) 258 LOGICAL, PARAMETER :: tvirtu=.TRUE. ! calculer Ri d'une maniere plus performante 259 LOGICAL, PARAMETER :: opt_ec=.FALSE.! formule du Centre Europeen dans l'atmosphere 286 260 287 261 ! 288 262 ! Variables locales: 289 290 263 INTEGER i, k !IM 120704 291 264 REAL zgeop(klon,klev) … … 293 266 REAL zri(klon) 294 267 REAL zl2(klon) 295 296 REAL u1(klon), v1(klon), t1(klon), q1(klon), z1(klon)297 REAL pcfm1(klon), pcfh1(klon)298 299 268 REAL zdphi, zdu2, ztvd, ztvu, zcdn 300 269 REAL zscf 301 270 REAL zt, zq, zdelta, zcvm5, zcor, zqs, zfr, zdqs 302 271 REAL z2geomf, zalh2, zalm2, zscfh, zscfm 303 REAL t_coup 304 PARAMETER (t_coup=273.15) 305 !IM 306 LOGICAL check 307 PARAMETER (check=.FALSE.) 272 REAL, PARAMETER :: t_coup=273.15 273 LOGICAL, PARAMETER :: check=.FALSE. 308 274 ! 309 275 ! contre-gradient pour la chaleur sensible: Kelvin/metre 310 276 REAL gamt(2:klev) 311 REAL qsurf(klon) 312 313 LOGICAL, SAVE :: appel1er 277 278 LOGICAL, SAVE :: appel1er=.TRUE. 314 279 !$OMP THREADPRIVATE(appel1er) 315 280 ! 316 281 ! Fonctions thermodynamiques et fonctions d'instabilite 317 282 REAL fsta, fins, x 318 LOGICAL zxli ! utiliser un jeu de fonctions simples319 PARAMETER (zxli=.FALSE.)320 283 321 284 fsta(x) = 1.0 / (1.0+10.0*x*(1+8.0*x)) 322 285 fins(x) = SQRT(1.0-18.0*x) 323 324 DATA appel1er /.TRUE./325 326 286 327 287 isommet=klev … … 388 348 ENDDO 389 349 390 !391 ! Calculer le frottement au sol (Cdrag)392 !393 DO i = 1, knon394 u1(i) = u(i,1)395 v1(i) = v(i,1)396 t1(i) = t(i,1)397 q1(i) = q(i,1)398 z1(i) = zgeop(i,1)399 ENDDO400 401 CALL clcdrag(klon, knon, nsrf, zxli, &402 u1, v1, t1, q1, z1, &403 ts, qsurf, rugos, &404 pcfm1, pcfh1)405 !IM ts, qsurf, rugos,406 407 DO i = 1, knon408 pcfm(i,1)=pcfm1(i)409 pcfh(i,1)=pcfh1(i)410 ENDDO411 350 ! 412 351 ! Calculer les coefficients turbulents dans l'atmosphere … … 535 474 pcfm, pcfh) 536 475 476 USE dimphy 477 537 478 !====================================================================== 538 479 ! J'introduit un peu de diffusion sauf dans les endroits … … 562 503 ! Quelques constantes et options: 563 504 ! 564 REAL prandtl 565 PARAMETER (prandtl=0.4) 566 REAL kstable 567 PARAMETER (kstable=0.002) 568 ! PARAMETER (kstable=0.001) 569 REAL mixlen ! constante controlant longueur de melange 570 PARAMETER (mixlen=35.0) 571 REAL seuil ! au-dela l'inversion est consideree trop faible 572 PARAMETER (seuil=-0.02) 505 REAL, PARAMETER :: prandtl=0.4 506 REAL, PARAMETER :: kstable=0.002 507 ! REAL, PARAMETER :: kstable=0.001 508 REAL, PARAMETER :: mixlen=35.0 ! constante controlant longueur de melange 509 REAL, PARAMETER :: seuil=-0.02 ! au-dela l'inversion est consideree trop faible 573 510 ! PARAMETER (seuil=-0.04) 574 511 ! PARAMETER (seuil=-0.06) -
LMDZ4/trunk/libf/phylmd/coefkzmin.F
r782 r1067 1 1 ! 2 ! $Header$ 3 ! 4 SUBROUTINE coefkzmin(ngrid,ypaprs,ypplay,yu,yv,yt,yq,ycoefm 2 SUBROUTINE coefkzmin(knon,ypaprs,ypplay,yu,yv,yt,yq,ycdragm 5 3 . ,km,kn) 6 c SUBROUTINE coefkzmin(ngrid,zlev,teta,ustar,km,kn) 4 7 5 USE dimphy 8 6 IMPLICIT NONE … … 14 12 c disponibles. 15 13 16 REAL yc oefm(klon,klev)14 REAL ycdragm(klon) 17 15 18 16 REAL yu(klon,klev), yv(klon,klev) … … 54 52 REAL km(klon,klev+1) 55 53 REAL kn(klon,klev+1) 56 integer ngrid54 integer knon 57 55 58 56 … … 69 67 c Debut de la partie qui doit etre unclue a terme dans clmain. 70 68 c 71 do i=1, ngrid69 do i=1,knon 72 70 yzlay(i,1)=RD*yt(i,1)/(0.5*(ypaprs(i,1)+ypplay(i,1))) 73 71 . *(ypaprs(i,1)-ypplay(i,1))/RG 74 72 enddo 75 73 do k=2,klev 76 do i=1, ngrid74 do i=1,knon 77 75 yzlay(i,k)=yzlay(i,k-1)+RD*0.5*(yt(i,k-1)+yt(i,k)) 78 76 s /ypaprs(i,k)*(ypplay(i,k-1)-ypplay(i,k))/RG … … 80 78 enddo 81 79 do k=1,klev 82 do i=1, ngrid80 do i=1,knon 83 81 cATTENTION:on passe la temperature potentielle virt. pour le calcul de K 84 82 yteta(i,k)=yt(i,k)*(ypaprs(i,1)/ypplay(i,k))**rkappa … … 86 84 enddo 87 85 enddo 88 do i=1, ngrid86 do i=1,knon 89 87 yzlev(i,1)=0. 90 88 yzlev(i,klev+1)=2.*yzlay(i,klev)-yzlay(i,klev-1) 91 89 enddo 92 90 do k=2,klev 93 do i=1, ngrid91 do i=1,knon 94 92 yzlev(i,k)=0.5*(yzlay(i,k)+yzlay(i,k-1)) 95 93 enddo 96 94 enddo 97 95 98 99 cIM cf FH yustar(:) =SQRT(ycoefm(:,1)*(yu(:,1)*yu(:,1)+yv(:,1)*yv(:,1))) 100 yustar(1:ngrid) =SQRT(ycoefm(1:ngrid,1)* 101 $ (yu(1:ngrid,1)*yu(1:ngrid,1)+yv(1:ngrid,1)*yv(1:ngrid,1))) 96 yustar(1:knon) =SQRT(ycdragm(1:knon)* 97 $ (yu(1:knon,1)*yu(1:knon,1)+yv(1:knon,1)*yv(1:knon,1))) 102 98 103 99 c Fin de la partie qui doit etre unclue a terme dans clmain. … … 114 110 zlev=yzlev 115 111 116 do ig=1, ngrid117 coriol(ig)=1.e-4118 pblhmin(ig)=0.07*ustar(ig)/max(abs(coriol(ig)),2.546e-5)112 do ig=1,knon 113 coriol(ig)=1.e-4 114 pblhmin(ig)=0.07*ustar(ig)/max(abs(coriol(ig)),2.546e-5) 119 115 enddo 120 116 121 117 do k=2,klev 122 do ig=1, ngrid118 do ig=1,knon 123 119 if (teta(ig,2).gt.teta(ig,1)) then 124 120 qmin=ustar(ig)*(max(1.-zlev(ig,k)/pblhmin(ig),0.))**2 -
LMDZ4/trunk/libf/phylmd/cpl_mod.F90
r1010 r1067 1 !2 ! $Header$3 1 ! 4 2 MODULE cpl_mod … … 67 65 REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: read_alb_sic ! albedo at sea ice 68 66 !$OMP THREADPRIVATE(read_alb_sic) 67 REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: read_u0, read_v0 ! ocean surface current 68 !$OMP THREADPRIVATE(read_u0,read_v0) 69 69 70 70 INTEGER, ALLOCATABLE, DIMENSION(:), SAVE :: unity … … 177 177 sum_error = sum_error + error 178 178 ALLOCATE(read_alb_sic(iim, jj_nb), stat = error) 179 sum_error = sum_error + error 180 181 ALLOCATE(read_u0(iim, jj_nb), stat = error) 182 sum_error = sum_error + error 183 ALLOCATE(read_v0(iim, jj_nb), stat = error) 179 184 sum_error = sum_error + error 180 185 … … 272 277 ! are stored in this module. 273 278 USE surface_data 279 USE phys_state_var_mod, ONLY : rlon, rlat 280 USE Write_Field 274 281 275 282 INCLUDE "indicesol.h" … … 296 303 REAL, DIMENSION(iim,jj_nb,jpfldo2a) :: tab_read_flds 297 304 REAL, DIMENSION(klon,nbsrf) :: pctsrf_old 305 REAL, DIMENSION(klon_mpi) :: rlon_mpi, rlat_mpi 306 REAL, DIMENSION(iim, jj_nb) :: tmp_lon, tmp_lat 307 REAL, DIMENSION(iim, jj_nb) :: tmp_r0 298 308 299 309 !************************************************************************************* … … 311 321 time_sec=(itime-1)*dtime 312 322 #ifdef CPP_COUPLE 313 time_sec=(itime-1)*dtime314 323 !$OMP MASTER 315 324 CALL fromcpl(time_sec, tab_read_flds) … … 342 351 !$OMP END MASTER 343 352 353 IF (cpl_current) THEN 354 355 ! Transform the longitudes and latitudes on 2D arrays 356 CALL gather_omp(rlon,rlon_mpi) 357 CALL gather_omp(rlat,rlat_mpi) 358 !$OMP MASTER 359 CALL Grid1DTo2D_mpi(rlon_mpi,tmp_lon) 360 CALL Grid1DTo2D_mpi(rlat_mpi,tmp_lat) 361 362 ! Transform the currents from cartesian to spheric coordinates 363 ! tmp_r0 should be zero 364 CALL geo2atm(iim, jj_nb, tab_read_flds(:,:,5), tab_read_flds(:,:,6), tab_read_flds(:,:,7), & 365 tmp_lon, tmp_lat, & 366 read_u0(:,:), read_v0(:,:), tmp_r0(:,:)) 367 !$OMP END MASTER 368 CALL WriteField('read_u0',read_u0) 369 CALL WriteField('read_v0',read_v0) 370 CALL WriteField('read_r0',tmp_r0) 371 ELSE 372 read_u0(:,:) = 0. 373 read_v0(:,:) = 0. 374 ENDIF 375 344 376 !************************************************************************************* 345 377 ! Transform seaice fraction (read_sic : ocean-seaice mask) into global … … 368 400 ! 369 401 370 SUBROUTINE cpl_receive_ocean_fields(knon, knindex, tsurf_new )402 SUBROUTINE cpl_receive_ocean_fields(knon, knindex, tsurf_new, u0_new, v0_new) 371 403 ! 372 404 ! This routine returns the field for the ocean that has been read from the coupler … … 384 416 !************************************************************************************* 385 417 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new 418 REAL, DIMENSION(klon), INTENT(OUT) :: u0_new 419 REAL, DIMENSION(klon), INTENT(OUT) :: v0_new 386 420 387 421 ! Local variables … … 396 430 CALL cpl2gath(read_sst, tsurf_new, knon, knindex) 397 431 CALL cpl2gath(read_sic, sic_new, knon, knindex) 432 CALL cpl2gath(read_u0, u0_new, knon, knindex) 433 CALL cpl2gath(read_v0, v0_new, knon, knindex) 398 434 399 435 !************************************************************************************* … … 1120 1156 ENDIF 1121 1157 1122 ! Transform the wind from local atmospheric 2D coordinates to geocentric1123 ! 3D coordinates1158 ! Transform the wind from spherical atmospheric 2D coordinates to geocentric 1159 ! cartesian 3D coordinates 1124 1160 !$OMP MASTER 1125 1161 CALL atm2geo (iim, jj_nb, tmp_taux, tmp_tauy, tmp_lon, tmp_lat, & … … 1165 1201 time_sec=(itime-1)*dtime 1166 1202 #ifdef CPP_COUPLE 1167 time_sec=(itime-1)*dtime1168 1203 !$OMP MASTER 1169 1204 CALL intocpl(time_sec, lafin, tab_flds(:,:,:)) -
LMDZ4/trunk/libf/phylmd/oasis.F90
r1001 r1067 1 !2 ! $Header$3 1 ! 4 2 MODULE oasis … … 32 30 INTEGER, PARAMETER :: jpflda2o2=6 33 31 ! Number of fields exchanged from ocean to atmosphere 34 INTEGER , PARAMETER :: jpfldo2a=432 INTEGER :: jpfldo2a 35 33 36 34 CHARACTER (len=8), DIMENSION(jpmaxfld), PUBLIC, SAVE :: cl_read … … 39 37 !$OMP THREADPRIVATE(cl_writ) 40 38 41 INTEGER, DIMENSION(jp fldo2a), SAVE, PRIVATE :: in_var_id39 INTEGER, DIMENSION(jpmaxfld), SAVE, PRIVATE :: in_var_id 42 40 !$OMP THREADPRIVATE(in_var_id) 43 41 INTEGER, DIMENSION(jpflda2o1+jpflda2o2), SAVE, PRIVATE :: out_var_id 44 42 !$OMP THREADPRIVATE(out_var_id) 45 43 46 CHARACTER(LEN=*),PARAMETER :: OPA_version='OPA9'44 LOGICAL :: cpl_current 47 45 48 46 #ifdef CPP_COUPLE … … 58 56 ! LF 09/2003 59 57 ! 58 USE IOIPSL 60 59 USE surface_data, ONLY : version_ocean 61 60 INCLUDE "dimensions.h" … … 75 74 CHARACTER (len = 20) :: modname = 'inicma' 76 75 CHARACTER (len = 80) :: abort_message 76 LOGICAL :: cpl_current_omp 77 77 78 78 !* 1. Initializations … … 90 90 ! 91 91 clmodnam = 'lmdz.x' ! as in $NBMODEL in Cpl/Nam/namcouple.tmp 92 ! 92 93 !************************************************************************************ 94 ! Define if coupling ocean currents or not 95 !************************************************************************************ 96 !$OMP MASTER 97 cpl_current_omp = .FALSE. 98 CALL getin('cpl_current', cpl_current_omp) 99 !$OMP END MASTER 100 !$OMP BARRIER 101 cpl_current = cpl_current_omp 102 WRITE(nuout,*) 'Couple ocean currents, cpl_current = ',cpl_current 103 104 IF (cpl_current) THEN 105 jpfldo2a=7 106 ELSE 107 jpfldo2a=4 108 END IF 93 109 !************************************************************************************ 94 110 ! Here we go: psmile initialisation … … 183 199 cl_read(4)='SIICTEMW' 184 200 END IF 201 cl_read(5)='CURRENTX' 202 cl_read(6)='CURRENTY' 203 cl_read(7)='CURRENTZ' 185 204 186 205 il_var_nodims(1) = 2 -
LMDZ4/trunk/libf/phylmd/ocean_cpl_mod.F90
r996 r1067 1 !2 ! $Header$3 1 ! 4 2 MODULE ocean_cpl_mod … … 8 6 ! 9 7 10 USE dimphy, ONLY : klon11 USE cpl_mod12 USE calcul_fluxs_mod, ONLY : calcul_fluxs13 USE climb_wind_mod, ONLY : calcul_wind_flux14 15 8 IMPLICIT NONE 16 9 PRIVATE … … 28 21 ! Allocate fields for this module and initailize the module mod_cpl 29 22 ! 23 USE dimphy, ONLY : klon 24 USE cpl_mod 25 30 26 ! Input arguments 31 27 !************************************************************************************* … … 48 44 SUBROUTINE ocean_cpl_noice( & 49 45 swnet, lwnet, alb1, & 50 windsp, & 51 fder_old, & 46 windsp, fder_old, & 52 47 itime, dtime, knon, knindex, & 53 p1lay, tq_cdrag, precip_rain, precip_snow, temp_air, spechum, & 54 petAcoef, peqAcoef, petBcoef, peqBcoef, & 55 ps, u1_lay, v1_lay, & 48 p1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum, & 49 AcoefH, AcoefQ, BcoefH, BcoefQ, & 50 AcoefU, AcoefV, BcoefU, BcoefV, & 51 ps, u1, v1, & 56 52 radsol, snow, agesno, & 57 qsurf, evap, fluxsens, fluxlat, &53 qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 58 54 tsurf_new, dflux_s, dflux_l) 55 59 56 ! 60 57 ! This subroutine treats the "open ocean", all grid points that are not entierly covered … … 62 59 ! surface is done and finally it sends some fields to the coupler. 63 60 ! 61 USE dimphy, ONLY : klon 62 USE cpl_mod 63 USE calcul_fluxs_mod 64 64 65 INCLUDE "indicesol.h" 65 66 INCLUDE "YOMCST.h" … … 76 77 REAL, DIMENSION(klon), INTENT(IN) :: fder_old 77 78 REAL, DIMENSION(klon), INTENT(IN) :: p1lay 78 REAL, DIMENSION(klon), INTENT(IN) :: tq_cdrag79 REAL, DIMENSION(klon), INTENT(IN) :: cdragh, cdragm 79 80 REAL, DIMENSION(klon), INTENT(IN) :: precip_rain, precip_snow 80 81 REAL, DIMENSION(klon), INTENT(IN) :: temp_air, spechum 81 REAL, DIMENSION(klon), INTENT(IN) :: petAcoef, peqAcoef82 REAL, DIMENSION(klon), INTENT(IN) :: petBcoef, peqBcoef82 REAL, DIMENSION(klon), INTENT(IN) :: AcoefH, AcoefQ, BcoefH, BcoefQ 83 REAL, DIMENSION(klon), INTENT(IN) :: AcoefU, AcoefV, BcoefU, BcoefV 83 84 REAL, DIMENSION(klon), INTENT(IN) :: ps 84 REAL, DIMENSION(klon), INTENT(IN) :: u1 _lay, v1_lay85 REAL, DIMENSION(klon), INTENT(IN) :: u1, v1 85 86 86 87 ! In/Output arguments … … 94 95 REAL, DIMENSION(klon), INTENT(OUT) :: qsurf 95 96 REAL, DIMENSION(klon), INTENT(OUT) :: evap, fluxsens, fluxlat 97 REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1, flux_v1 96 98 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new 97 99 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l … … 104 106 REAL, DIMENSION(klon) :: fder_new 105 107 REAL, DIMENSION(klon) :: tsurf_cpl 106 REAL, DIMENSION(klon) :: taux, tauy 108 REAL, DIMENSION(klon) :: u0_cpl, v0_cpl 109 REAL, DIMENSION(klon) :: u1_lay, v1_lay 107 110 LOGICAL :: check=.FALSE. 108 111 … … 116 119 ! 117 120 !**************************************************************************************** 118 CALL cpl_receive_ocean_fields(knon, knindex, tsurf_cpl )121 CALL cpl_receive_ocean_fields(knon, knindex, tsurf_cpl, u0_cpl, v0_cpl) 119 122 120 123 !**************************************************************************************** … … 126 129 dif_grnd = 0. 127 130 agesno(:) = 0. 128 131 132 DO i = 1, knon 133 u1_lay(i) = u1(i) - u0_cpl(i) 134 v1_lay(i) = v1(i) - v0_cpl(i) 135 END DO 136 129 137 CALL calcul_fluxs(knon, is_oce, dtime, & 130 tsurf_cpl, p1lay, cal, beta, tq_cdrag, ps, &138 tsurf_cpl, p1lay, cal, beta, cdragh, ps, & 131 139 precip_rain, precip_snow, snow, qsurf, & 132 140 radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, & 133 petAcoef, peqAcoef, petBcoef, peqBcoef, &141 AcoefH, AcoefQ, BcoefH, BcoefQ, & 134 142 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l) 135 143 136 ! Calcultate the flux of u and v at surface 137 CALL calcul_wind_flux(knon, dtime, taux, tauy) 138 144 ! - Flux calculation at first modele level for U and V 145 CALL calcul_flux_wind(knon, dtime, & 146 u0_cpl, v0_cpl, u1, v1, cdragm, & 147 AcoefU, AcoefV, BcoefU, BcoefV, & 148 p1lay, temp_air, & 149 flux_u1, flux_v1) 139 150 140 151 !**************************************************************************************** … … 159 170 CALL cpl_send_ocean_fields(itime, knon, knindex, & 160 171 swnet, lwnet, fluxlat, fluxsens, & 161 precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, taux, tauy, windsp)172 precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, flux_u1, flux_v1, windsp) 162 173 163 174 … … 171 182 itime, dtime, knon, knindex, & 172 183 lafin, & 173 p1lay, tq_cdrag, precip_rain, precip_snow, temp_air, spechum, & 174 petAcoef, peqAcoef, petBcoef, peqBcoef, & 175 ps, u1_lay, v1_lay, pctsrf, & 184 p1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum, & 185 AcoefH, AcoefQ, BcoefH, BcoefQ, & 186 AcoefU, AcoefV, BcoefU, BcoefV, & 187 ps, u1, v1, pctsrf, & 176 188 radsol, snow, qsurf, & 177 alb1_new, alb2_new, evap, fluxsens, fluxlat, &189 alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 178 190 tsurf_new, dflux_s, dflux_l) 179 191 ! … … 182 194 ! some fields to the coupler. 183 195 ! 196 USE dimphy, ONLY : klon 197 USE cpl_mod 198 USE calcul_fluxs_mod 199 184 200 INCLUDE "indicesol.h" 185 201 INCLUDE "YOMCST.h" … … 197 213 REAL, DIMENSION(klon), INTENT(IN) :: fder_old 198 214 REAL, DIMENSION(klon), INTENT(IN) :: p1lay 199 REAL, DIMENSION(klon), INTENT(IN) :: tq_cdrag215 REAL, DIMENSION(klon), INTENT(IN) :: cdragh, cdragm 200 216 REAL, DIMENSION(klon), INTENT(IN) :: precip_rain, precip_snow 201 217 REAL, DIMENSION(klon), INTENT(IN) :: temp_air, spechum 202 REAL, DIMENSION(klon), INTENT(IN) :: petAcoef, peqAcoef203 REAL, DIMENSION(klon), INTENT(IN) :: petBcoef, peqBcoef218 REAL, DIMENSION(klon), INTENT(IN) :: AcoefH, AcoefQ, BcoefH, BcoefQ 219 REAL, DIMENSION(klon), INTENT(IN) :: AcoefU, AcoefV, BcoefU, BcoefV 204 220 REAL, DIMENSION(klon), INTENT(IN) :: ps 205 REAL, DIMENSION(klon), INTENT(IN) :: u1 _lay, v1_lay221 REAL, DIMENSION(klon), INTENT(IN) :: u1, v1 206 222 REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf 207 223 … … 216 232 REAL, DIMENSION(klon), INTENT(OUT) :: alb1_new, alb2_new 217 233 REAL, DIMENSION(klon), INTENT(OUT) :: evap, fluxsens, fluxlat 234 REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1, flux_v1 218 235 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new 219 236 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l … … 227 244 REAL, DIMENSION(klon) :: cal, beta, dif_grnd 228 245 REAL, DIMENSION(klon) :: tsurf_cpl, fder_new 229 REAL, DIMENSION(klon) :: taux, tauy230 246 REAL, DIMENSION(klon) :: alb_cpl 247 REAL, DIMENSION(klon) :: u0, v0 248 REAL, DIMENSION(klon) :: u1_lay, v1_lay 231 249 232 250 ! End definitions … … 255 273 beta = 1.0 256 274 275 ! Suppose zero surface speed 276 u0(:)=0.0 277 v0(:)=0.0 278 u1_lay(:) = u1(:) - u0(:) 279 v1_lay(:) = v1(:) - v0(:) 257 280 258 281 CALL calcul_fluxs(knon, is_sic, dtime, & 259 tsurf_cpl, p1lay, cal, beta, tq_cdrag, ps, &282 tsurf_cpl, p1lay, cal, beta, cdragh, ps, & 260 283 precip_rain, precip_snow, snow, qsurf, & 261 284 radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, & 262 petAcoef, peqAcoef, petBcoef, peqBcoef, &285 AcoefH, AcoefQ, BcoefH, BcoefQ, & 263 286 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l) 264 287 265 ! Calcultate the flux of u and v at surface 266 CALL calcul_wind_flux(knon, dtime, taux, tauy) 267 268 288 289 ! - Flux calculation at first modele level for U and V 290 CALL calcul_flux_wind(knon, dtime, & 291 u0, v0, u1, v1, cdragm, & 292 AcoefU, AcoefV, BcoefU, BcoefV, & 293 p1lay, temp_air, & 294 flux_u1, flux_v1) 295 269 296 !**************************************************************************************** 270 297 ! Calculate fder : flux derivative (sensible and latente) … … 289 316 pctsrf, lafin, rlon, rlat, & 290 317 swnet, lwnet, fluxlat, fluxsens, & 291 precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, taux, tauy)318 precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, flux_u1, flux_v1) 292 319 293 320 -
LMDZ4/trunk/libf/phylmd/ocean_forced_mod.F90
r996 r1067 1 !2 ! $Header$3 1 ! 4 2 MODULE ocean_forced_mod … … 7 5 ! forced ocean, "ocean=force". 8 6 ! 9 USE surface_data, ONLY : calice, calsno, tau_gl10 USE fonte_neige_mod, ONLY : fonte_neige11 USE calcul_fluxs_mod, ONLY : calcul_fluxs12 USE dimphy13 14 7 IMPLICIT NONE 15 8 … … 18 11 !**************************************************************************************** 19 12 ! 20 SUBROUTINE ocean_forced_noice( itime, dtime, jour, knon, knindex,&21 debut, &22 p1lay, tq_cdrag, precip_rain, precip_snow, &13 SUBROUTINE ocean_forced_noice( & 14 itime, dtime, jour, knon, knindex, & 15 p1lay, cdragh, cdragm, precip_rain, precip_snow, & 23 16 temp_air, spechum, & 24 petAcoef, peqAcoef, petBcoef, peqBcoef, & 25 ps, u1_lay, v1_lay, & 17 AcoefH, AcoefQ, BcoefH, BcoefQ, & 18 AcoefU, AcoefV, BcoefU, BcoefV, & 19 ps, u1, v1, & 26 20 radsol, snow, agesno, & 27 qsurf, evap, fluxsens, fluxlat, &21 qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 28 22 tsurf_new, dflux_s, dflux_l) 29 23 ! … … 33 27 ! surface. 34 28 ! 29 USE dimphy 30 USE calcul_fluxs_mod 35 31 USE limit_read_mod 36 32 INCLUDE "indicesol.h" … … 41 37 INTEGER, INTENT(IN) :: itime, jour, knon 42 38 INTEGER, DIMENSION(klon), INTENT(IN) :: knindex 43 LOGICAL, INTENT(IN) :: debut44 39 REAL, INTENT(IN) :: dtime 45 40 REAL, DIMENSION(klon), INTENT(IN) :: p1lay 46 REAL, DIMENSION(klon), INTENT(IN) :: tq_cdrag41 REAL, DIMENSION(klon), INTENT(IN) :: cdragh, cdragm 47 42 REAL, DIMENSION(klon), INTENT(IN) :: precip_rain, precip_snow 48 43 REAL, DIMENSION(klon), INTENT(IN) :: temp_air, spechum 49 REAL, DIMENSION(klon), INTENT(IN) :: petAcoef, peqAcoef50 REAL, DIMENSION(klon), INTENT(IN) :: petBcoef, peqBcoef44 REAL, DIMENSION(klon), INTENT(IN) :: AcoefH, AcoefQ, BcoefH, BcoefQ 45 REAL, DIMENSION(klon), INTENT(IN) :: AcoefU, AcoefV, BcoefU, BcoefV 51 46 REAL, DIMENSION(klon), INTENT(IN) :: ps 52 REAL, DIMENSION(klon), INTENT(IN) :: u1 _lay, v1_lay47 REAL, DIMENSION(klon), INTENT(IN) :: u1, v1 53 48 54 49 ! In/Output arguments … … 62 57 REAL, DIMENSION(klon), INTENT(OUT) :: qsurf 63 58 REAL, DIMENSION(klon), INTENT(OUT) :: evap, fluxsens, fluxlat 59 REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1, flux_v1 64 60 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new 65 61 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l … … 70 66 REAL, DIMENSION(klon) :: cal, beta, dif_grnd 71 67 REAL, DIMENSION(klon) :: alb_neig, tsurf_lim, zx_sl 68 REAL, DIMENSION(klon) :: u0, v0 69 REAL, DIMENSION(klon) :: u1_lay, v1_lay 72 70 LOGICAL :: check=.FALSE. 73 71 … … 76 74 !**************************************************************************************** 77 75 IF (check) WRITE(*,*)' Entering ocean_forced_noice' 78 76 79 77 !**************************************************************************************** 80 78 ! 1) … … 95 93 alb_neig(:) = 0. 96 94 agesno(:) = 0. 97 95 ! Suppose zero surface speed 96 u0(:)=0.0 97 v0(:)=0.0 98 u1_lay(:) = u1(:) - u0(:) 99 v1_lay(:) = v1(:) - v0(:) 100 98 101 ! Calcul de tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l and qsurf 99 102 CALL calcul_fluxs(knon, is_oce, dtime, & 100 tsurf_lim, p1lay, cal, beta, tq_cdrag, ps, &103 tsurf_lim, p1lay, cal, beta, cdragh, ps, & 101 104 precip_rain, precip_snow, snow, qsurf, & 102 105 radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, & 103 petAcoef, peqAcoef, petBcoef, peqBcoef, &106 AcoefH, AcoefQ, BcoefH, BcoefQ, & 104 107 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l) 105 108 109 ! - Flux calculation at first modele level for U and V 110 CALL calcul_flux_wind(knon, dtime, & 111 u0, v0, u1, v1, cdragm, & 112 AcoefU, AcoefV, BcoefU, BcoefV, & 113 p1lay, temp_air, & 114 flux_u1, flux_v1) 106 115 107 116 END SUBROUTINE ocean_forced_noice 108 117 ! 109 !**************************************************************************************** 110 ! 111 SUBROUTINE ocean_forced_ice(itime, dtime, jour, knon, knindex, & 112 debut, & 113 tsurf_in, p1lay, tq_cdrag, precip_rain, precip_snow, temp_air, spechum, & 114 petAcoef, peqAcoef, petBcoef, peqBcoef, & 115 ps, u1_lay, v1_lay, & 118 !*************************************************************************************** 119 ! 120 SUBROUTINE ocean_forced_ice( & 121 itime, dtime, jour, knon, knindex, & 122 tsurf_in, p1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum, & 123 AcoefH, AcoefQ, BcoefH, BcoefQ, & 124 AcoefU, AcoefV, BcoefU, BcoefV, & 125 ps, u1, v1, & 116 126 radsol, snow, qsol, agesno, tsoil, & 117 qsurf, alb1_new, alb2_new, evap, fluxsens, fluxlat, &127 qsurf, alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 118 128 tsurf_new, dflux_s, dflux_l) 119 129 ! … … 122 132 ! surface. 123 133 ! 134 USE dimphy 135 USE calcul_fluxs_mod 136 USE surface_data, ONLY : calice, calsno, tau_gl 124 137 USE limit_read_mod 138 USE fonte_neige_mod, ONLY : fonte_neige 125 139 126 140 INCLUDE "indicesol.h" … … 133 147 INTEGER, INTENT(IN) :: itime, jour, knon 134 148 INTEGER, DIMENSION(klon), INTENT(IN) :: knindex 135 LOGICAL, INTENT(IN) :: debut136 149 REAL, INTENT(IN) :: dtime 137 150 REAL, DIMENSION(klon), INTENT(IN) :: tsurf_in 138 151 REAL, DIMENSION(klon), INTENT(IN) :: p1lay 139 REAL, DIMENSION(klon), INTENT(IN) :: tq_cdrag152 REAL, DIMENSION(klon), INTENT(IN) :: cdragh, cdragm 140 153 REAL, DIMENSION(klon), INTENT(IN) :: precip_rain, precip_snow 141 154 REAL, DIMENSION(klon), INTENT(IN) :: temp_air, spechum 142 REAL, DIMENSION(klon), INTENT(IN) :: petAcoef, peqAcoef143 REAL, DIMENSION(klon), INTENT(IN) :: petBcoef, peqBcoef155 REAL, DIMENSION(klon), INTENT(IN) :: AcoefH, AcoefQ, BcoefH, BcoefQ 156 REAL, DIMENSION(klon), INTENT(IN) :: AcoefU, AcoefV, BcoefU, BcoefV 144 157 REAL, DIMENSION(klon), INTENT(IN) :: ps 145 REAL, DIMENSION(klon), INTENT(IN) :: u1 _lay, v1_lay158 REAL, DIMENSION(klon), INTENT(IN) :: u1, v1 146 159 147 160 ! In/Output arguments … … 158 171 REAL, DIMENSION(klon), INTENT(OUT) :: alb2_new ! new albedo in near IR interval 159 172 REAL, DIMENSION(klon), INTENT(OUT) :: evap, fluxsens, fluxlat 173 REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1, flux_v1 160 174 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new 161 175 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l … … 170 184 REAL, DIMENSION(klon) :: alb_neig, tsurf_tmp 171 185 REAL, DIMENSION(klon) :: soilcap, soilflux 186 REAL, DIMENSION(klon) :: u0, v0 187 REAL, DIMENSION(klon) :: u1_lay, v1_lay 172 188 173 189 !**************************************************************************************** … … 178 194 !**************************************************************************************** 179 195 ! 1) 180 ! Flux calculation : tsurf_new, evap, fluxlat, fluxsens, 196 ! Flux calculation : tsurf_new, evap, fluxlat, fluxsens, flux_u1, flux_v1 181 197 ! dflux_s, dflux_l and qsurf 182 198 !**************************************************************************************** … … 200 216 201 217 beta = 1.0 218 ! Suppose zero surface speed 219 u0(:)=0.0 220 v0(:)=0.0 221 u1_lay(:) = u1(:) - u0(:) 222 v1_lay(:) = v1(:) - v0(:) 202 223 CALL calcul_fluxs(knon, is_sic, dtime, & 203 tsurf_tmp, p1lay, cal, beta, tq_cdrag, ps, &224 tsurf_tmp, p1lay, cal, beta, cdragh, ps, & 204 225 precip_rain, precip_snow, snow, qsurf, & 205 226 radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, & 206 petAcoef, peqAcoef, petBcoef, peqBcoef, &227 AcoefH, AcoefQ, BcoefH, BcoefQ, & 207 228 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l) 229 230 ! - Flux calculation at first modele level for U and V 231 CALL calcul_flux_wind(knon, dtime, & 232 u0, v0, u1, v1, cdragm, & 233 AcoefU, AcoefV, BcoefU, BcoefV, & 234 p1lay, temp_air, & 235 flux_u1, flux_v1) 208 236 209 237 !**************************************************************************************** -
LMDZ4/trunk/libf/phylmd/ocean_slab_mod.F90
r996 r1067 1 !2 ! $Header$3 1 ! 4 2 MODULE ocean_slab_mod … … 7 5 ! "ocean=slab". 8 6 ! 9 USE surface_data10 USE fonte_neige_mod, ONLY : fonte_neige11 USE calcul_fluxs_mod, ONLY : calcul_fluxs12 USE dimphy13 14 7 IMPLICIT NONE 15 8 PRIVATE … … 22 15 SUBROUTINE ocean_slab_frac(itime, dtime, jour, pctsrf, is_modified) 23 16 17 USE dimphy 24 18 USE limit_read_mod 19 USE surface_data 25 20 INCLUDE "indicesol.h" 26 21 ! INCLUDE "clesphys.h" … … 40 35 41 36 42 IF (version_ocean =='sicOBS') THEN37 IF (version_ocean == 'sicOBS') THEN 43 38 CALL limit_read_frac(itime, dtime, jour, pctsrf, is_modified) 44 39 ELSE … … 55 50 SUBROUTINE ocean_slab_noice( & 56 51 itime, dtime, jour, knon, knindex, & 57 p1lay, tq_cdrag, precip_rain, precip_snow, temp_air, spechum, & 58 petAcoef, peqAcoef, petBcoef, peqBcoef, & 59 ps, u1_lay, v1_lay, tsurf_in, & 52 p1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum, & 53 AcoefH, AcoefQ, BcoefH, BcoefQ, & 54 AcoefU, AcoefV, BcoefU, BcoefV, & 55 ps, u1, v1, tsurf_in, & 60 56 radsol, snow, agesno, & 61 qsurf, evap, fluxsens, fluxlat, &57 qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 62 58 tsurf_new, dflux_s, dflux_l, lmt_bils) 63 59 60 USE dimphy 61 USE calcul_fluxs_mod 62 64 63 INCLUDE "indicesol.h" 65 64 INCLUDE "iniprint.h" … … 73 72 REAL, INTENT(IN) :: dtime 74 73 REAL, DIMENSION(klon), INTENT(IN) :: p1lay 75 REAL, DIMENSION(klon), INTENT(IN) :: tq_cdrag74 REAL, DIMENSION(klon), INTENT(IN) :: cdragh, cdragm 76 75 REAL, DIMENSION(klon), INTENT(IN) :: precip_rain, precip_snow 77 76 REAL, DIMENSION(klon), INTENT(IN) :: temp_air, spechum 78 REAL, DIMENSION(klon), INTENT(IN) :: petAcoef, peqAcoef79 REAL, DIMENSION(klon), INTENT(IN) :: petBcoef, peqBcoef77 REAL, DIMENSION(klon), INTENT(IN) :: AcoefH, AcoefQ, BcoefH, BcoefQ 78 REAL, DIMENSION(klon), INTENT(IN) :: AcoefU, AcoefV, BcoefU, BcoefV 80 79 REAL, DIMENSION(klon), INTENT(IN) :: ps 81 REAL, DIMENSION(klon), INTENT(IN) :: u1 _lay, v1_lay80 REAL, DIMENSION(klon), INTENT(IN) :: u1, v1 82 81 REAL, DIMENSION(klon), INTENT(IN) :: tsurf_in 83 82 … … 92 91 REAL, DIMENSION(klon), INTENT(OUT) :: qsurf 93 92 REAL, DIMENSION(klon), INTENT(OUT) :: evap, fluxsens, fluxlat 93 REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1, flux_v1 94 94 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new 95 95 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l … … 101 101 REAL, DIMENSION(klon) :: cal, beta, dif_grnd 102 102 REAL, DIMENSION(klon) :: lmt_bils_oce, lmt_foce, diff_sst 103 REAL, DIMENSION(klon) :: u0, v0 104 REAL, DIMENSION(klon) :: u1_lay, v1_lay 103 105 REAL :: calc_bils_oce, deltat 104 106 REAL, PARAMETER :: cyang=50.0 * 4.228e+06 ! capacite calorifique volumetrique de l'eau J/(m2 K) … … 113 115 agesno(:) = 0. 114 116 117 ! Suppose zero surface speed 118 u0(:)=0.0 119 v0(:)=0.0 120 u1_lay(:) = u1(:) - u0(:) 121 v1_lay(:) = v1(:) - v0(:) 122 115 123 CALL calcul_fluxs(knon, is_oce, dtime, & 116 tsurf_in, p1lay, cal, beta, tq_cdrag, ps, &124 tsurf_in, p1lay, cal, beta, cdragh, ps, & 117 125 precip_rain, precip_snow, snow, qsurf, & 118 126 radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, & 119 petAcoef, peqAcoef, petBcoef, peqBcoef, &127 AcoefH, AcoefQ, BcoefH, BcoefQ, & 120 128 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l) 129 130 ! - Flux calculation at first modele level for U and V 131 CALL calcul_flux_wind(knon, dtime, & 132 u0, v0, u1, v1, cdragm, & 133 AcoefU, AcoefV, BcoefU, BcoefV, & 134 p1lay, temp_air, & 135 flux_u1, flux_v1) 121 136 122 137 !**************************************************************************************** -
LMDZ4/trunk/libf/phylmd/pbl_surface_mod.F90
r1064 r1067 388 388 REAL, DIMENSION(klon) :: y_flux_t1, y_flux_q1 389 389 REAL, DIMENSION(klon) :: y_dflux_t, y_dflux_q 390 REAL, DIMENSION(klon) :: u1lay, v1lay390 REAL, DIMENSION(klon) :: y_flux_u1, y_flux_v1 391 391 REAL, DIMENSION(klon) :: yt2m, yq2m, yu10m 392 392 REAL, DIMENSION(klon) :: yustar 393 REAL, DIMENSION(klon) :: yu10mx394 REAL, DIMENSION(klon) :: yu10my395 393 REAL, DIMENSION(klon) :: ywindsp 396 394 REAL, DIMENSION(klon) :: yt10m, yq10m … … 411 409 REAL, DIMENSION(klon) :: rugo1 412 410 REAL, DIMENSION(klon) :: yfluxsens 413 REAL, DIMENSION(klon) :: petAcoef, peqAcoef, petBcoef, peqBcoef 411 REAL, DIMENSION(klon) :: AcoefH, AcoefQ, BcoefH, BcoefQ 412 REAL, DIMENSION(klon) :: AcoefU, AcoefV, BcoefU, BcoefV 414 413 REAL, DIMENSION(klon) :: ypsref 415 414 REAL, DIMENSION(klon) :: yevap, ytsurf_new, yalb1_new, yalb2_new … … 421 420 REAL, DIMENSION(klon,klev) :: y_flux_u, y_flux_v 422 421 REAL, DIMENSION(klon,klev) :: ycoefh, ycoefm 422 REAL, DIMENSION(klon) :: ycdragh, ycdragm 423 423 REAL, DIMENSION(klon,klev) :: yu, yv 424 424 REAL, DIMENSION(klon,klev) :: yt, yq … … 451 451 REAL, DIMENSION(klon,nbsrf) :: trmb2 ! inhibition 452 452 REAL, DIMENSION(klon,nbsrf) :: trmb3 ! point Omega 453 REAL, DIMENSION(klon,nbsrf) :: zx_rh2m, zx_qsat2m 453 454 REAL, DIMENSION(klon,nbsrf) :: zx_t1 454 455 REAL, DIMENSION(klon, nbsrf) :: alb ! mean albedo for whole SW interval … … 461 462 REAL :: fsens,flat 462 463 LOGICAL ok_flux_surf 463 data ok_flux_surf/.false./464 DATA ok_flux_surf/.FALSE./ 464 465 !ym pas glop !! 465 common/flux_arp/fsens,flat,ok_flux_surf466 COMMON /flux_arp/fsens,flat,ok_flux_surf 466 467 !$OMP THREADPRIVATE(/flux_arp/) 467 468 … … 476 477 ! 477 478 !**************************************************************************************** 478 479 479 480 480 IF (first_call) THEN … … 515 515 ! Force soil water content to qsol0 if qsol0>0 and VEGET=F (use bucket 516 516 ! instead of ORCHIDEE) 517 if (qsol0>0.) then518 print*,'WARNING : On impose qsol=',qsol0517 IF (qsol0>0.) THEN 518 PRINT*,'WARNING : On impose qsol=',qsol0 519 519 qsol(:)=qsol0 520 endif520 ENDIF 521 521 !**************************************************************************************** 522 522 … … 527 527 !**************************************************************************************** 528 528 cdragh = 0.0 ; cdragm = 0.0 ; dflux_t = 0.0 ; dflux_q = 0.0 529 ypct = 0.0 ; yts = 0.0 ; ysnow = 0.0 ; zu1 = 0.0529 ypct = 0.0 ; yts = 0.0 ; ysnow = 0.0 530 530 zv1 = 0.0 ; yqsurf = 0.0 ; yalb1 = 0.0 ; yalb2 = 0.0 531 531 yrain_f = 0.0 ; ysnow_f = 0.0 ; yfder = 0.0 ; ysolsw = 0.0 … … 534 534 ydelp = 0.0 ; yu = 0.0 ; yv = 0.0 ; yt = 0.0 535 535 yq = 0.0 ; y_dflux_t = 0.0 ; y_dflux_q = 0.0 536 yrugoro = 0.0 ; y u10mx = 0.0 ; yu10my = 0.0 ; ywindsp = 0.0536 yrugoro = 0.0 ; ywindsp = 0.0 537 537 d_ts = 0.0 ; yfluxlat=0.0 ; flux_t = 0.0 ; flux_q = 0.0 538 538 flux_u = 0.0 ; flux_v = 0.0 ; d_t = 0.0 ; d_q = 0.0 539 d_u = 0.0 ; d_v = 0.0 ; zcoefh = 0.0 ;yqsol = 0.0539 d_u = 0.0 ; d_v = 0.0 ; yqsol = 0.0 540 540 ytherm = 0.0 ; ytke=0. 541 541 542 zcoefh(:,:) = 0.0 543 zcoefh(:,1) = 999999. ! zcoefh(:,k=1) should never be used 542 544 ytsoil = 999999. 543 545 … … 555 557 ENDDO 556 558 ENDDO 557 DO i = 1, klon558 zx_alf1 = 1.0559 zx_alf2 = 1.0 - zx_alf1560 u1lay(i) = u(i,1)*zx_alf1 + u(i,2)*zx_alf2561 v1lay(i) = v(i,1)*zx_alf1 + v(i,2)*zx_alf2562 ENDDO563 564 559 565 560 !**************************************************************************************** … … 688 683 yrugos(j) = rugos(i,nsrf) 689 684 yrugoro(j) = rugoro(i) 690 yu1(j) = u 1lay(i)691 yv1(j) = v 1lay(i)685 yu1(j) = u(i,1) 686 yv1(j) = v(i,1) 692 687 ypaprs(j,klev+1) = paprs(i,klev+1) 693 yu10mx(j) = u10m(i,nsrf) 694 yu10my(j) = v10m(i,nsrf) 695 ywindsp(j) = SQRT(yu10mx(j)*yu10mx(j) + yu10my(j)*yu10my(j) ) 688 ywindsp(j) = SQRT(u10m(i,nsrf)**2 + v10m(i,nsrf)**2 ) 696 689 END DO 697 690 … … 726 719 727 720 !**************************************************************************************** 728 ! 6) Calculate coefficients(ycoefm, ycoefh) for turbulent diffusion in the 729 ! atmosphere and coefficients for turbulent diffusion at surface(Cdrag). 721 ! 6a) Calculate coefficients for turbulent diffusion at surface, cdragh et cdragm. 722 ! 723 !**************************************************************************************** 724 725 CALL clcdrag( knon, nsrf, ypaprs, ypplay, & 726 yu(:,1), yv(:,1), yt(:,1), yq(:,1), & 727 yts, yqsurf, yrugos, & 728 ycdragm, ycdragh ) 729 730 !**************************************************************************************** 731 ! 6b) Calculate coefficients for turbulent diffusion in the atmosphere, ycoefm et ycoefm. 730 732 ! 731 733 !**************************************************************************************** 732 734 733 735 CALL coef_diff_turb(dtime, nsrf, knon, ni, & 734 ypaprs, ypplay, yu, yv, yq, yt, yts, yrugos, yqsurf, &736 ypaprs, ypplay, yu, yv, yq, yt, yts, yrugos, yqsurf, ycdragm, & 735 737 ycoefm, ycoefh, ytke) 736 738 … … 748 750 CALL climb_hq_down(knon, ycoefh, ypaprs, ypplay, & 749 751 ydelp, yt, yq, dtime, & 750 petAcoef, peqAcoef, petBcoef, peqBcoef)752 AcoefH, AcoefQ, BcoefH, BcoefQ) 751 753 752 754 ! - Calculate the coefficients Ccoef_U, Ccoef_V, Dcoef_U and Dcoef_V 753 CALL climb_wind_down(knon, dtime, ycoefm, ypplay, ypaprs, yt, ydelp, yu, yv) 755 CALL climb_wind_down(knon, dtime, ycoefm, ypplay, ypaprs, yt, ydelp, yu, yv, & 756 AcoefU, AcoefV, BcoefU, BcoefV) 754 757 755 758 … … 783 786 rlon, rlat, & 784 787 debut, lafin, ydelp(:,1), r_co2_ppm, ysolsw, ysollw, yalb, & 785 yts, ypplay(:,1), ycoefh(:,1), yrain_f, ysnow_f, yt(:,1), yq(:,1),& 786 petAcoef, peqAcoef, petBcoef, peqBcoef, & 788 yts, ypplay(:,1), ycdragh, ycdragm, yrain_f, ysnow_f, yt(:,1), yq(:,1),& 789 AcoefH, AcoefQ, BcoefH, BcoefQ, & 790 AcoefU, AcoefV, BcoefU, BcoefV, & 787 791 ypsref, yu1, yv1, yrugoro, pctsrf, & 788 792 ysnow, yqsol, yagesno, ytsoil, & 789 793 yz0_new, yalb1_new, yalb2_new, yevap, yfluxsens, yfluxlat, & 790 794 yqsurf, ytsurf_new, y_dflux_t, y_dflux_q, & 795 y_flux_u1, y_flux_v1, & 791 796 ylwdown) 792 797 … … 794 799 CALL surf_landice(itap, dtime, knon, ni, & 795 800 ysolsw, ysollw, yts, ypplay(:,1), & 796 ycoefh(:,1), yrain_f, ysnow_f, yt(:,1), yq(:,1),& 797 petAcoef, peqAcoef, petBcoef, peqBcoef, & 801 ycdragh, ycdragm, yrain_f, ysnow_f, yt(:,1), yq(:,1),& 802 AcoefH, AcoefQ, BcoefH, BcoefQ, & 803 AcoefU, AcoefV, BcoefU, BcoefV, & 798 804 ypsref, yu1, yv1, yrugoro, pctsrf, & 799 805 ysnow, yqsurf, yqsol, yagesno, & 800 806 ytsoil, yz0_new, yalb1_new, yalb2_new, yevap, yfluxsens, yfluxlat, & 801 ytsurf_new, y_dflux_t, y_dflux_q) 807 ytsurf_new, y_dflux_t, y_dflux_q, & 808 y_flux_u1, y_flux_v1) 802 809 803 810 CASE(is_oce) … … 805 812 yrugos, ywindsp, rmu0, yfder, yts, & 806 813 itap, dtime, jour, knon, ni, & 807 debut,&808 ypplay(:,1), ycoefh(:,1), ycoefm(:,1), yrain_f, ysnow_f, yt(:,1), yq(:,1),&809 petAcoef, peqAcoef, petBcoef, peqBcoef, &814 ypplay(:,1), ycdragh, ycdragm, yrain_f, ysnow_f, yt(:,1), yq(:,1),& 815 AcoefH, AcoefQ, BcoefH, BcoefQ, & 816 AcoefU, AcoefV, BcoefU, BcoefV, & 810 817 ypsref, yu1, yv1, yrugoro, pctsrf, & 811 818 ysnow, yqsurf, yagesno, & 812 819 yz0_new, yalb1_new, yalb2_new, yevap, yfluxsens, yfluxlat, & 813 ytsurf_new, y_dflux_t, y_dflux_q, slab_wfbils) 820 ytsurf_new, y_dflux_t, y_dflux_q, slab_wfbils, & 821 y_flux_u1, y_flux_v1) 814 822 815 823 CASE(is_sic) … … 817 825 rlon, rlat, ysolsw, ysollw, yalb1, yfder, & 818 826 itap, dtime, jour, knon, ni, & 819 debut, lafin, & 820 yts, ypplay(:,1), ycoefh(:,1), yrain_f, ysnow_f, yt(:,1), yq(:,1),& 821 petAcoef, peqAcoef, petBcoef, peqBcoef, & 827 lafin, & 828 yts, ypplay(:,1), ycdragh, ycdragm, yrain_f, ysnow_f, yt(:,1), yq(:,1),& 829 AcoefH, AcoefQ, BcoefH, BcoefQ, & 830 AcoefU, AcoefV, BcoefU, BcoefV, & 822 831 ypsref, yu1, yv1, yrugoro, pctsrf, & 823 832 ysnow, yqsurf, yqsol, yagesno, ytsoil, & 824 833 yz0_new, yalb1_new, yalb2_new, yevap, yfluxsens, yfluxlat, & 825 ytsurf_new, y_dflux_t, y_dflux_q) 834 ytsurf_new, y_dflux_t, y_dflux_q, & 835 y_flux_u1, y_flux_v1) 826 836 827 837 … … 848 858 !**************************************************************************************** 849 859 ! H and Q 850 ! print *,'pbl_surface: ok_flux_surf=',ok_flux_surf 851 ! print *,'pbl_surface: fsens flat RLVTT=',fsens,flat,RLVTT 852 if (ok_flux_surf) then 860 IF (ok_flux_surf) THEN 861 PRINT *,'pbl_surface: fsens flat RLVTT=',fsens,flat,RLVTT 853 862 y_flux_t1(:) = fsens 854 863 y_flux_q1(:) = flat/RLVTT 855 864 yfluxlat(:) = flat 856 else865 ELSE 857 866 y_flux_t1(:) = yfluxsens(:) 858 867 y_flux_q1(:) = -yevap(:) 859 endif868 ENDIF 860 869 861 870 CALL climb_hq_up(knon, dtime, yt, yq, & … … 863 872 y_flux_q(:,:), y_flux_t(:,:), y_d_q(:,:), y_d_t(:,:)) 864 873 865 ! U and V 866 CALL climb_wind_up(knon, dtime, yu, yv, &874 875 CALL climb_wind_up(knon, dtime, yu, yv, y_flux_u1, y_flux_v1, & 867 876 y_flux_u, y_flux_v, y_d_u, y_d_v) 877 868 878 869 879 DO j = 1, knon 870 880 y_dflux_t(j) = y_dflux_t(j) * ypct(j) 871 881 y_dflux_q(j) = y_dflux_q(j) * ypct(j) 872 yu1(j) = yu1(j) * ypct(j)873 yv1(j) = yv1(j) * ypct(j)874 882 ENDDO 875 883 … … 886 894 DO j = 1, knon 887 895 i = ni(j) 888 ycoefh(j,k) = ycoefh(j,k) * ypct(j)889 ycoefm(j,k) = ycoefm(j,k) * ypct(j)890 896 y_d_t(j,k) = y_d_t(j,k) * ypct(j) 891 897 y_d_q(j,k) = y_d_q(j,k) * ypct(j) … … 902 908 ENDDO 903 909 ENDDO 904 910 905 911 evap(:,nsrf) = - flux_q(:,1,nsrf) 906 912 … … 921 927 fluxlat(i,nsrf) = yfluxlat(j) 922 928 agesno(i,nsrf) = yagesno(j) 923 cdragh(i) = cdragh(i) + yc oefh(j,1)924 cdragm(i) = cdragm(i) + yc oefm(j,1)929 cdragh(i) = cdragh(i) + ycdragh(j)*ypct(j) 930 cdragm(i) = cdragm(i) + ycdragm(j)*ypct(j) 925 931 dflux_t(i) = dflux_t(i) + y_dflux_t(j) 926 932 dflux_q(i) = dflux_q(i) + y_dflux_q(j) 927 zu1(i) = zu1(i) + yu1(j) 928 zv1(i) = zv1(i) + yv1(j) 933 END DO 934 935 DO k = 2, klev 936 DO j = 1, knon 937 i = ni(j) 938 zcoefh(i,k) = zcoefh(i,k) + ycoefh(j,k)*ypct(j) 939 END DO 929 940 END DO 930 941 … … 945 956 946 957 947 #ifdef CRAY948 958 DO k = 1, klev 949 959 DO j = 1, knon 950 960 i = ni(j) 951 #else952 DO j = 1, knon953 i = ni(j)954 DO k = 1, klev955 #endif956 961 d_t(i,k) = d_t(i,k) + y_d_t(j,k) 957 962 d_q(i,k) = d_q(i,k) + y_d_q(j,k) 958 963 d_u(i,k) = d_u(i,k) + y_d_u(j,k) 959 964 d_v(i,k) = d_v(i,k) + y_d_v(j,k) 960 zcoefh(i,k) = zcoefh(i,k) + ycoefh(j,k)961 #ifdef CRAY962 965 END DO 963 966 END DO 964 #else965 END DO966 END DO967 #endif968 967 969 968 !**************************************************************************************** … … 1152 1151 PRINT*,' debut apres d_ts min max ftsol(ts)',itap,amn,amx 1153 1152 ENDIF 1153 1154 !jg ? 1154 1155 !!$! 1155 1156 !!$! If a sub-surface does not exsist for a grid point, the mean value for all … … 1194 1195 END DO 1195 1196 1197 ! Premier niveau de vent sortie dans physiq.F 1198 zu1(:) = u(:,1) 1199 zv1(:) = v(:,1) 1196 1200 1197 1201 ! Some of the module declared variables are returned for printing in physiq.F … … 1273 1277 CHARACTER(len=20) :: modname = 'pbl_surface_newfrac' 1274 1278 INTEGER, DIMENSION(nbsrf) :: nfois=0, mfois=0, pfois=0 1275 LOGICAL :: debug=.FALSE.1276 1279 ! 1277 1280 ! All at once !! … … 1302 1305 DO i=1, klon 1303 1306 IF (pctsrf_new(i,nsrf) > 0. .AND. pctsrf_old(i,nsrf) == 0.) THEN 1304 1307 1305 1308 IF (pctsrf_old(i,nsrf_comp1) > 0.) THEN 1306 1309 ! Use the complement sub-surface, keeping the continents unchanged … … 1342 1345 END DO 1343 1346 1344 IF (debug) THEN1345 print*,'itime=,',itime, 'Pas de nouveau fraction',pfois,'fois'1346 print*,'itime=,',itime, 'The fraction of the continents have changed',nfois,'fois'1347 print*,'itime=,',itime, 'The fraction ocean-seaice has changed',mfois,'fois'1348 END IF1349 1350 1347 END SUBROUTINE pbl_surface_newfrac 1351 1348 -
LMDZ4/trunk/libf/phylmd/phys_output_write.h
r1063 r1067 916 916 917 917 IF (flag_kz(iff)<=lev_files(iff)) THEN 918 CALL histwrite_phy(nid_files(iff),"kz",itau_w,ycoefh) 918 ! combinaision de cdrag et le coef melange dans la meme variable 919 zx_tmp_fi3d(:,1) = cdragh(:) 920 zx_tmp_fi3d(:,2:klev)= coefh(:,2:klev) 921 CALL histwrite_phy(nid_files(iff),"kz",itau_w,zx_tmp_fi3d) 919 922 ENDIF 920 923 921 924 IF (flag_kz_max(iff)<=lev_files(iff)) THEN 922 CALL histwrite_phy(nid_files(iff),"kz_max",itau_w,ycoefh) 925 ! combinaision de cdrag et le coef melange dans la meme variable 926 zx_tmp_fi3d(:,1) = cdragh(:) 927 zx_tmp_fi3d(:,2:klev)= coefh(:,2:klev) 928 CALL histwrite_phy(nid_files(iff),"kz_max",itau_w,zx_tmp_fi3d) 923 929 ENDIF 924 930 -
LMDZ4/trunk/libf/phylmd/physiq.F
r1065 r1067 42 42 c ===================== 43 43 c#define histhf 44 #define histday45 #define histmth44 c#define histday 45 c#define histmth 46 46 c#define histmthNMC 47 47 c#define histins … … 679 679 cAA Pour phytrac 680 680 cAA 681 REAL ycoefh(klon,klev) ! coef d'echange pour phytrac682 REAL yu1(klon)! vents dans la premiere couche U683 REAL yv1(klon)! vents dans la premiere couche V681 REAL coefh(klon,klev) ! coef d'echange pour phytrac, valable pour 2<=k<=klev 682 REAL u1(klon) ! vents dans la premiere couche U 683 REAL v1(klon) ! vents dans la premiere couche V 684 684 685 685 REAL zxffonte(klon), zxfqcalving(klon),zxfqfonte(klon) … … 1865 1865 e pplay, paprs, pctsrf, 1866 1866 + ftsol, falb1, falb2, u10m, v10m, 1867 s sollwdown, cdragh, cdragm, yu1, yv1,1867 s sollwdown, cdragh, cdragm, u1, v1, 1868 1868 s albsol1, albsol2, sens, evap, 1869 1869 s zxtsol, zxfluxlat, zt2m, qsat2m, 1870 1870 s d_t_vdf, d_q_vdf, d_u_vdf, d_v_vdf, 1871 s ycoefh,slab_wfbils,1871 s coefh, slab_wfbils, 1872 1872 d qsol, zq2m, s_pblh, s_lcl, 1873 1873 d s_capCL, s_oliqCL, s_cteiCL,s_pblT, … … 1881 1881 - zxfluxt, zxfluxq, q2m, fluxq, pbl_tke ) 1882 1882 1883 1883 1884 1884 !----------------------------------------------------------------------------------------- 1885 1885 ! ajout des tendances de la diffusion turbulente … … 2844 2844 $ paprs, 2845 2845 $ pplay, 2846 $ ycoefh,2846 $ coefh, 2847 2847 $ pphi, 2848 2848 $ t_seri, … … 3208 3208 I pen_d, 3209 3209 I pde_d, 3210 I ycoefh, 3210 I cdragh, 3211 I coefh, 3211 3212 I fm_therm, 3212 3213 I entr_therm, 3213 I yu1,3214 I yv1,3214 I u1, 3215 I v1, 3215 3216 I ftsol, 3216 3217 I pctsrf, … … 3256 3257 I t,pmfu, pmfd, pen_u, pde_u, pen_d, pde_d, 3257 3258 I fm_therm,entr_therm, 3258 I ycoefh,yu1,yv1,ftsol,pctsrf,3259 I cdragh,coefh,u1,v1,ftsol,pctsrf, 3259 3260 I frac_impa, frac_nucl, 3260 3261 I pphis,airephy,dtime,itap) -
LMDZ4/trunk/libf/phylmd/phystokenc.F
r776 r1067 1 !2 ! $Header$3 1 ! 4 2 c … … 8 6 I pt,pmfu, pmfd, pen_u, pde_u, pen_d, pde_d, 9 7 I pfm_therm,pentr_therm, 10 I pcoefh,yu1,yv1,ftsol,pctsrf,8 I cdragh, pcoefh,yu1,yv1,ftsol,pctsrf, 11 9 I frac_impa,frac_nucl, 12 10 I pphis,paire,dtime,itap) … … 65 63 c -------------- 66 64 c 67 REAL pcoefh(klon,klev) ! coeff melange CL 65 REAL cdragh(klon) ! cdrag 66 REAL pcoefh(klon,klev) ! coeff melange CL 67 REAL pcoefh_buf(klon,klev) ! coeff melange CL + cdrag 68 68 REAL yv1(klon) 69 69 REAL yu1(klon),pphis(klon),paire(klon) … … 126 126 c Couche limite: 127 127 c====================================================================== 128 129 c Dans le meme vecteur on recombine le drag et les coeff d'echange 130 pcoefh_buf(:,1) = cdragh(:) 131 pcoefh_buf(:,2:klev) = pcoefh(:,2:klev) 128 132 129 133 ok_sync = .true. … … 214 218 en_d(i,k)=en_d(i,k)+pen_d(i,k)*pdtphys 215 219 de_d(i,k)=de_d(i,k)+pde_d(i,k)*pdtphys 216 coefh(i,k)=coefh(i,k)+pcoefh (i,k)*pdtphys220 coefh(i,k)=coefh(i,k)+pcoefh_buf(i,k)*pdtphys 217 221 t(i,k)=t(i,k)+pt(i,k)*pdtphys 218 222 fm_therm(i,k)=fm_therm(i,k)+pfm_therm(i,k)*pdtphys … … 407 411 en_d(i,k)=en_d(i,k)+pen_d(i,k)*pdtphys 408 412 de_d(i,k)=de_d(i,k)+pde_d(i,k)*pdtphys 409 coefh(i,k)=coefh(i,k)+pcoefh (i,k)*pdtphys413 coefh(i,k)=coefh(i,k)+pcoefh_buf(i,k)*pdtphys 410 414 t(i,k)=t(i,k)+pt(i,k)*pdtphys 411 415 fm_therm(i,k)=fm_therm(i,k)+pfm_therm(i,k)*pdtphys -
LMDZ4/trunk/libf/phylmd/phytrac.F
r959 r1067 1 !2 ! $Header$3 1 ! 4 2 c … … 25 23 I pen_d, 26 24 I pde_d, 25 I cdragh, 27 26 I coefh, 28 27 I fm_therm, … … 175 174 c -------------- 176 175 c 176 REAL cdragh(nlon,nlev)! coeff drag pour T et Q 177 177 REAL coefh(nlon,nlev) ! coeff melange CL 178 178 REAL yu1(nlon) ! vents au premier niveau … … 663 663 if (clsol(it)) then ! couche limite avec quantite dans le sol calculee 664 664 CALL cltracrn(it, pdtphys, yu1, yv1, 665 e c oefh,t_seri,ftsol,pctsrf,665 e cdragh, coefh,t_seri,ftsol,pctsrf, 666 666 e tr_seri(1,1,it),trs(1,it), 667 667 e paprs, pplay, delp, -
LMDZ4/trunk/libf/phylmd/surf_land_bucket_mod.F90
r996 r1067 1 1 ! 2 ! $Header$ 3 ! 4 MODULE surf_land_bucket_mod 2 !MODULE surf_land_bucket_mod 5 3 ! 6 4 ! Surface land bucket module … … 15 13 tsurf, p1lay, tq_cdrag, precip_rain, precip_snow, temp_air, & 16 14 spechum, petAcoef, peqAcoef, petBcoef, peqBcoef, pref, & 17 u1 _lay, v1_lay, rugoro, swnet, lwnet, &15 u1, v1, rugoro, swnet, lwnet, & 18 16 snow, qsol, agesno, tsoil, & 19 17 qsurf, z0_new, alb1_new, alb2_new, evap, & … … 50 48 REAL, DIMENSION(klon), INTENT(IN) :: petBcoef, peqBcoef 51 49 REAL, DIMENSION(klon), INTENT(IN) :: pref 52 REAL, DIMENSION(klon), INTENT(IN) :: u1 _lay, v1_lay50 REAL, DIMENSION(klon), INTENT(IN) :: u1, v1 53 51 REAL, DIMENSION(klon), INTENT(IN) :: rugoro 54 52 REAL, DIMENSION(klon), INTENT(IN) :: swnet, lwnet … … 76 74 REAL, DIMENSION(klon) :: zfra 77 75 REAL, DIMENSION(klon) :: radsol ! total net radiance at surface 76 REAL, DIMENSION(klon) :: u0, v0, u1_lay, v1_lay 78 77 REAL, DIMENSION(klon) :: dummy_riverflow,dummy_coastalflow 79 78 INTEGER :: i … … 110 109 ENDIF 111 110 111 ! Suppose zero surface speed 112 u0(:)=0.0 113 v0(:)=0.0 114 u1_lay(:) = u1(:) - u0(:) 115 v1_lay(:) = v1(:) - v0(:) 116 112 117 CALL calcul_fluxs(knon, is_ter, dtime, & 113 118 tsurf, p1lay, cal, beta, tq_cdrag, pref, & -
LMDZ4/trunk/libf/phylmd/surf_land_mod.F90
r996 r1067 1 !2 ! $Header$3 1 ! 4 2 MODULE surf_land_mod 5 3 6 USE surface_data, ONLY : ok_veget7 USE dimphy8 9 #ifdef CPP_VEGET10 USE surf_land_orchidee_mod11 #endif12 USE surf_land_bucket_mod13 14 4 IMPLICIT NONE 15 5 … … 21 11 rlon, rlat, & 22 12 debut, lafin, zlev, ccanopy, swnet, lwnet, albedo, & 23 tsurf, p1lay, tq_cdrag, precip_rain, precip_snow, temp_air, spechum, & 24 petAcoef, peqAcoef, petBcoef, peqBcoef, & 25 pref, u1_lay, v1_lay, rugoro, pctsrf, & 13 tsurf, p1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum, & 14 AcoefH, AcoefQ, BcoefH, BcoefQ, & 15 AcoefU, AcoefV, BcoefU, BcoefV, & 16 pref, u1, v1, rugoro, pctsrf, & 26 17 snow, qsol, agesno, tsoil, & 27 18 z0_new, alb1_new, alb2_new, evap, fluxsens, fluxlat, & 28 19 qsurf, tsurf_new, dflux_s, dflux_l, & 20 flux_u1, flux_v1, & 29 21 lwdown_m) 22 23 USE dimphy 24 USE surface_data, ONLY : ok_veget 25 USE surf_land_orchidee_mod 26 USE surf_land_bucket_mod 27 USE calcul_fluxs_mod 30 28 31 29 INCLUDE "indicesol.h" … … 46 44 REAL, DIMENSION(klon), INTENT(IN) :: tsurf 47 45 REAL, DIMENSION(klon), INTENT(IN) :: p1lay 48 REAL, DIMENSION(klon), INTENT(IN) :: tq_cdrag46 REAL, DIMENSION(klon), INTENT(IN) :: cdragh, cdragm 49 47 REAL, DIMENSION(klon), INTENT(IN) :: precip_rain, precip_snow 50 48 REAL, DIMENSION(klon), INTENT(IN) :: temp_air, spechum 51 REAL, DIMENSION(klon), INTENT(IN) :: petAcoef, peqAcoef52 REAL, DIMENSION(klon), INTENT(IN) :: petBcoef, peqBcoef49 REAL, DIMENSION(klon), INTENT(IN) :: AcoefH, AcoefQ, BcoefH, BcoefQ 50 REAL, DIMENSION(klon), INTENT(IN) :: AcoefU, AcoefV, BcoefU, BcoefV 53 51 REAL, DIMENSION(klon), INTENT(IN) :: pref ! pressure reference 54 REAL, DIMENSION(klon), INTENT(IN) :: u1 _lay, v1_lay52 REAL, DIMENSION(klon), INTENT(IN) :: u1, v1 55 53 REAL, DIMENSION(klon), INTENT(IN) :: rugoro 56 54 REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf … … 75 73 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new 76 74 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l 75 REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1, flux_v1 ! flux for U and V at first model level 77 76 78 77 ! Local variables … … 84 83 REAL, DIMENSION(klon) :: epot_air ! potential air temperature 85 84 REAL, DIMENSION(klon) :: tsol_rad, emis_new ! output from interfsol not used 85 REAL, DIMENSION(klon) :: u0, v0 ! surface speed 86 86 INTEGER :: i 87 87 … … 117 117 END DO 118 118 119 #ifdef CPP_VEGET120 119 ! temporary for keeping same results using lwdown_m instead of lwdown 121 120 CALL surf_land_orchidee(itime, dtime, date0, knon, & 122 121 knindex, rlon, rlat, pctsrf, & 123 122 debut, lafin, & 124 zlev, u1 _lay, v1_lay, temp_air, spechum, epot_air, ccanopy, &125 tq_cdrag, petAcoef, peqAcoef, petBcoef, peqBcoef, &123 zlev, u1, v1, temp_air, spechum, epot_air, ccanopy, & 124 cdragh, AcoefH, AcoefQ, BcoefH, BcoefQ, & 126 125 precip_rain, precip_snow, lwdown_m, swnet, swdown, & 127 126 pref_tmp, & … … 129 128 tsol_rad, tsurf_new, alb1_new, alb2_new, & 130 129 emis_new, z0_new, qsurf) 131 #endif132 130 133 131 ! … … 144 142 !**************************************************************************************** 145 143 CALL surf_land_bucket(itime, jour, knon, knindex, debut, dtime,& 146 tsurf, p1lay, tq_cdrag, precip_rain, precip_snow, temp_air, &147 spechum, petAcoef, peqAcoef, petBcoef, peqBcoef, pref, &148 u1 _lay, v1_lay, rugoro, swnet, lwnet, &144 tsurf, p1lay, cdragh, precip_rain, precip_snow, temp_air, & 145 spechum, AcoefH, AcoefQ, BcoefH, BcoefQ, pref, & 146 u1, v1, rugoro, swnet, lwnet, & 149 147 snow, qsol, agesno, tsoil, & 150 148 qsurf, z0_new, alb1_new, alb2_new, evap, & … … 153 151 ENDIF ! ok_veget 154 152 153 !**************************************************************************************** 154 ! Calculation for all land models 155 ! - Flux calculation at first modele level for U and V 156 !**************************************************************************************** 157 ! Suppose zero surface speed 158 u0(:)=0.0 159 v0(:)=0.0 160 CALL calcul_flux_wind(knon, dtime, & 161 u0, v0, u1, v1, cdragm, & 162 AcoefU, AcoefV, BcoefU, BcoefV, & 163 p1lay, temp_air, & 164 flux_u1, flux_v1) 165 155 166 END SUBROUTINE surf_land 156 167 ! -
LMDZ4/trunk/libf/phylmd/surf_land_orchidee_mod.F90
r1023 r1067 1 !2 ! $Header$3 1 ! 4 2 MODULE surf_land_orchidee_mod … … 10 8 ! Get_orchidee_communicator 11 9 ! Init_neighbours 10 11 USE dimphy 12 12 #ifdef CPP_VEGET 13 14 USE dimphy15 13 USE intersurf ! module d'ORCHIDEE 14 #endif 16 15 USE cpl_mod, ONLY : cpl_send_land_fields 17 16 USE surface_data, ONLY : type_ocean … … 203 202 204 203 IF (debut) THEN 204 ! Test of coherence between variable ok_veget and cpp key CPP_VEGET 205 #ifndef CPP_VEGET 206 abort_message='Pb de coherence: ok_veget = .true. mais CPP_VEGET = .false.' 207 CALL abort_gcm(modname,abort_message,1) 208 #endif 209 205 210 CALL Init_surf_para(knon) 206 211 ALLOCATE(ktindex(knon)) … … 368 373 369 374 IF (knon > 0) THEN 375 #ifdef CPP_VEGET 370 376 CALL Init_intersurf(nbp_lon,nbp_lat,knon,ktindex,offset,orch_omp_size,orch_omp_rank,orch_comm) 377 #endif 371 378 ENDIF 372 379 … … 374 381 IF (knon > 0) THEN 375 382 383 #ifdef CPP_VEGET 376 384 CALL intersurf_main (itime+itau_phy-1, iim, jjm+1, knon, ktindex, dtime, & 377 385 lrestart_read, lrestart_write, lalo, & … … 383 391 tsol_rad, tsurf_new, qsurf, albedo_out, emis_new, z0_new, & 384 392 lon_scat, lat_scat) 385 393 #endif 386 394 ENDIF 387 395 … … 397 405 398 406 IF (knon > 0) THEN 399 407 #ifdef CPP_VEGET 400 408 CALL intersurf_main (itime+itau_phy, iim, jjm+1, knon, ktindex, dtime, & 401 409 lrestart_read, lrestart_write, lalo, & … … 407 415 tsol_rad(1:knon), tsurf_new(1:knon), qsurf(1:knon), albedo_out(1:knon,:), emis_new(1:knon), z0_new(1:knon), & 408 416 lon_scat, lat_scat) 409 417 #endif 410 418 ENDIF 411 419 … … 625 633 ! 626 634 627 #endif628 629 635 END MODULE surf_land_orchidee_mod -
LMDZ4/trunk/libf/phylmd/surf_landice_mod.F90
r996 r1067 1 !2 ! $Header$3 1 ! 4 2 MODULE surf_landice_mod 5 3 6 USE dimphy7 USE surface_data, ONLY : type_ocean, calice, calsno8 USE fonte_neige_mod, ONLY : fonte_neige, run_off_lic9 USE cpl_mod, ONLY : cpl_send_landice_fields10 USE calcul_fluxs_mod, ONLY : calcul_fluxs11 12 4 IMPLICIT NONE 13 5 … … 18 10 SUBROUTINE surf_landice(itime, dtime, knon, knindex, & 19 11 swnet, lwnet, tsurf, p1lay, & 20 tq_cdrag, precip_rain, precip_snow, temp_air, spechum, & 21 petAcoef, peqAcoef, petBcoef, peqBcoef, & 22 ps, u1_lay, v1_lay, rugoro, pctsrf, & 12 cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum, & 13 AcoefH, AcoefQ, BcoefH, BcoefQ, & 14 AcoefU, AcoefV, BcoefU, BcoefV, & 15 ps, u1, v1, rugoro, pctsrf, & 23 16 snow, qsurf, qsol, agesno, & 24 17 tsoil, z0_new, alb1, alb2, evap, fluxsens, fluxlat, & 25 tsurf_new, dflux_s, dflux_l) 18 tsurf_new, dflux_s, dflux_l, & 19 flux_u1, flux_v1) 20 21 USE dimphy 22 USE surface_data, ONLY : type_ocean, calice, calsno 23 USE fonte_neige_mod, ONLY : fonte_neige, run_off_lic 24 USE cpl_mod, ONLY : cpl_send_landice_fields 25 USE calcul_fluxs_mod 26 26 27 27 INCLUDE "indicesol.h" … … 39 39 REAL, DIMENSION(klon), INTENT(IN) :: tsurf 40 40 REAL, DIMENSION(klon), INTENT(IN) :: p1lay 41 REAL, DIMENSION(klon), INTENT(IN) :: tq_cdrag41 REAL, DIMENSION(klon), INTENT(IN) :: cdragh, cdragm 42 42 REAL, DIMENSION(klon), INTENT(IN) :: precip_rain, precip_snow 43 43 REAL, DIMENSION(klon), INTENT(IN) :: temp_air, spechum 44 REAL, DIMENSION(klon), INTENT(IN) :: petAcoef, peqAcoef 45 REAL, DIMENSION(klon), INTENT(IN) :: petBcoef, peqBcoef 44 REAL, DIMENSION(klon), INTENT(IN) :: AcoefH, AcoefQ 45 REAL, DIMENSION(klon), INTENT(IN) :: BcoefH, BcoefQ 46 REAL, DIMENSION(klon), INTENT(IN) :: AcoefU, AcoefV, BcoefU, BcoefV 46 47 REAL, DIMENSION(klon), INTENT(IN) :: ps 47 REAL, DIMENSION(klon), INTENT(IN) :: u1 _lay, v1_lay48 REAL, DIMENSION(klon), INTENT(IN) :: u1, v1 48 49 REAL, DIMENSION(klon), INTENT(IN) :: rugoro 49 50 REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf … … 64 65 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new 65 66 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l 67 REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1, flux_v1 66 68 67 69 ! Local variables … … 71 73 REAL, DIMENSION(klon) :: zfra, alb_neig 72 74 REAL, DIMENSION(klon) :: radsol 75 REAL, DIMENSION(klon) :: u0, v0, u1_lay, v1_lay 73 76 74 77 ! End definition … … 107 110 dif_grnd(:) = 0.0 108 111 112 ! Suppose zero surface speed 113 u0(:)=0.0 114 v0(:)=0.0 115 u1_lay(:) = u1(:) - u0(:) 116 v1_lay(:) = v1(:) - v0(:) 117 109 118 CALL calcul_fluxs(knon, is_lic, dtime, & 110 tsurf, p1lay, cal, beta, tq_cdrag, ps, &119 tsurf, p1lay, cal, beta, cdragh, ps, & 111 120 precip_rain, precip_snow, snow, qsurf, & 112 121 radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, & 113 petAcoef, peqAcoef, petBcoef, peqBcoef, &122 AcoefH, AcoefQ, BcoefH, BcoefQ, & 114 123 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l) 115 124 125 CALL calcul_flux_wind(knon, dtime, & 126 u0, v0, u1, v1, cdragm, & 127 AcoefU, AcoefV, BcoefU, BcoefV, & 128 p1lay, temp_air, & 129 flux_u1, flux_v1) 116 130 117 131 !**************************************************************************************** -
LMDZ4/trunk/libf/phylmd/surf_ocean_mod.F90
r996 r1067 1 !2 ! $Header$3 1 ! 4 2 MODULE surf_ocean_mod 5 6 USE dimphy7 USE surface_data, ONLY : type_ocean8 USE ocean_forced_mod, ONLY : ocean_forced_noice9 USE ocean_slab_mod, ONLY : ocean_slab_noice10 USE ocean_cpl_mod, ONLY : ocean_cpl_noice11 3 12 4 IMPLICIT NONE … … 19 11 rugos, windsp, rmu0, fder, tsurf_in, & 20 12 itime, dtime, jour, knon, knindex, & 21 debut, &22 p1lay, tq_cdrag, coefm, precip_rain, precip_snow, temp_air, spechum, &23 petAcoef, peqAcoef, petBcoef, peqBcoef, &24 ps, u1 _lay, v1_lay, rugoro, pctsrf, &13 p1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum, & 14 AcoefH, AcoefQ, BcoefH, BcoefQ, & 15 AcoefU, AcoefV, BcoefU, BcoefV, & 16 ps, u1, v1, rugoro, pctsrf, & 25 17 snow, qsurf, agesno, & 26 18 z0_new, alb1_new, alb2_new, evap, fluxsens, fluxlat, & 27 tsurf_new, dflux_s, dflux_l, lmt_bils) 19 tsurf_new, dflux_s, dflux_l, lmt_bils, & 20 flux_u1, flux_v1) 21 22 USE dimphy 23 USE surface_data, ONLY : type_ocean 24 USE ocean_forced_mod, ONLY : ocean_forced_noice 25 USE ocean_slab_mod, ONLY : ocean_slab_noice 26 USE ocean_cpl_mod, ONLY : ocean_cpl_noice 28 27 ! 29 28 ! This subroutine will make a call to ocean_XXX_noice according to the ocean mode (force, … … 49 48 REAL, DIMENSION(klon), INTENT(IN) :: tsurf_in 50 49 REAL, DIMENSION(klon), INTENT(IN) :: p1lay 51 REAL, DIMENSION(klon), INTENT(IN) :: tq_cdrag52 REAL, DIMENSION(klon), INTENT(IN) :: c oefm50 REAL, DIMENSION(klon), INTENT(IN) :: cdragh 51 REAL, DIMENSION(klon), INTENT(IN) :: cdragm 53 52 REAL, DIMENSION(klon), INTENT(IN) :: precip_rain, precip_snow 54 53 REAL, DIMENSION(klon), INTENT(IN) :: temp_air, spechum 55 REAL, DIMENSION(klon), INTENT(IN) :: petAcoef, peqAcoef56 REAL, DIMENSION(klon), INTENT(IN) :: petBcoef, peqBcoef54 REAL, DIMENSION(klon), INTENT(IN) :: AcoefH, AcoefQ, BcoefH, BcoefQ 55 REAL, DIMENSION(klon), INTENT(IN) :: AcoefU, AcoefV, BcoefU, BcoefV 57 56 REAL, DIMENSION(klon), INTENT(IN) :: ps 58 REAL, DIMENSION(klon), INTENT(IN) :: u1 _lay, v1_lay57 REAL, DIMENSION(klon), INTENT(IN) :: u1, v1 59 58 REAL, DIMENSION(klon), INTENT(IN) :: rugoro 60 59 REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf 61 LOGICAL, INTENT(IN) :: debut62 60 63 61 ! In/Output variables … … 76 74 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l 77 75 REAL, DIMENSION(klon), INTENT(OUT) :: lmt_bils 76 REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1, flux_v1 78 77 79 78 ! Local variables … … 101 100 CALL ocean_cpl_noice( & 102 101 swnet, lwnet, alb1, & 103 windsp, & 104 fder, & 102 windsp, fder, & 105 103 itime, dtime, knon, knindex, & 106 p1lay, tq_cdrag, precip_rain, precip_snow,temp_air,spechum,& 107 petAcoef, peqAcoef, petBcoef, peqBcoef, & 108 ps, u1_lay, v1_lay, & 104 p1lay, cdragh, cdragm, precip_rain, precip_snow,temp_air,spechum,& 105 AcoefH, AcoefQ, BcoefH, BcoefQ, & 106 AcoefU, AcoefV, BcoefU, BcoefV, & 107 ps, u1, v1, & 109 108 radsol, snow, agesno, & 110 qsurf, evap, fluxsens, fluxlat, &109 qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 111 110 tsurf_new, dflux_s, dflux_l) 112 111 … … 114 113 CALL ocean_slab_noice( & 115 114 itime, dtime, jour, knon, knindex, & 116 p1lay, tq_cdrag, precip_rain, precip_snow, temp_air, spechum,& 117 petAcoef, peqAcoef, petBcoef, peqBcoef, & 118 ps, u1_lay, v1_lay, tsurf_in, & 115 p1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum,& 116 AcoefH, AcoefQ, BcoefH, BcoefQ, & 117 AcoefU, AcoefV, BcoefU, BcoefV, & 118 ps, u1, v1, tsurf_in, & 119 119 radsol, snow, agesno, & 120 qsurf, evap, fluxsens, fluxlat, &120 qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 121 121 tsurf_new, dflux_s, dflux_l, lmt_bils) 122 122 … … 124 124 CALL ocean_forced_noice( & 125 125 itime, dtime, jour, knon, knindex, & 126 debut, & 127 p1lay, tq_cdrag, precip_rain, precip_snow, & 126 p1lay, cdragh, cdragm, precip_rain, precip_snow, & 128 127 temp_air, spechum, & 129 petAcoef, peqAcoef, petBcoef, peqBcoef, & 130 ps, u1_lay, v1_lay, & 128 AcoefH, AcoefQ, BcoefH, BcoefQ, & 129 AcoefU, AcoefV, BcoefU, BcoefV, & 130 ps, u1, v1, & 131 131 radsol, snow, agesno, & 132 qsurf, evap, fluxsens, fluxlat, &132 qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 133 133 tsurf_new, dflux_s, dflux_l) 134 134 END SELECT … … 158 158 z0_new(:) = 0.0 159 159 DO i = 1, knon 160 z0_new(i) = 0.018*c oefm(i) * (u1_lay(i)**2+v1_lay(i)**2)/RG &161 + 0.11*14e-6 / SQRT(c oefm(i) * (u1_lay(i)**2+v1_lay(i)**2))160 z0_new(i) = 0.018*cdragm(i) * (u1(i)**2+v1(i)**2)/RG & 161 + 0.11*14e-6 / SQRT(cdragm(i) * (u1(i)**2+v1(i)**2)) 162 162 z0_new(i) = MAX(1.5e-05,z0_new(i)) 163 163 ENDDO -
LMDZ4/trunk/libf/phylmd/surf_seaice_mod.F90
r996 r1067 1 !2 ! $Header$3 1 ! 4 2 MODULE surf_seaice_mod 5 3 6 USE dimphy7 USE surface_data8 USE ocean_forced_mod, ONLY : ocean_forced_ice9 USE ocean_cpl_mod, ONLY : ocean_cpl_ice10 4 IMPLICIT NONE 11 5 … … 17 11 rlon, rlat, swnet, lwnet, alb1, fder, & 18 12 itime, dtime, jour, knon, knindex, & 19 debut, lafin, & 20 tsurf, p1lay, tq_cdrag, precip_rain, precip_snow, temp_air, spechum, & 21 petAcoef, peqAcoef, petBcoef, peqBcoef, & 22 ps, u1_lay, v1_lay, rugoro, pctsrf, & 13 lafin, & 14 tsurf, p1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum, & 15 AcoefH, AcoefQ, BcoefH, BcoefQ, & 16 AcoefU, AcoefV, BcoefU, BcoefV, & 17 ps, u1, v1, rugoro, pctsrf, & 23 18 snow, qsurf, qsol, agesno, tsoil, & 24 19 z0_new, alb1_new, alb2_new, evap, fluxsens, fluxlat, & 25 tsurf_new, dflux_s, dflux_l) 20 tsurf_new, dflux_s, dflux_l, & 21 flux_u1, flux_v1) 22 23 USE dimphy 24 USE surface_data 25 USE ocean_forced_mod, ONLY : ocean_forced_ice 26 USE ocean_cpl_mod, ONLY : ocean_cpl_ice 27 26 28 ! 27 29 ! This subroutine will make a call to ocean_XXX_ice according to the ocean mode (force, … … 36 38 INTEGER, INTENT(IN) :: itime, jour, knon 37 39 INTEGER, DIMENSION(klon), INTENT(IN) :: knindex 38 LOGICAL, INTENT(IN) :: debut,lafin40 LOGICAL, INTENT(IN) :: lafin 39 41 REAL, INTENT(IN) :: dtime 40 42 REAL, DIMENSION(klon), INTENT(IN) :: rlon, rlat … … 48 50 REAL, DIMENSION(klon), INTENT(IN) :: precip_rain, precip_snow 49 51 REAL, DIMENSION(klon), INTENT(IN) :: temp_air, spechum 50 REAL, DIMENSION(klon), INTENT(IN) :: petAcoef, peqAcoef51 REAL, DIMENSION(klon), INTENT(IN) :: petBcoef, peqBcoef52 REAL, DIMENSION(klon), INTENT(IN) :: AcoefH, AcoefQ, BcoefH, BcoefQ 53 REAL, DIMENSION(klon), INTENT(IN) :: AcoefU, AcoefV, BcoefU, BcoefV 52 54 REAL, DIMENSION(klon), INTENT(IN) :: ps 53 REAL, DIMENSION(klon), INTENT(IN) :: u1 _lay, v1_lay55 REAL, DIMENSION(klon), INTENT(IN) :: u1, v1 54 56 REAL, DIMENSION(klon), INTENT(IN) :: rugoro 55 57 REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf … … 69 71 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new 70 72 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l 73 REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1, flux_v1 71 74 72 75 ! Local arguments 73 76 !**************************************************************************************** 74 77 REAL, DIMENSION(klon) :: radsol 78 75 79 ! 76 80 ! End definitions … … 96 100 itime, dtime, knon, knindex, & 97 101 lafin,& 98 p1lay, tq_cdrag, precip_rain, precip_snow, temp_air, spechum,& 99 petAcoef, peqAcoef, petBcoef, peqBcoef, & 100 ps, u1_lay, v1_lay, pctsrf, & 102 p1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum,& 103 AcoefH, AcoefQ, BcoefH, BcoefQ, & 104 AcoefU, AcoefV, BcoefU, BcoefV, & 105 ps, u1, v1, pctsrf, & 101 106 radsol, snow, qsurf, & 102 alb1_new, alb2_new, evap, fluxsens, fluxlat, &107 alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 103 108 tsurf_new, dflux_s, dflux_l) 104 109 105 110 ELSE IF (type_ocean == 'force' .OR. (type_ocean == 'slab' .AND. version_ocean=='sicOBS')) THEN 106 CALL ocean_forced_ice(itime, dtime, jour, knon, knindex, & 107 debut, & 108 tsurf, p1lay, tq_cdrag, precip_rain, precip_snow, temp_air, spechum,& 109 petAcoef, peqAcoef, petBcoef, peqBcoef, & 110 ps, u1_lay, v1_lay, & 111 CALL ocean_forced_ice( & 112 itime, dtime, jour, knon, knindex, & 113 tsurf, p1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum,& 114 AcoefH, AcoefQ, BcoefH, BcoefQ, & 115 AcoefU, AcoefV, BcoefU, BcoefV, & 116 ps, u1, v1, & 111 117 radsol, snow, qsol, agesno, tsoil, & 112 qsurf, alb1_new, alb2_new, evap, fluxsens, fluxlat, &118 qsurf, alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 113 119 tsurf_new, dflux_s, dflux_l) 114 120 … … 117 123 !!$ itime, dtime, jour, knon, knindex, & 118 124 !!$ debut, & 119 !!$ tsurf, p1lay, tq_cdrag, precip_rain, precip_snow, temp_air, spechum,&120 !!$ petAcoef, peqAcoef, petBcoef, peqBcoef, &121 !!$ ps, u1 _lay, v1_lay, pctsrf, &125 !!$ tsurf, p1lay, cdragh, precip_rain, precip_snow, temp_air, spechum,& 126 !!$ AcoefH, AcoefQ, BcoefH, BcoefQ, & 127 !!$ ps, u1, v1, pctsrf, & 122 128 !!$ radsol, snow, qsurf, qsol, agesno, tsoil, & 123 129 !!$ alb1_new, alb2_new, evap, fluxsens, fluxlat, & … … 133 139 z0_new = SQRT(z0_new**2+rugoro**2) 134 140 135 136 141 END SUBROUTINE surf_seaice 137 142 !
Note: See TracChangeset
for help on using the changeset viewer.