Changeset 1911
- Timestamp:
- Mar 9, 2018, 6:19:27 PM (7 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r1910 r1911 2525 2525 - in improvedclouds : change of the names of input and output variables according to their names in watercloud_mod in order to not confuse them (in improvedclouds "ptimestep" corresponds actually to "microtimestep"). 2526 2526 - in watercloud_mod, CLFvarying block : change of the name zteff in pteff to be logical with the other variables names, and writediagfi lines have been moved to the CLFvarying block. 2527 2528 == 09/03/2018 == MV 2529 "cosmetics" changes in co2cloud and improvedCO2clouds to better understand the role of the variables: 2530 - in co2cloud : - change of variables subpdq and subpdt in sum_subpdq and sum_subpdt to make clear we are making the sum of the tendencies in the microphysics loop. 2531 - change of variables pdqsed in subpdqsed as these are tendencies inside the microphysics loop 2532 - flag "sedimentation" has been added for the sedimentation block 2533 - variables names in the sedimentation block have been changed (tempo_traceurs becomes zqsed, sav_trac becomes zqsed0) 2534 - variable sum_subpdqs_sedco2 was added in the microphysics loop to make clear we make the sum of the surface sedimentation flux, output variable is still pdqs_sedco2 2535 - variable sum_subpdqs_sedco2 has been initialized to zero 2536 - zteff has been changed to pteff to be logical with the other variables names 2537 - in improvedCO2clouds : change of the names of input and output variables according to their names in co2cloud in order to not confuse them (in improvedCO2clouds "ptimestep" corresponds actually to "microtimestep"). 2538 -
trunk/LMDZ.MARS/libf/phymars/co2cloud.F
r1885 r1911 81 81 real, INTENT(IN) :: pq(ngrid,nlay,nq) ! tracers (kg/kg) 82 82 real, INTENT(IN) :: pdq(ngrid,nlay,nq) ! tendencies before condensation (kg/kg.s-1) 83 real, intent( out) :: pdqcloudco2(ngrid,nlay,nq) ! tendency due to CO2 condensation (kg/kg.s-1)84 real, intent( out) :: pdtcloudco2(ngrid,nlay) ! tendency on temperature due to latent heat83 real, intent(OUT) :: pdqcloudco2(ngrid,nlay,nq) ! tendency due to CO2 condensation (kg/kg.s-1) 84 real, intent(OUT) :: pdtcloudco2(ngrid,nlay) ! tendency on temperature due to latent heat 85 85 INTEGER, INTENT(IN) :: nq ! number of tracers 86 86 REAL, INTENT(IN) :: tau(ngrid,naerkind) ! Column dust optical depth at each point … … 91 91 DOUBLE PRECISION, INTENT(out) :: riceco2(ngrid,nlay) ! Ice mass mean radius (m) 92 92 ! (r_c in montmessin_2004) 93 REAL, INTENT( in) :: nuice(ngrid,nlay) ! Estimated effective variance93 REAL, INTENT(IN) :: nuice(ngrid,nlay) ! Estimated effective variance 94 94 ! of the size distribution 95 real, intent( out) :: rsedcloudco2(ngrid,nlay) ! Cloud sedimentation radius96 real, intent( out) :: rhocloudco2(ngrid,nlay) ! Cloud density (kg.m-3)97 real, intent( out) :: rsedcloud(ngrid,nlay) ! Water Cloud sedimentation radius98 real, intent( out) :: rhocloud(ngrid,nlay) ! Water Cloud density (kg.m-3)99 real, intent( in) :: pzlev(ngrid,nlay+1) ! altitude at the boundaries of the layers100 real, intent( out) :: pdqs_sedco2(ngrid) ! CO2 flux at the surface95 real, intent(OUT) :: rsedcloudco2(ngrid,nlay) ! Cloud sedimentation radius 96 real, intent(OUT) :: rhocloudco2(ngrid,nlay) ! Cloud density (kg.m-3) 97 real, intent(OUT) :: rsedcloud(ngrid,nlay) ! Water Cloud sedimentation radius 98 real, intent(OUT) :: rhocloud(ngrid,nlay) ! Water Cloud density (kg.m-3) 99 real, intent(IN) :: pzlev(ngrid,nlay+1) ! altitude at the boundaries of the layers 100 real, intent(OUT) :: pdqs_sedco2(ngrid) ! CO2 flux at the surface 101 101 REAL, INTENT(IN) :: pdu(ngrid,nlay),pu(ngrid,nlay) !Zonal Wind: zu=pu+pdu*ptimestep 102 102 … … 114 114 115 115 ! global tendency (clouds+physics) 116 REAL su bpdq(ngrid,nlay,nq) ! cf. pdqcloud117 REAL su bpdt(ngrid,nlay) ! cf. pdtcloud116 REAL sum_subpdq(ngrid,nlay,nq) ! cf. pdqcloud 117 REAL sum_subpdt(ngrid,nlay) ! cf. pdtcloud 118 118 real wq(ngrid,nlay+1) ! ! displaced tracer mass (kg.m-2) during microtimestep because sedim (?/m-2) 119 119 … … 131 131 real epaisseur (ngrid,nlay) ! Layer thickness (m) 132 132 real masse (ngrid,nlay) ! Layer mass (kg.m-2) 133 real tempo_traceur_t(ngrid,nlay) ! tracers with real-time value in microtimeloop 134 real tempo_traceurs(ngrid,nlay,nq) 135 real sav_trac(ngrid,nlay,nq) !For sedimentation tendancy 136 real pdqsed(ngrid,nlay,nq) 133 real ztsed(ngrid,nlay) ! tracers with real-time value in microtimeloop 134 real zqsed(ngrid,nlay,nq) 135 real zqsed0(ngrid,nlay,nq) !For sedimentation tendancy 136 real subpdqsed(ngrid,nlay,nq) 137 real sum_subpdqs_sedco2(ngrid) ! CO2 flux at the surface 137 138 138 139 DOUBLE PRECISION,allocatable,save :: memdMMccn(:,:) !memory of h2o particles … … 171 172 REAL :: zqice(ngrid,nlay) 172 173 REAL :: spant,zdelt ! delta T for the temperature distribution 173 REAL :: zteff(ngrid, nlay)! effective temperature in the cloud,neb174 REAL :: pteff(ngrid, nlay)! effective temperature in the cloud,neb 174 175 REAL :: pqeff(ngrid, nlay, nq)! effective tracers quantities in the cloud 175 176 REAL :: co2cloudfrac(ngrid,nlay) ! cloud fraction … … 309 310 dev2 = 1. / ( sqrt(2.) * sigma_iceco2 ) 310 311 beta=0.85 311 su bpdq(1:ngrid,1:nlay,1:nq) = 0312 su bpdt(1:ngrid,1:nlay) = 0312 sum_subpdq(1:ngrid,1:nlay,1:nq) = 0 313 sum_subpdt(1:ngrid,1:nlay) = 0 313 314 subpdqcloudco2(1:ngrid,1:nlay,1:nq) = 0 314 315 subpdtcloudco2(1:ngrid,1:nlay) = 0 … … 321 322 masse(1:ngrid,1:nlay)=0 322 323 323 sav_trac(1:ngrid,1:nlay,1:nq)=0 324 pdqsed(1:ngrid,1:nlay,1:nq)=0 324 zqsed0(1:ngrid,1:nlay,1:nq)=0 325 sum_subpdqs_sedco2(1:ngrid)=0 326 subpdqsed(1:ngrid,1:nlay,1:nq)=0 325 327 326 328 do l=1,nlay … … 338 340 spant=spantCO2 ! delta T for the temprature distribution 339 341 mincloud=0.1 ! min co2cloudfrac when there is ice 340 zteff(:,:)=pt(:,:)342 pteff(:,:)=pt(:,:) 341 343 co2cloudfrac(:,:)=mincloud 342 344 … … 411 413 IF (tcond(ig,l) .ge. (zt(ig,l)+zdelt) 412 414 & .or. tcond(ig,l) .le. 0 ) THEN !The entire fraction is saturated 413 zteff(ig,l)=zt(ig,l)415 pteff(ig,l)=zt(ig,l) 414 416 co2cloudfrac(ig,l)=1. 415 417 ELSE IF (tcond(ig,l) .le. (zt(ig,l)-zdelt)) THEN ! No saturation at all 416 zteff(ig,l)=zt(ig,l)-zdelt418 pteff(ig,l)=zt(ig,l)-zdelt 417 419 co2cloudfrac(ig,l)=mincloud 418 420 ELSE 419 421 co2cloudfrac(ig,l)=(tcond(ig,l)-zt(ig,l)+zdelt)/ 420 422 & (2.0*zdelt) 421 zteff(ig,l)=(tcond(ig,l)+zt(ig,l)-zdelt)/2. !Mean temperature of the cloud fraction423 pteff(ig,l)=(tcond(ig,l)+zt(ig,l)-zdelt)/2. !Mean temperature of the cloud fraction 422 424 END IF !ig if (tcond(ig,l) ... 423 zteff(ig,l)=zteff(ig,l)-pdt(ig,l)*ptimestep425 pteff(ig,l)=pteff(ig,l)-pdt(ig,l)*ptimestep 424 426 IF (co2cloudfrac(ig,l).le. mincloud) THEN 425 427 co2cloudfrac(ig,l)=mincloud … … 430 432 ELSE 431 433 !SatIndex not favorable for GW : leave pt untouched 432 zteff(ig,l)=pt(ig,l)434 pteff(ig,l)=pt(ig,l) 433 435 co2cloudfrac(ig,l)=mincloud 434 436 ENDIF ! of if(SatIndexmap... … … 440 442 DO l=1,nlay 441 443 DO ig=1,ngrid 442 zteff(ig,l)=pt(ig,l)444 pteff(ig,l)=pt(ig,l) 443 445 END DO 444 446 END DO … … 456 458 DO l=1,nlay 457 459 DO ig=1,ngrid 458 su bpdt(ig,l) =subpdt(ig,l)460 sum_subpdt(ig,l) = sum_subpdt(ig,l) 459 461 & + pdt(ig,l) ! At each micro timestep we add pdt in order to have a stepped entry 460 su bpdq(ig,l,igcm_dust_mass) =461 & su bpdq(ig,l,igcm_dust_mass)462 sum_subpdq(ig,l,igcm_dust_mass) = 463 & sum_subpdq(ig,l,igcm_dust_mass) 462 464 & + pdq(ig,l,igcm_dust_mass) 463 su bpdq(ig,l,igcm_dust_number) =464 & su bpdq(ig,l,igcm_dust_number)465 sum_subpdq(ig,l,igcm_dust_number) = 466 & sum_subpdq(ig,l,igcm_dust_number) 465 467 & + pdq(ig,l,igcm_dust_number) 466 468 467 su bpdq(ig,l,igcm_ccnco2_mass) =468 & su bpdq(ig,l,igcm_ccnco2_mass)469 sum_subpdq(ig,l,igcm_ccnco2_mass) = 470 & sum_subpdq(ig,l,igcm_ccnco2_mass) 469 471 & + pdq(ig,l,igcm_ccnco2_mass) 470 su bpdq(ig,l,igcm_ccnco2_number) =471 & su bpdq(ig,l,igcm_ccnco2_number)472 sum_subpdq(ig,l,igcm_ccnco2_number) = 473 & sum_subpdq(ig,l,igcm_ccnco2_number) 472 474 & + pdq(ig,l,igcm_ccnco2_number) 473 475 474 su bpdq(ig,l,igcm_co2_ice) =475 & su bpdq(ig,l,igcm_co2_ice)476 sum_subpdq(ig,l,igcm_co2_ice) = 477 & sum_subpdq(ig,l,igcm_co2_ice) 476 478 & + pdq(ig,l,igcm_co2_ice) 477 su bpdq(ig,l,igcm_co2) =478 & su bpdq(ig,l,igcm_co2)479 sum_subpdq(ig,l,igcm_co2) = 480 & sum_subpdq(ig,l,igcm_co2) 479 481 & + pdq(ig,l,igcm_co2) 480 482 481 su bpdq(ig,l,igcm_h2o_ice) =482 & su bpdq(ig,l,igcm_h2o_ice)483 sum_subpdq(ig,l,igcm_h2o_ice) = 484 & sum_subpdq(ig,l,igcm_h2o_ice) 483 485 & + pdq(ig,l,igcm_h2o_ice) 484 su bpdq(ig,l,igcm_ccn_mass) =485 & su bpdq(ig,l,igcm_ccn_mass)486 sum_subpdq(ig,l,igcm_ccn_mass) = 487 & sum_subpdq(ig,l,igcm_ccn_mass) 486 488 & + pdq(ig,l,igcm_ccn_mass) 487 su bpdq(ig,l,igcm_ccn_number) =488 & su bpdq(ig,l,igcm_ccn_number)489 sum_subpdq(ig,l,igcm_ccn_number) = 490 & sum_subpdq(ig,l,igcm_ccn_number) 489 491 & + pdq(ig,l,igcm_ccn_number) 490 492 ENDDO … … 507 509 c call to sedimentation routine, update tendancies 508 510 c------------------------------------------------------ 511 IF (sedimentation) THEN 512 509 513 DO l=1, nlay 510 514 DO ig=1,ngrid 511 tempo_traceur_t(ig,l)=zteff(ig,l)+subpdt(ig,l)512 & *microtimestep513 tempo_traceurs(ig,l,:)=pqeff(ig,l,:)514 & +su bpdq(ig,l,:)*microtimestep515 ztsed(ig,l)=pteff(ig,l) 516 & +sum_subpdt(ig,l)*microtimestep 517 zqsed(ig,l,:)=pqeff(ig,l,:) 518 & +sum_subpdq(ig,l,:)*microtimestep 515 519 rho_ice_co2T(ig,l)=1000.*(1.72391-2.53e-4* 516 & tempo_traceur_t(ig,l)-2.87e-6*517 & tempo_traceur_t(ig,l)*tempo_traceur_t(ig,l))520 & ztsed(ig,l)-2.87e-6* 521 & ztsed(ig,l)*ztsed(ig,l)) 518 522 519 523 rho_ice_co2=rho_ice_co2T(ig,l) 520 Niceco2=max( tempo_traceurs(ig,l,igcm_co2_ice),1.e-30)521 Nccnco2=max( tempo_traceurs(ig,l,igcm_ccnco2_number),524 Niceco2=max(zqsed(ig,l,igcm_co2_ice),1.e-30) 525 Nccnco2=max(zqsed(ig,l,igcm_ccnco2_number), 522 526 & 1.e-30) 523 Qccnco2=max( tempo_traceurs(ig,l,igcm_ccnco2_mass),527 Qccnco2=max(zqsed(ig,l,igcm_ccnco2_mass), 524 528 & 1.e-30) 525 529 call updaterice_microco2(Niceco2, … … 538 542 ENDDO 539 543 ! Gravitational sedimentation 540 sav_trac(:,:,igcm_co2_ice)=tempo_traceurs(:,:,igcm_co2_ice) 541 sav_trac(:,:,igcm_ccnco2_mass)= 542 & tempo_traceurs(:,:,igcm_ccnco2_mass) 543 sav_trac(:,:,igcm_ccnco2_number)= 544 & tempo_traceurs(:,:,igcm_ccnco2_number) 544 zqsed0(:,:,igcm_co2_ice)=zqsed(:,:,igcm_co2_ice) 545 zqsed0(:,:,igcm_ccnco2_mass)=zqsed(:,:,igcm_ccnco2_mass) 546 zqsed0(:,:,igcm_ccnco2_number)=zqsed(:,:,igcm_ccnco2_number) 545 547 !We save actualized tracer values to compute sedimentation tendancies 546 548 call newsedim(ngrid,nlay,ngrid*nlay,ngrid*nlay, 547 & microtimestep,pplev,masse,epaisseur, tempo_traceur_t,549 & microtimestep,pplev,masse,epaisseur,ztsed, 548 550 & rsedcloudco2,rhocloudco2t, 549 & tempo_traceurs(:,:,igcm_co2_ice),wq,beta) ! 3 traceurs551 & zqsed(:,:,igcm_co2_ice),wq,beta) ! 3 traceurs 550 552 ! sedim at the surface of co2 ice : keep track of it for physiq_mod 551 553 do ig=1,ngrid 552 pdqs_sedco2(ig)=pdqs_sedco2(ig)+ wq(ig,1)/microtimestep 554 sum_subpdqs_sedco2(ig)= 555 & sum_subpdqs_sedco2(ig)+ wq(ig,1)/microtimestep 553 556 end do 554 557 call newsedim(ngrid,nlay,ngrid*nlay,ngrid*nlay, 555 & microtimestep,pplev,masse,epaisseur, tempo_traceur_t,558 & microtimestep,pplev,masse,epaisseur,ztsed, 556 559 & rsedcloudco2,rhocloudco2t, 557 & tempo_traceurs(:,:,igcm_ccnco2_mass),wq,beta)560 & zqsed(:,:,igcm_ccnco2_mass),wq,beta) 558 561 call newsedim(ngrid,nlay,ngrid*nlay,ngrid*nlay, 559 & microtimestep,pplev,masse,epaisseur, tempo_traceur_t,562 & microtimestep,pplev,masse,epaisseur,ztsed, 560 563 & rsedcloudco2,rhocloudco2t, 561 & tempo_traceurs(:,:,igcm_ccnco2_number),wq,beta)564 & zqsed(:,:,igcm_ccnco2_number),wq,beta) 562 565 DO l = 1, nlay !Compute tendencies 563 566 DO ig=1,ngrid 564 pdqsed(ig,l,igcm_ccnco2_mass)=565 & ( tempo_traceurs(ig,l,igcm_ccnco2_mass)-566 & sav_trac(ig,l,igcm_ccnco2_mass))/microtimestep567 pdqsed(ig,l,igcm_ccnco2_number)=568 & ( tempo_traceurs(ig,l,igcm_ccnco2_number)-569 & sav_trac(ig,l,igcm_ccnco2_number))/microtimestep570 pdqsed(ig,l,igcm_co2_ice)=571 & ( tempo_traceurs(ig,l,igcm_co2_ice)-572 & sav_trac(ig,l,igcm_co2_ice))/microtimestep567 subpdqsed(ig,l,igcm_ccnco2_mass)= 568 & (zqsed(ig,l,igcm_ccnco2_mass)- 569 & zqsed0(ig,l,igcm_ccnco2_mass))/microtimestep 570 subpdqsed(ig,l,igcm_ccnco2_number)= 571 & (zqsed(ig,l,igcm_ccnco2_number)- 572 & zqsed0(ig,l,igcm_ccnco2_number))/microtimestep 573 subpdqsed(ig,l,igcm_co2_ice)= 574 & (zqsed(ig,l,igcm_co2_ice)- 575 & zqsed0(ig,l,igcm_co2_ice))/microtimestep 573 576 ENDDO 574 577 ENDDO … … 576 579 DO l=1,nlay 577 580 DO ig=1,ngrid 578 su bpdq(ig,l,igcm_ccnco2_mass) =579 & su bpdq(ig,l,igcm_ccnco2_mass)580 & + pdqsed(ig,l,igcm_ccnco2_mass)581 su bpdq(ig,l,igcm_ccnco2_number) =582 & su bpdq(ig,l,igcm_ccnco2_number)583 & + pdqsed(ig,l,igcm_ccnco2_number)584 su bpdq(ig,l,igcm_co2_ice) =585 & su bpdq(ig,l,igcm_co2_ice)586 & + pdqsed(ig,l,igcm_co2_ice)581 sum_subpdq(ig,l,igcm_ccnco2_mass) = 582 & sum_subpdq(ig,l,igcm_ccnco2_mass) 583 & +subpdqsed(ig,l,igcm_ccnco2_mass) 584 sum_subpdq(ig,l,igcm_ccnco2_number) = 585 & sum_subpdq(ig,l,igcm_ccnco2_number) 586 & +subpdqsed(ig,l,igcm_ccnco2_number) 587 sum_subpdq(ig,l,igcm_co2_ice) = 588 & sum_subpdq(ig,l,igcm_co2_ice) 589 & +subpdqsed(ig,l,igcm_co2_ice) 587 590 ENDDO 588 ENDDO 591 ENDDO 592 593 END IF !(end if sedimentation) 594 589 595 c------------------------------------------------------ 590 596 c 2. Main call to the cloud schemes: 591 597 c------------------------------------------------------ 592 598 CALL improvedCO2clouds(ngrid,nlay,microtimestep, 593 & pplay,pplev, zteff,subpdt,594 & pqeff,su bpdq,subpdqcloudco2,subpdtcloudco2,599 & pplay,pplev,pteff,sum_subpdt, 600 & pqeff,sum_subpdq,subpdqcloudco2,subpdtcloudco2, 595 601 & nq,tauscaling,memdMMccn,memdMMh2o,memdNNccn) 596 602 c----------------------------------------------------- … … 599 605 DO l=1,nlay 600 606 DO ig=1,ngrid 601 su bpdt(ig,l) =602 & su bpdt(ig,l) + subpdtcloudco2(ig,l)603 604 su bpdq(ig,l,igcm_dust_mass) =605 & su bpdq(ig,l,igcm_dust_mass)607 sum_subpdt(ig,l) = 608 & sum_subpdt(ig,l) + subpdtcloudco2(ig,l) 609 610 sum_subpdq(ig,l,igcm_dust_mass) = 611 & sum_subpdq(ig,l,igcm_dust_mass) 606 612 & + subpdqcloudco2(ig,l,igcm_dust_mass) 607 su bpdq(ig,l,igcm_dust_number) =608 & su bpdq(ig,l,igcm_dust_number)613 sum_subpdq(ig,l,igcm_dust_number) = 614 & sum_subpdq(ig,l,igcm_dust_number) 609 615 & + subpdqcloudco2(ig,l,igcm_dust_number) 610 616 611 su bpdq(ig,l,igcm_ccnco2_mass) =612 & su bpdq(ig,l,igcm_ccnco2_mass)617 sum_subpdq(ig,l,igcm_ccnco2_mass) = 618 & sum_subpdq(ig,l,igcm_ccnco2_mass) 613 619 & + subpdqcloudco2(ig,l,igcm_ccnco2_mass) 614 su bpdq(ig,l,igcm_ccnco2_number) =615 & su bpdq(ig,l,igcm_ccnco2_number)620 sum_subpdq(ig,l,igcm_ccnco2_number) = 621 & sum_subpdq(ig,l,igcm_ccnco2_number) 616 622 & + subpdqcloudco2(ig,l,igcm_ccnco2_number) 617 623 618 su bpdq(ig,l,igcm_co2_ice) =619 & su bpdq(ig,l,igcm_co2_ice)624 sum_subpdq(ig,l,igcm_co2_ice) = 625 & sum_subpdq(ig,l,igcm_co2_ice) 620 626 & + subpdqcloudco2(ig,l,igcm_co2_ice) 621 su bpdq(ig,l,igcm_co2) =622 & su bpdq(ig,l,igcm_co2)627 sum_subpdq(ig,l,igcm_co2) = 628 & sum_subpdq(ig,l,igcm_co2) 623 629 & + subpdqcloudco2(ig,l,igcm_co2) 624 630 625 su bpdq(ig,l,igcm_h2o_ice) =626 & su bpdq(ig,l,igcm_h2o_ice)631 sum_subpdq(ig,l,igcm_h2o_ice) = 632 & sum_subpdq(ig,l,igcm_h2o_ice) 627 633 & + subpdqcloudco2(ig,l,igcm_h2o_ice) 628 su bpdq(ig,l,igcm_ccn_mass) =629 & su bpdq(ig,l,igcm_ccn_mass)634 sum_subpdq(ig,l,igcm_ccn_mass) = 635 & sum_subpdq(ig,l,igcm_ccn_mass) 630 636 & + subpdqcloudco2(ig,l,igcm_ccn_mass) 631 su bpdq(ig,l,igcm_ccn_number) =632 & su bpdq(ig,l,igcm_ccn_number)637 sum_subpdq(ig,l,igcm_ccn_number) = 638 & sum_subpdq(ig,l,igcm_ccn_number) 633 639 & + subpdqcloudco2(ig,l,igcm_ccn_number) 634 640 ENDDO … … 641 647 c CO2 flux at surface (kg.m-2.s-1) 642 648 do ig=1,ngrid 643 pdqs_sedco2(ig)= pdqs_sedco2(ig)/real(imicroco2)649 pdqs_sedco2(ig)=sum_subpdqs_sedco2(ig)/real(imicroco2) 644 650 enddo 645 651 c------ Temperature tendency pdtcloud … … 647 653 DO ig=1,ngrid 648 654 pdtcloudco2(ig,l) = 649 & su bpdt(ig,l)/real(imicroco2)-pdt(ig,l)655 & sum_subpdt(ig,l)/real(imicroco2)-pdt(ig,l) 650 656 ENDDO 651 657 ENDDO … … 654 660 DO ig=1,ngrid 655 661 pdqcloudco2(ig,l,igcm_co2_ice) = 656 & su bpdq(ig,l,igcm_co2_ice)/real(imicroco2)662 & sum_subpdq(ig,l,igcm_co2_ice)/real(imicroco2) 657 663 & - pdq(ig,l,igcm_co2_ice) 658 664 pdqcloudco2(ig,l,igcm_co2) = 659 & su bpdq(ig,l,igcm_co2)/real(imicroco2)665 & sum_subpdq(ig,l,igcm_co2)/real(imicroco2) 660 666 & - pdq(ig,l,igcm_co2) 661 667 pdqcloudco2(ig,l,igcm_h2o_ice) = 662 & su bpdq(ig,l,igcm_h2o_ice)/real(imicroco2)668 & sum_subpdq(ig,l,igcm_h2o_ice)/real(imicroco2) 663 669 & - pdq(ig,l,igcm_h2o_ice) 664 670 ENDDO … … 667 673 DO ig=1,ngrid 668 674 pdqcloudco2(ig,l,igcm_ccnco2_mass) = 669 & su bpdq(ig,l,igcm_ccnco2_mass)/real(imicroco2)675 & sum_subpdq(ig,l,igcm_ccnco2_mass)/real(imicroco2) 670 676 & - pdq(ig,l,igcm_ccnco2_mass) 671 677 pdqcloudco2(ig,l,igcm_ccnco2_number) = 672 & su bpdq(ig,l,igcm_ccnco2_number)/real(imicroco2)678 & sum_subpdq(ig,l,igcm_ccnco2_number)/real(imicroco2) 673 679 & - pdq(ig,l,igcm_ccnco2_number) 674 680 pdqcloudco2(ig,l,igcm_ccn_mass) = 675 & su bpdq(ig,l,igcm_ccn_mass)/real(imicroco2)681 & sum_subpdq(ig,l,igcm_ccn_mass)/real(imicroco2) 676 682 & - pdq(ig,l,igcm_ccn_mass) 677 683 pdqcloudco2(ig,l,igcm_ccn_number) = 678 & su bpdq(ig,l,igcm_ccn_number)/real(imicroco2)684 & sum_subpdq(ig,l,igcm_ccn_number)/real(imicroco2) 679 685 & - pdq(ig,l,igcm_ccn_number) 680 686 ENDDO … … 683 689 DO ig=1,ngrid 684 690 pdqcloudco2(ig,l,igcm_dust_mass) = 685 & su bpdq(ig,l,igcm_dust_mass)/real(imicroco2)691 & sum_subpdq(ig,l,igcm_dust_mass)/real(imicroco2) 686 692 & - pdq(ig,l,igcm_dust_mass) 687 693 pdqcloudco2(ig,l,igcm_dust_number) = 688 & su bpdq(ig,l,igcm_dust_number)/real(imicroco2)694 & sum_subpdq(ig,l,igcm_dust_number)/real(imicroco2) 689 695 & - pdq(ig,l,igcm_dust_number) 690 696 ENDDO … … 776 782 & ,1.e-30) 777 783 778 myT= zteff(ig,l)+(pdt(ig,l)+pdtcloudco2(ig,l))*ptimestep784 myT=pteff(ig,l)+(pdt(ig,l)+pdtcloudco2(ig,l))*ptimestep 779 785 rho_ice_co2T(ig,l)=1000.*(1.72391-2.53e-4* 780 786 & myT-2.87e-6* myT* myT) … … 859 865 ENDDO 860 866 861 call co2sat(ngrid*nlay, zteff+(pdt+pdtcloudco2)*ptimestep867 call co2sat(ngrid*nlay,pteff+(pdt+pdtcloudco2)*ptimestep 862 868 & ,pplay,zqsatco2) 863 869 do l=1,nlay -
trunk/LMDZ.MARS/libf/phymars/improvedCO2clouds.F
r1884 r1911 1 subroutine improvedCO2clouds(ngrid,nlay, ptimestep,2 & pplay,pplev,pt ,pdt,3 & pq ,pdq,pdqcloudco2,pdtcloudco2,1 subroutine improvedCO2clouds(ngrid,nlay,microtimestep, 2 & pplay,pplev,pteff,sum_subpdt, 3 & pqeff,sum_subpdq,subpdqcloudco2,subpdtcloudco2, 4 4 & nq,tauscaling, 5 5 & memdMMccn,memdMMh2o,memdNNccn) … … 61 61 INTEGER,INTENT(in) :: ngrid,nlay 62 62 integer,intent(in) :: nq ! number of tracers 63 REAL,INTENT(in) :: ptimestep ! physics time step (s)63 REAL,INTENT(in) :: microtimestep ! physics time step (s) 64 64 REAL,INTENT(in) :: pplay(ngrid,nlay) ! mid-layer pressure (Pa) 65 65 REAL,INTENT(in) :: pplev(ngrid,nlay+1) ! inter-layer pressure (Pa) 66 REAL,INTENT(in) :: pt (ngrid,nlay) ! temperature at the middle of the66 REAL,INTENT(in) :: pteff(ngrid,nlay) ! temperature at the middle of the 67 67 ! layers (K) 68 REAL,INTENT(in) :: pdt(ngrid,nlay) ! tendency on temperature from68 REAL,INTENT(in) :: sum_subpdt(ngrid,nlay) ! tendency on temperature from 69 69 ! previous physical parametrizations 70 REAL,INTENT(in) :: pq (ngrid,nlay,nq) ! tracers (kg/kg)71 REAL,INTENT(in) :: pdq(ngrid,nlay,nq) ! tendencies on tracers70 REAL,INTENT(in) :: pqeff(ngrid,nlay,nq) ! tracers (kg/kg) 71 REAL,INTENT(in) :: sum_subpdq(ngrid,nlay,nq) ! tendencies on tracers 72 72 ! before condensation (kg/kg.s-1) 73 73 REAL,INTENT(in) :: tauscaling(ngrid) ! Convertion factor for qdust and Ndust 74 74 c Outputs: 75 REAL,INTENT(out) :: pdqcloudco2(ngrid,nlay,nq) ! tendency on tracers75 REAL,INTENT(out) :: subpdqcloudco2(ngrid,nlay,nq) ! tendency on tracers 76 76 ! due to CO2 condensation (kg/kg.s-1) 77 77 ! condensation si igcm_co2_ice 78 REAL,INTENT(out) :: pdtcloudco2(ngrid,nlay) ! tendency on temperature due78 REAL,INTENT(out) :: subpdtcloudco2(ngrid,nlay) ! tendency on temperature due 79 79 ! to latent heat 80 80 … … 302 302 303 303 c Initialize the tendencies 304 pdqcloudco2(1:ngrid,1:nlay,1:nq)=0.305 pdtcloudco2(1:ngrid,1:nlay)=0.306 307 c pt temperature layer;pdt dT.s-1308 c pq traceur kg/kg;pdq tendance idem .s-1304 subpdqcloudco2(1:ngrid,1:nlay,1:nq)=0. 305 subpdtcloudco2(1:ngrid,1:nlay)=0. 306 307 c pteff temperature layer; sum_subpdt dT.s-1 308 c pqeff traceur kg/kg; sum_subpdq tendance idem .s-1 309 309 zt(1:ngrid,1:nlay) = 310 & pt (1:ngrid,1:nlay) +311 & pdt(1:ngrid,1:nlay) * ptimestep310 & pteff(1:ngrid,1:nlay) + 311 & sum_subpdt(1:ngrid,1:nlay) * microtimestep 312 312 zq(1:ngrid,1:nlay,1:nq) = 313 & pq (1:ngrid,1:nlay,1:nq) +314 & pdq(1:ngrid,1:nlay,1:nq) * ptimestep313 & pqeff(1:ngrid,1:nlay,1:nq) + 314 & sum_subpdq(1:ngrid,1:nlay,1:nq) * microtimestep 315 315 WHERE( zq(1:ngrid,1:nlay,1:nq) < 1.e-30 ) 316 316 & zq(1:ngrid,1:nlay,1:nq) = 1.e-30 … … 443 443 dMh2o = 0. 444 444 do i = 1, nbinco2_cld 445 Proba=1.0-dexp(-1.*ptimestep*rate(i)) 446 Probah2o=coeffh2o*(1.0-dexp(-1.*ptimestep*rateh2o(i))) !if co2useh2o=.false., this is =0 445 Proba=1.0-dexp(-1.*microtimestep*rate(i)) 446 Probah2o=coeffh2o* 447 & (1.0-dexp(-1.*microtimestep*rateh2o(i))) !if co2useh2o=.false., this is =0 447 448 dNh2o = dNh2o + n_aer_h2oice(i) * Probah2o 448 449 dMh2o = dMh2o + m_aer_h2oice(i) * Probah2o … … 517 518 Ic_rice=0. 518 519 flag_pourri=1 519 pdtcloudco2(ig,l)=-pdt(ig,l)520 subpdtcloudco2(ig,l)=-sum_subpdt(ig,l) 520 521 dMice=0 521 522 522 523 else 523 dMice=zq(ig,l,igcm_ccnco2_number)*Ic_rice* ptimestep524 dMice=zq(ig,l,igcm_ccnco2_number)*Ic_rice*microtimestep 524 525 & *tauscaling(ig) ! Kg par kg d'air, >0 si croissance ! 525 526 !kg.s-1 par particule * nb particule par kg air*s … … 530 531 !facteurmax maximum quantity of CO2 that can sublime/condense according to available thermal energy 531 532 ! latent heat release >0 if growth i.e. if dMice >0 532 pdtcloudco2(ig,l)=dMice*lw/cpp/ptimestep533 subpdtcloudco2(ig,l)=dMice*lw/cpp/microtimestep 533 534 ! kgco2/kgair* J/kgco2 * 1/(J.kgair-1.K-1)/s= K par seconde 534 535 !Now update tracers … … 588 589 589 590 ! Get cloud tendencies 590 pdqcloudco2(1:ngrid,1:nlay,igcm_co2) =591 subpdqcloudco2(1:ngrid,1:nlay,igcm_co2) = 591 592 & (zq(1:ngrid,1:nlay,igcm_co2) - 592 & zq0(1:ngrid,1:nlay,igcm_co2))/ ptimestep593 pdqcloudco2(1:ngrid,1:nlay,igcm_co2_ice) =593 & zq0(1:ngrid,1:nlay,igcm_co2))/microtimestep 594 subpdqcloudco2(1:ngrid,1:nlay,igcm_co2_ice) = 594 595 & (zq(1:ngrid,1:nlay,igcm_co2_ice) - 595 & zq0(1:ngrid,1:nlay,igcm_co2_ice))/ ptimestep596 pdqcloudco2(1:ngrid,1:nlay,igcm_h2o_ice) =596 & zq0(1:ngrid,1:nlay,igcm_co2_ice))/microtimestep 597 subpdqcloudco2(1:ngrid,1:nlay,igcm_h2o_ice) = 597 598 & (zq(1:ngrid,1:nlay,igcm_h2o_ice) - 598 & zq0(1:ngrid,1:nlay,igcm_h2o_ice))/ ptimestep599 pdqcloudco2(1:ngrid,1:nlay,igcm_ccn_mass) =599 & zq0(1:ngrid,1:nlay,igcm_h2o_ice))/microtimestep 600 subpdqcloudco2(1:ngrid,1:nlay,igcm_ccn_mass) = 600 601 & (zq(1:ngrid,1:nlay,igcm_ccn_mass) - 601 & zq0(1:ngrid,1:nlay,igcm_ccn_mass))/ ptimestep602 pdqcloudco2(1:ngrid,1:nlay,igcm_ccn_number) =602 & zq0(1:ngrid,1:nlay,igcm_ccn_mass))/microtimestep 603 subpdqcloudco2(1:ngrid,1:nlay,igcm_ccn_number) = 603 604 & (zq(1:ngrid,1:nlay,igcm_ccn_number) - 604 & zq0(1:ngrid,1:nlay,igcm_ccn_number))/ ptimestep605 pdqcloudco2(1:ngrid,1:nlay,igcm_ccnco2_mass) =605 & zq0(1:ngrid,1:nlay,igcm_ccn_number))/microtimestep 606 subpdqcloudco2(1:ngrid,1:nlay,igcm_ccnco2_mass) = 606 607 & (zq(1:ngrid,1:nlay,igcm_ccnco2_mass) - 607 & zq0(1:ngrid,1:nlay,igcm_ccnco2_mass))/ ptimestep608 pdqcloudco2(1:ngrid,1:nlay,igcm_ccnco2_number) =608 & zq0(1:ngrid,1:nlay,igcm_ccnco2_mass))/microtimestep 609 subpdqcloudco2(1:ngrid,1:nlay,igcm_ccnco2_number) = 609 610 & (zq(1:ngrid,1:nlay,igcm_ccnco2_number) - 610 & zq0(1:ngrid,1:nlay,igcm_ccnco2_number))/ ptimestep611 pdqcloudco2(1:ngrid,1:nlay,igcm_dust_mass) =611 & zq0(1:ngrid,1:nlay,igcm_ccnco2_number))/microtimestep 612 subpdqcloudco2(1:ngrid,1:nlay,igcm_dust_mass) = 612 613 & (zq(1:ngrid,1:nlay,igcm_dust_mass) - 613 & zq0(1:ngrid,1:nlay,igcm_dust_mass))/ ptimestep614 pdqcloudco2(1:ngrid,1:nlay,igcm_dust_number) =614 & zq0(1:ngrid,1:nlay,igcm_dust_mass))/microtimestep 615 subpdqcloudco2(1:ngrid,1:nlay,igcm_dust_number) = 615 616 & (zq(1:ngrid,1:nlay,igcm_dust_number) - 616 & zq0(1:ngrid,1:nlay,igcm_dust_number))/ ptimestep617 & zq0(1:ngrid,1:nlay,igcm_dust_number))/microtimestep 617 618 618 619 end
Note: See TracChangeset
for help on using the changeset viewer.