Changeset 2628


Ignore:
Timestamp:
Feb 28, 2022, 6:46:07 PM (3 years ago)
Author:
abierjon
Message:

Mars GCM:
Big changes on mountain top dust flows for GCM6:

  • the scheme now activates only in grid meshes that contain a mountain among a hard-written list, instead of every meshes. This is done to prevent strong artificial reinjections of dust in places that don't present huge converging slopes enabling the concentration of dust (ex: Valles Marineris, Hellas). Topdust is now also detrained as soon as it leaves the column it originated from.
  • the list of the 19 allowed mountains is used by the subroutine topmons_setup in module topmons_mod, to compute a logical array contains_mons(ngrid). alpha_hmons and hsummit are also set up once and for all by this subroutine, which is called in physiq_mod's firstcall.
  • contains_mons, alpha_hmons and hsummit are now saved variables of the module surfdat_h, and are called as such and not as arguments in the subroutines using them.
  • the logical flag "slpwind" and the comments in the code have also been updated to the new terminology "mountain top dust flows", accordingly to ticket #71. The new flag read in callphys.def is "topflows".

AB

Location:
trunk/LMDZ.MARS
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/README

    r2627 r2628  
    35563556Also cleaned up and commented comsaison_h in the process.
    35573557
    3558 == 04/01/2021 == CM
     3558== 04/01/2022 == CM
    35593559- Clean co2condens_mod.F
    35603560- remove dqsurf duplication after call co2condens
    35613561
    3562 == 04/01/2021 == AB
     3562== 04/01/2022 == AB
    35633563Some further cleaning of co2condens following r2599 and r2600 that fixed the bug appearing when the scavenging by CO2 ice was activated.
    35643564
    3565 == 04/01/2021 == CM
     3565== 04/01/2022 == CM
    35663566following r2600, remove use co2condens_mod4micro in physiq_mod.F
    35673567
     
    36083608Open_MP :Small OpenMP fixes in conf_phys for reading radia.def with ifort
    36093609
     3610== 28/02/2022 == AB
     3611Big changes on mountain top dust flows for GCM6:
     3612- the scheme now activates only in grid meshes that contain a mountain among
     3613  a hard-written list, instead of every meshes. This is done to prevent strong
     3614  artificial reinjections of dust in places that don't present huge converging
     3615  slopes that concentrate dust (ex: Valles Marineris, Hellas).
     3616  Topdust is now also detrained as soon as it leaves the column it originated from.
     3617- the list of the 19 allowed mountains is used by the subroutine topmons_setup
     3618  in module topmons_mod, to compute a logical array contains_mons(ngrid).
     3619  alpha_hmons and hsummit are also set up once and for all by this subroutine,
     3620  which is called in physiq_mod's firstcall.
     3621- contains_mons, alpha_hmons and hsummit are now saved variables of the module
     3622  surfdat_h, and are called as such and not as arguments in the subroutines
     3623  using them.
     3624- the logical flag "slpwind" and the comments in the code have also been updated
     3625  to the new terminology "mountain top dust flows", accordingly to ticket #71.
     3626  The new flag read in callphys.def is "topflows".
  • trunk/LMDZ.MARS/libf/phymars/aeropacity_mod.F

    r2584 r2628  
    1414     &    QREFvis3d,QREFir3d,omegaREFir3d,
    1515     &    totstormfract,clearatm,dsords,dsotop,
    16      &    alpha_hmons,nohmons,
     16     &    nohmons,
    1717     &    clearsky,totcloudfrac)
    1818                                                         
     
    3838      use dust_scaling_mod, only: compute_dustscaling
    3939      use density_co2_ice_mod, only: density_co2_ice
     40      use surfdat_h,only: alpha_hmons,contains_mons
     41     
    4042       IMPLICIT NONE
    4143c=======================================================================
     
    104106      REAL, INTENT(IN) :: totstormfract(ngrid) ! mesh fraction with a rocket
    105107                          ! dust storm
    106       LOGICAL, INTENT(IN) :: nohmons ! true to compute RT without slope wind
    107                              ! topdust, false to compute RT in the topdust
    108       REAL, INTENT(IN) :: alpha_hmons(ngrid)
     108      LOGICAL, INTENT(IN) :: nohmons ! true to compute RT without topdust,
     109                             ! false to compute RT in the topdust
    109110      REAL,INTENT(OUT) :: tauscaling(ngrid) ! Scaling factor for qdust and Ndust
    110111      REAL,INTENT(OUT) :: dust_rad_adjust(ngrid) ! Radiative adjustment
     
    596597c       and once in the part of the mesh without the sub-grid mountain (nohmons=true)
    597598        aerosol(1:ngrid,1:nlayer,iaer) = 0.
    598         IF (nohmons) THEN  ! considering part of the mesh without storm
     599        IF (nohmons) THEN  ! considering part of the mesh without top flows
    599600          aerosol(1:ngrid,1:nlayer,iaer)=1.e-25
    600         ELSE  ! part of the mesh with concentred dust storm
     601        ELSE  ! part of the mesh with concentrated dust flows
    601602          DO l=1,nlayer
    602603             IF (l.LE.cstdustlevel) THEN
     
    883884c aerosol/X for topdust to prepare calculation of radiative transfer
    884885c -----------------------------------------------------------------
    885       IF (slpwind) THEN
     886      IF (topflows) THEN
    886887        DO ig=1,ngrid
    887           IF (alpha_hmons(ig) .gt. 0.) THEN
     888          IF (contains_mons(ig)) THEN ! contains_mons=True ensures that alpha_hmons>0
    888889            DO l=1,nlayer
    889              ! topdust: opacity relative to the storm fraction (topdust/x)
     890             ! topdust: opacity relative to the mons fraction (topdust/x)
    890891              aerosol(ig,l,iaer_topdust_doubleq) =
    891892     &        aerosol(ig,l,iaer_topdust_doubleq)/alpha_hmons(ig)
  • trunk/LMDZ.MARS/libf/phymars/callkeys.h

    r2612 r2628  
    1515     &   ,calltherm,callrichsl,callslope,tituscap,callyamada4,co2clouds &
    1616     &   ,co2useh2o,meteo_flux,activeco2ice,CLFvaryingCO2,spantCO2      &
    17      &   ,CLFvarying,satindexco2,rdstorm,slpwind,calllott_nonoro        &
     17     &   ,CLFvarying,satindexco2,rdstorm,topflows,calllott_nonoro        &
    1818     &   ,latentheat_surfwater,gwd_convective_source,startphy_file      &
    1919     &   ,hdo,hdofrac,cst_cap_albedo,temp_dependant_m,refill_watercap
     
    7272      logical scavenging
    7373      logical rdstorm ! rocket dust storm parametrization
    74       logical slpwind ! entrainment by slope wind parametrization
     74      logical topflows ! entrainment by mountain top dust flows parametrization
    7575      logical latentheat_surfwater ! latent heat release from ground water ice sublimation/condensation
    7676      logical cst_cap_albedo ! polar cap albedo remains unchanged by water frost deposition
  • trunk/LMDZ.MARS/libf/phymars/callradite_mod.F

    r2584 r2628  
    1212     $     taucloudtes,rdust,rice,nuice,riceco2,nuiceco2,co2ice,
    1313     $     rstormdust,rtopdust,totstormfract,clearatm,dsords,dsotop,
    14      $     alpha_hmons,nohmons,clearsky,totcloudfrac)
     14     $     nohmons,clearsky,totcloudfrac)
    1515
    1616      use aeropacity_mod, only: aeropacity
     
    213213      REAL,INTENT(OUT) :: dsords(ngrid,nlayer) ! density scaled opacity for rocket dust storm dust
    214214     
    215 c     entrainment by slope wind
    216       LOGICAL, INTENT(IN) :: nohmons ! true for background dust
    217       REAL, INTENT(IN) :: alpha_hmons(ngrid) ! sub-grid scale topography mesh fraction
     215c     entrainment by mountain top dust flows
     216      LOGICAL, INTENT(IN) :: nohmons ! true for background dust
    218217      REAL,INTENT(OUT) :: rtopdust(ngrid,nlayer)  ! Topdust geometric mean radius (m)
    219218      REAL,INTENT(OUT) :: dsotop(ngrid,nlayer) ! density scaled opacity for topmons dust
     
    376375           enddo
    377376         end if
    378          if (slpwind.AND.active) then
     377         if (topflows.AND.active) then
    379378           do iaer=1,naerkind
    380379             if (name_iaer(iaer).eq."topdust_doubleq") then
     
    448447     &    QREFvis3d,QREFir3d,omegaREFir3d,
    449448     &    totstormfract,clearatm,dsords,dsotop,
    450      &    alpha_hmons,nohmons,
    451      &    clearsky,totcloudfrac)
     449     &    nohmons,clearsky,totcloudfrac)
     450     
    452451c     Starting loop on sub-domain
    453452c     ----------------------------
  • trunk/LMDZ.MARS/libf/phymars/callsedim_mod.F

    r2616 r2628  
    372372       ENDIF !of if (rdstorm)
    373373
    374        IF (slpwind) THEN ! identifying topdust tracers for sedimentation
     374       IF (topflows) THEN ! identifying topdust tracers for sedimentation
    375375           itopdust_mass=0      ! dummy initialization
    376376           itopdust_number=0    ! dummy initialization
     
    392392             write(*,*) 'callsedim: error! could not identify'
    393393             write(*,*) ' tracers for topdust mass and number mixing'
    394              write(*,*) ' ratio and slpwind is activated!'
     394             write(*,*) ' ratio and topflows is activated!'
    395395             call abort_physic(modname,"missing topdust tracers",1)
    396396           endif
    397        ENDIF !of if (slpwind)
     397       ENDIF !of if (topflows)
    398398
    399399        firstcall=.false.
     
    452452        end do
    453453      endif
    454 c     entrainment by slope wind
    455       if (slpwind) then
     454c     entrainment by mountain top dust flows
     455      if (topflows) then
    456456        do l=1,nlay
    457457          do ig=1, ngrid
     
    710710      endif ! of if (rdstorm)
    711711
    712       if (slpwind) then
     712      if (topflows) then
    713713       DO l = 1, nlay
    714714        DO ig=1,ngrid
     
    718718        ENDDO
    719719       ENDDO
    720       endif ! of if (slpwind)
     720      endif ! of if (topflows)
    721721 
    722722c     Update the ice particle size "rice"
  • trunk/LMDZ.MARS/libf/phymars/conf_phys.F

    r2627 r2628  
    314314        write(*,*)" coeff_detrainment = ",coeff_detrainment
    315315
    316 ! entrainment by slope wind scheme
    317          write(*,*)"call slope wind lifting parametrization"
    318          slpwind=.false. ! default value
    319          call getin_p("slpwind",slpwind)
    320          write(*,*)" slpwind = ",slpwind
     316! entrainment by mountain top dust flows scheme
     317         write(*,*)"call mountain top dust flows parametrization"
     318         topflows=.false. ! default value
     319         call getin_p("topflows",topflows)
     320         write(*,*)" topflows = ",topflows
    321321
    322322! latent heat release from ground water ice sublimation/condensation
     
    471471           endif
    472472         endif
    473 ! rocket dust storm and entrainment by slope wind
     473! rocket dust storm and entrainment by top flows
    474474! Test of incompatibility:
    475 ! if rdstorm or slpwind is used, then doubleq should be true
    476          if ((rdstorm.or.slpwind).and..not.doubleq) then
    477            print*,'if rdstorm or slpwind is used, then doubleq
     475! if rdstorm or topflows is used, then doubleq should be true
     476         if ((rdstorm.or.topflows).and..not.doubleq) then
     477           print*,'if rdstorm or topflows is used, then doubleq
    478478     &            should be used !'
    479479           call abort_physic(modname,
    480      &          "rdstorm or slpwind requires doubleq",1)
    481          endif
    482          if ((rdstorm.or.slpwind).and..not.active) then
    483            print*,'if rdstorm or slpwind is used, then active
     480     &          "rdstorm or topflows requires doubleq",1)
     481         endif
     482         if ((rdstorm.or.topflows).and..not.active) then
     483           print*,'if rdstorm or topflows is used, then active
    484484     &            should be used !'
    485485           call abort_physic(modname,
    486      &          "rdstorm or slpwind requires activ",1)
     486     &          "rdstorm or topflows requires activ",1)
    487487         endif
    488488         if (rdstorm.and..not.lifting) then
     
    492492     &          "rdstorm requires lifting",1)
    493493         endif
    494          if ((rdstorm.or.slpwind).and..not.freedust) then
    495            print*,'if rdstorm or slpwind is used, then freedust
     494         if ((rdstorm.or.topflows).and..not.freedust) then
     495           print*,'if rdstorm or topflows is used, then freedust
    496496     &            should be used !'
    497497           call abort_physic(modname,
    498      &          "rdstorm or slpwind requires freedust",1)
     498     &          "rdstorm or topflows requires freedust",1)
    499499         endif
    500500         if (rdstorm.and.(dustinjection.eq.0)) then
     
    900900           ! and picky compilers who know name_iaer(2) is out of bounds
    901901           j=2
    902            IF (rdstorm.AND..NOT.activice.AND..NOT.slpwind) then
     902           IF (rdstorm.AND..NOT.activice.AND..NOT.topflows) then
    903903             name_iaer(j) = "stormdust_doubleq" !! storm dust two-moment scheme
    904904             j = j+1
    905905           END IF
    906906
    907            IF (rdstorm.AND.water.AND.activice.AND..NOT.slpwind) then
     907           IF (rdstorm.AND.water.AND.activice.AND..NOT.topflows) then
    908908             name_iaer(j) = "stormdust_doubleq"
    909909             j = j+1
    910910           END IF
    911911
    912            IF (slpwind.AND..NOT.activice.AND..NOT.rdstorm) then
     912           IF (topflows.AND..NOT.activice.AND..NOT.rdstorm) then
    913913             name_iaer(j) = "topdust_doubleq" !! storm dust two-moment scheme
    914914             j = j+1
    915915           END IF
    916916 
    917            IF (slpwind.AND.water.AND.activice.AND..NOT.rdstorm) then
     917           IF (topflows.AND.water.AND.activice.AND..NOT.rdstorm) then
    918918             name_iaer(j) =  "topdust_doubleq"
    919919             j = j+1
    920920           END IF
    921921
    922            IF (rdstorm.AND.slpwind.AND..NOT.activice) THEN
     922           IF (rdstorm.AND.topflows.AND..NOT.activice) THEN
    923923             name_iaer(j) = "stormdust_doubleq"
    924924             name_iaer(j+1) = "topdust_doubleq"
     
    926926           ENDIF
    927927
    928            IF (rdstorm.AND.slpwind.AND.water.AND.activice) THEN
     928           IF (rdstorm.AND.topflows.AND.water.AND.activice) THEN
    929929             name_iaer(j) = "stormdust_doubleq"
    930930             name_iaer(j+1) = "topdust_doubleq"
  • trunk/LMDZ.MARS/libf/phymars/initracer.F

    r2616 r2628  
    181181        enddo
    182182      endif ! of if (rdstorm)
    183        if (slpwind) then
     183       if (topflows) then
    184184        do iq=1,nq
    185185          if (noms(iq).eq."topdust_mass") then
     
    192192          endif
    193193        enddo
    194       endif ! of if (slpwind)   
     194      endif ! of if (topflows)   
    195195      ! 2. find chemistry and water tracers
    196196      do iq=1,nq
     
    613613        end if !(rdstorm)
    614614!c ----------------------------------------------------------------------
    615 !c slope wind scheme
     615!c mountain top dust flows scheme
    616616!c you need a radius value for topdust to active its sedimentation
    617617!c we take the same value as for the normal dust
    618         if (slpwind) then
     618        if (topflows) then
    619619          rho_q(igcm_topdust_mass)=rho_dust
    620620          rho_q(igcm_topdust_number)=rho_dust
    621621          radius(igcm_topdust_mass) = 3.e-6
    622622          radius(igcm_topdust_number) = 3.e-6
    623         end if !(slpwind)
     623        end if !(topflows)
    624624!c ----------------------------------------------------------------------
    625625     
     
    859859       endif
    860860
    861        if (slpwind) then
     861       if (topflows) then
    862862       ! verify that we indeed have topdust_mass and topdust_number tracers
    863863         if (igcm_topdust_mass.eq.0) then
    864864           write(*,*) "initracer: error !!"
    865            write(*,*) "  cannot use slpwind option without ",
     865           write(*,*) "  cannot use topflows option without ",
    866866     &                "a topdust_mass tracer !"
    867            call abort_physic("initracer","slpwind issue",1)
     867           call abort_physic("initracer","topflows issue",1)
    868868         endif
    869869         if (igcm_topdust_number.eq.0) then
    870870           write(*,*) "initracer: error !!"
    871            write(*,*) "  cannot use slpwind option without ",
     871           write(*,*) "  cannot use topflows option without ",
    872872     &                "a topdust_number tracer !"
    873            call abort_physic("initracer","slpwind issue",1)
     873           call abort_physic("initracer","topflows issue",1)
    874874         endif
    875875       endif
  • trunk/LMDZ.MARS/libf/phymars/phys_state_var_init_mod.F90

    r2562 r2628  
    5252      use rocketduststorm_mod, only: ini_rocketduststorm_mod, &
    5353                                     end_rocketduststorm_mod
    54       use topmons_mod, only: ini_topmons_mod, &
    55                              end_topmons_mod
    5654      use calchim_mod, only: ini_calchim_mod,end_calchim_mod
    5755      use watercloud_mod, only: ini_watercloud_mod, &
     
    137135      call ini_rocketduststorm_mod(ngrid)
    138136
    139       ! allocate arrays in "topmons_mod":
    140       call end_topmons_mod
    141       call ini_topmons_mod(ngrid,nlayer)
    142 
    143137      ! allocate arrays in "calchim_mod" (aeronomars)
    144138      call end_calchim_mod
  • trunk/LMDZ.MARS/libf/phymars/physiq_mod.F

    r2616 r2628  
    2323      use rocketduststorm_mod, only: rocketduststorm, dustliftday
    2424      use calcstormfract_mod, only: calcstormfract
    25       use topmons_mod, only: topmons,alpha_hmons
     25      use topmons_mod, only: topmons,topmons_setup
    2626      use tracer_mod, only: noms, mmol, igcm_co2, igcm_n2, igcm_co2_ice,
    2727     &                      igcm_co, igcm_o, igcm_h2o_vap, igcm_h2o_ice,
     
    308308                                    !            - in a mesh with stormdust and background dust (false)
    309309                                    !            - in a mesh with background dust only (true)
    310 c     entrainment by slope winds
     310c     entrainment by mountain top dust flows
    311311      logical nohmons               ! nohmons used to calculate twice the radiative
    312                                     ! transfer when slpwind is active :
     312                                    ! transfer when topflows is active :
    313313                                    !            - in a mesh with topdust and background dust (false)
    314314                                    !            - in a mesh with background dust only (true)
     
    507507      REAL co2totB
    508508
    509 c entrainment by slope winds above sb-grid scale topography
     509c entrainment by mountain top dust flows above sub-grid scale topography
    510510      REAL pdqtop(ngrid,nlayer,nq) ! tendency for dust after topmons
    511       REAL hmax,hmin
    512       REAL hsummit(ngrid)
    513511
    514512c when no startfi file is asked for init
     
    718716         endif
    719717
    720 c        Initialize mountain mesh fraction for the entrainment by slope wind param.
     718c        Initialize mountain mesh fraction for the entrainment by top flows param.
    721719c        ~~~~~~~~~~~~~~~
    722         if (slpwind) then
    723           !! alpha_hmons calculation
    724           if (ngrid.gt.1) then
    725             call planetwide_maxval(hmons,hmax )
    726             call planetwide_minval(hmons,hmin )
    727             do ig=1,ngrid
    728               alpha_hmons(ig)= 0.5*(hmons(ig)-hmin)/(hmax-hmin)
    729             enddo
    730           else
    731             hmin=0.
    732             hmax=23162.1 !set here the height of the sub-grid scaled topography
    733             do ig=1,ngrid               
    734               alpha_hmons(ig)= (hmons(ig)-hmin)/(hmax-hmin) !0.1*(hmons(ig)-hmin)/(hmax-hmin)
    735               print*,"1D, hmons=",hmons(ig),"alpha=",alpha_hmons(ig)
    736             enddo
    737           endif ! (ngrid.gt.1)
    738         endif ! if (slpwind)
     720        if (topflows) call topmons_setup(ngrid)
    739721
    740722#endif
     
    972954c          Transfer through CO2 (except NIR CO2 absorption)
    973955c            and aerosols (dust and water ice)
    974            ! callradite for background dust
     956           ! callradite for background dust (out of the rdstorm fraction)
    975957           clearatm=.true.
    976            !! callradite for background dust in the case of slope wind entrainment
     958           !! callradite for background dust (out of the topflows fraction)
    977959           nohmons=.true.
    978960
     
    988970     &     taucloudtes,rdust,rice,nuice,riceco2,nuiceco2,co2ice,
    989971     &     rstormdust,rtopdust,totstormfract,clearatm,dsords,dsotop,
    990      &     alpha_hmons,nohmons,clearsky,totcloudfrac)
     972     &     nohmons,clearsky,totcloudfrac)
    991973
    992974           ! case of sub-grid water ice clouds: callradite for the clear case
     
    1006988     &              rice,nuice,riceco2, nuiceco2,co2ice,rstormdust,
    1007989     &              rtopdust,totstormfract,
    1008      &              clearatm,dsords,dsotop,alpha_hmons,nohmons,
    1009      &              clearsky,totcloudfrac)
     990     &              clearatm,dsords,dsotop,
     991     &              nohmons,clearsky,totcloudfrac)
    1010992               clearsky = .false.  ! just in case.
    1011993               ! Sum the fluxes and heating rates from cloudy/clear
     
    12001182     &                      clearsky,totcloudfrac,
    12011183c               input sub-grid scale topography
    1202      &                      nohmons,alpha_hmons,
     1184     &                      nohmons,
    12031185c               output
    12041186     &                      pdqrds,wspeed,dsodust,dsords,dsotop,
     
    12501232c     3.2 Dust entrained from the PBL up to the top of sub-grid scale topography
    12511233c    -------------------------------------------
    1252       IF (slpwind) THEN
    1253          if (ngrid.gt.1) then
    1254            hsummit(:)=summit(:)-phisfi(:)/g
    1255          else
    1256            hsummit(:)=14000.
    1257          endif
     1234      IF (topflows) THEN
    12581235         clearatm=.true. ! stormdust is not accounted in the extra heating on top of the mountains
    12591236         nohmons=.false.
     
    12661243     &                totstormfract,clearatm,
    12671244     &                clearsky,totcloudfrac,
    1268      &                nohmons,hsummit,
     1245     &                nohmons,
    12691246     &                pdqtop,wtop,dsodust,dsords,dsotop,
    12701247     &                tau_pref_scenario,tau_pref_gcm)
     
    12871264         ENDDO
    12881265
    1289       ENDIF ! end of if (slpwind)
     1266      ENDIF ! end of if (topflows)
    12901267
    12911268c     3.3 Dust injection from the surface
     
    33873364           endif ! (rdstorm)
    33883365
    3389            if (slpwind) then
     3366           if (topflows) then
    33903367             call WRITEDIAGFI(ngrid,'refftopdust','refftopdust',
    33913368     &                        'm',3,rtopdust*ref_r0)
     
    34043381     &         'm2.kg-1',3,dsotop)
    34053382             end select
    3406            endif ! (slpwind)
     3383           endif ! (topflows)
    34073384
    34083385           if (dustscaling_mode==2) then
  • trunk/LMDZ.MARS/libf/phymars/rocketduststorm_mod.F90

    r2616 r2628  
    3030                                 clearsky,totcloudfrac,                &
    3131!             input sub-grid scale topography
    32                                  nohmons,alpha_hmons,                  &
     32                                 nohmons,                              &
    3333!             output
    3434                                 pdqrds,wrad,dsodust,dsords,dsotop,    &
     
    8181      REAL,INTENT(OUT) :: dust_rad_adjust(ngrid)
    8282     
    83 !     sbgrid scale water ice clouds
     83!     subgrid scale water ice clouds
    8484      logical, intent(in) :: clearsky
    8585      real, intent(in) :: totcloudfrac(ngrid)
    8686
    87 !     sbgrid scale topography
     87!     subgrid scale topography
    8888      LOGICAL, INTENT(IN) :: nohmons
    89       REAL, INTENT(IN) :: alpha_hmons(ngrid)   
    9089 
    9190!--------------------------------------------------------
     
    257256                 tau,aerosol,dsodust,tauscaling,dust_rad_adjust,       &
    258257                 taucloudtes,rdust,rice,nuice,riceco2,nuiceco2,co2ice,rstormdust,rtopdust, &
    259                  totstormfract,clearatm,dsords,dsotop,alpha_hmons,nohmons,&
     258                 totstormfract,clearatm,dsords,dsotop,nohmons,&
    260259                 clearsky,totcloudfrac)
    261260
  • trunk/LMDZ.MARS/libf/phymars/surfdat_h.F90

    r2578 r2628  
    3535!$OMP                TESice_Scoef,iceradius,dtemisice,                           &
    3636!$OMP                zmea,zstd,zsig,zgam,zthe,hmons,summit,base,z0,z0_default )
     37
     38  !! mountain top dust flows
     39  REAL,SAVE,ALLOCATABLE :: alpha_hmons(:) ! sub-grid scale mountain mesh fraction
     40  REAL,SAVE,ALLOCATABLE :: hsummit(:) ! mountain height above the GCM surface
     41  LOGICAL,SAVE,ALLOCATABLE :: contains_mons(:) ! is there a mountain in the grid mesh ?
     42         
     43!$OMP THREADPRIVATE(alpha_hmons,hsummit,contains_mons)
    3744
    3845  !! variables
     
    7582    allocate(summit(ngrid))
    7683    allocate(base(ngrid))
    77    
     84    allocate(alpha_hmons(ngrid))
     85    allocate(hsummit(ngrid))
     86    allocate(contains_mons(ngrid))
     87       
    7888  end subroutine ini_surfdat_h
    7989
     
    8393  implicit none
    8494
    85     if (allocated(albedodat))   deallocate(albedodat)
    86     if (allocated(phisfi))      deallocate(phisfi)
    87     if (allocated(watercaptag)) deallocate(watercaptag)
    88     if (allocated(dryness))     deallocate(dryness)
    89     if (allocated(zmea))        deallocate(zmea)
    90     if (allocated(zstd))        deallocate(zstd)
    91     if (allocated(zsig))        deallocate(zsig)
    92     if (allocated(zgam))        deallocate(zgam)
    93     if (allocated(zthe))        deallocate(zthe)
    94     if (allocated(z0))          deallocate(z0)
    95     if (allocated(qsurf))       deallocate(qsurf)
    96     if (allocated(tsurf))       deallocate(tsurf)
    97     if (allocated(co2ice))      deallocate(co2ice)
    98     if (allocated(watercap))    deallocate(watercap)
    99     if (allocated(emis))        deallocate(emis)
    100     if (allocated(capcal))      deallocate(capcal)
    101     if (allocated(fluxgrd))     deallocate(fluxgrd)
    102     if (allocated(hmons))       deallocate(hmons)
    103     if (allocated(summit))      deallocate(summit)
    104     if (allocated(base))        deallocate(base)
     95    if (allocated(albedodat))     deallocate(albedodat)
     96    if (allocated(phisfi))        deallocate(phisfi)
     97    if (allocated(watercaptag))   deallocate(watercaptag)
     98    if (allocated(dryness))       deallocate(dryness)
     99    if (allocated(zmea))          deallocate(zmea)
     100    if (allocated(zstd))          deallocate(zstd)
     101    if (allocated(zsig))          deallocate(zsig)
     102    if (allocated(zgam))          deallocate(zgam)
     103    if (allocated(zthe))          deallocate(zthe)
     104    if (allocated(z0))            deallocate(z0)
     105    if (allocated(qsurf))         deallocate(qsurf)
     106    if (allocated(tsurf))         deallocate(tsurf)
     107    if (allocated(co2ice))        deallocate(co2ice)
     108    if (allocated(watercap))      deallocate(watercap)
     109    if (allocated(emis))          deallocate(emis)
     110    if (allocated(capcal))        deallocate(capcal)
     111    if (allocated(fluxgrd))       deallocate(fluxgrd)
     112    if (allocated(hmons))         deallocate(hmons)
     113    if (allocated(summit))        deallocate(summit)
     114    if (allocated(base))          deallocate(base)
     115    if (allocated(alpha_hmons))   deallocate(alpha_hmons)
     116    if (allocated(hsummit))       deallocate(hsummit)
     117    if (allocated(contains_mons)) deallocate(contains_mons)
    105118   
    106119  end subroutine end_surfdat_h
  • trunk/LMDZ.MARS/libf/phymars/topmons_mod.F90

    r2616 r2628  
    22
    33      IMPLICIT NONE
    4 
    5 !     sub-grid scale mountain mesh fraction
    6       REAL, SAVE, ALLOCATABLE :: alpha_hmons(:)
    7 
    8 !$OMP THREADPRIVATE(alpha_hmons)
    94
    105      CONTAINS
     
    3227                                 clearsky,totcloudfrac,                &
    3328!             input sub-grid scale mountain
    34                                  nohmons,hsummit,                      &
     29                                 nohmons,                              &
    3530!             output
    3631                                 pdqtop,wfin,dsodust,dsords,dsotop,    &
     
    4338      USE dimradmars_mod, only: albedo,naerkind
    4439      USE comsaison_h, only: dist_sol,mu0,fract
    45       USE surfdat_h, only: emis,co2ice,hmons,summit
     40      USE surfdat_h, only: emis,co2ice,hmons,summit,alpha_hmons, &
     41                           hsummit,contains_mons
    4642      USE callradite_mod, only: callradite
    4743
     
    8783!     input sub-grid scale mountain
    8884      LOGICAL, INTENT(IN) :: nohmons
    89       REAL, INTENT(IN) :: hsummit(ngrid)
    9085
    9186!--------------------------------------------------------
     
    196191
    197192!     Detrainment     
    198       REAL coefdetrain(ngrid,nlayer)          ! coefficient for detrainment : % of stormdust detrained
     193      REAL coefdetrain(ngrid,nlayer)          ! coefficient for detrainment : % of topdust detrained
    199194      REAL dqdet_topdust_mass(ngrid,nlayer)   ! tendancy pdq topdust mass after detrainment only
    200195      REAL dqdet_topdust_number(ngrid,nlayer) ! tendancy pdq topdust number after detrainment only
     
    206201      ! **********************************************************************
    207202      ! **********************************************************************
    208       ! Parametrization of the entrainment by slope wind above the sub-grid
    209       ! scale topography
     203      ! Parametrization of the entrainment of dust by slope winds above the
     204      ! converging sub-grid scale topography ("mountain top dust flows")
    210205      ! **********************************************************************
    211206      ! **********************************************************************     
     
    279274       ! 1.1. Call the second radiative transfer for topdust, obtain the extra heating
    280275       ! *********************************************************************
     276       
     277       ! NB: since the only grid meshes that matter for the radiative transfer
     278       !     are the ones that contain a mount (contains_mons(ig)=.true.),
     279       !     it could be relevant to optimize the code by calling the RT
     280       !     only for those grid meshes.
     281       !     See Ticket #92 on trac.lmd.jussieu.fr/Planeto   
    281282        CALL callradite(icount,ngrid,nlayer,nq,zday,zls,zq,albedo,     &
    282283                 emis,mu0,pplev,pplay,pt,tsurf,fract,dist_sol,igout,   &
     
    285286                 tau,aerosol,dsodust,tauscaling,dust_rad_adjust,    &
    286287                 taucloudtes,rdust,rice,nuice,riceco2,nuiceco2,co2ice,rstormdust,rtopdust, &
    287                  totstormfract,clearatm,dsords,dsotop,alpha_hmons,nohmons,&
     288                 totstormfract,clearatm,dsords,dsotop,nohmons,&
    288289                 clearsky,totcloudfrac)
    289290       ! **********************************************************************
     
    291292       ! **********************************************************************
    292293        DO ig=1,ngrid
    293           IF ( (mu0(ig) .gt. mu0lim) .and. (alpha_hmons(ig) .gt. 0.) ) THEN
     294          IF ( (mu0(ig) .gt. mu0lim) .and. (contains_mons(ig)) ) THEN
     295            !! mu0(ig)>mu0lim ensures that it is daytime
     296            !! contains_mons=True ensures that there is a mount in the mesh and alpha_hmons>0
     297         
    294298            !! **********************************************************************
    295299            !! Temperature profile above the mountain and in the close environment
     
    353357              endif
    354358            ENDDO
    355           ENDIF ! IF ((mu0(ig) .gt. mu0lim) .and. alpha_hmons(ig) .gt. 0.)
     359          ENDIF ! IF ((mu0(ig) .gt. mu0lim) .and. contains_mons(ig))
    356360        ENDDO ! DO ig=1,ngrid
    357361
     
    364368       ! **********************************************************************
    365369       DO ig=1,ngrid
    366          IF ( (mu0(ig) .gt. mu0lim) .and. (alpha_hmons(ig) .gt. 0.) ) THEN
     370         IF ( (mu0(ig) .gt. mu0lim) .and. (contains_mons(ig)) ) THEN
    367371           !! Positive buoyancy: negative vertical velocity entrains UP
    368372           IF (dt_top(ig) .gt. 0.) THEN
     
    477481
    478482        DO ig=1,ngrid
    479           IF ( (mu0(ig) .gt. mu0lim) .and. (alpha_hmons(ig) .gt. 0.) ) THEN
     483          IF ( (mu0(ig) .gt. mu0lim) .and. (contains_mons(ig)) ) THEN
    480484            !! Total air mass within the PBL before entrainment (=> by PBL we mean between the surface and the layer where the vertical wind is maximum)
    481485            masse_pbl(ig)=0.
     
    489493       ! **********************************************************************
    490494        DO ig=1,ngrid
    491           IF ( (mu0(ig) .gt. mu0lim) .and. (alpha_hmons(ig) .gt. 0.) .and. (masse_pbl(ig) .gt. 0.) ) THEN
     495          IF ( (mu0(ig) .gt. mu0lim) .and. (contains_mons(ig)) .and. (masse_pbl(ig) .gt. 0.) ) THEN
    492496            !! Transport of background dust + concentrated topdust above lwmax
    493497            DO l=lwmax(ig),nlayer
     
    583587          DO l=1,nlayer!-1
    584588            !! Detrainment during the day
    585             IF ( (mu0(ig) .gt. mu0lim) .and. (zq_topdust_mass(ig,l) .gt. zq_dust_mass(ig,l)*0.01)) THEN
     589            IF ( (mu0(ig) .gt. mu0lim) .and. (zq_topdust_mass(ig,l) .gt. zq_dust_mass(ig,l)*0.01) .and. (contains_mons(ig)) ) THEN
    586590               coefdetrain(ig,l)=1.*( rhobarz(ig,l+1)*abs(wfin(ig,l+1)) - rhobarz(ig,l)*abs(wfin(ig,l)) ) / masse(ig,l)
    587591               !! Detrainment when abs(w(l)) > abs(w(l+1)), i.e. coefdetrain < 0
     
    601605               !  dqdet_topdust_number(ig,l)=-(1.-exp(coefdetrain(ig,l)*ptimestep))*zq_dust_number(ig,l)/ptimestep
    602606               endif
    603             !! Full detrainment during the night imposed
     607            !! Full detrainment imposed during the night or when topdust leaves its origin column (contains_mons=False)
    604608            ELSE
    605609               dqdet_topdust_mass(ig,l)=-zq_topdust_mass(ig,l)/ptimestep
     
    681685               CALL WRITEDIAGFI(ngrid,'wfin_top', &
    682686                'wfin_top','',3,wfin(:,:))
     687               CALL WRITEDIAGFI(ngrid,'hmons', &
     688                'hmons','',2,hmons)
     689               CALL WRITEDIAGFI(ngrid,'hsummit', &
     690                'hsummit','',2,hsummit)
    683691               CALL WRITEDIAGFI(ngrid,'alpha_hmons', &
    684692                'alpha_hmons','',2,alpha_hmons)
     
    961969
    962970
    963       end subroutine van_leer
    964 
     971      end subroutine van_leer   
     972     
    965973!********************************************************************************
    966        ! initialization module variables
    967        subroutine ini_topmons_mod(ngrid,nlayer)
    968        
    969        implicit none
    970        
    971        integer, intent(in) :: ngrid
    972        integer, intent(in) :: nlayer
    973        
    974        allocate(alpha_hmons(ngrid))
    975 
    976        end subroutine ini_topmons_mod
    977        
    978        subroutine end_topmons_mod
    979        
    980        implicit none
    981        
    982        if (allocated(alpha_hmons)) deallocate(alpha_hmons)
    983 
    984        end subroutine end_topmons_mod       
     974      subroutine topmons_setup(ngrid)
     975      ! Purpose:
     976      ! 1) Fill the logical array contains_mons(:),
     977      !    with contains_mons(ig)=True if there is
     978      !    a mountain in the mesh ig
     979      ! 2) Compute alpha_hmons(:) and hsummit(:)
     980      use surfdat_h,only: phisfi,hmons,summit,base,&
     981                          alpha_hmons,hsummit,contains_mons                                     
     982      use comcstfi_h,only: pi,g
     983      use planetwide_mod,only: planetwide_maxval, planetwide_minval
     984      use geometry_mod,only: longitude_deg,latitude_deg,&
     985                             boundslon,boundslat !boundslon/lat(ngrid,4) :
     986                                                 !  |------------------------------|
     987                                                 !  |north_west=2      north_east=1|
     988                                                 !  |                              |
     989                                                 !  |             (ig)             |
     990                                                 !  |                              |
     991                                                 !  |south_west=3      south_east=4|
     992                                                 !  |------------------------------|
     993                             
     994      implicit none
     995      integer,intent(in) :: ngrid
     996     
     997      ! Local variables
     998      integer,parameter :: ntop_max = 19 ! total number of mounts written in the hmons list
     999      real lon_top(ntop_max),lat_top(ntop_max) ! coordinates of the mounts (in deg)
     1000      ! Mountains list :
     1001      ! Olympus Mons,Ascraeus Mons,Elysium Mons,Arsia Mons,Pavonis Mons,
     1002      ! Hecates Tholus,Tharsis Tholus,Ceraunius Tholus,Alba Mons,Apollinaris Mons,
     1003      ! Albor Tholus,Biblis Tholus,Anseris Mons,Ulysses Tholus,Aeolis Mons,
     1004      ! Euripus Mons,Hadriacus Mons,Tyrrhenus Mons,Uranius Mons
     1005      !
     1006      ! NB: in 64x48 horiz. resolution, Biblis Tholus & Ulysses Tholus fall in the
     1007      !     same mesh, hence only Biblis Tholus is kept by the alpha_hmons computation
     1008      data lon_top/-134.,-104.5,146.9,-121.1,-113.4,&
     1009                    150.2,-90.8,-97.4,-109.6,174.4,&
     1010                    150.4,-124.6,86.6,-121.6,137.8,&
     1011                        105.,91.8,106.5,-92.2/
     1012      data lat_top/18.4,11.8,24.8,-8.4,-0.8,&
     1013                   31.8,13.4,24.,40.4,-9.3,&
     1014                   18.8,2.6,-29.8,2.9,-5.4,&
     1015                   -44.8,-32.1,-21.1,26.8/
     1016      integer,parameter :: ntop = 19 ! the topmons scheme is limited to the first ntop mounts
     1017      real :: boundslon_deg(4),boundslat_deg(4)
     1018      real :: hmax,hmin
     1019      integer :: ig,itop
     1020     
     1021     
     1022     
     1023      IF (ngrid.gt.1) THEN     
     1024        ! Sanity check
     1025        if (ntop.gt.ntop_max) then
     1026          call abort_physic("topmons_setup","Number of mountains ntop greater than ntop_max",1)
     1027        endif
     1028
     1029        ! Determine contains_mons
     1030        contains_mons(:)=.false.
     1031
     1032        do ig=1,ngrid
     1033          boundslon_deg(:)=boundslon(ig,:)/pi*180.
     1034          boundslat_deg(:)=boundslat(ig,:)/pi*180.
     1035
     1036          do itop=1,ntop
     1037            if ( (lon_top(itop).gt.boundslon_deg(2)).and.(lon_top(itop).lt.boundslon_deg(1)) &
     1038            .and.(lat_top(itop).gt.boundslat_deg(3)).and.(lat_top(itop).lt.boundslat_deg(2)) ) then
     1039              contains_mons(ig)=.true.
     1040              write(*,*) "topmons_setup: Found a mount at:"
     1041              write(*,*) "(",boundslon_deg(2),",",boundslat_deg(2),")  (",boundslon_deg(1),",",boundslat_deg(1),")"
     1042              write(*,*) "             ((",lon_top(itop),",",lat_top(itop),"))"
     1043              write(*,*) "(",boundslon_deg(3),",",boundslat_deg(3),")  (",boundslon_deg(4),",",boundslat_deg(4),")"
     1044            endif
     1045          enddo
     1046        enddo
     1047
     1048        ! Compute alpha_hmons
     1049        call planetwide_maxval(hmons,hmax)
     1050        call planetwide_minval(hmons,hmin)
     1051        do ig=1,ngrid
     1052          if (contains_mons(ig)) then
     1053          ! the mesh ig contains a mountain
     1054            alpha_hmons(ig)= 0.5*(hmons(ig)-hmin)/(hmax-hmin)
     1055            ! Sanity check
     1056            if (alpha_hmons(ig).le.0) then
     1057              call abort_physic("topmons_setup","ERROR: alpha_hmons cannot be <0 "//&
     1058                                "if the mesh contains a mountain. Please check your "//&
     1059                                "formula or your start files.",1)
     1060            endif
     1061          else
     1062          ! the mesh ig doesn't contain a mountain
     1063            alpha_hmons(ig)= 0
     1064          endif
     1065        enddo
     1066
     1067        ! Compute hsummit
     1068        hsummit(:)=summit(:)-phisfi(:)/g
     1069     
     1070      ELSE ! 1D case
     1071            hmin=0.
     1072            hmax=23162.1 !set here the height of the sub-grid scale topography
     1073            do ig=1,ngrid               
     1074              alpha_hmons(ig)= (hmons(ig)-hmin)/(hmax-hmin) !0.1*(hmons(ig)-hmin)/(hmax-hmin)
     1075              print*,"1D, hmons=",hmons(ig),"alpha=",alpha_hmons(ig)
     1076            enddo
     1077           
     1078            hsummit(:)=14000.
     1079      ENDIF ! (ngrid.gt.1)
     1080     
     1081      end subroutine topmons_setup
     1082!********************************************************************************   
    9851083     
    9861084      END MODULE topmons_mod
  • trunk/LMDZ.MARS/libf/phymars/updatereffrad_mod.F

    r2584 r2628  
    142142
    143143        ! updating radius of topdust particles
    144         IF (slpwind.AND.active) THEN
     144        IF (topflows.AND.active) THEN
    145145          DO l=1,nlayer
    146146            DO ig=1, ngrid
Note: See TracChangeset for help on using the changeset viewer.