Changeset 2225 for trunk/LMDZ.MARS/libf


Ignore:
Timestamp:
Jan 24, 2020, 3:25:31 PM (5 years ago)
Author:
emillour
Message:

Mars GCM:
Further cleanup of nonorographic gravity waves drag parametrization east_gwstress
and west_gwstress need be initialized and are better as module variables.
EM

Location:
trunk/LMDZ.MARS/libf/phymars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/nonoro_gwd_ran_mod.F90

    r2220 r2225  
    55REAL,allocatable,save :: du_nonoro_gwd(:,:) ! Zonal wind tendency due to GWD
    66REAL,allocatable,save :: dv_nonoro_gwd(:,:) ! Meridional wind tendency due to GWD
     7REAL,ALLOCATABLE,SAVE :: east_gwstress(:,:) ! Profile of eastward stress
     8REAL,ALLOCATABLE,SAVE :: west_gwstress(:,:) ! Profile of westward stress
    79
    810CONTAINS
     
    1012      SUBROUTINE NONORO_GWD_RAN(ngrid,nlayer,DTIME, pp,  &
    1113                  zmax_therm, pt, pu, pv, pdt, pdu, pdv, &
    12                   zustr,zvstr,d_t, d_u, d_v, &
    13                   east_gwstress, west_gwstress)
     14                  zustr,zvstr,d_t, d_u, d_v)
    1415
    1516    !--------------------------------------------------------------------------------
     
    6465    ! 0.2 OUTPUTS
    6566    REAL, intent(out):: zustr(ngrid), zvstr(ngrid) ! Surface Stresses
    66     REAL, intent(inout):: d_t(ngrid, nlayer)        ! Tendency on Temp.
    67     REAL, intent(inout):: d_u(ngrid, nlayer), d_v(ngrid, nlayer) ! tendency on winds
    68     REAL, intent(inout):: east_gwstress(ngrid, nlayer) ! Profile of eastward stress
    69     REAL, intent(inout):: west_gwstress(ngrid, nlayer) ! Profile of westward stress
     67    REAL, intent(out):: d_t(ngrid, nlayer)        ! Tendency on Temp.
     68    REAL, intent(out):: d_u(ngrid, nlayer), d_v(ngrid, nlayer) ! tendency on winds
    7069
    7170    ! O.3 INTERNAL ARRAYS
     
    506505  END SUBROUTINE NONORO_GWD_RAN
    507506
    508 ! ===================================================================
    509 ! Subroutines used to write variables of memory in start files       
    510 ! ===================================================================
     507! ========================================================
     508! Subroutines used to allocate/deallocate module variables       
     509! ========================================================
    511510
    512511  SUBROUTINE ini_nonoro_gwd_ran(ngrid,nlayer)
     
    519518         allocate(du_nonoro_gwd(ngrid,nlayer))
    520519         allocate(dv_nonoro_gwd(ngrid,nlayer))
     520         allocate(east_gwstress(ngrid,nlayer))
     521         east_gwstress(:,:)=0
     522         allocate(west_gwstress(ngrid,nlayer))
     523         west_gwstress(:,:)=0
    521524
    522525  END SUBROUTINE ini_nonoro_gwd_ran
     
    528531         if (allocated(du_nonoro_gwd)) deallocate(du_nonoro_gwd)
    529532         if (allocated(dv_nonoro_gwd)) deallocate(dv_nonoro_gwd)
     533         if (allocated(east_gwstress)) deallocate(east_gwstress)
     534         if (allocated(west_gwstress)) deallocate(west_gwstress)
    530535
    531536  END SUBROUTINE end_nonoro_gwd_ran
  • trunk/LMDZ.MARS/libf/phymars/physiq_mod.F

    r2224 r2225  
    436436      REAL d_u_hin(ngrid,nlayer), d_v_hin(ngrid,nlayer)
    437437      REAL d_t_hin(ngrid,nlayer)
    438       REAL east_gwstress(ngrid,nlayer)
    439       REAL west_gwstress(ngrid,nlayer)
    440438c  Diagnostics 2D of gw_nonoro
    441439      REAL zustrhi(ngrid), zvstrhi(ngrid)
     
    14071405     &               pdt, pdu, pdv,
    14081406     &               zustrhi,zvstrhi,
    1409      &               d_t_hin, d_u_hin, d_v_hin,
    1410      &               east_gwstress, west_gwstress)
     1407     &               d_t_hin, d_u_hin, d_v_hin)
    14111408
    14121409!  Update tendencies
Note: See TracChangeset for help on using the changeset viewer.