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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.