Changeset 2101 for trunk/LMDZ.GENERIC/libf/phystd/thermcell_alim.F90
- Timestamp:
- Feb 15, 2019, 2:43:57 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/thermcell_alim.F90
r2093 r2101 2 2 ! 3 3 ! 4 SUBROUTINE thermcell_alim(ngrid,klev,ztv2,zlev,alim_star,lalim,lmin)4 SUBROUTINE thermcell_alim(ngrid,nlay,ztv2,zlev,alim_star,lalim,lmin) 5 5 6 7 USE thermcell_mod, ONLY: linf, d_temp8 9 IMPLICIT NONE10 6 11 7 !============================================================================== … … 14 10 ! laterale a la base des panaches thermiques 15 11 !============================================================================== 12 13 IMPLICIT NONE 16 14 17 15 … … 24 22 25 23 INTEGER, INTENT(IN) :: ngrid 26 INTEGER, INTENT(IN) :: klev27 INTEGER, INTENT(IN) :: lmin(ngrid) ! plume initial level24 INTEGER, INTENT(IN) :: nlay 25 INTEGER, INTENT(IN) :: lmin(ngrid) ! plume initial level 28 26 29 REAL, INTENT(IN) :: ztv2(ngrid, klev)! Virtual potential temperature30 REAL, INTENT(IN) :: zlev(ngrid, klev+1)! levels altitude27 REAL, INTENT(IN) :: ztv2(ngrid,nlay) ! Virtual potential temperature 28 REAL, INTENT(IN) :: zlev(ngrid,nlay+1) ! levels altitude 31 29 32 30 ! outputs: 33 31 ! -------- 34 32 35 INTEGER, INTENT(OUT) :: lalim(ngrid) ! alimentation maximal level33 INTEGER, INTENT(OUT) :: lalim(ngrid) ! alimentation maximal level 36 34 37 REAL, INTENT(OUT) :: alim_star(ngrid, klev)35 REAL, INTENT(OUT) :: alim_star(ngrid,nlay) ! Normalized alimentation 38 36 39 37 ! local: … … 42 40 INTEGER :: ig, l 43 41 44 REAL :: alim_star_tot(ngrid) ! integrated alimentation42 REAL :: alim_star_tot(ngrid) ! integrated alimentation 45 43 46 44 !============================================================================== … … 56 54 !============================================================================== 57 55 58 DO l=lmin(ig),klev-159 DO ig=1,ngrid60 IF ((ztv2(ig,l) >ztv2(ig,l+1)).and.(ztv2(ig,lmin(ig))>=ztv2(ig,l))) THEN56 DO ig=1,ngrid 57 DO l=lmin(ig),nlay-1 58 IF ((ztv2(ig,l).gt.ztv2(ig,l+1)).and.(ztv2(ig,lmin(ig)).ge.ztv2(ig,l))) THEN 61 59 alim_star(ig,l) = MAX( (ztv2(ig,l) - ztv2(ig,l+1)), 0.) & 62 60 & * sqrt(zlev(ig,l+1)) … … 73 71 !------------------------------------------------------------------------------ 74 72 75 DO l=1, klev73 DO l=1,nlay 76 74 DO ig=1,ngrid 77 75 IF (alim_star_tot(ig) > 1.e-10 ) THEN
Note: See TracChangeset
for help on using the changeset viewer.