Changeset 1591 for trunk/LMDZ.VENUS/libf
- Timestamp:
- Aug 31, 2016, 4:31:29 PM (8 years ago)
- Location:
- trunk/LMDZ.VENUS/libf/phyvenus
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.VENUS/libf/phyvenus/clmain.F
r1543 r1591 291 291 c call coefkzmin(knon,ypaprs,ypplay,yu,yv,yt,ycoefm 292 292 c . ,ycoefm0,ycoefh0) 293 c call dump2d( iim,jjm-1,ycoefm(2:klon-1,2), 'KZ ')294 c call dump2d( iim,jjm-1,ycoefm0(2:klon-1,2),'KZMIN ')293 c call dump2d(nbp_lon,nbp_lat-2,ycoefm(2:klon-1,2), 'KZ ') 294 c call dump2d(nbp_lon,nbp_lat-2,ycoefm0(2:klon-1,2),'KZMIN ') 295 295 296 296 ycoefm0 = 1.e-3 … … 349 349 ENDIF 350 350 351 c iflag_pbl peut etre utilise comme longue r de melange351 c iflag_pbl peut etre utilise comme longueur de melange 352 352 353 353 if (iflag_pbl.ge.11) then … … 558 558 PARAMETER (check=.false.) 559 559 C 560 c---------------------- 561 c ATMOSPHERE PROFONDE 562 real p_lim,p_ref 563 real rsmu_mod(klon,klev),zrsmu_mod(klon,klev) 564 real ratio_mod(klon,klev) 565 ! theta_mod = theta * ratio_mod => ratio_mod = mmm0/mmm(p) 566 567 p_lim = 6e6 568 p_ref = 8.9e6 569 570 DO k = 1, klev 571 DO i = 1, klon 572 ratio_mod(i,k) = 1. 573 rsmu_mod(i,k) = RD 574 if (pplay(i,k).gt.p_lim) then 575 ratio_mod(i,k) = RMD / 576 & (RMD+0.56*(log(pplay(i,k))-log(p_lim))/(log(p_ref)-log(p_lim))) 577 ratio_mod(i,k) = max(ratio_mod(i,k),RMD/(RMD+0.56)) 578 rsmu_mod(i,k) = RD*ratio_mod(i,k) 579 endif 580 ENDDO 581 ENDDO 582 c---------------------- 583 560 584 if (iflag_pbl.eq.1) then 561 585 do k = 3, klev … … 584 608 DO i = 1, knon 585 609 zt(i,k) = (t(i,k)+t(i,k-1)) * 0.5 610 c---------------------- 611 c ATMOSPHERE PROFONDE 612 zrsmu_mod(i,k) = (rsmu_mod(i,k)+rsmu_mod(i,k-1)) * 0.5 613 c---------------------- 586 614 ENDDO 587 615 ENDDO … … 612 640 DO i = 1, knon 613 641 zx_coef(i,k) = coef(i,k)*RG/(pplay(i,k-1)-pplay(i,k)) 614 . *(paprs(i,k)/zt(i,k)/RD)**2 642 c---------------------- 643 c ATMOSPHERE PROFONDE 644 . *(paprs(i,k)/zt(i,k)/zrsmu_mod(i,k))**2 645 c---------------------- 615 646 zx_coef(i,k) = zx_coef(i,k) * dtime*RG 616 647 ENDDO 617 648 ENDDO 618 649 c 619 c Preparer les flux lies aux contre-gardients 650 c Preparer les flux lies aux contre-gardients OBSOLETE 620 651 c 621 652 DO k = 2, klev … … 984 1015 DATA appel1er /.TRUE./ 985 1016 c 1017 c---------------------- 1018 c ATMOSPHERE PROFONDE 1019 real p_lim,p_ref 1020 real modgam(klon,klev) 1021 1022 p_lim = 6e6 1023 p_ref = 8.9e6 1024 1025 DO k = 1, klev 1026 DO i = 1, klon 1027 modgam(i,k) = 0. 1028 if (pplay(i,k).gt.p_lim) then 1029 modgam(i,k) = 0.56/(log(p_ref)-log(p_lim))/R 1030 endif 1031 ENDDO 1032 ENDDO 1033 c---------------------- 1034 986 1035 isommet=klev 987 1036 … … 1045 1094 zmgeom(i,k)= zgeop(i,k)-zgeop(i,k-1) 1046 1095 zdphi = zmgeom(i,k)/2. 1047 ztvd(i,k) = (t(i,k) + zdphi/cpdet(zt(i,k))) 1048 ztvu(i,k) = (t(i,k-1) - zdphi/cpdet(zt(i,k))) 1096 c---------------------- 1097 c ATMOSPHERE PROFONDE 1098 ztvd(i,k) = t(i,k) + zdphi* 1099 & (1./cpdet(zt(i,k))+modgam(i,k)) 1100 ztvu(i,k) = t(i,k-1) - zdphi* 1101 & (1./cpdet(zt(i,k))+modgam(i,k)) 1102 c---------------------- 1049 1103 zpk(i,k) = ppk(i,k)*(paprs(i,k)/pplay(i,k))**RKAPPA 1050 1104 ENDDO … … 1054 1108 zt(i,1) = ts(i) 1055 1109 ztvu(i,1) = ts(i) 1056 ztvd(i,1) = t(i,1)+zgeop(i,1)/cpdet(zt(i,1)) 1110 c---------------------- 1111 c ATMOSPHERE PROFONDE 1112 ztvd(i,1) = t(i,1)+zgeop(i,1)* 1113 & (1./cpdet(zt(i,1))+modgam(i,1)) 1114 c---------------------- 1057 1115 zpk(i,1) = ppk(i,1)*(paprs(i,1)/pplay(i,1))**RKAPPA 1058 1116 ENDDO -
trunk/LMDZ.VENUS/libf/phyvenus/concentrations2.F
r1530 r1591 174 174 c endif 175 175 176 ! n2177 c akin2 = 5.6e-4178 c cpin2 = 1.034e3179 180 181 182 176 ! tell the world about it: 183 177 write(*,*) "concentrations: firstcall, nbq=",nbq … … 224 218 end do 225 219 mmean(ig,l) = 1./mmean(ig,l) 226 rnew(ig,l) = 8.314/mmean(ig,l)*1.e3 ! J/kg K 227 228 c write(*,*),'Mmean: ',ig, l, mmean(ig,l) 220 rnew(ig,l) = 8.314/mmean(ig,l)*1.e3 ! J/kg K 221 c write(*,*),'Mmean in concentration2: ',ig, l, mmean(ig,l) 229 222 end do 230 223 end do … … 244 237 c write(*,*),'Air density: ',ig, l, rho(0,l) 245 238 246 !!! --- INSERT N2 values ----247 239 !! WARNING -> Cp here below doesn't depend on T (cpdet) 248 240 -
trunk/LMDZ.VENUS/libf/phyvenus/diffusion.h
r1442 r1591 9 9 real*8 dzres 10 10 11 parameter (Pdiff=1 5.) ! pressure below which diffusion is computed12 parameter (tdiffmin=5 d0)13 parameter (dzres=2 d0) ! grid resolution (km) for diffusion11 parameter (Pdiff=1.e-1) ! pressure below which diffusion is computed 12 parameter (tdiffmin=5.d0) 13 parameter (dzres=2.d0) ! grid resolution (km) for diffusion 14 14 -
trunk/LMDZ.VENUS/libf/phyvenus/flott_gwd_ran.F90
r1530 r1591 5 5 ! Parametrization of the momentum flux deposition due to a discrete 6 6 ! number of gravity waves. 7 ! F. Lott (version 9: 16 February, 2012), reproduce v3 but with only8 ! two waves present at each time step7 ! F. Lott 8 ! Version 14, Gaussian distribution of the source 9 9 ! LMDz model online version 10 ! ADAPTED FOR VENUS 10 ! ADAPTED FOR VENUS / F. LOTT + S. LEBONNOIS 11 ! Version adapted on 03/04/2013: 12 ! - input flux compensated in the deepest layers 11 13 !--------------------------------------------------------------------- 12 14 13 15 use dimphy 16 use moyzon_mod, only: plevmoy 14 17 implicit none 15 18 … … 39 42 ! O.3 INTERNAL ARRAYS 40 43 41 INTEGER II, LL , IEQ44 INTEGER II, LL 42 45 43 46 ! 0.3.0 TIME SCALE OF THE LIFE CYCLE OF THE WAVES PARAMETERIZED … … 62 65 REAL ZOM(NW, KLON), ZOP(NW, KLON) 63 66 64 ! Wave vertical velocities at the 2 1/2 levsurrounding the full level67 ! Wave EP-fluxes at the 2 semi levels surrounding the full level 65 68 REAL WWM(NW, KLON), WWP(NW, KLON) 66 67 REAL RUW0(NW, KLON) ! Fluxes at launching level 68 69 ! Fluxes X and Y for each waves at 1/2 Levels 69 70 REAL RUWP(NW, KLON), RVWP(NW, KLON) 70 ! Fluxes X and Y for each waves at 1/2 Levels71 72 INTEGER LAUNCH ! Launching altitude73 74 REAL RUWMAX,SAT ! saturation parameter75 REAL XLAUNCH ! Controle the launching altitude76 71 REAL RUW(KLON, KLEV + 1) ! Flux x at semi levels 77 72 REAL RVW(KLON, KLEV + 1) ! Flux y at semi levels 78 73 74 REAL RUW0(NW, KLON) ! Fluxes at launching level 75 REAL RUWMAX ! Max value 76 INTEGER LAUNCH ! Launching altitude 77 REAL XLAUNCH ! Control the launching altitude 78 79 79 ! 0.3.2 PARAMETERS OF WAVES DISSIPATIONS 80 80 81 REAL SAT ! saturation parameter 81 82 REAL RDISS, ZOISEC ! COEFF DE DISSIPATION, SECURITY FOR INTRINSIC FREQ 82 83 … … 99 100 logical output 100 101 data output/.false./ 101 ! CAUTION ! IF output is .true. THEN change NO to 10 at least ! 102 ! data output/.true./ 103 ! CAUTION ! IF output is .true. THEN change NO to 10 at least ! 102 104 character*14 outform 103 105 character*2 str2 106 integer ieq 104 107 105 108 ! ON CONSERVE LA MEMOIRE un certain temps AVEC UN SAVE … … 127 130 RUWMAX = 0.005 ! Max EP-Flux at Launch altitude 128 131 SAT = 0.85 ! Saturation parameter: Sc in (12) 129 RDISS = 10.! Diffusion parameter132 RDISS = 0.1 ! Diffusion parameter 130 133 131 134 DELTAT=24.*3600. ! Time scale of the waves (first introduced in 9b) 132 135 133 KMIN = 1.E-6 ! Min horizontal wavenumber 134 KMAX = 2.E-5 ! Max horizontal wavenumber 136 !!!! TEST GG. Values corresponding to min/max horizontal wavel 50-500 km 137 !(similar to observations) 138 KMIN = 1.E-5 ! Min horizontal wavenumber 139 KMAX = 1.E-4 ! Max horizontal wavenumber 135 140 !Online output: one value only 136 141 if (output) then 137 KMIN = 6.3E-6138 KMAX = 6.3E-6142 KMIN = 3E-5 143 KMAX = 3E-5 139 144 endif 140 145 CMIN = 1. ! Min phase velocity 141 146 CMAX = 61. ! Max phase speed velocity 142 XLAUNCH=0.6 ! Parameter that control launching altitude 143 144 PR = 9.2e6 ! Reference pressure ! VENUS!! 145 TR = 240. ! Reference Temperature ! VENUS: cloud layer 147 ! XLAUNCH=0.6 ! Parameter that control launching altitude 148 XLAUNCH=5e-3 ! Value for top of cloud convective region 149 150 ! PR = 9.2e6 ! Reference pressure ! VENUS!! 151 PR = 5e5 ! Reference pressure ! VENUS: cloud layer 152 TR = 300. ! Reference Temperature ! VENUS: cloud layer 146 153 H0 = RD * TR / RG ! Characteristic vertical scale height 147 154 … … 162 169 ENDIF 163 170 164 ! 1.2 WAVES CHARACTERISTICS CHOSEN RANDOMLY 171 ! 2. EVALUATION OF THE BACKGROUND FLOW AT SEMI-LEVELS 172 !------------------------------------------------------------- 173 174 !Online output 175 if (output) OPEN(11,file="impact-gwno.dat") 176 177 ! Pressure and Inv of pressure, Temperature / at 1/2 level 178 DO LL = 2, KLEV 179 PH(:, LL) = EXP((LOG(PP(:, LL)) + LOG(PP(:, LL - 1))) / 2.) 180 end DO 181 182 PH(:, KLEV + 1) = 0. 183 PH(:, 1) = 2. * PP(:, 1) - PH(:, 2) 184 185 ! Launching altitude 186 187 DO LL = 1, NLEV 188 IF (plevmoy(LL) / plevmoy(1) > XLAUNCH) LAUNCH = LL 189 ENDDO 190 ! test 191 ! print*,"launch=",LAUNCH 192 ! print*,"launch p,N2=",plevmoy(LAUNCH),pn2(nlon/2+1,LAUNCH) 193 194 ! Log pressure vert. coordinate 195 DO LL = 1, KLEV + 1 196 ZH(:, LL) = H0 * LOG(PR / (PH(:, LL) + PSEC)) 197 end DO 198 199 if (output) then 200 ! altitude above surface 201 ZHbis(:,1) = 0. 202 DO LL = 2, KLEV + 1 203 H0bis(:, LL-1) = RD * TT(:, LL-1) / RG 204 ZHbis(:, LL) = ZHbis(:, LL-1) & 205 + H0bis(:, LL-1)*(PH(:, LL-1)-PH(:,LL))/PP(:, LL-1) 206 end DO 207 endif 208 209 ! Winds and BV frequency 210 DO LL = 2, KLEV 211 UH(:, LL) = 0.5 * (UU(:, LL) + UU(:, LL - 1)) ! Zonal wind 212 VH(:, LL) = 0.5 * (VV(:, LL) + VV(:, LL - 1)) ! Meridional wind 213 ! BVSEC: BV Frequency 214 ! VENUS ATTENTION: CP VARIABLE PSTAB CALCULE EN AMONT DES PARAMETRISATIONS 215 BV(:, LL) = MAX(BVSEC,SQRT(pn2(:,LL))) 216 end DO 217 BV(:, 1) = BV(:, 2) 218 UH(:, 1) = 0. 219 VH(:, 1) = 0. 220 BV(:, KLEV + 1) = BV(:, KLEV) 221 UH(:, KLEV + 1) = UU(:, KLEV) 222 VH(:, KLEV + 1) = VV(:, KLEV) 223 224 225 ! 3. WAVES CHARACTERISTICS CHOSEN RANDOMLY 165 226 !------------------------------------------- 166 227 … … 168 229 ! are used to produce the waves characteristics 169 230 ! in a stochastic way 231 232 !! A REVOIR: 233 !! - utilisation de MOD ou bien de aleas ? 234 !! - distribution gaussienne des CPHA ? (avec signe ZP qui est ajuste apres) 170 235 171 236 JW = 0 … … 187 252 ! Intrinsic frequency 188 253 ZO(JW, II) = CPHA * ZK(JW, II) 254 ! Intrinsic frequency is imposed 255 ZO(JW, II) = ZO(JW, II) & 256 + ZK(JW, II) * COS(ZP(JW)) * UH(II, LAUNCH) & 257 + ZK(JW, II) * SIN(ZP(JW)) * VH(II, LAUNCH) 189 258 ! Momentum flux at launch lev 190 259 ! RUW0(JW, II) = RUWMAX / REAL(NW) & … … 199 268 end DO 200 269 201 ! 2. EVALUATION OF THE BACKGROUND FLOW AT SEMI-LEVELS 202 !------------------------------------------------------------- 203 204 IEQ = KLON / 2 205 !Online output 206 if (output) OPEN(11,file="impact-gwno.dat") 207 208 ! Pressure and Inv of pressure, Temperature / at 1/2 level 209 DO LL = 2, KLEV 210 PH(:, LL) = EXP((LOG(PP(:, LL)) + LOG(PP(:, LL - 1))) / 2.) 211 end DO 212 213 PH(:, KLEV + 1) = 0. 214 PH(:, 1) = 2. * PP(:, 1) - PH(:, 2) 215 216 ! Launching altitude 217 218 DO LL = 1, NLEV 219 IF (PH(IEQ, LL) / PH(IEQ, 1) > XLAUNCH) LAUNCH = LL 220 ENDDO 221 222 ! Log pressure vert. coordinate (altitude above surface) 223 ZHbis(:,1) = 0. 224 DO LL = 2, KLEV + 1 225 H0bis(:, LL-1) = RD * TT(:, LL-1) / RG 226 ZHbis(:, LL) = ZHbis(:, LL-1) & 227 + H0bis(:, LL-1)*(PH(:, LL-1)-PH(:,LL))/PP(:, LL-1) 228 end DO 229 ! Log pressure vert. coordinate 230 DO LL = 1, KLEV + 1 231 ZH(:, LL) = H0 * LOG(PR / (PH(:, LL) + PSEC)) 232 end DO 233 234 235 ! Winds and BV frequency 236 DO LL = 2, KLEV 237 UH(:, LL) = 0.5 * (UU(:, LL) + UU(:, LL - 1)) ! Zonal wind 238 VH(:, LL) = 0.5 * (VV(:, LL) + VV(:, LL - 1)) ! Meridional wind 239 ! BVSEC: BV Frequency 240 ! VENUS ATTENTION: CP VARIABLE PSTAB CALCULE EN AMONT DES PARAMETRISATIONS 241 BV(:, LL) = MAX(BVSEC,SQRT(pn2(:,LL))) 242 end DO 243 BV(:, 1) = BV(:, 2) 244 UH(:, 1) = 0. 245 VH(:, 1) = 0. 246 BV(:, KLEV + 1) = BV(:, KLEV) 247 UH(:, KLEV + 1) = UU(:, KLEV) 248 VH(:, KLEV + 1) = VV(:, KLEV) 249 250 251 ! 3. COMPUTE THE FLUXES 270 ! 4. COMPUTE THE FLUXES 252 271 !-------------------------- 253 272 254 ! 3.1 Vertical velocity at launching altitude to ensure273 ! 4.1 Vertical velocity at launching altitude to ensure 255 274 ! the correct value to the imposed fluxes. 256 275 ! … … 261 280 - ZK(JW, :) * COS(ZP(JW)) * UH(:, LAUNCH) & 262 281 - ZK(JW, :) * SIN(ZP(JW)) * VH(:, LAUNCH) 263 ! Vertical velocity at launch level, value to ensure the imposed 264 ! mom flux: 265 WWP(JW, :) = SQRT(ABS(ZOP(JW, :)) / MAX(BV(:, LAUNCH),BVSEC) & 266 * RUW0(JW,:)) 282 ! WW is directly a flux, here, not vertical velocity anymore 283 WWP(JW, :) = RUW0(JW,:) 267 284 RUWP(JW, :) = COS(ZP(JW)) * SIGN(1., ZOP(JW, :)) * RUW0(JW, :) 268 285 RVWP(JW, :) = SIN(ZP(JW)) * SIGN(1., ZOP(JW, :)) * RUW0(JW, :) … … 270 287 end DO 271 288 272 ! 3.2 Uniform values below the launching altitude 273 274 DO LL = 1, LAUNCH 275 RUW(:, LL) = 0 276 RVW(:, LL) = 0 277 DO JW = 1, NW 278 RUW(:, LL) = RUW(:, LL) + RUWP(JW, :) 279 RVW(:, LL) = RVW(:, LL) + RVWP(JW, :) 280 end DO 281 end DO 282 283 ! 3.3 Loop over altitudes, with passage from one level to the 289 ! 4.2 Initial flux at launching altitude 290 291 RUW(:, LAUNCH) = 0 292 RVW(:, LAUNCH) = 0 293 DO JW = 1, NW 294 RUW(:, LAUNCH) = RUW(:, LAUNCH) + RUWP(JW, :) 295 RVW(:, LAUNCH) = RVW(:, LAUNCH) + RVWP(JW, :) 296 end DO 297 298 ! 4.3 Loop over altitudes, with passage from one level to the 284 299 ! next done by i) conserving the EP flux, ii) dissipating 285 300 ! a little, iii) testing critical levels, and vi) testing … … 287 302 288 303 !Online output 289 write(str2,'(i2)') NW+2 290 outform="("//str2//"(E12.4,1X))" 291 if (output) WRITE(11,outform) ZH(IEQ, 1) / 1000., ZHbis(IEQ, 1) / 1000., & 304 if (output) then 305 ieq=nlon/2+1 306 write(str2,'(i2)') NW+2 307 outform="("//str2//"(E12.4,1X))" 308 WRITE(11,outform) ZH(IEQ, 1) / 1000., ZHbis(IEQ, 1) / 1000., & 292 309 (ZO(JW, IEQ)/ZK(JW, IEQ)*COS(ZP(JW)), JW = 1, NW) 310 endif 293 311 294 312 DO LL = LAUNCH, KLEV - 1 … … 305 323 306 324 WWP(JW, :) = MIN( & 307 325 ! No breaking (Eq.6) 308 326 WWM(JW, :) & 309 * SQRT(BV(:, LL ) / BV(:, LL+1) & 310 * ABS(ZOP(JW, :)) / MAX(ABS(ZOM(JW, :)), ZOISEC)) & 311 ! Dissipation (Eq. 8): 327 ! Dissipation (Eq. 8): 312 328 * EXP(- RDISS * PR / (PH(:, LL + 1) + PH(:, LL)) & 313 329 * ((BV(:, LL + 1) + BV(:, LL)) / 2.)**3 & 314 330 / MAX(ABS(ZOP(JW, :) + ZOM(JW, :)) / 2., ZOISEC)**4 & 315 331 * ZK(JW, :)**3 * (ZH(:, LL + 1) - ZH(:, LL))), & 316 ! Critical levels (forced to zero if intrinsic 317 ! frequency changes sign) 332 ! Critical levels (forced to zero if intrinsic frequency changes sign) 318 333 MAX(0., SIGN(1., ZOP(JW, :) * ZOM(JW, :))) & 319 320 * ZOP(JW, :)**2 / ZK(JW, :)/BV(:, LL+1) &321 * EXP(-ZH(:, LL + 1)/ 2./H0) * SAT)334 ! Saturation (Eq. 12) 335 * ABS(ZOP(JW, :))**3 /BV(:, LL+1) & 336 * EXP(-ZH(:, LL + 1)/H0) * SAT**2*KMIN**2/ZK(JW, :)**4) 322 337 end DO 323 338 … … 327 342 328 343 DO JW = 1, NW 329 RUWP(JW, :) = ZOP(JW, :)/MAX(ABS(ZOP(JW, :)), ZOISEC)**2 & 330 *BV(:,LL+1)& 331 * COS(ZP(JW)) * WWP(JW, :)**2 332 RVWP(JW, :) = ZOP(JW, :)/MAX(ABS(ZOP(JW, :)), ZOISEC)**2 & 333 *BV(:,LL+1)& 334 * SIN(ZP(JW)) * WWP(JW, :)**2 344 RUWP(JW, :) = SIGN(1.,ZOP(JW, :))*COS(ZP(JW))*WWP(JW, :) 345 RVWP(JW, :) = SIGN(1.,ZOP(JW, :))*SIN(ZP(JW))*WWP(JW, :) 335 346 end DO 336 347 ! … … 358 369 end DO 359 370 371 ! 5 CALCUL DES TENDANCES: 372 !------------------------ 373 374 ! 5.1 Rectification des flux au sommet et dans les basses couches: 375 ! MODIF SL 376 377 ! Attention, ici c'est le total sur toutes les ondes... 378 379 RUW(:, KLEV + 1) = 0. 380 RVW(:, KLEV + 1) = 0. 381 382 ! Here, big change compared to FLott version: 383 ! We compensate (RUW(:, LAUNCH), ie total emitted upward flux 384 ! over the layers max(1,LAUNCH-3) to LAUNCH-1 385 DO LL = 1, max(1,LAUNCH-3) 386 RUW(:, LL) = 0. 387 RVW(:, LL) = 0. 388 end DO 389 DO LL = max(2,LAUNCH-2), LAUNCH-1 390 RUW(:, LL) = RUW(:, LL - 1) + RUW(:, LAUNCH) * & 391 (PH(:,LL)-PH(:,LL-1)) / (PH(:,LAUNCH)-PH(:,max(1,LAUNCH-3))) 392 RVW(:, LL) = RVW(:, LL - 1) + RVW(:, LAUNCH) * & 393 (PH(:,LL)-PH(:,LL-1)) / (PH(:,LAUNCH)-PH(:,max(1,LAUNCH-3))) 394 end DO 395 ! This way, the total flux from GW is zero, but there is a net transport 396 ! (upward) that should be compensated by circulation 397 ! and induce additional friction at the surface 398 360 399 !Online output 361 400 if (output) then 401 DO LL = 1, KLEV - 1 402 WRITE(11,*) ZHbis(IEQ, LL)/1000.,RUW(IEQ,LL) 403 end DO 362 404 CLOSE(11) 363 405 stop 364 406 endif 365 366 ! 4 CALCUL DES TENDANCES:367 !------------------------368 369 ! 4.1 Rectification des flux au sommet et dans les basses couches:370 371 RUW(:, KLEV + 1) = 0.372 RVW(:, KLEV + 1) = 0.373 RUW(:, 1) = RUW(:, LAUNCH)374 RVW(:, 1) = RVW(:, LAUNCH)375 DO LL = 2, LAUNCH376 RUW(:, LL) = RUW(:, LL - 1) + (RUW(:, LAUNCH + 1) - RUW(:, 1)) * &377 (PH(:, LL) - PH(:, LL - 1)) / (PH(:, LAUNCH + 1) - PH(:, 1))378 RVW(:, LL) = RVW(:, LL - 1) + (RVW(:, LAUNCH + 1) - RVW(:, 1)) * &379 (PH(:, LL) - PH(:, LL - 1)) / (PH(:, LAUNCH + 1) - PH(:, 1))380 end DO381 407 382 408 ! AR-1 RECURSIVE FORMULA (13) IN VERSION 4 -
trunk/LMDZ.VENUS/libf/phyvenus/moldiff_red.F90
r1530 r1591 226 226 !!! 227 227 !! =======> Gab 29 oct 2014 228 !!$$$ $$$$THIS UPDATE IS ALREADY DONE in physique (t_seri & tr_seri) $$$$$$228 !!$$$ THIS UPDATE IS ALREADY DONE in physique (t_seri & tr_seri) $$$$$$ 229 229 230 230 ! Update the temperature modified by other processes … … 449 449 ! Tdiff=Tdiff/2. 450 450 451 ! if (ig .eq. ij0) then 452 ! print*,'test',ig,Tdiff,tdiffmin,minloc(Tdiffrafmol),minloc(Tdiffrafmol(nlraf,:)) 453 ! endif 454 if (tdiff .lt. tdiffmin*Mraf(nlraf)) tdiff=tdiffmin*Mraf(nlraf) 455 ntime=anint(dble(ptimestep)/Tdiff) 456 ! print*,'ptime',ig,ptimestep,Tdiff,ntime,tdiffmin,Mraf(nlraf) 451 if (tdiff .lt. tdiffmin*Mraf(nlraf)) tdiff=tdiffmin*Mraf(nlraf) 452 453 ! if (tdiff .lt. tdiffmin*Mraf(nlraf)) then 454 ! print*, 'Moldiff L454', tdiff, ptimestep, tdiffmin*Mraf(nlraf) 455 ! endif 456 457 ! JYC + GG aout 2015 add this condition below 458 if (tdiff .ge. ptimestep) tdiff=ptimestep 459 ! Number of time step 460 ntime=anint(dble(ptimestep)/tdiff) 461 !print*,'ptime',ig,tdiff,ntime,Mraf(nlraf) 462 457 463 ! Adimensionned temperature 458 464 … … 592 598 CALL GCMGRID_P2(Zraf,Praf,Qraf,Traf,Nrafk,Rrafk,qq,qnew,tt,tnew,& 593 599 & pp,mol_tr,gcmind,nlraf,ncompdiff,nlayer,FacMass,ig) 600 601 !!! Call added by JY+GG Aout 2014 602 CALL MMOY(massemoy,mol_tr,qnew,gcmind,nlayer,ncompdiff) 594 603 595 604 CALL RHOTOT(pp,tt,massemoy,qnew,RHOT,RHOK,nlayer,ncompdiff) … … 994 1003 SUBROUTINE ZVERT(P,T,M,Z,nl,ig) 995 1004 IMPLICIT NONE 1005 #include "YOMCST.h" 996 1006 INTEGER :: nl,l,ig 997 1007 REAL*8,dimension(nl) :: P,T,M,Z,H 998 1008 REAL*8 :: z0 999 1009 REAL*8 :: kbolt,masseU,Konst,g,Hpm 1000 masseU=1. 660538782d-271001 kbolt= 1.3806504d-231010 masseU=1.e-3/RNAVO 1011 kbolt=RKBOL 1002 1012 Konst=kbolt/masseU 1003 g= 3.72D01013 g=RG 1004 1014 1005 1015 z0=0d0 … … 1025 1035 SUBROUTINE RHOTOT(P,T,M,qq,rhoN,rhoK,nl,nq) 1026 1036 IMPLICIT NONE 1027 1037 #include "YOMCST.h" 1028 1038 REAL*8 :: kbolt,masseU,Konst 1029 1039 INTEGER :: nl,nq,l,iq 1030 1040 REAL*8,DIMENSION(nl) :: P,T,M,RHON 1031 1041 REAL*8,DIMENSION(nl,nq) :: RHOK,qq 1032 masseU=1. 660538782d-271033 kbolt= 1.3806504d-231042 masseU=1.e-3/RNAVO 1043 kbolt=RKBOL 1034 1044 Konst=Kbolt/masseU 1035 1045 … … 1049 1059 use infotrac 1050 1060 IMPLICIT NONE 1051 1061 #include "YOMCST.h" 1052 1062 INTEGER :: nl,nq,il,l,i,iq,nlx,iz,ig 1053 1063 INTEGER :: gc(nq) … … 1060 1070 REAL*8 :: facZ,dZ,H 1061 1071 REAL,DIMENSION(nq) :: mol_tr 1062 masseU=1. 660538782d-271063 kbolt= 1.3806504d-231072 masseU=1.e-3/RNAVO 1073 kbolt=RKBOL 1064 1074 Konst=Kbolt/masseU 1065 g= 3.72d01075 g=RG 1066 1076 1067 1077 … … 1206 1216 SUBROUTINE VELVERT(nn,T,H,D,Dz,masse,W,nl) 1207 1217 IMPLICIT NONE 1218 #include "YOMCST.h" 1208 1219 INTEGER :: l,nl,nn 1209 1220 REAL*8,DIMENSION(nl) :: T,H,D,W,DT 1210 1221 REAL*8 :: Dz,Hmol,masse 1211 1222 REAL*8 :: kbolt,masseU,Konst,g 1212 masseU=1. 660538782d-271213 kbolt= 1.3806504d-231223 masseU=1.e-3/RNAVO 1224 kbolt=RKBOL 1214 1225 Konst=Kbolt/masseU 1215 g=3.72d0 1226 g=RG 1216 1227 1217 1228 DT(1)=1D0/T(1)*(-3D0*T(1)+4D0*T(2)-T(3))/(2D0*DZ) … … 1366 1377 SUBROUTINE Checkmass2(qold,qnew,P,il,nl,nn,nq) 1367 1378 IMPLICIT NONE 1379 #include "YOMCST.h" 1368 1380 INTEGER :: nl,nn,l,nq,il 1369 1381 REAL,DIMENSION(nl+1) :: P 1370 1382 REAL*8,DIMENSION(nl,nq) :: qold,qnew 1371 1383 REAL*8 :: DM,Mold,Mnew,g 1372 g= 3.72d01384 g=RG 1373 1385 DM=0d0 1374 1386 Mold=0d0 … … 1381 1393 ENDDO 1382 1394 IF (abs(DM/Mold) .gt. 1d-5) THEN 1383 Print*,'We dont conserve mas ',nn,DM,Mold,Mnew,DM/Mold1395 Print*,'We dont conserve mass',nn,DM,Mold,Mnew,DM/Mold 1384 1396 ENDIF 1385 1397 … … 1391 1403 use infotrac 1392 1404 IMPLICIT NONE 1405 #include "YOMCST.h" 1393 1406 INTEGER :: nl,nq,nlx,il,nn,iP,ig,compteur 1394 1407 INTEGER,DIMENSION(1) :: indP … … 1403 1416 REAL*8 :: kbolt,masseU,Konst,g,Dz,facP,Hi 1404 1417 REAL*8 :: Znew,Znew2,Pnew,Pnew2 1405 masseU=1.660538782d-27 1406 kbolt= 1.3806504d-231418 masseU=1.e-3/RNAVO 1419 kbolt=RKBOL 1407 1420 Konst=Kbolt/masseU 1408 g=3.72d0 1421 g=RG 1409 1422 Dz=Z(2)-Z(1) 1410 1423 Znew=Z(nl) … … 1493 1506 ! use infotrac 1494 1507 IMPLICIT NONE 1508 #include "YOMCST.h" 1495 1509 INTEGER :: nl,nq,nlx,il,nn,iP,ig,compteur 1496 1510 INTEGER,DIMENSION(1) :: indP … … 1504 1518 REAL*8 :: kbolt,masseU,Konst,g,Dz,facP,Hi 1505 1519 REAL*8 :: Znew,Znew2,Pnew,Pnew2 1506 masseU=1.660538782d-27 1507 kbolt= 1.3806504d-231520 masseU=1.e-3/RNAVO 1521 kbolt=RKBOL 1508 1522 Konst=Kbolt/masseU 1509 g=3.72d0 1523 g=RG 1510 1524 Dz=Z(2)-Z(1) 1511 1525 Znew=Z(nl) -
trunk/LMDZ.VENUS/libf/phyvenus/nlte_tcool.F
r1530 r1591 82 82 cpnew_ig(l)=cpnew(ig,l) 83 83 84 c write (*,*) 'nlte_tcool z_ig', l, z_ig(l) 84 85 enddo 85 86 86 87 c ! From GCM's grid to NLTE's grid 87 88 call NLTEdlvr11_ZGRID_02 (nlev, 88 89 $ p_ig, t_ig, z_ig, … … 302 303 zmin = z_gcm(jlowerboundary) 303 304 zmax = z_gcm(jtopboundary) 304 ! print*, zmin, zmax 305 306 ! print*, 'nlte boundaries', zmin, zmax 307 ! print*, 'Top atmosphere', z_gcm(nlev-1) 305 308 ! stop 306 309 deltaz = (zmax-zmin) / (nl-1) -
trunk/LMDZ.VENUS/libf/phyvenus/nlthermeq.F
r1530 r1591 64 64 END IF 65 65 66 c write(*,*) 'LTE rad. calculations up to layer ', nlaylte67 68 66 c 69 67 100 return … … 73 71 20 format(' half-width (scale heights) ',f6.2) 74 72 30 format(' suggested LTE coverage at least ',f6.2,'Pa') 75 40 format(' nlthermeq: purely NLTE contribution over (nlayer) ',f6. 2)73 40 format(' nlthermeq: purely NLTE contribution over (nlayer) ',f6.4) 76 74 77 75 end -
trunk/LMDZ.VENUS/libf/phyvenus/radlwsw.F
r1545 r1591 54 54 REAL PPB(klev+1) 55 55 56 REAL zfract, zrmu0 56 REAL zfract, zrmu0,latdeg 57 57 58 58 REAL zheat(klev), zcool(klev) … … 273 273 c--------- 274 274 znivs=zzlev(j,:) 275 latdeg=abs(latitude_deg(j)) 276 275 277 c CALL SW_venus_ve_1Dglobave(zrmu0, zfract, ! pour moy globale 276 278 c CALL SW_venus_ve(zrmu0, zfract, … … 279 281 c S ztopsw,zsolsw,ZFSNET) 280 282 281 c CALL SW_venus_cl_1Dglobave(zrmu0, zfract, ! pour moy globale 282 c CALL SW_venus_cl(zrmu0, zfract, 283 c CALL SW_venus_dc_1Dglobave(zrmu0, zfract, ! pour moy globale 284 CALL SW_venus_dc(zrmu0, zfract, 283 c CALL SW_venus_cl_1Dglobave(zrmu0,zfract, ! pour moy globale 284 c CALL SW_venus_cl(zrmu0,zfract, 285 c CALL SW_venus_dc_1Dglobave(zrmu0,zfract, ! pour moy globale 286 c CALL SW_venus_dc(zrmu0,zfract, 287 CALL SW_venus_rh(zrmu0,zfract,latdeg, 288 c CALL SW_venus_rh_1Dglobave(zrmu0,zfract, ! pour moy globale 285 289 S PPB,temp, 286 290 S zheat,
Note: See TracChangeset
for help on using the changeset viewer.