Changeset 2124
- Timestamp:
- Apr 24, 2019, 12:11:24 PM (6 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r2119 r2124 2709 2709 == 02/04/2019 == MV 2710 2710 - correction of the Van Leer scheme in vlz_fi.F, used by the sedimentation routine, and rocketduststorm_mod.F90 (particular case evoked previously --> update) 2711 2712 == 24/04/09 == EM+FF 2713 - Updated co2condens to correctly conserve tracer mass -
trunk/LMDZ.MARS/libf/phymars/co2condens_mod.F
r2009 r2124 16 16 use tracer_mod, only: noms 17 17 use surfdat_h, only: emissiv, phisfi 18 use geometry_mod, only: latitude ! grid point latitudes (rad) 18 use geometry_mod, only: latitude, ! grid point latitudes (rad) 19 & longitude_deg, latitude_deg 19 20 use planete_h, only: obliquit 20 21 use comcstfi_h, only: cpp, g, r, pi 21 22 #ifndef MESOSCALE 22 USE vertical_layers_mod, ONLY: bp23 USE vertical_layers_mod, ONLY: ap, bp 23 24 #endif 24 25 IMPLICIT NONE … … 113 114 REAL masse(nlayer),w(nlayer+1) 114 115 REAL Sm(nlayer),Smq(nlayer,nq),mixmas,qmix 116 REAL availco2 115 117 LOGICAL condsub(ngrid) 116 118 … … 130 132 c local saved variables 131 133 integer,save :: ico2 ! index of CO2 tracer 132 real,save :: qco2 min,qco2,mmean134 real,save :: qco2,mmean 133 135 real,parameter :: latcond=5.9e5 ! (J/kg) Latent heat of solid CO2 ice 134 136 real,parameter :: tcond1mb=136.27 ! condensation temperature (K) at 1 mbar … … 139 141 LOGICAL,SAVE :: firstcall = .true. !,firstcall2=.true. 140 142 141 c D.BARDET: todebug143 c D.BARDET: for debug 142 144 real ztc3D(ngrid,nlayer) 143 145 REAL ztm3D(ngrid,nlayer) … … 156 158 157 159 firstcall=.false. 158 write(*,*) ' Newcondens: improved_ztcond=',improved_ztcond159 PRINT*,'In newcondens:Tcond(P=1mb)=',tcond1mb,' Lcond=',latcond160 write(*,*) 'CO2condens: improved_ztcond=',improved_ztcond 161 PRINT*,'In co2condens:Tcond(P=1mb)=',tcond1mb,' Lcond=',latcond 160 162 PRINT*,'acond,bcond,ccond',acond,bcond,ccond 161 163 … … 177 179 endif 178 180 enddo 179 c minimum CO2 mix. ratio below which mixing occur with layer above:180 qco2min =0.75181 181 end if 182 182 ENDIF ! of IF (firstcall) … … 378 378 & /(latcond*ptimestep) - zfallheat 379 379 pdtsrfc(ig) = (ztcondsol(ig) - ztsrf(ig))/ptimestep 380 380 zdiceco2(ig) = zcondices(ig) + zfallice(ig,1) 381 382 c If there is not enough CO2 tracer in 1st layer to condense 383 c """""""""""""""""""""""""""""""""""""""""""""""""""""" 384 IF(ico2.ne.0) then 385 c Available CO2 tracer in layer 1 at end of timestep (kg/m2) 386 availco2= pq(ig,1,ico2)*((ap(1)-ap(2))+ 387 & (bp(1)-bp(2))*(pplev(ig,1)/g-zdiceco2(ig)*ptimestep)) 388 389 IF ((zcondices(ig) + zcondicea(ig,1))*ptimestep 390 & .gt.availco2) then 391 zcondices(ig) = availco2/ptimestep -zcondicea(ig,1) 392 zdiceco2(ig) = zcondices(ig) + zfallice(ig,1) 393 pdtsrfc(ig)=(latcond/pcapcal(ig))* 394 & (zcondices(ig)+zfallheat) 395 ENDIF 396 ENDIF 397 398 381 399 c If the entire CO_2 ice layer sublimes 382 400 c """""""""""""""""""""""""""""""""""""""""""""""""""" … … 388 406 pdtsrfc(ig)=(latcond/pcapcal(ig))* 389 407 & (zcondices(ig)+zfallheat) 408 zdiceco2(ig) = zcondices(ig) + zfallice(ig,1) 390 409 END IF 391 410 … … 393 412 c """""""""""""""""""""""""""""""""""" 394 413 395 zdiceco2(ig) = zcondices(ig) + zfallice(ig,1)396 414 piceco2(ig) = piceco2(ig) + zdiceco2(ig)*ptimestep 397 415 pdpsrf(ig) = -zdiceco2(ig)*g … … 401 419 PRINT*,'condensing more than total mass' 402 420 PRINT*,'Grid point ',ig 421 PRINT*,'Longitude(degrees): ',longitude_deg(ig) 422 PRINT*,'Latitude(degrees): ',latitude_deg(ig) 403 423 PRINT*,'Ps = ',pplev(ig,1) 404 424 PRINT*,'d Ps = ',pdpsrf(ig) … … 416 436 if(.not.piceco2(ig).ge.0.) THEN 417 437 if(piceco2(ig).le.-5.e-8) print*, 418 $ 'WARNING newcondens piceco2(',ig,')=', piceco2(ig)438 $ 'WARNING co2condens piceco2(',ig,')=', piceco2(ig) 419 439 piceco2(ig)=0. 420 440 endif … … 465 485 END DO 466 486 467 c Mass of each layer 468 c ------------------ 487 c Mass of each layer at the end of timestep 488 c ----------------------------------------- 469 489 DO l=1,nlayer 470 masse(l)=(pplev(ig,l) - pplev(ig,l+1))/g 490 masse(l)=( pplev(ig,l) - pplev(ig,l+1) + 491 & (bp(l)-bp(l+1))*pdpsrf(ig)*ptimestep)/g 471 492 END DO 472 493 … … 628 649 ! NB: Updated surface pressure, at grid point 'ngrid', is 629 650 ! ps(ngrid)=pplev(ngrid,1)+pdpsrf(ngrid)*ptimestep 630 ! write(*,*) " newcondens: South pole: latitude(ngrid)=",651 ! write(*,*) "co2condens: South pole: latitude(ngrid)=", 631 652 ! & latitude(ngrid) 632 653 ztcondsol(ngrid)= … … 754 775 enddo 755 776 756 c boundary conditions (not used in newcondens !!)777 c boundary conditions (not used in co2condens !!) 757 778 c qm(nlayer+1)=0. 758 779 c if(w(1).gt.0.) then
Note: See TracChangeset
for help on using the changeset viewer.