Ignore:
Timestamp:
Sep 6, 2013, 8:51:56 AM (11 years ago)
Author:
aslmd
Message:

LMDZ.MARS cleaned and commented version of the thermal plume model with automatic arrays.

File:
1 edited

Legend:

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

    r1028 r1032  
    1 ! ---------------------------------------------------------------------
    2 ! Arnaud Colaitis 2011-01-05
    3 ! --------------------------------------------------------------------
    41      subroutine thermcell_dqup(ngrid,nlayer,ptimestep,fm,entr,detr,  &
    52     &    masse0,q_therm,dq_therm,ndt,zlmax)
     
    1613!
    1714!=======================================================================
    18 
    19 #include "dimensions.h" !contains global GCM grid dimension informations
    20 #include "dimphys.h" !similar to dimensions.h, and based on it; includes
    21                      ! "ngridmx": number of horizontal grid points
    22                      ! "nlayermx": number of atmospheric layers
     15! Arnaud Colaitis 2011-01-05 (modified 2011-2013)
     16! SEE COMMENTS IN CALLTHERM_INTERFACE
     17!=======================================================================
    2318
    2419! ============================ INPUTS ============================
     
    2621      INTEGER, INTENT(IN) :: ngrid,nlayer ! number of grid points and number of levels
    2722      REAL, INTENT(IN) :: ptimestep ! timestep (s)
    28       REAL, INTENT(IN) :: fm(ngridmx,nlayermx+1) ! upward mass flux
    29       REAL, INTENT(IN) :: entr(ngridmx,nlayermx) ! entrainment mass flux
    30       REAL, INTENT(IN) :: detr(ngridmx,nlayermx) ! detrainment mass flux
    31       REAL, INTENT(IN) :: q_therm(ngridmx,nlayermx) ! initial profil of q
    32       REAL, INTENT(IN) :: masse0(ngridmx,nlayermx) ! mass of cells
     23      REAL, INTENT(IN) :: fm(ngrid,nlayer+1) ! upward mass flux
     24      REAL, INTENT(IN) :: entr(ngrid,nlayer) ! entrainment mass flux
     25      REAL, INTENT(IN) :: detr(ngrid,nlayer) ! detrainment mass flux
     26      REAL, INTENT(IN) :: q_therm(ngrid,nlayer) ! initial profil of q
     27      REAL, INTENT(IN) :: masse0(ngrid,nlayer) ! mass of cells
    3328      INTEGER, INTENT(IN) :: ndt ! number of subtimesteps
    3429      INTEGER, INTENT(IN) :: zlmax ! index of maximum layer
     
    3631! ============================ OUTPUTS ===========================
    3732
    38       REAL, INTENT(OUT) :: dq_therm(ngridmx,nlayermx)  ! dq/dt -> derivative
     33      REAL, INTENT(OUT) :: dq_therm(ngrid,nlayer)  ! dq/dt -> derivative
    3934
    4035! ============================ LOCAL =============================
    4136
    42       REAL q(ngridmx,nlayermx)
    43       REAL qa(ngridmx,nlayermx)
     37      REAL q(ngrid,nlayer)
     38      REAL qa(ngrid,nlayer)
    4439      INTEGER ig,k,i
    45       REAL invflux0(ngridmx,nlayermx)
     40      REAL invflux0(ngrid,nlayer)
    4641      REAL ztimestep
    4742
     
    6560
    6661        do k=2,zlmax
    67            do ig=1,ngridmx
     62           do ig=1,ngrid
    6863              if ((fm(ig,k+1)+detr(ig,k))*ptimestep.gt.  &
    6964     &        1.e-5*masse0(ig,k)) then
Note: See TracChangeset for help on using the changeset viewer.