Changeset 2682


Ignore:
Timestamp:
May 19, 2022, 2:29:25 PM (3 years ago)
Author:
emillour
Message:

Mars GCM:
Update Non-Orographic GW scheme: cmax is not longer fixed but evaluated
as the zonal wind at launch altitude.
JL

Location:
trunk/LMDZ.MARS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/README

    r2678 r2682  
    37113711+ declare new variable "flux_1AU" for solar constant.
    37123712
     3713== 19/05/2022 == JL
     3714Upate Non-Orographic GW scheme: cmax is not longer fixed but evaluated
     3715as the zonal wind at launch altitude.
  • trunk/LMDZ.MARS/libf/phymars/nonoro_gwd_ran_mod.F90

    r2651 r2682  
    107107!$OMP THREADPRIVATE(kmin)
    108108    REAL kstar                     ! Min horizontal wavenumber constrained by horizontal resolution
    109     REAL, save :: cmax             ! Max horizontal absolute phase velocity (at the maginitide of zonal wind u at the launch altitude)
    110 !$OMP THREADPRIVATE(cmax)
     109
    111110    REAL :: max_k(ngrid)           ! max_k=max(kstar,kmin)
    112111    REAL, parameter:: cmin = 1.    ! Min horizontal absolute phase velocity (not used)   
    113     REAL CPHA                      ! absolute PHASE VELOCITY frequency
     112    REAL CPHA(ngrid)                      ! absolute PHASE VELOCITY frequency
    114113    REAL ZK(NW, ngrid)             ! Horizontal wavenumber amplitude
    115114    REAL ZP(NW, ngrid)             ! Horizontal wavenumber angle       
     
    131130!$OMP THREADPRIVATE(xlaunch)
    132131    REAL, parameter:: zmaxth_top = 8000. ! Top of convective layer (approx. not used)
    133 
     132    REAL cmax(ngrid,nlayer)             ! Max horizontal absolute phase velocity (at the maginitide of zonal wind u at the launch altitude)
    134133
    135134    ! 0.3.2 PARAMETERS OF WAVES DISSIPATIONS
     
    174173        call getin_p("nonoro_gwd_sat", sat)
    175174        write(*,*) "nonoro_gwd_ran: sat=", sat     
    176         cmax = 50. ! default gravity waves phase velocity value !!
    177         call getin_p("nonoro_gwd_cmax", cmax)
    178         write(*,*) "nonoro_gwd_ran: cmax=", cmax
     175!        cmax = 50. ! default gravity waves phase velocity value !!
     176!        call getin_p("nonoro_gwd_cmax", cmax)
     177!        write(*,*) "nonoro_gwd_ran: cmax=", cmax
    179178        rdiss=0.01 ! default coefficient of dissipation !!
    180179        call getin_p("nonoro_gwd_rdiss", rdiss)
     
    271270    UH(:, nlayer + 1) = UU(:, nlayer)
    272271    VH(:, nlayer + 1) = VV(:, nlayer)
    273 
     272    cmax(:,launch)=UU(:, launch)
    274273    DO ii=1,ngrid
    275274       KSTAR = PI/SQRT(cell_area(II))
     
    300299! this computation allows to get a gaussian distribution centered on 0 (right ?)
    301300! then cmin is not useful, and it favors small values.
    302                 CPHA = 0.
     301                CPHA(:) = 0.
    303302                DO JJ = 1, NA
    304303                    RAN_NUM_3=MOD(TT(II, JW+3*JJ)**2, 1.)
    305                     CPHA = CPHA + 2.*CMAX*                         &
     304                    CPHA(ii) = CPHA(ii) + 2.*CMAX(ii,launch)*      &
    306305                           (RAN_NUM_3 -0.5)*                       &
    307306                           SQRT(3.)/SQRT(NA*1.)
    308307                END DO
    309                 IF (CPHA.LT.0.)  THEN
    310                    CPHA = -1.*CPHA
     308                IF (CPHA(ii).LT.0.)  THEN
     309                   CPHA(ii) = -1.*CPHA(ii)
    311310                   ZP(JW,II) = ZP(JW,II) + PI
    312311                ENDIF
     
    316315
    317316                ! Intrinsic frequency
    318                 ZO(JW, II) = CPHA * ZK(JW, II)
     317                ZO(JW, II) = CPHA(II) * ZK(JW, II)
    319318                ! Intrinsic frequency  is imposed
    320319                ZO(JW, II) = ZO(JW, II)                                            &
Note: See TracChangeset for help on using the changeset viewer.