Changeset 1909 for trunk/LMDZ.MARS/libf/phymars
- Timestamp:
- Mar 9, 2018, 4:43:48 PM (7 years ago)
- Location:
- trunk/LMDZ.MARS/libf/phymars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/improvedclouds.F
r1779 r1909 1 subroutine improvedclouds(ngrid,nlay, ptimestep,2 & pplay,pt ,pdt,3 & pq ,pdq,pdqcloud,pdtcloud,1 subroutine improvedclouds(ngrid,nlay,microtimestep, 2 & pplay,pteff,sum_subpdt, 3 & pqeff,sum_subpdq,subpdqcloud,subpdtcloud, 4 4 & nq,tauscaling) 5 5 ! to use 'getin' … … 42 42 INTEGER ngrid,nlay 43 43 integer nq ! nombre de traceurs 44 REAL ptimestep ! pas de temps physique (s)44 REAL microtimestep ! pas de temps physique (s) 45 45 REAL pplay(ngrid,nlay) ! pression au milieu des couches (Pa) 46 46 47 REAL pt (ngrid,nlay) ! temperature at the middle of the47 REAL pteff(ngrid,nlay) ! temperature at the middle of the 48 48 ! layers (K) 49 REAL pdt(ngrid,nlay) ! tendance temperature des autres49 REAL sum_subpdt(ngrid,nlay) ! tendance temperature des autres 50 50 ! param. 51 REAL pq (ngrid,nlay,nq) ! traceur (kg/kg)52 REAL pdq(ngrid,nlay,nq) ! tendance avant condensation51 REAL pqeff(ngrid,nlay,nq) ! traceur (kg/kg) 52 REAL sum_subpdq(ngrid,nlay,nq) ! tendance avant condensation 53 53 ! (kg/kg.s-1) 54 54 REAL tauscaling(ngrid) ! Convertion factor for qdust and Ndust 55 55 56 56 c Outputs: 57 REAL pdqcloud(ngrid,nlay,nq) ! tendance de la condensation57 REAL subpdqcloud(ngrid,nlay,nq) ! tendance de la condensation 58 58 ! H2O(kg/kg.s-1) 59 REAL pdtcloud(ngrid,nlay) ! tendance temperature due59 REAL subpdtcloud(ngrid,nlay) ! tendance temperature due 60 60 ! a la chaleur latente 61 61 … … 216 216 ! 1. Initialisation 217 217 !============================================================= 218 cste = 4*pi*rho_ice* ptimestep218 cste = 4*pi*rho_ice*microtimestep 219 219 220 220 res_out(:,:) = 0 … … 222 222 223 223 c Initialize the tendencies 224 pdqcloud(1:ngrid,1:nlay,1:nq)=0225 pdtcloud(1:ngrid,1:nlay)=0224 subpdqcloud(1:ngrid,1:nlay,1:nq)=0 225 subpdtcloud(1:ngrid,1:nlay)=0 226 226 227 227 228 228 zt(1:ngrid,1:nlay) = 229 & pt (1:ngrid,1:nlay) +230 & pdt(1:ngrid,1:nlay) * ptimestep229 & pteff(1:ngrid,1:nlay) + 230 & sum_subpdt(1:ngrid,1:nlay) * microtimestep 231 231 232 232 zq(1:ngrid,1:nlay,1:nq) = 233 & pq (1:ngrid,1:nlay,1:nq) +234 & pdq(1:ngrid,1:nlay,1:nq) * ptimestep233 & pqeff(1:ngrid,1:nlay,1:nq) + 234 & sum_subpdq(1:ngrid,1:nlay,1:nq) * microtimestep 235 235 236 236 … … 317 317 dM = 0. 318 318 do i = 1, nbin_cld 319 n_aer(i) = n_aer(i)/( 1. + rate(i)* ptimestep)320 m_aer(i) = m_aer(i)/( 1. + rate(i)* ptimestep)321 dN = dN + n_aer(i) * rate(i) * ptimestep322 dM = dM + m_aer(i) * rate(i) * ptimestep319 n_aer(i) = n_aer(i)/( 1. + rate(i)*microtimestep) 320 m_aer(i) = m_aer(i)/( 1. + rate(i)*microtimestep) 321 dN = dN + n_aer(i) * rate(i) * microtimestep 322 dM = dM + m_aer(i) * rate(i) * microtimestep 323 323 enddo 324 324 … … 386 386 lw=(2834.3-0.28*(zt(ig,l)-To)- 387 387 & 0.004*(zt(ig,l)-To)*(zt(ig,l)-To))*1.e+3 388 pdtcloud(ig,l)= dMice*lw/cpp/ptimestep388 subpdtcloud(ig,l)= dMice*lw/cpp/microtimestep 389 389 390 390 … … 420 420 421 421 ! Get cloud tendencies 422 pdqcloud(1:ngrid,1:nlay,igcm_h2o_vap) =422 subpdqcloud(1:ngrid,1:nlay,igcm_h2o_vap) = 423 423 & (zq(1:ngrid,1:nlay,igcm_h2o_vap) - 424 & zq0(1:ngrid,1:nlay,igcm_h2o_vap))/ ptimestep425 pdqcloud(1:ngrid,1:nlay,igcm_h2o_ice) =424 & zq0(1:ngrid,1:nlay,igcm_h2o_vap))/microtimestep 425 subpdqcloud(1:ngrid,1:nlay,igcm_h2o_ice) = 426 426 & (zq(1:ngrid,1:nlay,igcm_h2o_ice) - 427 & zq0(1:ngrid,1:nlay,igcm_h2o_ice))/ ptimestep428 pdqcloud(1:ngrid,1:nlay,igcm_ccn_mass) =427 & zq0(1:ngrid,1:nlay,igcm_h2o_ice))/microtimestep 428 subpdqcloud(1:ngrid,1:nlay,igcm_ccn_mass) = 429 429 & (zq(1:ngrid,1:nlay,igcm_ccn_mass) - 430 & zq0(1:ngrid,1:nlay,igcm_ccn_mass))/ ptimestep431 pdqcloud(1:ngrid,1:nlay,igcm_ccn_number) =430 & zq0(1:ngrid,1:nlay,igcm_ccn_mass))/microtimestep 431 subpdqcloud(1:ngrid,1:nlay,igcm_ccn_number) = 432 432 & (zq(1:ngrid,1:nlay,igcm_ccn_number) - 433 & zq0(1:ngrid,1:nlay,igcm_ccn_number))/ ptimestep433 & zq0(1:ngrid,1:nlay,igcm_ccn_number))/microtimestep 434 434 435 435 if (scavenging) then 436 436 437 pdqcloud(1:ngrid,1:nlay,igcm_dust_mass) =437 subpdqcloud(1:ngrid,1:nlay,igcm_dust_mass) = 438 438 & (zq(1:ngrid,1:nlay,igcm_dust_mass) - 439 & zq0(1:ngrid,1:nlay,igcm_dust_mass))/ ptimestep440 pdqcloud(1:ngrid,1:nlay,igcm_dust_number) =439 & zq0(1:ngrid,1:nlay,igcm_dust_mass))/microtimestep 440 subpdqcloud(1:ngrid,1:nlay,igcm_dust_number) = 441 441 & (zq(1:ngrid,1:nlay,igcm_dust_number) - 442 & zq0(1:ngrid,1:nlay,igcm_dust_number))/ ptimestep442 & zq0(1:ngrid,1:nlay,igcm_dust_number))/microtimestep 443 443 444 444 endif -
trunk/LMDZ.MARS/libf/phymars/watercloud_mod.F
r1880 r1909 98 98 99 99 ! global tendency (clouds+physics) 100 REAL su bpdq(ngrid,nlay,nq) ! cf. pdqcloud101 REAL su bpdt(ngrid,nlay) ! cf. pdtcloud100 REAL sum_subpdq(ngrid,nlay,nq) ! cf. pdqcloud 101 REAL sum_subpdt(ngrid,nlay) ! cf. pdtcloud 102 102 103 103 ! no supersaturation when option supersat is false … … 119 119 REAL :: spant ! delta T for the temperature distribution 120 120 ! REAL :: zqsat(ngrid,nlay) ! saturation 121 REAL :: zteff(ngrid, nlay)! effective temperature in the cloud,neb121 REAL :: pteff(ngrid, nlay)! effective temperature in the cloud,neb 122 122 REAL :: pqeff(ngrid, nlay, nq)! effective tracers quantities in the cloud 123 123 REAL :: cloudfrac(ngrid,nlay) ! cloud fraction … … 158 158 159 159 c-----Initialization 160 su bpdq(1:ngrid,1:nlay,1:nq) = 0161 su bpdt(1:ngrid,1:nlay) = 0160 sum_subpdq(1:ngrid,1:nlay,1:nq) = 0 161 sum_subpdt(1:ngrid,1:nlay) = 0 162 162 163 163 ! default value if no ice … … 168 168 c------------------ 169 169 c-----Initialization 170 zteff(1:ngrid,1:nlay) = 0170 pteff(1:ngrid,1:nlay) = 0 171 171 pqeff(1:ngrid,1:nlay,1:nq) = 0 172 172 DO l=1,nlay 173 173 DO ig=1,ngrid 174 zteff(ig,l)=pt(ig,l)174 pteff(ig,l)=pt(ig,l) 175 175 END DO 176 176 END DO … … 212 212 zdelt=spant !MAX(spant*ztclf(ig,l),1.e-12), now totally in K. Fixed width 213 213 IF (tcond(ig,l) .ge. (ztclf(ig,l)+zdelt)) THEN 214 zteff(ig,l)=ztclf(ig,l)214 pteff(ig,l)=ztclf(ig,l) 215 215 cloudfrac(ig,l)=1. 216 216 ELSE IF (tcond(ig,l) .le. (ztclf(ig,l)-zdelt)) THEN 217 zteff(ig,l)=ztclf(ig,l)-zdelt217 pteff(ig,l)=ztclf(ig,l)-zdelt 218 218 cloudfrac(ig,l)=mincloud 219 219 ELSE 220 220 cloudfrac(ig,l)=(tcond(ig,l)-ztclf(ig,l)+zdelt)/ 221 221 & (2.0*zdelt) 222 zteff(ig,l)=(tcond(ig,l)+ztclf(ig,l)-zdelt)/2.222 pteff(ig,l)=(tcond(ig,l)+ztclf(ig,l)-zdelt)/2. 223 223 END IF 224 zteff(ig,l)=zteff(ig,l)-pdt(ig,l)*ptimestep224 pteff(ig,l)=pteff(ig,l)-pdt(ig,l)*ptimestep 225 225 IF (cloudfrac(ig,l).le.mincloud) THEN !MV17: replaced .le.0 by .le.mincloud 226 226 cloudfrac(ig,l)=mincloud … … 251 251 pqeff(:,:,igcm_h2o_ice)=pq(:,:,igcm_h2o_ice)/ 252 252 & cloudfrac(:,:) 253 END IF ! end if (CLFvarying) 254 !! MV17: CLFvarying outputs 253 !! CLFvarying outputs 255 254 CALL WRITEDIAGFI(ngrid,'pqeffice','pqeffice', 256 255 & 'kg/kg',3,pqeff(:,:,igcm_h2o_ice)) 257 CALL WRITEDIAGFI(ngrid,' zteff','zteff',258 & 'K',3, zteff(:,:))256 CALL WRITEDIAGFI(ngrid,'pteff','pteff', 257 & 'K',3,pteff(:,:)) 259 258 CALL WRITEDIAGFI(ngrid,'tcond','tcond', 260 259 & 'K',3,tcond(:,:)) 261 260 CALL WRITEDIAGFI(ngrid,'cloudfrac','cloudfrac', 262 261 & 'K',3,cloudfrac(:,:)) 262 END IF ! end if (CLFvarying) 263 263 c------------------------------------------------------------------ 264 264 c Time subsampling for microphysics … … 277 277 DO l=1,nlay 278 278 DO ig=1,ngrid 279 su bpdt(ig,l) =subpdt(ig,l)279 sum_subpdt(ig,l) = sum_subpdt(ig,l) 280 280 & + pdt(ig,l) ! At each micro timestep we add pdt in order to have a stepped entry 281 281 ENDDO 282 282 ENDDO 283 c------ Tracers tendencies subpdq 283 c------ Tracers tendencies subpdq are additionned 284 284 c------ At each micro timestep we add pdq in order to have a stepped entry 285 285 IF (microphys) THEN 286 286 DO l=1,nlay 287 287 DO ig=1,ngrid 288 su bpdq(ig,l,igcm_dust_mass) =289 & su bpdq(ig,l,igcm_dust_mass)288 sum_subpdq(ig,l,igcm_dust_mass) = 289 & sum_subpdq(ig,l,igcm_dust_mass) 290 290 & + pdq(ig,l,igcm_dust_mass) 291 su bpdq(ig,l,igcm_dust_number) =292 & su bpdq(ig,l,igcm_dust_number)291 sum_subpdq(ig,l,igcm_dust_number) = 292 & sum_subpdq(ig,l,igcm_dust_number) 293 293 & + pdq(ig,l,igcm_dust_number) 294 su bpdq(ig,l,igcm_ccn_mass) =295 & su bpdq(ig,l,igcm_ccn_mass)294 sum_subpdq(ig,l,igcm_ccn_mass) = 295 & sum_subpdq(ig,l,igcm_ccn_mass) 296 296 & + pdq(ig,l,igcm_ccn_mass) 297 su bpdq(ig,l,igcm_ccn_number) =298 & su bpdq(ig,l,igcm_ccn_number)297 sum_subpdq(ig,l,igcm_ccn_number) = 298 & sum_subpdq(ig,l,igcm_ccn_number) 299 299 & + pdq(ig,l,igcm_ccn_number) 300 300 ENDDO … … 303 303 DO l=1,nlay 304 304 DO ig=1,ngrid 305 su bpdq(ig,l,igcm_h2o_ice) =306 & su bpdq(ig,l,igcm_h2o_ice)305 sum_subpdq(ig,l,igcm_h2o_ice) = 306 & sum_subpdq(ig,l,igcm_h2o_ice) 307 307 & + pdq(ig,l,igcm_h2o_ice) 308 su bpdq(ig,l,igcm_h2o_vap) =309 & su bpdq(ig,l,igcm_h2o_vap)308 sum_subpdq(ig,l,igcm_h2o_vap) = 309 & sum_subpdq(ig,l,igcm_h2o_vap) 310 310 & + pdq(ig,l,igcm_h2o_vap) 311 311 ENDDO … … 317 317 IF (microphys) THEN 318 318 CALL improvedclouds(ngrid,nlay,microtimestep, 319 & pplay, zteff,subpdt,320 & pqeff,su bpdq,subpdqcloud,subpdtcloud,319 & pplay,pteff,sum_subpdt, 320 & pqeff,sum_subpdq,subpdqcloud,subpdtcloud, 321 321 & nq,tauscaling) 322 322 323 323 ELSE 324 324 CALL simpleclouds(ngrid,nlay,microtimestep, 325 & pplay,pzlay, zteff,subpdt,326 & pqeff,su bpdq,subpdqcloud,subpdtcloud,325 & pplay,pzlay,pteff,sum_subpdt, 326 & pqeff,sum_subpdq,subpdqcloud,subpdtcloud, 327 327 & nq,tau,rice) 328 328 ENDIF … … 335 335 DO l=1,nlay 336 336 DO ig=1,ngrid 337 su bpdq(ig,l,igcm_dust_mass) =338 & su bpdq(ig,l,igcm_dust_mass)337 sum_subpdq(ig,l,igcm_dust_mass) = 338 & sum_subpdq(ig,l,igcm_dust_mass) 339 339 & + subpdqcloud(ig,l,igcm_dust_mass) 340 su bpdq(ig,l,igcm_dust_number) =341 & su bpdq(ig,l,igcm_dust_number)340 sum_subpdq(ig,l,igcm_dust_number) = 341 & sum_subpdq(ig,l,igcm_dust_number) 342 342 & + subpdqcloud(ig,l,igcm_dust_number) 343 su bpdq(ig,l,igcm_ccn_mass) =344 & su bpdq(ig,l,igcm_ccn_mass)343 sum_subpdq(ig,l,igcm_ccn_mass) = 344 & sum_subpdq(ig,l,igcm_ccn_mass) 345 345 & + subpdqcloud(ig,l,igcm_ccn_mass) 346 su bpdq(ig,l,igcm_ccn_number) =347 & su bpdq(ig,l,igcm_ccn_number)346 sum_subpdq(ig,l,igcm_ccn_number) = 347 & sum_subpdq(ig,l,igcm_ccn_number) 348 348 & + subpdqcloud(ig,l,igcm_ccn_number) 349 349 ENDDO … … 352 352 DO l=1,nlay 353 353 DO ig=1,ngrid 354 su bpdq(ig,l,igcm_h2o_ice) =355 & su bpdq(ig,l,igcm_h2o_ice)354 sum_subpdq(ig,l,igcm_h2o_ice) = 355 & sum_subpdq(ig,l,igcm_h2o_ice) 356 356 & + subpdqcloud(ig,l,igcm_h2o_ice) 357 su bpdq(ig,l,igcm_h2o_vap) =358 & su bpdq(ig,l,igcm_h2o_vap)357 sum_subpdq(ig,l,igcm_h2o_vap) = 358 & sum_subpdq(ig,l,igcm_h2o_vap) 359 359 & + subpdqcloud(ig,l,igcm_h2o_vap) 360 360 ENDDO … … 364 364 DO l=1,nlay 365 365 DO ig=1,ngrid 366 su bpdt(ig,l) =367 & su bpdt(ig,l) + subpdtcloud(ig,l)366 sum_subpdt(ig,l) = 367 & sum_subpdt(ig,l) + subpdtcloud(ig,l) 368 368 ENDDO 369 369 ENDDO … … 381 381 DO ig=1,ngrid 382 382 pdtcloud(ig,l) = 383 & su bpdt(ig,l)/real(imicro)-pdt(ig,l)383 & sum_subpdt(ig,l)/real(imicro)-pdt(ig,l) 384 384 ENDDO 385 385 ENDDO … … 389 389 DO ig=1,ngrid 390 390 pdqcloud(ig,l,igcm_h2o_ice) = 391 & su bpdq(ig,l,igcm_h2o_ice)/real(imicro)391 & sum_subpdq(ig,l,igcm_h2o_ice)/real(imicro) 392 392 & - pdq(ig,l,igcm_h2o_ice) 393 393 pdqcloud(ig,l,igcm_h2o_vap) = 394 & su bpdq(ig,l,igcm_h2o_vap)/real(imicro)394 & sum_subpdq(ig,l,igcm_h2o_vap)/real(imicro) 395 395 & - pdq(ig,l,igcm_h2o_vap) 396 396 ENDDO … … 401 401 DO ig=1,ngrid 402 402 pdqcloud(ig,l,igcm_ccn_mass) = 403 & su bpdq(ig,l,igcm_ccn_mass)/real(imicro)403 & sum_subpdq(ig,l,igcm_ccn_mass)/real(imicro) 404 404 & - pdq(ig,l,igcm_ccn_mass) 405 405 pdqcloud(ig,l,igcm_ccn_number) = 406 & su bpdq(ig,l,igcm_ccn_number)/real(imicro)406 & sum_subpdq(ig,l,igcm_ccn_number)/real(imicro) 407 407 & - pdq(ig,l,igcm_ccn_number) 408 408 ENDDO … … 414 414 DO ig=1,ngrid 415 415 pdqcloud(ig,l,igcm_dust_mass) = 416 & su bpdq(ig,l,igcm_dust_mass)/real(imicro)416 & sum_subpdq(ig,l,igcm_dust_mass)/real(imicro) 417 417 & - pdq(ig,l,igcm_dust_mass) 418 418 pdqcloud(ig,l,igcm_dust_number) = 419 & su bpdq(ig,l,igcm_dust_number)/real(imicro)419 & sum_subpdq(ig,l,igcm_dust_number)/real(imicro) 420 420 & - pdq(ig,l,igcm_dust_number) 421 421 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.