Changeset 1974 for trunk/LMDZ.MARS/libf
- Timestamp:
- Jul 18, 2018, 4:48:34 PM (6 years ago)
- Location:
- trunk/LMDZ.MARS/libf
- Files:
-
- 5 added
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/datareadnc.F
r1918 r1974 1 1 c======================================================================= 2 2 SUBROUTINE datareadnc(relief,phisinit,alb,ith,z0, 3 & zmea,zstd,zsig,zgam,zthe) 3 & zmea,zstd,zsig,zgam,zthe, 4 & hmons,summit,zavg) 4 5 c======================================================================= 5 6 c … … 42 43 c======================================================================= 43 44 44 use ioipsl_getincom, only: getin 45 USE comconst_mod, ONLY: g,pi 45 ! to use 'getin' 46 use ioipsl_getincom, only: getin 47 use comconst_mod, only: g,pi 46 48 use datafile_mod, only: datadir 49 use avg_horiz_mod, only: avg_horiz 50 use mvc_horiz_mod, only: mvc_horiz 47 51 48 52 implicit none … … 74 78 REAL,intent(out) :: zgam(imdp1*jmdp1) 75 79 REAL,intent(out) :: zthe(imdp1*jmdp1) 76 80 REAL,intent(out) :: hmons(imdp1*jmdp1) !CW17,361*180 hmons 81 REAL,intent(out) :: summit(imdp1*jmdp1) !CW17,361*180 hmons 82 REAL,intent(out) :: zavg(imdp1*jmdp1) !CW17,361*180 hmons 83 77 84 ! Local variables: 78 85 REAL zdata(imd*jmdp1) … … 95 102 96 103 CHARACTER*20 string 97 DIMENSION string(0: 4)104 DIMENSION string(0:6) 98 105 99 106 … … 233 240 call grid_noro1(360, 180, longitude, latitude, zdata, 234 241 . iim, jjp1, rlonv, rlatu, zmea,zstd,zsig,zgam,zthe) 242 243 !CW17 244 call avg_horiz(imd,jmdp1,iim,jjm,longitude, 245 . latitude,rlonv,rlatu,zdata,pfield) 246 247 do j=1,jjp1 !CW17 49, iimp1=65, the last column = first column 248 pfield(iimp1*j) = pfield(1+iimp1*(j-1)) 249 enddo 250 do i=1,iimp1*jjp1 251 c if (pfield(i) .ne. -999999.) then 252 zavg(i) = pfield(i) 253 c else 254 c zavg(i)=-999999. 255 c endif 256 enddo 235 257 236 258 endif … … 297 319 c FIN 298 320 c----------------------------------------------------------------------- 299 321 322 c======================================================================= 323 c<<<<<<<<<<<<<<<<<<<<<<<add new dataset>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 324 ! name of dataset 325 string(5) = 'hmons' !subgrid hmons 326 c the following data could be useful in future, but currently, 327 c we don't need to put them into restartfi.nc 328 string(6) = 'summit' !subgrid summit 329 c string(7) = 'base' !base of summit (not subgrid) 330 c string(8) = 'bottom' !subgrid base 331 do k=5,6 332 write(*,*) 'string',k,string(k) 333 c----------------------------------------------------------------------- 334 c Lecture NetCDF 335 c----------------------------------------------------------------------- 336 337 ierr = NF_INQ_VARID (unit, string(k), nvarid) 338 if (ierr.ne.nf_noerr) then 339 write(*,*) 'datareadnc error, cannot find ',trim(string(k)) 340 write(*,*) ' in file ',trim(datadir),'/surface.nc' 341 stop 342 endif 343 344 c----------------------------------------------------------------------- 345 c initialisation 346 c----------------------------------------------------------------------- 347 call initial0(iimp1*jjp1,pfield) 348 call initial0(imd*jmdp1,zdata) 349 call initial0(imdp1*jmdp1,zdataS) 350 351 #ifdef NC_DOUBLE 352 ierr = NF_GET_VAR_DOUBLE(unit, nvarid, zdata) 353 #else 354 ierr = NF_GET_VAR_REAL(unit, nvarid, zdata) 355 #endif 356 if (ierr.ne.nf_noerr) then 357 write(*,*) 'datareadnc: error failed loading ', 358 . trim(string(k)) 359 stop 360 endif 361 362 c----------------------------------------------------------------------- 363 c Passage de zdata en grille (imdp1 jmdp1) 364 c----------------------------------------------------------------------- 365 do j=1,jmdp1 ! 180 366 do i=1,imd ! 360 367 !copy zdata to zdataS, line by line 368 ! i+ 361 *(j-1) i+ 360*(j-1) 369 zdataS(i+imdp1*(j-1)) = zdata(i+ngridmxgdat*(j-1)) 370 enddo 371 ! the last column = the first column of zdata 372 zdataS(imdp1+imdp1*(j-1)) = zdata(1+ngridmxgdat*(j-1)) 373 enddo 374 375 if (k .eq. 5 .or. k .eq. 6) then 376 ! hmons, summit, keep the maximum of subgrids 377 call mvc_horiz(imd,jmdp1,iim,jjm,longitude, 378 . latitude,rlonv,rlatu,zdata,pfield) 379 endif 380 381 382 c----------------------------------------------------------------------- 383 c Periodicite 384 c----------------------------------------------------------------------- 385 386 do j=1,jjp1 ! 49, iimp1=65, the last column = first column 387 pfield(iimp1*j) = pfield(1+iimp1*(j-1)) 388 enddo 389 390 c----------------------------------------------------------------------- 391 c Sauvegarde des champs 392 c----------------------------------------------------------------------- 393 394 if (k.eq.5) then ! hmons 395 do i=1,iimp1*jjp1 396 if (pfield(i) .ne. -999999.) then 397 hmons(i) = pfield(i) 398 else 399 hmons(i)=0. 400 endif 401 enddo 402 endif 403 404 if (k.eq.6) then ! summit 405 do i=1,iimp1*jjp1 406 summit(i) = pfield(i) 407 enddo 408 endif 409 410 enddo 411 c<<<<<<<<<<<<<<<<<<<<<<<<<done add new dataset>>>>>>>>>>>>>>>>>>>>>>>>>> 412 c======================================================================= 300 413 END -
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/newstart.F
r1944 r1974 27 27 use surfdat_h, only: phisfi, z0, zmea, zstd, zsig, zgam, zthe, 28 28 & albedodat, z0_default, qsurf, tsurf, 29 & co2ice, emis 29 & co2ice, emis, hmons 30 30 use comsoil_h, only: inertiedat, layer, mlayer, nsoilmx, tsoil 31 31 use control_mod, only: day_step, iphysiq, anneeref, planet_type … … 97 97 real zmeaS(iip1,jjp1),zstdS(iip1,jjp1) 98 98 real zsigS(iip1,jjp1),zgamS(iip1,jjp1),ztheS(iip1,jjp1) 99 real hmonsS(iip1,jjp1) 100 real summitS(iip1,jjp1) 101 real zavgS(iip1,jjp1) 99 102 real z0S(iip1,jjp1) 100 103 … … 380 383 381 384 CALL datareadnc(relief,phis,alb,surfith,z0S, 382 & zmeaS,zstdS,zsigS,zgamS,ztheS) 385 & zmeaS,zstdS,zsigS,zgamS,ztheS, 386 & hmonsS,summitS,zavgS) 383 387 384 388 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,phis,phisfi) … … 392 396 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,zgamS,zgam) 393 397 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,ztheS,zthe) 398 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,hmonsS,hmons) 399 ! CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,summitS,summit) 400 ! CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,zavgS,zavg) 394 401 395 402 endif ! of if (choix_1.ne.1) … … 1642 1649 call physdem0("restartfi.nc",lonfi,latfi,nsoilmx,ngridmx,llm, 1643 1650 . nqtot,dtphys,real(day_ini),0.0, 1644 . airefi,albfi,ithfi,zmea,zstd,zsig,zgam,zthe) 1651 . airefi,albfi,ithfi,zmea,zstd,zsig,zgam,zthe, 1652 . hmons) 1645 1653 call physdem1("restartfi.nc",nsoilmx,ngridmx,llm,nqtot, 1646 1654 & dtphys,hour_ini, -
trunk/LMDZ.MARS/libf/phymars/aeropacity_mod.F
r1861 r1974 7 7 SUBROUTINE aeropacity(ngrid,nlayer,nq,zday,pplay,pplev,ls, 8 8 & pq,tauscaling,tauref,tau,taucloudtes,aerosol,dsodust,reffrad, 9 & nueffrad,QREFvis3d,QREFir3d,omegaREFvis3d,omegaREFir3d, 9 & QREFvis3d,QREFir3d,omegaREFir3d, 10 & totstormfract,clearatm,dsords, 10 11 & clearsky,totcloudfrac) 11 12 12 13 ! to use 'getin' 13 14 USE ioipsl_getincom, only: getin 14 15 use tracer_mod, only: noms, igcm_h2o_ice, igcm_dust_mass, 15 16 & igcm_dust_submicron, rho_dust, rho_ice, 16 & nqdust 17 & nqdust, igcm_stormdust_mass 17 18 use geometry_mod, only: latitude ! grid point latitudes (rad) 18 19 use comgeomfi_h, only: sinlat ! sines of grid point latitudes … … 26 27 & iaerdust,tauvis, 27 28 & iaer_dust_conrath,iaer_dust_doubleq, 28 & iaer_dust_submicron,iaer_h2o_ice 29 & iaer_dust_submicron,iaer_h2o_ice, 30 & iaer_stormdust_doubleq 31 USE calcstormfract_mod 29 32 IMPLICIT NONE 30 33 c======================================================================= … … 56 59 c QREFvis3d(ngrid,nlayer,naerkind) \ 3d extinction coefficients 57 60 c QREFir3d(ngrid,nlayer,naerkind) / at reference wavelengths; 58 c omegaREFvis3d(ngrid,nlayer,naerkind) \ 3d single scat. albedo59 61 c omegaREFir3d(ngrid,nlayer,naerkind) / at reference wavelengths; 60 62 c … … 65 67 c aerosol aerosol(ig,l,1) is the dust optical 66 68 c depth in layer l, grid point ig 67 69 c taualldust CW17 total opacity for all dust scatterer stormdust included 68 70 c 69 71 c======================================================================= 70 #include "callkeys.h"72 include "callkeys.h" 71 73 72 74 c----------------------------------------------------------------------- … … 77 79 c Input/Output 78 80 c ------------ 79 INTEGER ngrid,nlayer,nq80 81 REAL ls,zday,expfactor82 REAL pplev(ngrid,nlayer+1),pplay(ngrid,nlayer)83 REAL pq(ngrid,nlayer,nq)84 REAL tauref(ngrid),tau(ngrid,naerkind)85 REAL aerosol(ngrid,nlayer,naerkind)86 REAL dsodust(ngrid,nlayer)87 REAL reffrad(ngrid,nlayer,naerkind)88 REAL nueffrad(ngrid,nlayer,naerkind)89 REAL QREFvis3d(ngrid,nlayer,naerkind)90 REAL QREFir3d(ngrid,nlayer,naerkind)91 REAL omegaREFvis3d(ngrid,nlayer,naerkind)92 REAL omegaREFir3d(ngrid,nlayer,naerkind)93 real,intent(in) :: totcloudfrac(ngrid) ! total cloud fraction94 logical,intent(in) :: clearsky ! true for part without clouds,95 ! false for part with clouds (total or sub-grid clouds)96 real :: CLFtot ! total cloud fraction81 INTEGER, INTENT(IN) :: ngrid,nlayer,nq 82 REAL, INTENT(IN) :: ls,zday 83 REAL, INTENT(IN) :: pplev(ngrid,nlayer+1),pplay(ngrid,nlayer) 84 REAL, INTENT(IN) :: pq(ngrid,nlayer,nq) 85 REAL, INTENT(OUT) :: tauref(ngrid) 86 REAL, INTENT(OUT) :: tau(ngrid,naerkind) 87 REAL, INTENT(OUT) :: aerosol(ngrid,nlayer,naerkind) 88 REAL, INTENT(OUT) :: dsodust(ngrid,nlayer) 89 REAL, INTENT(OUT) :: dsords(ngrid,nlayer) !dso of stormdust 90 REAL, INTENT(INOUT) :: reffrad(ngrid,nlayer,naerkind) 91 REAL, INTENT(IN) :: QREFvis3d(ngrid,nlayer,naerkind) 92 REAL, INTENT(IN) :: QREFir3d(ngrid,nlayer,naerkind) 93 REAL, INTENT(IN) :: omegaREFir3d(ngrid,nlayer,naerkind) 94 LOGICAL, INTENT(IN) :: clearatm 95 REAL, INTENT(IN) :: totstormfract(ngrid) 96 REAL, INTENT(OUT) :: tauscaling(ngrid) ! Scaling factor for qdust and Ndust 97 REAL,INTENT(IN) :: totcloudfrac(ngrid) ! total cloud fraction 98 LOGICAL,INTENT(IN) :: clearsky ! true for part without clouds,false for part with clouds (total or sub-grid clouds) 97 99 c 98 100 c Local variables : 99 101 c ----------------- 102 REAL CLFtot ! total cloud fraction 103 real expfactor 100 104 INTEGER l,ig,iq,i,j 101 105 INTEGER iaer ! Aerosol index … … 110 114 c for dust or water ice particles in the radiative transfer 111 115 c (see callradite.F for more information). 112 REAL taudusttmp(ngrid)! Temporary dust opacity 113 ! used before scaling 114 REAL tauscaling(ngrid) ! Scaling factor for qdust and Ndust 116 REAL taudusttmp(ngrid)! Temporary dust opacity used before scaling 117 REAL taubackdusttmp(ngrid)! Temporary background dust opacity used before scaling 118 REAL taualldust(ngrid)! dust opacity all dust 119 REAL taudust(ngrid)! dust opacity dust doubleq 120 REAL taustormdust(ngrid)! dust opacity stormdust doubleq 121 REAL taustormdusttmp(ngrid)! dust opacity stormdust doubleq before tauscaling 115 122 REAL taudustvis(ngrid) ! Dust opacity after scaling 116 123 REAL taudusttes(ngrid) ! Dust opacity at IR ref. wav. as … … 157 164 158 165 tau(1:ngrid,1:naerkind)=0 166 dsords(:,:)=0. !CW17: initialize dsords 167 dsodust(:,:)=0. 159 168 160 169 ! identify tracers … … 166 175 DO iaer=1,naerkind 167 176 txt=name_iaer(iaer) 168 IF (txt(1:4).eq."dust") THEN 177 ! CW17: choice tauscaling for stormdust or not 178 IF ((txt(1:4).eq."dust").OR.(txt(1:5).eq."storm")) THEN 169 179 naerdust=naerdust+1 170 180 iaerdust(naerdust)=iaer … … 213 223 call getin("tauvis",tauvis) 214 224 215 IF (freedust ) THEN225 IF (freedust.or.rdstorm) THEN ! if rdstorm no need to held opacity constant at the first levels 216 226 cstdustlevel = 1 217 227 ELSE 218 cstdustlevel = cstdustlevel0 228 cstdustlevel = cstdustlevel0 !Opacity in the first levels is held constant to 229 !avoid unrealistic values due to constant lifting 219 230 ENDIF 220 231 … … 374 385 & ( pplev(ig,l) - pplev(ig,l+1) ) / g 375 386 ! DENSITY SCALED OPACITY IN INFRARED: 376 dsodust(ig,l) =377 & ( 0.75 * QREFir3d(ig,cstdustlevel,iaer) /378 & ( rho_dust * reffrad(ig,cstdustlevel,iaer) ) ) *379 & pq(ig,cstdustlevel,igcm_dust_mass)387 ! dsodust(ig,l) = 388 ! & ( 0.75 * QREFir3d(ig,cstdustlevel,iaer) / 389 ! & ( rho_dust * reffrad(ig,cstdustlevel,iaer) ) ) * 390 ! & pq(ig,cstdustlevel,igcm_dust_mass) 380 391 ENDDO 381 392 ELSE … … 387 398 & ( pplev(ig,l) - pplev(ig,l+1) ) / g 388 399 ! DENSITY SCALED OPACITY IN INFRARED: 389 dsodust(ig,l) =390 & ( 0.75 * QREFir3d(ig,l,iaer) /391 & ( rho_dust * reffrad(ig,l,iaer) ) ) *392 & pq(ig,l,igcm_dust_mass)400 ! dsodust(ig,l) = 401 ! & ( 0.75 * QREFir3d(ig,l,iaer) / 402 ! & ( rho_dust * reffrad(ig,l,iaer) ) ) * 403 ! & pq(ig,l,igcm_dust_mass) 393 404 ENDDO 394 405 ENDIF … … 473 484 ENDIF ! end (clearsky) 474 485 475 c 3. Outputs -- Now done in physiq.F 476 ! IF (ngrid.NE.1) THEN 477 ! CALL WRITEDIAGFI(ngrid,'tauVIS','tauext VIS refwvl', 478 ! & ' ',2,taucloudvis) 479 ! CALL WRITEDIAGFI(ngrid,'tauTES','tauabs IR refwvl', 480 ! & ' ',2,taucloudtes) 481 ! IF (callstats) THEN 482 ! CALL wstats(ngrid,'tauVIS','tauext VIS refwvl', 483 ! & ' ',2,taucloudvis) 484 ! CALL wstats(ngrid,'tauTES','tauabs IR refwvl', 485 ! & ' ',2,taucloudtes) 486 ! ENDIF 487 ! ELSE 488 ! CALL writeg1d(ngrid,1,taucloudtes,'tautes','NU') 489 ! ENDIF 486 c================================================================== 487 CASE("stormdust_doubleq") aerkind ! CW17 : Two-moment scheme for 488 c stormdust (transport of mass and number mixing ratio) 489 c================================================================== 490 c aerosol is calculated twice : once within the dust storm (clearatm=false) 491 c and once in the part of the mesh without dust storm (clearatm=true) 492 aerosol(1:ngrid,1:nlayer,iaer) = 0. 493 IF (clearatm) THEN ! considering part of the mesh without storm 494 aerosol(1:ngrid,1:nlayer,iaer)=1.e-25 495 ELSE ! part of the mesh with concentred dust storm 496 DO l=1,nlayer 497 IF (l.LE.cstdustlevel) THEN 498 c Opacity in the first levels is held constant to 499 c avoid unrealistic values due to constant lifting: 500 DO ig=1,ngrid 501 aerosol(ig,l,iaer) = 502 & ( 0.75 * QREFvis3d(ig,cstdustlevel,iaer) / 503 & ( rho_dust * reffrad(ig,cstdustlevel,iaer) ) ) * 504 & pq(ig,cstdustlevel,igcm_stormdust_mass) * 505 & ( pplev(ig,l) - pplev(ig,l+1) ) / g 506 ENDDO 507 ELSE 508 DO ig=1,ngrid 509 aerosol(ig,l,iaer) = 510 & ( 0.75 * QREFvis3d(ig,l,iaer) / 511 & ( rho_dust * reffrad(ig,l,iaer) ) ) * 512 & pq(ig,l,igcm_stormdust_mass) * 513 & ( pplev(ig,l) - pplev(ig,l+1) ) / g 514 ENDDO 515 ENDIF 516 ENDDO 517 ENDIF 490 518 c================================================================== 491 519 END SELECT aerkind … … 498 526 c is originally scaled to an equivalent odpref Pa pressure surface. 499 527 c ----------------------------------------------------------------- 528 500 529 501 530 #ifdef DUSTSTORM … … 640 669 IF (freedust) THEN 641 670 tauscaling(:) = 1. 642 671 c opacity obtained with stormdust 672 IF (rdstorm) THEN 673 taustormdusttmp(1:ngrid)=0. 674 DO l=1,nlayer 675 DO ig=1,ngrid 676 taustormdusttmp(ig) = taustormdusttmp(ig)+ 677 & aerosol(ig,l,iaerdust(2)) 678 ENDDO 679 ENDDO 680 !opacity obtained with background dust only 681 taubackdusttmp(1:ngrid)=0. 682 DO l=1,nlayer 683 DO ig=1,ngrid 684 taubackdusttmp(ig) = taubackdusttmp(ig)+ 685 & aerosol(ig,l,iaerdust(1)) 686 ENDDO 687 ENDDO 688 ENDIF !rdsstorm 643 689 ELSE 644 690 c Temporary scaling factor … … 669 715 & aerosol(ig,l,iaerdust(iaer))* tauscaling(ig)) 670 716 ENDDO 671 ENDDO672 ENDDO673 674 DO l=1,nlayer675 DO ig=1,ngrid676 dsodust(ig,l) = max(1E-20,dsodust(ig,l)* tauscaling(ig))677 717 ENDDO 678 718 ENDDO … … 700 740 tauref(:) = tauref(:) * odpref / pplev(:,1) 701 741 ENDIF 702 703 c output for debug 704 c IF (ngrid.NE.1) THEN 705 c CALL WRITEDIAGFI(ngrid,'taudusttmp','virtual tau dust', 706 c & '#',2,taudusttmp) 707 c CALL WRITEDIAGFI(ngrid,'tausca','tauscaling', 708 c & '#',2,tauscaling) 709 c ELSE 710 c CALL WRITEDIAGFI(ngrid,'taudusttmp','virtual tau dust', 711 c & '#',0,taudusttmp) 712 c CALL WRITEDIAGFI(ngrid,'tausca','tauscaling', 713 c & '#',0,tauscaling) 714 c ENDIF 742 715 743 c ----------------------------------------------------------------- 716 744 c Column integrated visible optical depth in each point … … 724 752 ENDDO 725 753 754 c for diagnostics: opacity for all dust scatterers stormdust included 755 taualldust(1:ngrid)=0. 756 DO iaer=1,naerdust 757 DO l=1,nlayer 758 DO ig=1,ngrid 759 taualldust(ig) = taualldust(ig) + 760 & aerosol(ig,l,iaerdust(iaer)) 761 ENDDO 762 ENDDO 763 ENDDO 764 765 IF (rdstorm) THEN 766 767 c for diagnostics: opacity for dust in background only 768 taudust(1:ngrid)=0. 769 DO l=1,nlayer 770 DO ig=1,ngrid 771 taudust(ig) = taudust(ig) + 772 & aerosol(ig,l,iaer_dust_doubleq) 773 ENDDO 774 ENDDO 775 776 c for diagnostics: opacity for dust in storm only 777 taustormdust(1:ngrid)=0. 778 DO l=1,nlayer 779 DO ig=1,ngrid 780 taustormdust(ig) = taustormdust(ig) + 781 & aerosol(ig,l,iaer_stormdust_doubleq) 782 ENDDO 783 ENDDO 784 785 ENDIF 786 787 726 788 #ifdef DUSTSTORM 727 789 IF (firstcall) THEN … … 733 795 c Density scaled opacity and column opacity output 734 796 c ----------------------------------------------------------------- 735 c dsodust(1:ngrid,1:nlayer) = 0. 736 c DO iaer=1,naerdust 737 c DO l=1,nlayer 738 c DO ig=1,ngrid 739 c dsodust(ig,l) = dsodust(ig,l) + 740 c & aerosol(ig,l,iaerdust(iaer)) * g / 741 c & (pplev(ig,l) - pplev(ig,l+1)) 742 c ENDDO 743 c ENDDO 744 c IF (ngrid.NE.1) THEN 745 c write(txt2,'(i1.1)') iaer 746 c call WRITEDIAGFI(ngrid,'taudust'//txt2, 747 c & 'Dust col opacity', 748 c & ' ',2,tau(1,iaerdust(iaer))) 749 c IF (callstats) THEN 750 c CALL wstats(ngrid,'taudust'//txt2, 751 c & 'Dust col opacity', 752 c & ' ',2,tau(1,iaerdust(iaer))) 753 c ENDIF 754 c ENDIF 755 c ENDDO 756 757 c IF (ngrid.NE.1) THEN 758 c CALL WRITEDIAGFI(ngrid,'dsodust','tau*g/dp', 759 c & 'm2.kg-1',3,dsodust) 760 c IF (callstats) THEN 761 c CALL wstats(ngrid,'dsodust', 762 c & 'tau*g/dp', 763 c & 'm2.kg-1',3,dsodust) 764 c ENDIF 765 c ELSE 766 c CALL WRITEDIAGFI(ngrid,"dsodust","dsodust","m2.kg-1",1, 767 c & dsodust) 768 c ENDIF ! of IF (ngrid.NE.1) 769 c ----------------------------------------------------------------- 797 IF (rdstorm) then 798 DO l=1,nlayer 799 IF (l.LE.cstdustlevel) THEN 800 DO ig=1,ngrid 801 dsodust(ig,l)=dsodust(ig,l) + 802 & aerosol(ig,l,iaer_dust_doubleq) * g / 803 & (pplev(ig,l) - pplev(ig,l+1)) 804 805 dsords(ig,l) = dsords(ig,l) + 806 & aerosol(ig,l,iaer_stormdust_doubleq)* g/ 807 & (pplev(ig,l) - pplev(ig,l+1)) 808 ENDDO 809 ELSE 810 DO ig=1,ngrid 811 dsodust(ig,l) =dsodust(ig,l) + 812 & aerosol(ig,l,iaer_dust_doubleq) * g / 813 & (pplev(ig,l) - pplev(ig,l+1)) 814 dsords(ig,l) = dsords(ig,l) + 815 & aerosol(ig,l,iaer_stormdust_doubleq)* g/ 816 & (pplev(ig,l) - pplev(ig,l+1)) 817 ENDDO 818 ENDIF 819 ENDDO 820 ENDIF 821 822 c ----------------------------------------------------------------- 823 c ----------------------------------------------------------------- 824 c aerosol/X for stormdust to prepare calculation of radiative transfer 825 c ----------------------------------------------------------------- 826 if (rdstorm) then 827 DO l=1,nlayer 828 DO ig=1,ngrid 829 aerosol(ig,l,iaer_stormdust_doubleq) = 830 & aerosol(ig,l,iaer_stormdust_doubleq)/totstormfract(ig) 831 ENDDO 832 ENDDO 833 endif 834 770 835 771 836 END SUBROUTINE aeropacity -
trunk/LMDZ.MARS/libf/phymars/callkeys.h
r1818 r1974 13 13 & ,lifting,freedust,callddevil,scavenging,sedimentation & 14 14 & ,activice,water,tifeedback,microphys,supersat,caps,photochem & 15 & ,calltherm,callrichsl,callslope,tituscap,callyamada4,co2clouds ,&16 & co2useh2o,meteo_flux,CLFvaryingCO2,spantCO2,CLFvarying,&17 & satindexco215 & ,calltherm,callrichsl,callslope,tituscap,callyamada4,co2clouds & 16 & ,co2useh2o,meteo_flux,CLFvaryingCO2,spantCO2,CLFvarying & 17 & ,satindexco2,rdstorm 18 18 19 19 COMMON/callkeys_i/iradia,iaervar,iddist,ilwd,ilwb,ilwn,ncouche & 20 & ,dustbin,nltemodel,nircorr,solvarmod,solvaryear 20 & ,dustbin,nltemodel,nircorr,solvarmod,solvaryear,dustinjection 21 21 22 22 COMMON/callkeys_r/topdustref,semi,alphan,euveff, & 23 & tke_heat_flux,dustrefir,fixed_euv_value,CLFfixval 23 & tke_heat_flux,dustrefir,fixed_euv_value,CLFfixval, & 24 & coeff_injection 24 25 25 26 LOGICAL callrad,calldifv,calladj,callcond,callsoil, & … … 42 43 real euveff 43 44 real tke_heat_flux 45 real coeff_injection ! dust injection scheme coefficient 44 46 real CLFfixval 45 47 … … 53 55 integer solvarmod ! model for solar EUV variation 54 56 integer solvaryear ! mars year for realisticly varying solar EUV 57 integer dustinjection ! dust injection scheme number 55 58 56 59 logical rayleigh 57 60 logical tracer 58 61 integer dustbin 59 logical freedust 62 logical freedust 60 63 logical active,doubleq,submicron,lifting,callddevil,scavenging 64 logical rdstorm ! rocket dust storm parametrization 61 65 logical sedimentation 62 66 logical activice,tifeedback,supersat,caps -
trunk/LMDZ.MARS/libf/phymars/callradite_mod.F
r1969 r1974 7 7 SUBROUTINE callradite(icount,ngrid,nlayer,nq,zday,ls,pq,albedo, 8 8 $ emis,mu0,pplev,pplay,pt,tsurf,fract,dist_sol,igout, 9 $ dtlw,dtsw,fluxsurf_lw,fluxsurf_sw,fluxtop_lw,fluxtop_sw, 10 & tauref,tau,aerosol,dsodust,tauscaling,taucloudtes,rdust,rice, 11 & nuice,co2ice,clearsky,totcloudfrac) 9 $ dtlw,dtsw,fluxsurf_lw,fluxsurf_sw,fluxtop_lw, 10 $ fluxtop_sw,tauref,tau,aerosol,dsodust,tauscaling, 11 $ taucloudtes,rdust,rice,nuice,co2ice,rstormdust, 12 $ totstormfract,clearatm,dsords, 13 $ clearsky,totcloudfrac) 12 14 13 15 use aeropacity_mod, only: aeropacity … … 16 18 use dimradmars_mod, only: naerkind, name_iaer, 17 19 & iaer_dust_conrath,iaer_dust_doubleq, 18 & iaer_dust_submicron,iaer_h2o_ice 20 & iaer_dust_submicron,iaer_h2o_ice, 21 & iaer_stormdust_doubleq 19 22 use yomlw_h, only: gcp, nlaylte 20 23 use comcstfi_h, only: g,cpp … … 154 157 c the "naerkind" kind of aerosol optical 155 158 c properties. 156 157 159 c======================================================================= 158 160 c … … 160 162 c ------------- 161 163 c 162 #include "callkeys.h"164 include "callkeys.h" 163 165 164 166 c----------------------------------------------------------------------- … … 170 172 171 173 REAL,INTENT(IN) :: pq(ngrid,nlayer,nq) 172 REAL,INTENT(IN ) :: tauscaling(ngrid) ! Conversion factor for174 REAL,INTENT(INOUT) :: tauscaling(ngrid) ! Conversion factor for 173 175 ! qdust and Ndust 174 176 REAL,INTENT(IN) :: albedo(ngrid,2),emis(ngrid) … … 194 196 REAL,INTENT(OUT) :: nuice(ngrid,nlayer) ! Estimated effective variance 195 197 REAL,INTENT(IN) :: co2ice(ngrid) ! co2 ice surface layer (kg.m-2) 198 199 c rocket dust storm 200 LOGICAL,INTENT(IN) :: clearatm ! true for background dust 201 REAL,INTENT(IN) :: totstormfract(ngrid) ! dust storm mesh fraction 202 REAL,INTENT(OUT) :: rstormdust(ngrid,nlayer) ! Storm dust geometric mean radius (m) 203 REAL dsords(ngrid,nlayer) ! density scaled opacity for rocket dust storm dust 204 196 205 c sub-grid scale water ice clouds 197 real,intent(out) :: totcloudfrac(ngrid)198 logical,intent(in) :: clearsky206 LOGICAL,INTENT(IN) :: clearsky 207 REAL,INTENT(IN) :: totcloudfrac(ngrid) 199 208 200 209 c … … 292 301 iaer_dust_submicron=0 293 302 iaer_h2o_ice=0 303 iaer_stormdust_doubleq=0 294 304 295 305 aer_count=0 … … 326 336 enddo 327 337 endif 338 if (rdstorm.AND.active) then 339 do iaer=1,naerkind 340 if (name_iaer(iaer).eq."stormdust_doubleq") then 341 iaer_stormdust_doubleq = iaer 342 aer_count = aer_count + 1 343 endif 344 enddo 345 end if 328 346 329 347 c Check that we identified all tracers: … … 372 390 c Updating aerosol size distributions: 373 391 CALL updatereffrad(ngrid,nlayer, 374 & rdust,r ice,nuice,392 & rdust,rstormdust,rice,nuice, 375 393 & reffrad,nueffrad, 376 394 & pq,tauscaling,tau,pplay) … … 385 403 c Computing aerosol optical depth in each layer: 386 404 CALL aeropacity(ngrid,nlayer,nq,zday,pplay,pplev,ls, 387 & pq,tauscaling,tauref,tau,taucloudtes,aerosol,dsodust,reffrad, 388 & nueffrad,QREFvis3d,QREFir3d,omegaREFvis3d,omegaREFir3d, 389 & clearsky,totcloudfrac) 405 & pq,tauscaling,tauref,tau,taucloudtes,aerosol,dsodust,reffrad, 406 & QREFvis3d,QREFir3d,omegaREFir3d, 407 & totstormfract,clearatm,dsords, 408 & clearsky,totcloudfrac) 390 409 391 410 c Starting loop on sub-domain -
trunk/LMDZ.MARS/libf/phymars/callsedim_mod.F
r1962 r1974 4 4 5 5 CONTAINS 6 7 SUBROUTINE callsedim(ngrid,nlay, 8 & pplev,zlev, zlay, pt, pdt, rdust,rice,6 7 SUBROUTINE callsedim(ngrid,nlay,ptimestep, 8 & pplev,zlev,zlay,pt,pdt,rdust,rstormdust,rice, 9 9 & rsedcloud,rhocloud, 10 & pq, pdqfi,pdqsed,pdqs_sed,nq,10 & pq,pdqfi,pdqsed,pdqs_sed,nq, 11 11 & tau,tauscaling) 12 ! to use 'getin' 12 13 13 USE ioipsl_getincom, only: getin 14 14 USE updaterad, only: updaterdust,updaterice_micro,updaterice_typ … … 17 17 & igcm_ccn_mass, igcm_ccn_number, 18 18 & igcm_h2o_ice, nuice_sed, nuice_ref, 19 & igcm_ccnco2_mass, igcm_ccnco2_number, 20 & igcm_co2_ice 19 & igcm_ccnco2_mass,igcm_ccnco2_number, 20 & igcm_co2_ice, igcm_stormdust_mass, 21 & igcm_stormdust_number 21 22 USE newsedim_mod, ONLY: newsedim 22 23 USE comcstfi_h, ONLY: g … … 61 62 c Aerosol radius provided by the water ice microphysical scheme: 62 63 real,intent(out) :: rdust(ngrid,nlay) ! Dust geometric mean radius (m) 64 real,intent(out) :: rstormdust(ngrid,nlay) ! Stormdust geometric mean radius (m) 63 65 real,intent(out) :: rice(ngrid,nlay) ! H2O Ice geometric mean radius (m) 64 66 c Sedimentation radius of water ice … … 89 91 real r0dust(ngrid,nlay) ! geometric mean radius used for 90 92 ! dust (m) 91 ! real r0ccn(ngrid,nlay) ! geometric mean radius used for 93 real r0stormdust(ngrid,nlay) ! Geometric mean radius used for stormdust (m) 92 94 ! ! CCNs (m) 93 95 real,save :: beta ! correction for the shape of the ice particles (cf. newsedim) 94 95 96 c for ice radius computation 96 97 REAL Mo,No … … 133 134 INTEGER,SAVE :: iccn_number ! index of tracer containing CCN number 134 135 ! mix. ratio 136 INTEGER,SAVE :: istormdust_mass ! index of tracer containing 137 !stormdust mass mix. ratio 138 INTEGER,SAVE :: istormdust_number ! index of tracer containing 139 !stormdust number mix. ratio 135 140 INTEGER,SAVE :: iccnco2_number ! index of tracer containing CCN number 136 141 INTEGER,SAVE :: iccnco2_mass ! index of tracer containing CCN number … … 140 145 LOGICAL,SAVE :: firstcall=.true. 141 146 147 148 142 149 c ** un petit test de coherence 143 150 c -------------------------- 144 145 151 ! AS: firstcall OK absolute 146 152 IF (firstcall) THEN … … 240 246 ENDIF !of if (co2clouds) 241 247 242 243 IF (water) THEN 248 IF (water) THEN 244 249 write(*,*) "correction for the shape of the ice particles ?" 245 250 beta=0.75 ! default value … … 251 256 write(*,*) "water_param nueff Radiative:", nuice_ref 252 257 ENDIF 253 ENDIF 258 ENDIF 259 260 IF (rdstorm) THEN ! identifying stormdust tracers for sedimentation 261 istormdust_mass=0 ! dummy initialization 262 istormdust_number=0 ! dummy initialization 263 264 do iq=1,nq 265 if (noms(iq).eq."stormdust_mass") then 266 istormdust_mass=iq 267 write(*,*)"callsedim: istormdust_mass=",istormdust_mass 268 endif 269 if (noms(iq).eq."stormdust_number") then 270 istormdust_number=iq 271 write(*,*)"callsedim: istormdust_number=", 272 & istormdust_number 273 endif 274 enddo 275 276 ! check that we did find the tracers 277 if ((istormdust_mass.eq.0).or.(istormdust_number.eq.0)) then 278 write(*,*) 'callsedim: error! could not identify' 279 write(*,*) ' tracers for stormdust mass and number mixing' 280 write(*,*) ' ratio and rdstorm is activated!' 281 stop 282 endif 283 ENDIF !of if (rdstorm) 254 284 255 285 firstcall=.false. … … 268 298 zt(1:ngrid,1:nlay)=pt(1:ngrid,1:nlay) 269 299 & +pdt(1:ngrid,1:nlay)*ptimestep 270 271 300 272 301 c Computing the different layer properties … … 295 324 end do 296 325 endif 297 298 326 ! rocket dust storm 327 if (rdstorm) then 328 do l=1,nlay 329 do ig=1, ngrid 330 331 call updaterdust(zqi(ig,l,igcm_stormdust_mass), 332 & zqi(ig,l,igcm_stormdust_number),r0stormdust(ig,l), 333 & tauscaling(ig)) 334 335 end do 336 end do 337 endif 299 338 c ================================================================= 300 339 do iq=1,nq … … 307 346 c ----------------------------------------------------------------- 308 347 if ((doubleq.and. 309 & ((iq.eq.idust_mass).or.310 & (iq.eq.idust_number)))) then348 & ((iq.eq.idust_mass).or.(iq.eq.idust_number).or. 349 & (iq.eq.istormdust_mass).or.(iq.eq.istormdust_number)))) then 311 350 312 351 c Computing size distribution: 313 352 c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 314 353 315 cif ((iq.eq.idust_mass).or.(iq.eq.idust_number)) then354 if ((iq.eq.idust_mass).or.(iq.eq.idust_number)) then 316 355 do l=1,nlay 317 356 do ig=1, ngrid … … 319 358 end do 320 359 end do 321 sigma0 = varian 360 else if ((iq.eq.istormdust_mass).or. 361 & (iq.eq.istormdust_number)) then 362 do l=1,nlay 363 do ig=1, ngrid 364 r0(ig,l)=r0stormdust(ig,l) 365 end do 366 end do 367 endif 368 sigma0 = varian 322 369 323 370 c Computing mass mixing ratio for each particle size 324 371 c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 325 IF ((iq.EQ.idust_mass).or.(iq.EQ.i ccn_mass)) then372 IF ((iq.EQ.idust_mass).or.(iq.EQ.istormdust_mass)) then 326 373 radpower = 2 327 374 ELSE ! number … … 376 423 377 424 do ir=1,nr 378 379 425 call newsedim(ngrid,nlay,1,1,ptimestep, 380 426 & pplev,masse,epaisseur,zt,rd(ir),(/rho_dust/),qr(1,1,ir), … … 391 437 zqi(ig,l,iq)=zqi(ig,l,iq)+qr(ig,l,ir) 392 438 ENDDO 393 ENDDO 439 ENDDO 394 440 enddo ! of do ir=1,nr 395 441 c ----------------------------------------------------------------- … … 457 503 ENDDO 458 504 endif ! of if (doubleq) 459 505 506 if (rdstorm) then 507 DO l = 1, nlay 508 DO ig=1,ngrid 509 call updaterdust(zqi(ig,l,igcm_stormdust_mass), 510 & zqi(ig,l,igcm_stormdust_number),rstormdust(ig,l), 511 & tauscaling(ig)) 512 ENDDO 513 ENDDO 514 endif ! of if (rdstorm) 515 460 516 c Update the ice particle size "rice" 461 517 c ------------------------------------- … … 490 546 491 547 END MODULE callsedim_mod 548 -
trunk/LMDZ.MARS/libf/phymars/comsaison_h.F90
r1770 r1974 9 9 real,save,allocatable :: mu0(:) 10 10 real,save,allocatable :: fract(:) 11 real,save,allocatable :: local_time(:) ! local solar time as fraction of day (0,1) 11 12 12 13 contains … … 19 20 allocate(mu0(ngrid)) 20 21 allocate(fract(ngrid)) 22 allocate(local_time(ngrid)) 21 23 22 24 end subroutine ini_comsaison_h … … 29 31 if (allocated(mu0)) deallocate(mu0) 30 32 if (allocated(fract)) deallocate(fract) 33 if (allocated(local_time)) deallocate(local_time) 31 34 32 35 end subroutine end_comsaison_h -
trunk/LMDZ.MARS/libf/phymars/conf_phys.F
r1918 r1974 280 280 write(*,*)" calllott = ",calllott 281 281 282 ! rocket dust storm injection scheme 283 write(*,*)"call rocket dust storm and slope lifting", 284 & " parametrization" 285 rdstorm=.false. ! default value 286 call getin("rdstorm",rdstorm) 287 write(*,*)" rdstorm = ",rdstorm 282 288 283 289 write(*,*)"rad.transfer is computed every iradia", … … 359 365 endif 360 366 367 ! dust injection scheme 368 dustinjection=0 ! default: no injection scheme 369 call getin("dustinjection",dustinjection) 370 write(*,*)" dustinjection = ",dustinjection 371 ! dust injection scheme coefficient 372 coeff_injection=1. ! default value 373 call getin("coeff_injection",coeff_injection) 374 write(*,*)" coeff_in,jection = ",coeff_injection 375 361 376 ! free evolving dust 362 377 ! freedust=true just says that there is no lifting and no dust opacity scaling. … … 372 387 ! this test is valid in GCM case 373 388 ! ... not in mesoscale case, for we want to activate mesoscale lifting 374 if (freedust.and.lifting) then 375 print*,'if freedust is used, then lifting should not be used' 376 print*,'lifting forced to false !!' 377 lifting=.false. 389 if (freedust.and.dustinjection.eq.0)then 390 if(lifting) then 391 print*,'if freedust is used and dustinjection = 0, 392 & then lifting should not be used' 393 stop 394 endif 378 395 endif 379 396 #endif 380 397 if (dustinjection.eq.1)then 398 if(.not.lifting) then 399 print*,"if dustinjection=1, then lifting should be true" 400 stop 401 endif 402 if(.not.freedust) then 403 print*,"if dustinjection=1, then freedust should be true" 404 stop 405 endif 406 endif 407 ! rocket dust storm 408 ! Test of incompatibility: 409 ! if rdstorm is used, then doubleq should be true 410 if (rdstorm.and..not.doubleq) then 411 print*,'if rdstorm is used, then doubleq should be used !' 412 stop 413 endif 414 if (rdstorm.and..not.active) then 415 print*,'if rdstorm is used, then active should be used !' 416 stop 417 endif 418 if (rdstorm.and..not.lifting) then 419 print*,'if rdstorm is used, then lifting should be used !' 420 stop 421 endif 422 if (rdstorm.and..not.freedust) then 423 print*,'if rdstorm is used, then freedust should be used !' 424 stop 425 endif 426 if (rdstorm.and.(dustinjection.eq.0)) then 427 print*,'if rdstorm is used, then dustinjection should 428 & be used !' 429 stop 430 endif 381 431 ! Dust IR opacity 382 432 write(*,*)" Wavelength for infrared opacity of dust ?" … … 642 692 WRITE(*,*) 'equal to 2.' 643 693 CALL ABORT 644 ELSE IF ( (.NOT.activice).AND.(naerkind.GT.1) ) THEN645 WRITE(*,*) 'naerkind is greater than unity, but'646 WRITE(*,*) 'activice has not been set to .true.'647 WRITE(*,*) 'in callphys.def; this is not logical!'648 CALL ABORT649 694 ENDIF 650 695 … … 666 711 ! and picky compilers who know name_iaer(2) is out of bounds 667 712 j=2 713 IF (rdstorm.AND..NOT.activice) name_iaer(2) = 714 & "stormdust_doubleq" !! storm dust two-moment scheme 715 IF (rdstorm.AND.water.AND.activice) name_iaer(3) = 716 & "stormdust_doubleq" 668 717 IF (water.AND.activice) name_iaer(j) = "h2o_ice" !! radiatively-active clouds 669 718 IF (submicron.AND.active) name_iaer(j) = "dust_submicron" !! JBM experimental stuff 670 719 endif ! of if (nq.gt.1) 720 671 721 c ---------------------------------------------------------- 672 722 -
trunk/LMDZ.MARS/libf/phymars/dimradmars_mod.F90
r1771 r1974 32 32 ! submicron population of dust 33 33 ! particles 34 integer iaer_stormdust_doubleq ! Storm dust profile is given by the 35 ! mass mixing ratio of the two moment scheme 36 ! method (doubleq) 34 37 integer iaer_h2o_ice ! Water ice particles 35 38 -
trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F
r1944 r1974 11 11 & albedice, iceradius, dtemisice, z0, 12 12 & zmea, zstd, zsig, zgam, zthe, phisfi, 13 & watercaptag 13 & watercaptag, hmons 14 14 use slope_mod, only: theta_sl, psi_sl 15 15 use phyredem, only: physdem0,physdem1 … … 557 557 zgam(1)=0.E+0 558 558 zthe(1)=0.E+0 559 c for rocket dust storm scheme 560 hmons(1)=0.E+0 559 561 560 562 … … 716 718 call physdem0("startfi.nc",longitude,latitude,nsoilmx,ngrid,llm, 717 719 & nq,dtphys,float(day0),time,cell_area, 718 & albedodat,inertiedat,zmea,zstd,zsig,zgam,zthe )720 & albedodat,inertiedat,zmea,zstd,zsig,zgam,zthe,hmons) 719 721 call physdem1("startfi.nc",nsoilmx,ngrid,llm,nq, 720 722 & dtphys,time, -
trunk/LMDZ.MARS/libf/phymars/initracer.F
r1720 r1974 24 24 25 25 26 #include "callkeys.h"26 include "callkeys.h" 27 27 28 28 integer,intent(in) :: ngrid ! number of atmospheric columns … … 32 32 integer iq,ig,count 33 33 real r0_lift , reff_lift, nueff_lift 34 real r0_storm,reff_storm 34 35 c Ratio of small over large dust particles (used when both 35 36 c doubleq and the submicron mode are active); In Montmessin 36 37 c et al. (2002), a value of 25 has been deduced; 37 38 real, parameter :: popratio = 25. 38 character(len= 20) :: txt ! to store some text39 character(len=30) :: txt ! to store some text 39 40 40 41 c----------------------------------------------------------------------- … … 69 70 igcm_h2o_vap=0 70 71 igcm_h2o_ice=0 72 igcm_stormdust_mass=0 73 igcm_stormdust_number=0 71 74 igcm_co2=0 72 75 igcm_co=0 … … 147 150 enddo 148 151 endif ! of if (submicron) 152 if (rdstorm) then 153 do iq=1,nq 154 if (noms(iq).eq."stormdust_mass") then 155 igcm_stormdust_mass=iq 156 count=count+1 157 endif 158 if (noms(iq).eq."stormdust_number") then 159 igcm_stormdust_number=iq 160 count=count+1 161 endif 162 enddo 163 endif ! of if (rdstorm) 149 164 ! 2. find chemistry and water tracers 150 165 do iq=1,nq … … 422 437 #else 423 438 alpha_lift(igcm_dust_mass)=1.e-6 !1.e-6 !Lifted mass coeff 439 IF (dustinjection.ge.1) THEN 440 reff_lift = 3.0e-6 ! Effective radius of lifted dust (m) 441 alpha_lift(igcm_dust_mass)=(4/3.)*reff_lift*rho_dust 442 & /2.4 443 ENDIF 424 444 #endif 425 445 … … 437 457 write(*,*) "initracer: doubleq_param alpha_lift:", 438 458 & alpha_lift(igcm_dust_mass) 459 !c ---------------------------------------------------------------------- 460 !c rocket dust storm scheme 461 !c lifting tracer stormdust using same distribution than 462 !c normal dust 463 if (rdstorm) then 464 reff_storm=3.e-6 ! reff_lift !3.e-6 465 r0_storm=reff_storm/ref_r0 466 rho_q(igcm_stormdust_mass)=rho_dust 467 rho_q(igcm_stormdust_number)=rho_dust 468 469 alpha_devil(igcm_stormdust_mass)=9.e-9 ! dust devil lift mass coeff 470 alpha_lift(igcm_stormdust_mass)=4./3./2.4*reff_storm*rho_dust 471 472 write(*,*) 'alpha_lift(rds):',alpha_lift(igcm_stormdust_mass) 473 474 alpha_devil(igcm_stormdust_number)=r3n_q* 475 & alpha_devil(igcm_stormdust_mass)/r0_storm**3 476 alpha_lift(igcm_stormdust_number)=r3n_q* 477 & alpha_lift(igcm_stormdust_mass)/r0_storm**3 478 479 radius(igcm_stormdust_mass) = reff_storm 480 radius(igcm_stormdust_number) = reff_storm 481 end if !(rdstorm) 482 !c ---------------------------------------------------------------------- 483 439 484 else 440 485 … … 618 663 endif 619 664 endif 620 665 666 if (rdstorm) then 667 ! verify that we indeed have stormdust_mass and stormdust_number tracers 668 if (igcm_stormdust_mass.eq.0) then 669 write(*,*) "initracer: error !!" 670 write(*,*) " cannot use rdstorm option without ", 671 & "a stormdust_mass tracer !" 672 stop 673 endif 674 if (igcm_stormdust_number.eq.0) then 675 write(*,*) "initracer: error !!" 676 write(*,*) " cannot use rdstorm option without ", 677 & "a stormdust_number tracer !" 678 stop 679 endif 680 endif 681 621 682 if (callnlte) then ! NLTE requirements 622 683 if (nltemodel.ge.1) then -
trunk/LMDZ.MARS/libf/phymars/phyetat0_mod.F90
r1944 r1974 12 12 use tracer_mod, only: noms ! tracer names 13 13 use surfdat_h, only: phisfi, albedodat, z0, z0_default,& 14 zmea, zstd, zsig, zgam, zthe 14 zmea, zstd, zsig, zgam, zthe, hmons 15 15 use iostart, only: nid_start, open_startphy, close_startphy, & 16 16 get_field, get_var, inquire_field, & … … 19 19 20 20 implicit none 21 22 include "callkeys.h" 21 23 !====================================================================== 22 24 ! Auteur(s) Z.X. Li (LMD/CNRS) date: 19930818 … … 179 181 endif 180 182 183 ! hmons 184 call get_field("hmons",hmons,found) 185 if (.not.found) then 186 write(*,*) "WARNING: phyetat0: Failed loading <hmons>" 187 if (rdstorm) then 188 call abort 189 else 190 write(*,*) "will continue anyway..." 191 write(*,*) "because you may not need it." 192 hmons(:)=0. 193 end if 194 else 195 do ig=1,ngrid 196 if (hmons(ig) .eq. -999999.) hmons(ig)=0. 197 enddo 198 write(*,*) "phyetat0: <hmons> range:", & 199 minval(hmons), maxval(hmons) 200 endif 181 201 182 202 ! Time axis … … 277 297 if (.not.found) then 278 298 write(*,*) "phyetat0: <tauscaling> not in file" 279 tauscaling(:) = -1299 tauscaling(:) = 1 280 300 else 281 301 write(*,*) "phyetat0: dust conversion factor <tauscaling> range:", & … … 296 316 call get_field("wstar",wstar,found,indextime) 297 317 if (.not.found) then 298 write(*,*) "phyetat0: < totcloudfrac> not in file! Set to zero"318 write(*,*) "phyetat0: <wstar> not in file! Set to zero" 299 319 wstar(:)=0 300 320 else -
trunk/LMDZ.MARS/libf/phymars/phyredem.F90
r1944 r1974 1 !2 ! $Id: $3 !4 1 module phyredem 5 2 … … 10 7 subroutine physdem0(filename,lonfi,latfi,nsoil,ngrid,nlay,nq, & 11 8 phystep,day_ini,time,airefi, & 12 alb,ith,pzmea,pzstd,pzsig,pzgam,pzthe) 9 alb,ith,pzmea,pzstd,pzsig,pzgam,pzthe, & 10 phmons) 13 11 ! create physics restart file and write time-independent variables 14 12 use comsoil_h, only: inertiedat, volcapa, mlayer … … 16 14 use surfdat_h, only: zmea, zstd, zsig, zgam, zthe, & 17 15 z0_default, albedice, emisice, emissiv, & 18 iceradius, dtemisice, phisfi, z0 16 iceradius, dtemisice, phisfi, z0, & 17 hmons 19 18 use dimradmars_mod, only: tauvis 20 19 use iostart, only : open_restartphy, close_restartphy, & … … 46 45 real,intent(in) :: pzgam(ngrid) 47 46 real,intent(in) :: pzthe(ngrid) 48 47 real,intent(in) :: phmons(ngrid) 48 49 49 real :: tab_cntrl(length) ! nb "length=100" defined in iostart module 50 50 … … 131 131 call put_field("ZGAM","Relief: gamma parameter",zgam) 132 132 call put_field("ZTHE","Relief: theta parameter",zthe) 133 133 ! Write hmons if it was read in startfi 134 if (maxval(hmons).ne.minval(hmons)) then 135 call put_field("hmons","Relief: hmons parameter",hmons) 136 end if 137 134 138 ! Soil thermal inertia 135 139 call put_field("inertiedat","Soil thermal inertia",ith) -
trunk/LMDZ.MARS/libf/phymars/phys_state_var_init_mod.F90
r1922 r1974 47 47 use time_phylmdz_mod, only: init_time 48 48 use co2cloud_mod, only: ini_co2cloud,end_co2cloud 49 use rocketduststorm_mod, only: ini_rocketduststorm_mod, & 50 end_rocketduststorm_mod 49 51 50 52 IMPLICIT NONE … … 112 114 call ini_co2cloud(ngrid,nlayer) 113 115 116 ! allocate arrays in "rocketduststorm_mod": 117 call end_rocketduststorm_mod 118 call ini_rocketduststorm_mod(ngrid) 119 114 120 END SUBROUTINE phys_state_var_init 115 121 -
trunk/LMDZ.MARS/libf/phymars/physiq_mod.F
r1973 r1974 17 17 use co2cloud_mod, only: co2cloud, mem_Mccn_co2, mem_Mh2o_co2, 18 18 & mem_Nccn_co2 19 use aeropacity_mod 20 use callradite_mod 21 use callsedim_mod 19 use callradite_mod, only: callradite 20 use callsedim_mod, only: callsedim 21 use rocketduststorm_mod, only: rocketduststorm, dustliftday 22 use calcstormfract_mod, only: calcstormfract 22 23 use tracer_mod, only: noms, mmol, igcm_co2, igcm_n2, igcm_co2_ice, 23 24 & igcm_co, igcm_o, igcm_h2o_vap, igcm_h2o_ice, … … 27 28 & igcm_dust_mass, igcm_dust_number, igcm_h2o2, 28 29 & nuice_ref, rho_ice, rho_dust, ref_r0, 29 & igcm_he 30 & igcm_he, igcm_stormdust_mass, 31 & igcm_stormdust_number 30 32 use comsoil_h, only: inertiedat, ! soil thermal inertia 31 33 & tsoil, nsoilmx ! number of subsurface layers 32 use geometry_mod, only: longitude, latitude, cell_area 34 use geometry_mod, only: longitude, latitude, cell_area, 35 & longitude_deg 33 36 use comgeomfi_h, only: sinlon, coslon, sinlat, coslat 34 37 use surfdat_h, only: phisfi, albedodat, zmea, zstd, zsig, zgam, … … 36 39 & frost_albedo_threshold, 37 40 & tsurf, co2ice, emis, 38 & capcal, fluxgrd, qsurf 39 use comsaison_h, only: dist_sol, declin, mu0, fract 41 & capcal, fluxgrd, qsurf, 42 & hmons 43 use comsaison_h, only: dist_sol, declin, mu0, fract, local_time 40 44 use slope_mod, only: theta_sl, psi_sl 41 45 use conc_mod, only: rnew, cpnew, mmean … … 48 52 use planete_h, only: aphelie, periheli, year_day, peri_day, 49 53 & obliquit 50 USE comcstfi_h, only: r, cpp, mugaz, g, rcp, pi, rad 54 USE comcstfi_h, only: r, cpp, mugaz, g, rcp, pi, rad 51 55 USE calldrag_noro_mod, ONLY: calldrag_noro 52 56 USE vdifc_mod, ONLY: vdifc … … 54 58 & fill_data_thermos, allocate_param_thermos 55 59 use iono_h, only: allocate_param_iono 60 use compute_dtau_mod, only: compute_dtau 56 61 #ifdef MESOSCALE 57 62 use comsoil_h, only: mlayer,layer … … 64 69 use eofdump_mod, only: eofdump 65 70 USE vertical_layers_mod, ONLY: ap,bp,aps,bps 71 66 72 #endif 67 73 … … 207 213 REAL,INTENT(out) :: pdpsrf(ngrid) ! surface pressure tendency (Pa/s) 208 214 215 209 216 210 217 c Local saved variables: … … 212 219 INTEGER,SAVE :: day_ini ! Initial date of the run (sol since Ls=0) 213 220 INTEGER,SAVE :: icount ! counter of calls to physiq during the run. 221 214 222 #ifdef DUSTSTORM 215 223 REAL pq_tmp(ngrid, nlayer, 2) ! To compute tendencies due the dust bomb 216 224 #endif 225 217 226 c Variables used by the water ice microphysical scheme: 218 227 REAL rice(ngrid,nlayer) ! Water ice geometric mean radius (m) … … 257 266 REAL fluxtop_sw(ngrid,2) !Outgoing SW (solar) flux to space (W.m-2) 258 267 REAL tauref(ngrid) ! Reference column optical depth at odpref 268 c rocket dust storm 269 REAL totstormfract(ngrid) ! fraction of the mesh where the dust storm is contained 270 logical clearatm ! clearatm used to calculate twice the radiative 271 ! transfer when rdstorm is active : 272 ! - in a mesh with stormdust and background dust (false) 273 ! - in a mesh with background dust only (true) 274 259 275 real,parameter :: odpref=610. ! DOD reference pressure (Pa) 260 276 REAL tau(ngrid,naerkind) ! Column dust optical depth at each point 261 277 ! AS: TBD: this one should be in a module ! 262 REAL dsodust(ngrid,nlayer) ! density-scaled opacity (in infrared)263 278 REAL zls ! solar longitude (rad) 264 279 REAL zday ! date (time since Ls=0, in martian days) … … 271 286 REAL zdtlw(ngrid,nlayer) ! (K/s) 272 287 REAL zdtsw(ngrid,nlayer) ! (K/s) 273 ! REAL cldtlw(ngrid,nlayer) ! (K/s) LW heating rate for clear area 274 ! REAL cldtsw(ngrid,nlayer) ! (K/s) SW heating rate for clear area 288 REAL pdqrds(ngrid,nlayer,nq) ! tendency for dust after rocketduststorm 289 275 290 REAL zdtnirco2(ngrid,nlayer) ! (K/s) 276 291 REAL zdtnlte(ngrid,nlayer) ! (K/s) … … 315 330 PARAMETER (length=100) 316 331 332 c Variables for the total dust for diagnostics 333 REAL qdusttotal(ngrid,nlayer) !it equals to dust + stormdust 334 335 INTEGER iaer 336 317 337 c local variables only used for diagnostic (output in file "diagfi" or "stats") 318 338 c ----------------------------------------------------------------------------- … … 320 340 REAL zu(ngrid,nlayer),zv(ngrid,nlayer) 321 341 REAL zq(ngrid,nlayer,nq) 342 322 343 REAL fluxtop_sw_tot(ngrid), fluxsurf_sw_tot(ngrid) 323 344 character*2 str2 … … 325 346 real zdtdif(ngrid,nlayer), zdtadj(ngrid,nlayer) 326 347 real rdust(ngrid,nlayer) ! dust geometric mean radius (m) 348 real rstormdust(ngrid,nlayer) ! stormdust geometric mean radius (m) 327 349 integer igmin, lmin 328 350 logical tdiag … … 340 362 real mass(nq) ! global mass of tracers (g) 341 363 REAL mtot(ngrid) ! Total mass of water vapor (kg/m2) 364 REAL mstormdtot(ngrid) ! Total mass of stormdust tracer (kg/m2) 365 REAL mdusttot(ngrid) ! Total mass of dust tracer (kg/m2) 342 366 REAL icetot(ngrid) ! Total mass of water ice (kg/m2) 343 367 REAL mtotco2(ngrid) ! Total mass of co2 vapor (kg/m2) … … 360 384 REAL nccn(ngrid,nlayer) ! true n ccn (kg/kg) 361 385 REAL qccn(ngrid,nlayer) ! true q ccn (kg/kg) 386 c definition tendancies of stormdust tracers 387 REAL rdsdqdustsurf(ngrid) ! surface q stormdust flux (kg/m2/s) 388 REAL rdsdndustsurf(ngrid) ! surface n stormdust flux (number/m2/s) 389 REAL rdsndust(ngrid,nlayer) ! true n stormdust (kg/kg) 390 REAL rdsqdust(ngrid,nlayer) ! true q stormdust (kg/kg) 391 REAL wspeed(ngrid,nlayer+1) ! vertical speed tracer stormdust 392 REAL dsodust(ngrid,nlayer) 393 REAL dsords(ngrid,nlayer) 394 362 395 REAL nccnco2(ngrid,nlayer) ! true n ccnco2 (kg/kg) 363 396 REAL qccnco2(ngrid,nlayer) ! true q ccnco2 (kg/kg) … … 396 429 REAL tstar(ngrid) ! friction velocity and friction potential temp 397 430 REAL L_mo(ngrid),vhf(ngrid),vvv(ngrid) 398 ! REAL zu2(ngrid) 431 real qdustrds0(ngrid,nlayer),qdustrds1(ngrid,nlayer) 432 real qstormrds0(ngrid,nlayer),qstormrds1(ngrid,nlayer) 433 real qdusttotal0(ngrid),qdusttotal1(ngrid) 399 434 400 435 c sub-grid scale water ice clouds (A. Pottier 2013) … … 543 578 & nsoilmx,ngrid,nlayer,nq, 544 579 & ptimestep,pday,time_phys,cell_area, 545 & albedodat,inertiedat,zmea,zstd,zsig,zgam,zthe) 580 & albedodat,inertiedat,zmea,zstd,zsig,zgam,zthe, 581 & hmons) 546 582 endif 547 583 #endif … … 565 601 zdtsurf(:)=0 566 602 dqsurf(:,:)=0 603 567 604 #ifdef DUSTSTORM 568 605 pq_tmp(:,:,:)=0 … … 572 609 573 610 zday=pday+ptime ! compute time, in sols (and fraction thereof) 574 611 ! Compute local time at each grid point 612 DO ig=1,ngrid 613 local_time(ig)=modulo(1.+(zday-INT(zday)) 614 & +(longitude_deg(ig)/15)/24,1.) 615 ENDDO 575 616 c Compute Solar Longitude (Ls) : 576 617 c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 702 743 & zdtnlte(1:ngrid,1:nlayer)/86400. 703 744 endif 704 else745 ELSE 705 746 zdtnlte(:,:)=0. 706 endif747 ENDIF !end callnlte 707 748 708 749 c Find number of layers for LTE radiation calculations 709 750 IF(MOD(iphysiq*(icount-1),day_step).EQ.0) 710 751 & CALL nlthermeq(ngrid,nlayer,zplev,zplay) 752 753 c rocketstorm : compute dust storm mesh fraction 754 IF (rdstorm) THEN 755 CALL calcstormfract(ngrid,nlayer,nq,pq, 756 & totstormfract) 757 ENDIF 711 758 712 759 c Note: Dustopacity.F has been transferred to callradite.F … … 724 771 c Transfer through CO2 (except NIR CO2 absorption) 725 772 c and aerosols (dust and water ice) 726 773 ! callradite for background dust 774 clearatm=.true. 727 775 c Radiative transfer 728 776 c ------------------ … … 730 778 clearsky=.false. ! part with clouds for both cases CLFvarying true/false 731 779 CALL callradite(icount,ngrid,nlayer,nq,zday,zls,pq,albedo, 732 $ emis,mu0,zplev,zplay,pt,tsurf,fract,dist_sol,igout, 733 $ zdtlw,zdtsw,fluxsurf_lw,fluxsurf_sw,fluxtop_lw,fluxtop_sw, 734 $ tauref,tau,aerosol,dsodust,tauscaling,taucloudtes,rdust,rice, 735 $ nuice,co2ice,clearsky,totcloudfrac) 780 & emis,mu0,zplev,zplay,pt,tsurf,fract,dist_sol,igout, 781 & zdtlw,zdtsw,fluxsurf_lw,fluxsurf_sw,fluxtop_lw, 782 & fluxtop_sw,tauref,tau,aerosol,dsodust,tauscaling, 783 & taucloudtes,rdust,rice,nuice,co2ice,rstormdust, 784 & totstormfract,clearatm,dsords, 785 & clearsky,totcloudfrac) 786 736 787 ! case of sub-grid water ice clouds: callradite for the clear case 737 788 IF (CLFvarying) THEN … … 746 797 & fluxsurf_swclf,fluxtop_lwclf,fluxtop_swclf,tauref, 747 798 & tau,aerosol,dsodust,tauscaling,taucloudtesclf,rdust, 748 & rice,nuice,co2ice, clearsky, totcloudfrac) 799 & rice,nuice,co2ice,rstormdust,totstormfract, 800 & clearatm,dsords,clearsky,totcloudfrac) 749 801 clearsky = .false. ! just in case. 750 802 ! Sum the fluxes and heating rates from cloudy/clear … … 774 826 775 827 ENDIF ! (CLFvarying) 776 828 829 ! Dustinjection 830 if (dustinjection.gt.0) then 831 CALL compute_dtau(ngrid,nlayer, 832 & zday,pplev,tauref, 833 & ptimestep,dustliftday,local_time) 834 endif 835 c============================================================================ 836 777 837 #ifdef DUSTSTORM 778 838 !! specific case: compute the added quantity of dust for perturbation 779 839 if (firstcall) then 780 840 pdq(1:ngrid,1:nlayer,igcm_dust_mass)= 781 & pdq(1:ngrid,1:nlayer,igcm_dust_mass) 841 & pdq(1:ngrid,1:nlayer,igcm_dust_mass) 782 842 & - pq_tmp(1:ngrid,1:nlayer,1) 783 843 & + pq(1:ngrid,1:nlayer,igcm_dust_mass) … … 897 957 ENDIF ! of IF (callrad) 898 958 959 c 3. Rocket dust storm 960 c ------------------------------------------- 961 IF (rdstorm) THEN 962 clearatm=.false. 963 pdqrds(:,:,:)=0. 964 qdusttotal0(:)=0. 965 qdusttotal1(:)=0. 966 do ig=1,ngrid 967 do l=1,nlayer 968 zdh(ig,l)=pdt(ig,l)/zpopsk(ig,l) ! updated potential 969 ! temperature tendency 970 ! for diagnostics 971 qdustrds0(ig,l)=pq(ig,l,igcm_dust_mass)+ 972 & pdq(ig,l,igcm_dust_mass)*ptimestep 973 qstormrds0(ig,l)=pq(ig,l,igcm_stormdust_mass)+ 974 & pdq(ig,l,igcm_stormdust_mass)*ptimestep 975 qdusttotal0(ig)=qdusttotal0(ig)+(qdustrds0(ig,l)+ 976 & qstormrds0(ig,l))*(zplev(ig,l)- 977 & zplev(ig,l+1))/g 978 enddo 979 enddo 980 call writediagfi(ngrid,'qdustrds0','qdust before rds', 981 & 'kg/kg ',3,qdustrds0) 982 call writediagfi(ngrid,'qstormrds0','qstorm before rds', 983 & 'kg/kg ',3,qstormrds0) 984 985 CALL rocketduststorm(ngrid,nlayer,nq,ptime,ptimestep, 986 & pq,pdq,pt,pdt,zplev,zplay,zzlev, 987 & zzlay,zdtsw,zdtlw, 988 c for radiative transfer 989 & clearatm,icount,zday,zls, 990 & tsurf,igout,totstormfract, 991 c input sub-grid scale cloud 992 & clearsky,totcloudfrac, 993 c output 994 & pdqrds,wspeed,dsodust,dsords) 995 996 c update the tendencies of both dust after vertical transport 997 DO l=1,nlayer 998 DO ig=1,ngrid 999 pdq(ig,l,igcm_stormdust_mass)= 1000 & pdq(ig,l,igcm_stormdust_mass)+ 1001 & pdqrds(ig,l,igcm_stormdust_mass) 1002 pdq(ig,l,igcm_stormdust_number)= 1003 & pdq(ig,l,igcm_stormdust_number)+ 1004 & pdqrds(ig,l,igcm_stormdust_number) 1005 1006 pdq(ig,l,igcm_dust_mass)= 1007 & pdq(ig,l,igcm_dust_mass)+ pdqrds(ig,l,igcm_dust_mass) 1008 pdq(ig,l,igcm_dust_number)= 1009 & pdq(ig,l,igcm_dust_number)+ 1010 & pdqrds(ig,l,igcm_dust_number) 1011 1012 ENDDO 1013 ENDDO 1014 do l=1,nlayer 1015 do ig=1,ngrid 1016 qdustrds1(ig,l)=pq(ig,l,igcm_dust_mass)+ 1017 & pdq(ig,l,igcm_dust_mass)*ptimestep 1018 qstormrds1(ig,l)=pq(ig,l,igcm_stormdust_mass)+ 1019 & pdq(ig,l,igcm_stormdust_mass)*ptimestep 1020 qdusttotal1(ig)=qdusttotal1(ig)+(qdustrds1(ig,l)+ 1021 & qstormrds1(ig,l))*(zplev(ig,l)- 1022 & zplev(ig,l+1))/g 1023 enddo 1024 enddo 1025 1026 c for diagnostics 1027 call writediagfi(ngrid,'qdustrds1','qdust after rds', 1028 & 'kg/kg ',3,qdustrds1) 1029 call writediagfi(ngrid,'qstormrds1','qstorm after rds', 1030 & 'kg/kg ',3,qstormrds1) 1031 1032 call writediagfi(ngrid,'qdusttotal0','q sum before rds', 1033 & 'kg/kg ',2,qdusttotal0) 1034 call writediagfi(ngrid,'qdusttotal1','q sum after rds', 1035 & 'kg/kg ',2,qdusttotal1) 1036 1037 ENDIF ! end of if(rdstorm) 1038 899 1039 c----------------------------------------------------------------------- 900 c 3. Gravity wave and subgrid scale topography drag :1040 c 4. Gravity wave and subgrid scale topography drag : 901 1041 c ------------------------------------------------- 902 1042 … … 917 1057 918 1058 c----------------------------------------------------------------------- 919 c 4. Vertical diffusion (turbulent mixing):1059 c 5. Vertical diffusion (turbulent mixing): 920 1060 c ----------------------------------------- 921 1061 … … 968 1108 $ zdum1,zdum2,zdh,pdq,zflubid, 969 1109 $ zdudif,zdvdif,zdhdif,zdtsdif,q2, 970 & zdqdif,zdqsdif,wstar,zcdv,zcdh,hfmax_th,sensibFlux )971 1110 & zdqdif,zdqsdif,wstar,zcdv,zcdh,hfmax_th,sensibFlux, 1111 & dustliftday,local_time) 972 1112 973 1113 DO ig=1,ngrid … … 1018 1158 zdqdif(1:ngrid,2:nlayer,1:nq) = 0. 1019 1159 DO iq=1, nq 1020 IF ((iq .ne. igcm_dust_mass)1021 & .and. (iq .ne. igcm_dust_number)) THEN1022 zdqsdif(:,iq)=0.1023 ENDIF1160 IF ((iq .ne. igcm_dust_mass) 1161 & .and. (iq .ne. igcm_dust_number)) THEN 1162 zdqsdif(:,iq)=0. 1163 ENDIF 1024 1164 ENDDO 1025 1165 ELSE … … 1041 1181 1042 1182 c----------------------------------------------------------------------- 1043 c 5. Thermals :1183 c 6. Thermals : 1044 1184 c ----------------------------- 1045 1185 … … 1085 1225 lmax_th_out(:)=0. 1086 1226 end if 1087 1088 1227 c----------------------------------------------------------------------- 1089 c 5. Dry convective adjustment:1228 c 7. Dry convective adjustment: 1090 1229 c ----------------------------- 1091 1230 … … 1107 1246 $ zduadj,zdvadj,zdhadj, 1108 1247 $ zdqadj) 1109 1110 1248 1111 1249 DO l=1,nlayer … … 1133 1271 1134 1272 c----------------------------------------------------------------------- 1135 c 6. Specific parameterizations for tracers1273 c 8. Specific parameterizations for tracers 1136 1274 c: ----------------------------------------- 1137 1275 1138 1276 if (tracer) then 1139 1277 1140 c 6a. Water and ice1278 c 8a. Water and ice 1141 1279 c --------------- 1142 1280 … … 1219 1357 END IF ! of IF (water) 1220 1358 1221 c 6a bis. CO2 clouds (CL & JA)1359 c 8a bis. CO2 clouds (CL & JA) 1222 1360 c --------------------------------------- 1223 1361 c CO2 ice cloud condensation in the atmosphere … … 1342 1480 1343 1481 1344 c 6b. Aerosol particles1482 c 8b. Aerosol particles 1345 1483 c ------------------- 1346 1347 1484 c ---------- 1348 1485 c Dust devil : … … 1371 1508 c ------------- 1372 1509 c Sedimentation : acts also on water ice 1373 c ------------- 1510 c ------------- 1374 1511 IF (sedimentation) THEN 1375 1512 zdqsed(1:ngrid,1:nlayer,1:nq)=0 … … 1378 1515 c Sedimentation for co2 clouds tracers are inside co2cloud microtimestep 1379 1516 c Zdqssed isn't 1380 call callsedim(ngrid,nlayer, 1381 & zplev,zzlev, zzlay, pt, pdt, rdust, rice,1382 & r sedcloud,rhocloud,1383 & pq, pdq, zdqsed,zdqssed,nq,1517 call callsedim(ngrid,nlayer,ptimestep, 1518 & zplev,zzlev,zzlay,pt,pdt,rdust,rstormdust, 1519 & rice,rsedcloud,rhocloud, 1520 & pq,pdq,zdqsed,zdqssed,nq, 1384 1521 & tau,tauscaling) 1385 1522 c Flux at the surface of co2 ice computed in co2cloud microtimestep … … 1387 1524 zdqssed(1:ngrid,igcm_co2_ice)=zdqssed_co2(1:ngrid) 1388 1525 ENDIF 1526 1527 IF (rdstorm) THEN 1528 c Storm dust cannot sediment to the surface 1529 DO ig=1,ngrid 1530 zdqsed(ig,1,igcm_stormdust_mass)= 1531 & zdqsed(ig,1,igcm_stormdust_mass)+ 1532 & zdqssed(ig,igcm_stormdust_mass) / 1533 & ((pplev(ig,1)-pplev(ig,2))/g) 1534 zdqsed(ig,1,igcm_stormdust_number)= 1535 & zdqsed(ig,1,igcm_stormdust_number)+ 1536 & zdqssed(ig,igcm_stormdust_number) / 1537 & ((pplev(ig,1)-pplev(ig,2))/g) 1538 zdqssed(ig,igcm_stormdust_mass)=0. 1539 zdqssed(ig,igcm_stormdust_number)=0. 1540 ENDDO 1541 ENDIF !rdstorm 1389 1542 1390 1543 DO iq=1, nq … … 1400 1553 ENDDO 1401 1554 ENDDO 1555 1402 1556 END IF ! of IF (sedimentation) 1403 1557 1404 1558 c Add lifted dust to tendancies after sedimentation in the LES (AC) 1405 1559 IF (turb_resolved) THEN … … 1417 1571 ENDDO 1418 1572 ENDIF 1419 1420 1573 c 1421 c 6c. Chemical species1574 c 8c. Chemical species 1422 1575 c ------------------ 1423 1576 … … 1493 1646 #endif 1494 1647 1495 c 6d. Updates1648 c 8d. Updates 1496 1649 c --------- 1497 1650 … … 1511 1664 #ifndef MESOSCALE 1512 1665 c----------------------------------------------------------------------- 1513 c 7. THERMOSPHERE CALCULATION1666 c 9. THERMOSPHERE CALCULATION 1514 1667 c----------------------------------------------------------------------- 1515 1668 … … 1535 1688 endif ! of if (callthermos) 1536 1689 #endif 1537 1538 1690 c----------------------------------------------------------------------- 1539 c 8. Carbon dioxide condensation-sublimation:1691 c 10. Carbon dioxide condensation-sublimation: 1540 1692 c (should be the last atmospherical physical process to be computed) 1541 1693 c ------------------------------------------- … … 1607 1759 #endif 1608 1760 1609 ENDIF ! of IF (callcond) 1610 1611 1761 ENDIF ! of IF (callcond) 1612 1762 c----------------------------------------------------------------------- 1613 c 9. Surface and sub-surface soil temperature1763 c 11. Surface and sub-surface soil temperature 1614 1764 c----------------------------------------------------------------------- 1615 1765 c 1616 1766 c 1617 c 9.1 Increment Surface temperature:1767 c 11.1 Increment Surface temperature: 1618 1768 c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1619 1769 … … 1656 1806 1657 1807 c 1658 c 9.2 Compute soil temperatures and subsurface heat flux:1808 c 11.2 Compute soil temperatures and subsurface heat flux: 1659 1809 c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1660 1810 IF (callsoil) THEN … … 1669 1819 ENDIF 1670 1820 ENDIF 1671 1821 1822 c To avoid negative values 1823 IF (rdstorm) THEN 1824 where (pq(:,:,igcm_stormdust_mass) + 1825 & ptimestep*pdq(:,:,igcm_stormdust_mass) < 0.) 1826 pdq(:,:,igcm_stormdust_mass) = 1827 & - pq(:,:,igcm_stormdust_mass)/ptimestep + 1.e-30 1828 pdq(:,:,igcm_stormdust_number) = 1829 & - pq(:,:,igcm_stormdust_number)/ptimestep + 1.e-30 1830 end where 1831 where (pq(:,:,igcm_stormdust_number) + 1832 & ptimestep*pdq(:,:,igcm_stormdust_number) < 0.) 1833 pdq(:,:,igcm_stormdust_mass) = 1834 & - pq(:,:,igcm_stormdust_mass)/ptimestep + 1.e-30 1835 pdq(:,:,igcm_stormdust_number) = 1836 & - pq(:,:,igcm_dust_number)/ptimestep + 1.e-30 1837 end where 1838 1839 where (pq(:,:,igcm_dust_mass) + 1840 & ptimestep*pdq(:,:,igcm_dust_mass) < 0.) 1841 pdq(:,:,igcm_dust_mass) = 1842 & - pq(:,:,igcm_dust_mass)/ptimestep + 1.e-30 1843 pdq(:,:,igcm_dust_number) = 1844 & - pq(:,:,igcm_dust_number)/ptimestep + 1.e-30 1845 end where 1846 where (pq(:,:,igcm_dust_number) + 1847 & ptimestep*pdq(:,:,igcm_dust_number) < 0.) 1848 pdq(:,:,igcm_dust_mass) = 1849 & - pq(:,:,igcm_dust_mass)/ptimestep + 1.e-30 1850 pdq(:,:,igcm_dust_number) = 1851 & - pq(:,:,igcm_dust_number)/ptimestep + 1.e-30 1852 end where 1853 ENDIF !(rdstorm) 1672 1854 1673 1855 c----------------------------------------------------------------------- 1674 c 1 0. Write output files1856 c 12. Write output files 1675 1857 c ---------------------- 1676 1858 … … 1885 2067 endif 1886 2068 endif ! of (doubleq) 2069 2070 if (rdstorm) then ! diagnostics of stormdust tendancies for 1D and 3D 2071 mstormdtot(:)=0 2072 mdusttot(:)=0 2073 qdusttotal(:,:)=0 2074 do ig=1,ngrid 2075 rdsdqdustsurf(ig) = 2076 & zdqssed(ig,igcm_stormdust_mass)*tauscaling(ig) 2077 rdsdndustsurf(ig) = 2078 & zdqssed(ig,igcm_stormdust_number)*tauscaling(ig) 2079 rdsndust(ig,:) = 2080 & pq(ig,:,igcm_stormdust_number)*tauscaling(ig) 2081 rdsqdust(ig,:) = 2082 & pq(ig,:,igcm_stormdust_mass)*tauscaling(ig) 2083 do l=1,nlayer 2084 mstormdtot(ig) = mstormdtot(ig) + 2085 & zq(ig,l,igcm_stormdust_mass) * 2086 & (zplev(ig,l) - zplev(ig,l+1)) / g 2087 mdusttot(ig) = mdusttot(ig) + 2088 & zq(ig,l,igcm_dust_mass) * 2089 & (zplev(ig,l) - zplev(ig,l+1)) / g 2090 qdusttotal(ig,l) = qdust(ig,l)+rdsqdust(ig,l) !calculate total dust 2091 enddo 2092 enddo 2093 endif !(rdstorm) 2094 1887 2095 if (co2clouds) then 1888 2096 do ig=1,ngrid … … 1906 2114 enddo 1907 2115 endif ! of if (co2clouds) 1908 1909 2116 1910 2117 if (water) then 1911 2118 mtot(:)=0 … … 2138 2345 call wstats(ngrid,'dustN','Dust number', 2139 2346 & 'part/kg',3,ndust) 2347 if (rdstorm) then 2348 call wstats(ngrid,'reffstormdust','reffdust', 2349 & 'm',3,rstormdust*ref_r0) 2350 call wstats(ngrid,'rdsdustq','Dust mass mr', 2351 & 'kg/kg',3,rdsqdust) 2352 call wstats(ngrid,'rdsdustN','Dust number', 2353 & 'part/kg',3,rdsndust) 2354 end if 2140 2355 else 2141 2356 do iq=1,dustbin … … 2345 2560 c call WRITEDIAGFI(ngrid,'lw_htrt','lw heat. rate', 2346 2561 c & 'w.m-2',3,zdtlw) 2347 2562 2348 2563 if (.not.activice) then 2349 2564 CALL WRITEDIAGFI(ngrid,'tauTESap', … … 2434 2649 & qsurf(1:ngrid,igcm_h2o_ice)) 2435 2650 #endif 2436 2437 2651 CALL WRITEDIAGFI(ngrid,'mtot', 2438 2652 & 'total mass of water vapor', … … 2443 2657 vmr=zq(1:ngrid,1:nlayer,igcm_h2o_ice) 2444 2658 & *mmean(1:ngrid,1:nlayer)/mmol(igcm_h2o_ice) 2445 callWRITEDIAGFI(ngrid,'vmr_h2oice','h2o ice vmr',2659 CALL WRITEDIAGFI(ngrid,'vmr_h2oice','h2o ice vmr', 2446 2660 & 'mol/mol',3,vmr) 2447 2661 vmr=zq(1:ngrid,1:nlayer,igcm_h2o_vap) 2448 2662 & *mmean(1:ngrid,1:nlayer)/mmol(igcm_h2o_vap) 2449 callWRITEDIAGFI(ngrid,'vmr_h2ovap','h2o vap vmr',2663 CALL WRITEDIAGFI(ngrid,'vmr_h2ovap','h2o vap vmr', 2450 2664 & 'mol/mol',3,vmr) 2451 2665 CALL WRITEDIAGFI(ngrid,'reffice', … … 2555 2769 & 'part/kg',3,ndust) 2556 2770 call WRITEDIAGFI(ngrid,'dsodust', 2557 & 'dust density scaled opacity', 2558 & 'm2.kg-1',3,dsodust) 2559 c call WRITEDIAGFI(ngrid,"tauscaling", 2560 c & "dust conversion factor"," ",2,tauscaling) 2771 & 'density scaled optcial depth', 2772 & 'm2.kg-1',3,dsodust) 2773 call WRITEDIAGFI(ngrid,'dso', 2774 & 'density scaled optcial depth', 2775 & 'm2.kg-1',3,dsodust+dsords) 2561 2776 else 2562 2777 do iq=1,dustbin … … 2569 2784 endif ! (doubleq) 2570 2785 2786 if (rdstorm) then ! writediagfi tendencies stormdust tracers 2787 call WRITEDIAGFI(ngrid,'reffdust','reffdust', 2788 & 'm',3,rdust*ref_r0) 2789 call WRITEDIAGFI(ngrid,'reffstormdust','reffstormdust', 2790 & 'm',3,rstormdust*ref_r0) 2791 call WRITEDIAGFI(ngrid,'mstormdtot', 2792 & 'total mass of stormdust only', 2793 & 'kg.m-2',2,mstormdtot) 2794 call WRITEDIAGFI(ngrid,'mdusttot', 2795 & 'total mass of dust only', 2796 & 'kg.m-2',2,mdusttot) 2797 call WRITEDIAGFI(ngrid,'rdsdqsdust', 2798 & 'deposited surface stormdust mass', 2799 & 'kg.m-2.s-1',2,rdsdqdustsurf) 2800 call WRITEDIAGFI(ngrid,'rdsdustq','storm Dust mass mr', 2801 & 'kg/kg',3,rdsqdust) 2802 call WRITEDIAGFI(ngrid,'rdsdustqmodel','storm Dust massmr', 2803 & 'kg/kg',3,pq(:,:,igcm_stormdust_mass)) 2804 call WRITEDIAGFI(ngrid,'rdsdustN','storm Dust number', 2805 & 'part/kg',3,rdsndust) 2806 call WRITEDIAGFI(ngrid,"stormfract", 2807 & "fraction of the mesh, with stormdust","none", 2808 & 2,totstormfract) 2809 call WRITEDIAGFI(ngrid,'qsurf', 2810 & 'stormdust injection', 2811 & 'kg.m-2',2,qsurf(:,igcm_stormdust_mass)) 2812 call WRITEDIAGFI(ngrid,'pdqsurf', 2813 & 'tendancy stormdust mass at surface', 2814 & 'kg.m-2',2,dqsurf(:,igcm_stormdust_mass)) 2815 call WRITEDIAGFI(ngrid,'wspeed','vertical speed stormdust', 2816 & 'm/s',3,wspeed(:,1:nlayer)) 2817 call WRITEDIAGFI(ngrid,'zdqsed_dustq' 2818 & ,'sedimentation q','kg.m-2.s-1',3, 2819 & zdqsed(:,:,igcm_dust_mass)) 2820 call WRITEDIAGFI(ngrid,'zdqssed_dustq' 2821 & ,'sedimentation q','kg.m-2.s-1',2, 2822 & zdqssed(:,igcm_dust_mass)) 2823 call WRITEDIAGFI(ngrid,'zdqsed_rdsq' 2824 & ,'sedimentation q','kg.m-2.s-1',3, 2825 & zdqsed(:,:,igcm_stormdust_mass)) 2826 call WRITEDIAGFI(ngrid,'rdust','rdust', 2827 & 'm',3,rdust) 2828 call WRITEDIAGFI(ngrid,'rstormdust','rstormdust', 2829 & 'm',3,rstormdust) 2830 call WRITEDIAGFI(ngrid,'totaldustq','total dust mass', 2831 & 'kg/kg',3,qdusttotal) 2832 call WRITEDIAGFI(ngrid,'dsords', 2833 & 'density scaled opacity of stormdust', 2834 & 'm2.kg-1',3,dsords) 2835 endif ! (rdstorm) 2836 2571 2837 if (scavenging) then 2572 2838 call WRITEDIAGFI(ngrid,'ccnq','CCN mass mr', … … 2574 2840 call WRITEDIAGFI(ngrid,'ccnN','CCN number', 2575 2841 & 'part/kg',3,nccn) 2842 call WRITEDIAGFI(ngrid,'surfccnq','Surf nuclei mass mr', 2843 & 'kg.m-2',2,qsurf(1,igcm_ccn_mass)) 2844 call WRITEDIAGFI(ngrid,'surfccnN','Surf nuclei number', 2845 & 'kg.m-2',2,qsurf(1,igcm_ccn_number)) 2576 2846 endif ! (scavenging) 2577 2847 … … 2804 3074 call WRITEDIAGFI(ngrid,'rdust','rdust', 2805 3075 & 'm',1,rdust) 2806 endif 3076 endif ! doubleq 1D 3077 if (rdstorm) then 3078 call writediagfi(1,'aerosol_dust','opacity of env. dust','' 3079 & ,1,aerosol(:,:,igcm_dust_mass)) 3080 call writediagfi(1,'aerosol_stormdust', 3081 & 'opacity of storm dust','' 3082 & ,1,aerosol(:,:,igcm_stormdust_mass)) 3083 call WRITEDIAGFI(ngrid,'dqsdifdustq','diffusion', 3084 & 'kg.m-2.s-1',0,zdqsdif(1,igcm_dust_mass)) 3085 call WRITEDIAGFI(ngrid,'dqsdifrdsq','diffusion', 3086 & 'kg.m-2.s-1',0,zdqsdif(1,igcm_stormdust_mass)) 3087 call WRITEDIAGFI(ngrid,'mstormdtot', 3088 & 'total mass of stormdust only', 3089 & 'kg.m-2',0,mstormdtot) 3090 call WRITEDIAGFI(ngrid,'mdusttot', 3091 & 'total mass of dust only', 3092 & 'kg.m-2',0,mdusttot) 3093 call WRITEDIAGFI(ngrid,'tauref', 3094 & 'Dust ref opt depth','NU',0,tauref) 3095 call WRITEDIAGFI(ngrid,'rdsdqsdust', 3096 & 'deposited surface stormdust mass', 3097 & 'kg.m-2.s-1',0,rdsdqdustsurf) 3098 call WRITEDIAGFI(ngrid,'rdsdustq','storm Dust mass mr', 3099 & 'kg/kg',1,rdsqdust) 3100 call WRITEDIAGFI(ngrid,"stormfract", 3101 & "fraction of the mesh,with stormdust", 3102 & "none",0,totstormfract) 3103 call WRITEDIAGFI(ngrid,'rdsqsurf', 3104 & 'stormdust at surface', 3105 & 'kg.m-2',0,qsurf(:,igcm_stormdust_mass)) 3106 call WRITEDIAGFI(ngrid,'qsurf', 3107 & 'dust mass at surface', 3108 & 'kg.m-2',0,qsurf(:,igcm_dust_mass)) 3109 call WRITEDIAGFI(ngrid,'wspeed','vertical speed stormdust', 3110 & 'm/s',1,wspeed) 3111 call WRITEDIAGFI(ngrid,'totaldustq','total dust mass', 3112 & 'kg/kg',1,qdusttotal) 3113 call WRITEDIAGFI(ngrid,'dsords', 3114 & 'density scaled opacity of stormdust', 3115 & 'm2.kg-1',1,dsords) 3116 call WRITEDIAGFI(ngrid,'zdqsed_dustq' 3117 & ,'sedimentation q','kg.m-2.s-1',1, 3118 & zdqsed(1,:,igcm_dust_mass)) 3119 call WRITEDIAGFI(ngrid,'zdqsed_rdsq' 3120 & ,'sedimentation q','kg.m-2.s-1',1, 3121 & zdqsed(1,:,igcm_stormdust_mass)) 3122 endif !(rdstorm 1D) 3123 2807 3124 if (water.AND.tifeedback) then 2808 3125 call WRITEDIAGFI(ngrid,"soiltemp", … … 2975 3292 2976 3293 icount=icount+1 3294 2977 3295 2978 3296 END SUBROUTINE physiq -
trunk/LMDZ.MARS/libf/phymars/suaer.F90
r1918 r1974 6 6 iaer_dust_conrath,iaer_dust_doubleq,& 7 7 iaer_dust_submicron,iaer_h2o_ice,& 8 iaer_stormdust_doubleq,& 8 9 file_id,radiustab, gvis, omegavis, & 9 10 QVISsQREF, gIR, omegaIR, & … … 153 154 ! Reference wavelength in the infrared: 154 155 longrefir(iaer)=12.1E-6 ! 825cm-1 TES/MGS 156 !================================================================== 157 CASE("stormdust_doubleq") aerkind ! Two-moment scheme for stormdust - radiative properties 158 !================================================================== 159 ! Visible domain: 160 file_id(iaer,1) = 'optprop_dustvis_TM_n50.dat' !T-Matrix 161 ! Infrared domain: 162 file_id(iaer,2) = 'optprop_dustir_n50.dat' !Mie 163 ! Reference wavelength in the visible: 164 longrefvis(iaer)=0.67E-6 165 ! If not equal to 0.67e-6 -> change readtesassim accordingly; 166 ! Reference wavelength in the infrared: 167 longrefir(iaer)=dustrefir 155 168 !================================================================== 156 169 END SELECT aerkind -
trunk/LMDZ.MARS/libf/phymars/surfdat_h.F90
r1770 r1974 20 20 real,save :: iceradius(2) , dtemisice(2) 21 21 real,save,allocatable :: zmea(:),zstd(:),zsig(:),zgam(:),zthe(:) 22 real,save,allocatable :: hmons(:) 22 23 real,save,allocatable :: z0(:) ! surface roughness length (m) 23 24 real,save :: z0_default ! default (constant over planet) surface roughness (m) … … 55 56 allocate(capcal(ngrid)) 56 57 allocate(fluxgrd(ngrid)) 57 58 allocate(hmons(ngrid)) 59 58 60 end subroutine ini_surfdat_h 59 61 … … 79 81 if (allocated(capcal)) deallocate(capcal) 80 82 if (allocated(fluxgrd)) deallocate(fluxgrd) 83 if (allocated(hmons)) deallocate(hmons) 81 84 82 85 end subroutine end_surfdat_h -
trunk/LMDZ.MARS/libf/phymars/tracer_mod.F90
r1941 r1974 6 6 integer,save :: nqmx ! initialized in conf_phys 7 7 8 character* 20,allocatable,save :: noms(:) ! name of the tracer8 character*30,allocatable,save :: noms(:) ! name of the tracer 9 9 real,allocatable,save :: mmol(:) ! mole mass of tracer (g/mol-1) 10 10 real,allocatable,save :: radius(:) ! dust and ice particle radius (m) … … 23 23 real,save :: nuiceco2_sed ! Sedimentation effective variance of the co2 ice dist. 24 24 real,save :: nuiceco2_ref ! Effective variance of the co2 ice dist. 25 25 26 26 real,save :: ccn_factor ! ratio of nuclei for water ice particles 27 27 … … 42 42 integer,save :: igcm_ccn_number ! CCN number mixing ratio 43 43 integer,save :: igcm_dust_submicron ! submicron dust mixing ratio 44 44 integer,save :: igcm_stormdust_mass ! storm dust mass mixing ratio 45 integer,save :: igcm_stormdust_number ! storm dust number mixing ratio 46 45 47 integer,save :: igcm_ccnco2_mass ! CCN (dust and/or water ice) for CO2 mass mixing ratio 46 48 integer,save :: igcm_ccnco2_number ! CCN (dust and/or water ice) for CO2 number mixing ratio -
trunk/LMDZ.MARS/libf/phymars/updatereffrad_mod.F
r1969 r1974 6 6 7 7 SUBROUTINE updatereffrad(ngrid,nlayer, 8 & rdust,r ice,nuice,8 & rdust,rstormdust,rice,nuice, 9 9 & reffrad,nueffrad, 10 10 & pq,tauscaling,tau,pplay) … … 14 14 & igcm_h2o_ice, igcm_ccn_mass, radius, 15 15 & igcm_ccn_number, nuice_ref, varian, 16 & ref_r0, igcm_dust_submicron 16 & ref_r0, igcm_dust_submicron, 17 & igcm_stormdust_mass,igcm_stormdust_number 17 18 USE dimradmars_mod, only: nueffdust,naerkind, 18 19 & name_iaer, 19 20 & iaer_dust_conrath,iaer_dust_doubleq, 20 & iaer_dust_submicron,iaer_h2o_ice 21 & iaer_dust_submicron,iaer_h2o_ice, 22 & iaer_stormdust_doubleq 21 23 22 24 IMPLICIT NONE … … 45 47 46 48 c----------------------------------------------------------------------- 47 c Inputs :49 c Inputs/outputs: 48 50 c ------ 49 51 50 INTEGER ngrid,nlayer52 INTEGER, INTENT(in) :: ngrid,nlayer 51 53 c Ice geometric mean radius (m) 52 REAL :: rice(ngrid,nlayer)54 REAL, INTENT(out) :: rice(ngrid,nlayer) 53 55 c Estimated effective variance of the size distribution (n.u.) 54 REAL :: nuice(ngrid,nlayer)56 REAL, INTENT(out) :: nuice(ngrid,nlayer) 55 57 c Tracer mass mixing ratio (kg/kg) 56 REAL pq(ngrid,nlayer,nqmx) 57 REAL rdust(ngrid,nlayer) ! Dust geometric mean radius (m) 58 59 REAL pplay(ngrid,nlayer) ! altitude at the middle of the layers 60 REAL tau(ngrid,naerkind) 61 62 63 c Outputs: 64 c ------- 65 58 REAL, INTENT(in) :: pq(ngrid,nlayer,nqmx) 59 REAL, INTENT(out) :: rdust(ngrid,nlayer) ! Dust geometric mean radius (m) 60 REAL, INTENT(out) :: rstormdust(ngrid,nlayer) ! Dust geometric mean radius (m) 61 REAL, INTENT(in) :: pplay(ngrid,nlayer) ! altitude at the middle of the layers 62 REAL, INTENT(in) :: tau(ngrid,naerkind) 66 63 c Aerosol effective radius used for radiative transfer (meter) 67 REAL :: reffrad(ngrid,nlayer,naerkind)64 REAL, INTENT(out) :: reffrad(ngrid,nlayer,naerkind) 68 65 c Aerosol effective variance used for radiative transfer (n.u.) 69 REAL :: nueffrad(ngrid,nlayer,naerkind) 70 66 REAL, INTENT(out) :: nueffrad(ngrid,nlayer,naerkind) 67 REAL, INTENT(in) :: tauscaling(ngrid) ! Convertion factor for qccn and Nccn 68 71 69 c Local variables: 72 70 c --------------- … … 85 83 REAL Mo,No ! Mass and number of ccn 86 84 REAL rhocloud(ngrid,nlayer) ! Cloud density (kg.m-3) 87 REAL tauscaling(ngrid) ! Convertion factor for qccn and Nccn88 85 89 86 LOGICAL,SAVE :: firstcall=.true. … … 114 111 ENDDO 115 112 ENDIF 113 114 ! updating radius of stormdust particles 115 IF (rdstorm.AND.active) THEN 116 DO l=1,nlayer 117 DO ig=1, ngrid 118 call updaterdust(pq(ig,l,igcm_stormdust_mass), 119 & pq(ig,l,igcm_stormdust_number),rstormdust(ig,l)) 120 nueffdust(ig,l) = exp(varian**2.)-1. 121 ENDDO 122 ENDDO 123 ENDIF 116 124 117 125 c 1.2 Water-ice particles … … 126 134 127 135 IF (firstcall) THEN 128 IF (minval(tauscaling).lt.0) tauscaling(:) = 1.e-3 ! default value when non-read in startfi is -1129 IF (freedust) tauscaling(:) = 1. ! if freedust, enforce no rescaling at all136 !IF (minval(tauscaling).lt.0) tauscaling(:) = 1.e-3 ! default value when non-read in startfi is -1 137 !IF (freedust) tauscaling(:) = 1. ! if freedust, enforce no rescaling at all 130 138 firstcall = .false. 131 139 ENDIF … … 206 214 ENDDO 207 215 c================================================================== 216 CASE("stormdust_doubleq") aerkind! Two-moment scheme for 217 c stormdust; same distribution than normal dust 218 c================================================================== 219 DO l=1,nlayer 220 DO ig=1,ngrid 221 reffrad(ig,l,iaer) = rstormdust(ig,l) * ref_r0 222 nueffrad(ig,l,iaer) = nueffdust(ig,l) 223 ENDDO 224 ENDDO 225 c================================================================== 208 226 END SELECT aerkind 209 227 ENDDO ! iaer (loop on aerosol kind) -
trunk/LMDZ.MARS/libf/phymars/vdifc_mod.F
r1969 r1974 12 12 $ pdudif,pdvdif,pdhdif,pdtsrf,pq2, 13 13 $ pdqdif,pdqsdif,wstar,zcdv_true,zcdh_true, 14 $ hfmax,sensibFlux )14 $ hfmax,sensibFlux,dustliftday,local_time) 15 15 16 16 use tracer_mod, only: noms, igcm_dust_mass, igcm_dust_number, 17 17 & igcm_dust_submicron, igcm_h2o_vap, 18 & igcm_h2o_ice, alpha_lift 18 & igcm_h2o_ice, alpha_lift, 19 & igcm_stormdust_mass, igcm_stormdust_number 19 20 use surfdat_h, only: watercaptag, frost_albedo_threshold, dryness 20 21 USE comcstfi_h, ONLY: cpp, r, rcp, g 21 22 use turb_mod, only: turb_resolved, ustar, tstar 23 use compute_dtau_mod, only: ti_injection,tf_injection 22 24 IMPLICIT NONE 23 25 … … 79 81 real,intent(in) :: pq(ngrid,nlay,nq), pdqfi(ngrid,nlay,nq) 80 82 real,intent(out) :: pdqdif(ngrid,nlay,nq) 81 real,intent(out) :: pdqsdif(ngrid,nq) 83 real,intent(out) :: pdqsdif(ngrid,nq) 84 REAL,INTENT(in) :: dustliftday(ngrid) 85 REAL,INTENT(in) :: local_time(ngrid) 82 86 83 87 c local: … … 691 695 end do 692 696 else if (doubleq) then 693 do ig=1,ngrid 697 if (dustinjection.eq.0) then !injection scheme 0 (old) 698 !or 2 (injection in CL) 699 do ig=1,ngrid 694 700 if(co2ice(ig).lt.1) then ! pas de soulevement si glace CO2 695 701 pdqsdif(ig,igcm_dust_mass) = … … 698 704 & -alpha_lift(igcm_dust_number) 699 705 end if 700 end do 706 end do 707 elseif(dustinjection.eq.1)then ! dust injection scheme = 1 injection from surface 708 do ig=1,ngrid 709 if(co2ice(ig).lt.1) then ! pas de soulevement si glace CO2 710 IF((ti_injection.LE.local_time(ig)).and. 711 & (local_time(ig).LE.tf_injection)) THEN 712 if (rdstorm) then !Rocket dust storm scheme 713 pdqsdif(ig,igcm_stormdust_mass) = 714 & -alpha_lift(igcm_stormdust_mass) 715 & *dustliftday(ig) 716 pdqsdif(ig,igcm_stormdust_number) = 717 & -alpha_lift(igcm_stormdust_number) 718 & *dustliftday(ig) 719 pdqsdif(ig,igcm_dust_mass)= 0. 720 pdqsdif(ig,igcm_dust_number)= 0. 721 else 722 pdqsdif(ig,igcm_dust_mass)= 723 & -dustliftday(ig)* 724 & alpha_lift(igcm_dust_mass) 725 pdqsdif(ig,igcm_dust_number)= 726 & -dustliftday(ig)* 727 & alpha_lift(igcm_dust_number) 728 endif 729 if (submicron) then 730 pdqsdif(ig,igcm_dust_submicron) = 0. 731 endif ! if (submicron) 732 ELSE ! outside dust injection time frame 733 pdqsdif(ig,igcm_dust_mass)= 0. 734 pdqsdif(ig,igcm_dust_number)= 0. 735 pdqsdif(ig,igcm_stormdust_mass)= 0. 736 pdqsdif(ig,igcm_stormdust_number)= 0. 737 ENDIF 738 739 end if ! of if(co2ice(ig).lt.1) 740 end do 741 endif ! end if dustinjection 701 742 else if (submicron) then 702 743 do ig=1,ngrid … … 723 764 c Inversion pour l'implicite sur q 724 765 c -------------------------------- 725 do iq=1,nq 766 do iq=1,nq !for all tracers including stormdust 726 767 CALL multipl((nlay-1)*ngrid,zkh(1,2),zb0(1,2),zb(1,2)) 727 768
Note: See TracChangeset
for help on using the changeset viewer.