Ignore:
Timestamp:
Feb 15, 2019, 2:43:57 PM (6 years ago)
Author:
aboissinot
Message:

Fix a bug in thermcell_alim.F90 where vertical and horizontal loops must be inverted.
In thermal plume model, arrays size declaration is standardised (no longer done thanks to dimphy module but by way of arguments).
Clean up some thermal plume model routines (remove uselesss variables...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/thermcell_flux.F90

    r2092 r2101  
    22!
    33!
    4       SUBROUTINE thermcell_flux(ngrid,klev,ptimestep,masse,                   &
    5       &                    lalim,lmin,lmax,alim_star,entr_star,detr_star,     &
    6       &                    f,rhobarz,zlev,zw2,fm,entr,                        &
    7       &                    detr,zqla,lev_out,lunout1,igout)
     4SUBROUTINE thermcell_flux(ngrid,nlay,ptimestep,masse,                         &
     5                          lalim,lmin,lmax,alim_star,entr_star,detr_star,      &
     6                          f,rhobarz,zlev,zw2,fm,entr,                         &
     7                          detr,zqla,lev_out,lunout1,igout)
    88     
    99     
     
    2626     
    2727      INTEGER ngrid
    28       INTEGER klev
     28      INTEGER nlay
    2929      INTEGER igout
    3030      INTEGER lev_out
     
    3434      INTEGER lalim(ngrid)
    3535     
    36       REAL alim_star(ngrid,klev)
    37       REAL entr_star(ngrid,klev)
    38       REAL detr_star(ngrid,klev)
    39       REAL zw2(ngrid,klev+1)
    40       REAL zlev(ngrid,klev+1)
    41       REAL masse(ngrid,klev)
     36      REAL alim_star(ngrid,nlay)
     37      REAL entr_star(ngrid,nlay)
     38      REAL detr_star(ngrid,nlay)
     39      REAL zw2(ngrid,nlay+1)
     40      REAL zlev(ngrid,nlay+1)
     41      REAL masse(ngrid,nlay)
    4242      REAL ptimestep
    43       REAL rhobarz(ngrid,klev)
     43      REAL rhobarz(ngrid,nlay)
    4444      REAL f(ngrid)
    45       REAL zqla(ngrid,klev)
     45      REAL zqla(ngrid,nlay)
    4646      REAL zmax(ngrid)
    4747     
     
    4949!      --------     
    5050     
    51       REAL entr(ngrid,klev)
    52       REAL detr(ngrid,klev)
    53       REAL fm(ngrid,klev+1)
     51      REAL entr(ngrid,nlay)
     52      REAL detr(ngrid,nlay)
     53      REAL fm(ngrid,nlay+1)
    5454     
    5555!      local:
     
    124124!------------------------------------------------------------------------------
    125125     
    126       DO l=1,klev
     126      DO l=1,nlay
    127127         entr(:,l) = f(:) * (entr_star(:,l) + alim_star(:,l))
    128128         detr(:,l) = f(:) * detr_star(:,l)
     
    133133!------------------------------------------------------------------------------
    134134     
    135       DO l=1,klev
     135      DO l=1,nlay
    136136         DO ig=1,ngrid
    137137            IF (l.lt.lmax(ig) .and. l.ge.lmin(ig)) THEN
     
    152152!==============================================================================
    153153     
    154       DO l=1,klev
     154      DO l=1,nlay
    155155         
    156156!------------------------------------------------------------------------------
     
    186186! Test sur fraca constante ou croissante au-dessus de lalim
    187187!------------------------------------------------------------------------------
     188         
    188189! AB : Do we have to decree that? If so, set iflag_thermals_optflux to 0
    189190         IF (iflag_thermals_optflux==0) THEN
     
    205206! Test sur flux de masse constant ou decroissant au-dessus de lalim
    206207!------------------------------------------------------------------------------
     208         
    207209! AB : Do we have to decree that? If so, set iflag_thermals_optflux to 0
    208210         IF (iflag_thermals_optflux==0) THEN
     
    544546     
    545547!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    546 ! AB : temporary test added to check the equation df/dz = e - d validity
    547 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    548 !      DO l=1,klev
     548! AB : temporary test added to check the validity of eq. df/dz = e - d
     549!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     550!      DO l=1,nlay
    549551!         DO ig=1,ngrid
    550552!            test = abs(fm(ig,l) + entr(ig,l) - detr(ig,l) - fm(ig,l+1))
Note: See TracChangeset for help on using the changeset viewer.