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

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.