Changeset 5840 for LMDZ6/trunk


Ignore:
Timestamp:
Sep 25, 2025, 10:57:40 AM (3 months ago)
Author:
jyg
Message:

Getting rid of tracer arrays within cva_driver.
Lot of comments to be cleared later.

Location:
LMDZ6/trunk/libf/phylmd
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/concvl.f90

    r5696 r5840  
    422422    nloc = klon
    423423    CALL cva_driver_pre(klev, k_upper_cv, iflag_con, iflag_ice_thermo, ok_conserv_q, dtime )
    424     CALL cva_driver(klon, klev, klev+1, ntra, nloc, k_upper_cv, &
     424!!    CALL cva_driver(klon, klev, klev+1, ntra, nloc, k_upper_cv, &                  !jyg: get rid of ntra
     425    CALL cva_driver(klon, klev, klev+1, nloc, k_upper_cv, &                 
    425426                    iflag_con, iflag_mix, iflag_ice_thermo, &
    426427                    iflag_clos, ok_conserv_q, dtime, cvl_comp_threshold, &
    427                     t, q, qs, t_wake, q_wake, qs_wake, s_wake, u, v, tra, &
     428!!                    t, q, qs, t_wake, q_wake, qs_wake, s_wake, u, v, tra, &        !jyg: get rid of ntra
     429                    t, q, qs, t_wake, q_wake, qs_wake, s_wake, u, v, &       
    428430                    em_p, em_ph, &
    429431                    Ale, Alp, omega, &
    430432                    em_sig1feed, em_sig2feed, em_wght, &
    431                     iflag, d_t, d_q, d_qcomp, d_u, d_v, d_tra, rain, kbas, ktop, &
    432                     cbmf, plcl, plfc, wbeff, sig1, w01, ptop2, sigd, &
     433!!                    iflag, d_t, d_q, d_qcomp, d_u, d_v, d_tra, rain, kbas, ktop, & !jyg: get rid of ntra
     434                    iflag, d_t, d_q, d_qcomp, d_u, d_v, rain, kbas, ktop, &         
     435                    cbmf, plcl, plfc, wbeff, sig1, w01, ptop2, sigd, &
    433436                    Ma, mip, Vprecip, Vprecipi, upwd, dnwd, dnwdbis, qcondc, wd, &
    434437                    cape, cin, tvp, &
  • LMDZ6/trunk/libf/phylmd/cv3_routines.f90

    r5707 r5840  
    23132313END SUBROUTINE cv3_closure
    23142314
    2315 SUBROUTINE cv3_mixing(nloc, ncum, nd, na, ntra, icb, nk, inb, &
    2316                       ph, t, rr, rs, u, v, tra, h, lv, lf, frac, qnk, &
     2315!!SUBROUTINE cv3_mixing(nloc, ncum, nd, na, ntra, icb, nk, inb, &                        !jyg: get rid of ntra
     2316SUBROUTINE cv3_mixing(nloc, ncum, nd, na, icb, nk, inb, &
     2317!!                      ph, t, rr, rs, u, v, tra, h, lv, lf, frac, qnk, &                !jyg: get rid of ntra
     2318                      ph, t, rr, rs, u, v, h, lv, lf, frac, qnk, &                       
    23172319                      unk, vnk, hp, tv, tvp, ep, clw, m, sig, &
    2318                       ment, qent, uent, vent, nent, sij, elij, ments, qents, traent)
     2320!!                      ment, qent, uent, vent, nent, sij, elij, ments, qents, traent)   !jyg: get rid of ntra
     2321                      ment, qent, uent, vent, nent, sij, elij, ments, qents)
    23192322  USE cvflag_mod_h
    23202323  USE lmdz_cv_ini, ONLY : cpd,cpv,minorig,nl,rrv,cpd,ginv,grav
     
    23272330
    23282331!inputs:
    2329   INTEGER, INTENT (IN)                               :: ncum, nd, na, ntra, nloc
     2332!!  INTEGER, INTENT (IN)                               :: ncum, nd, na, ntra, nloc       !jyg: get rid of ntra
     2333  INTEGER, INTENT (IN)                               :: ncum, nd, na, nloc
    23302334  INTEGER, DIMENSION (nloc), INTENT (IN)             :: icb, inb, nk
    23312335  REAL, DIMENSION (nloc, nd), INTENT (IN)            :: sig
     
    23342338  REAL, DIMENSION (nloc, nd), INTENT (IN)            :: t, rr, rs
    23352339  REAL, DIMENSION (nloc, nd), INTENT (IN)            :: u, v
    2336   REAL, DIMENSION (nloc, nd, ntra), INTENT (IN)      :: tra               ! input of convect3
     2340!!  REAL, DIMENSION (nloc, nd, ntra), INTENT (IN)      :: tra               ! input of convect3 !jyg: get rid of ntra
    23372341  REAL, DIMENSION (nloc, na), INTENT (IN)            :: lv, h, hp
    23382342  REAL, DIMENSION (nloc, na), INTENT (IN)            :: lf, frac
     
    23442348  REAL, DIMENSION (nloc, na, na), INTENT (OUT)        :: uent, vent
    23452349  REAL, DIMENSION (nloc, na, na), INTENT (OUT)        :: sij, elij
    2346   REAL, DIMENSION (nloc, nd, nd, ntra), INTENT (OUT)  :: traent
     2350!!  REAL, DIMENSION (nloc, nd, nd, ntra), INTENT (OUT)  :: traent                        !jyg: get rid of ntra
    23472351  REAL, DIMENSION (nloc, nd, nd), INTENT (OUT)        :: ments, qents
    23482352  INTEGER, DIMENSION (nloc, nd), INTENT (OUT)         :: nent
     
    23912395  ment(1:ncum, 1:nd, 1:nd) = 0.0
    23922396  sij(1:ncum, 1:nd, 1:nd) = 0.0
    2393 
    2394 !AC!      do k=1,ntra
    2395 !AC!       do j=1,nd  ! instead nlp
    2396 !AC!        do i=1,nd ! instead nlp
    2397 !AC!         do il=1,ncum
    2398 !AC!            traent(il,i,j,k)=tra(il,j,k)
    2399 !AC!         enddo
    2400 !AC!        enddo
    2401 !AC!       enddo
    2402 !AC!      enddo
    24032397  zm(:, :) = 0.
    24042398
     
    24562450            uent(il, i, j) = sij(il, i, j)*u(il, i) + (1.-sij(il,i,j))*unk(il)
    24572451            vent(il, i, j) = sij(il, i, j)*v(il, i) + (1.-sij(il,i,j))*vnk(il)
    2458 !!!!      do k=1,ntra
    2459 !!!!      traent(il,i,j,k)=sij(il,i,j)*tra(il,i,k)
    2460 !!!!     :      +(1.-sij(il,i,j))*tra(il,nk(il),k)
    2461 !!!!      end do
    24622452            elij(il, i, j) = altem
    24632453            elij(il, i, j) = max(0.0, elij(il,i,j))
     
    24702460      END DO
    24712461    END DO
    2472 
    2473 !AC!       do k=1,ntra
    2474 !AC!        do j=minorig,nl
    2475 !AC!         do il=1,ncum
    2476 !AC!          if( (i.ge.icb(il)).and.(i.le.inb(il)).and.
    2477 !AC!     :       (j.ge.(icb(il)-1)).and.(j.le.inb(il)))then
    2478 !AC!            traent(il,i,j,k)=sij(il,i,j)*tra(il,i,k)
    2479 !AC!     :            +(1.-sij(il,i,j))*tra(il,nk(il),k)
    2480 !AC!          endif
    2481 !AC!         enddo
    2482 !AC!        enddo
    2483 !AC!       enddo
    24842462
    24852463
     
    25032481    END DO
    25042482  END DO
    2505 
    2506 !AC!      do j=1,ntra
    2507 !AC!       do i=minorig+1,nl
    2508 !AC!        do il=1,ncum
    2509 !AC!         if (i.ge.icb(il) .and. i.le.inb(il) .and. nent(il,i).eq.0) then
    2510 !AC!          traent(il,i,i,j)=tra(il,nk(il),j)
    2511 !AC!         endif
    2512 !AC!        enddo
    2513 !AC!       enddo
    2514 !AC!      enddo
    25152483
    25162484  DO j = minorig, nl
     
    26862654      END IF
    26872655    END DO ! il
    2688 
    2689 !AC!      do j=1,ntra
    2690 !AC!       do il=1,ncum
    2691 !AC!        if ( i.ge.icb(il) .and. i.le.inb(il) .and. lwork(il)
    2692 !AC!     :     .and. csum(il,i).lt.m(il,i) ) then
    2693 !AC!         traent(il,i,i,j)=tra(il,nk(il),j)
    2694 !AC!        endif
    2695 !AC!       enddo
    2696 !AC!      enddo
    26972656789 END DO
    26982657
     
    27302689END SUBROUTINE cv3_mixing
    27312690
    2732 SUBROUTINE cv3_unsat(nloc, ncum, nd, na, ntra, icb, inb, iflag, &
    2733                      t, rr, rs, gz, u, v, tra, p, ph, &
    2734                      th, tv, lv, lf, cpn, ep, sigp, clw, frac_s, qpreca, frac_a, qta , &                       !!jygprl
     2691!!SUBROUTINE cv3_unsat(nloc, ncum, nd, na, ntra, icb, inb, iflag, &                              !jyg: get rid of ntra
     2692SUBROUTINE cv3_unsat(nloc, ncum, nd, na, icb, inb, iflag, &
     2693!!                     t, rr, rs, gz, u, v, tra, p, ph, &                                        !jyg: get rid of ntra
     2694                     t, rr, rs, gz, u, v, p, ph, &
     2695                     th, tv, lv, lf, cpn, ep, sigp, clw, frac_s, qpreca, frac_a, qta , &         !!jygprl
    27352696                     m, ment, elij, delt, plcl, coef_clos, &
    2736                      mp, rp, up, vp, trap, wt, water, evap, fondue, ice, &
     2697!!                     mp, rp, up, vp, trap, wt, water, evap, fondue, ice, &                     !jyg: get rid of ntra
     2698                     mp, rp, up, vp, wt, water, evap, fondue, ice, &
    27372699                     faci, b, sigd, &
    27382700                     wdtrainA, wdtrainS, wdtrainM)                                      ! RomP
     
    27442706
    27452707!inputs:
    2746   INTEGER, INTENT (IN)                               :: ncum, nd, na, ntra, nloc
     2708!!  INTEGER, INTENT (IN)                               :: ncum, nd, na, ntra, nloc               !jyg: get rid of ntra
     2709  INTEGER, INTENT (IN)                               :: ncum, nd, na, nloc
    27472710  INTEGER, DIMENSION (nloc), INTENT (IN)             :: icb, inb
    27482711  REAL, INTENT(IN)                                   :: delt
     
    27512714  REAL, DIMENSION (nloc, na), INTENT (IN)            :: gz
    27522715  REAL, DIMENSION (nloc, nd), INTENT (IN)            :: u, v
    2753   REAL, DIMENSION (nloc, nd, ntra), INTENT(IN)       :: tra
     2716!!  REAL, DIMENSION (nloc, nd, ntra), INTENT(IN)       :: tra                                    !jyg: get rid of ntra
    27542717  REAL, DIMENSION (nloc, nd), INTENT (IN)            :: p
    27552718  REAL, DIMENSION (nloc, nd+1), INTENT (IN)          :: ph
     
    27732736  REAL, DIMENSION (nloc, na), INTENT (OUT)           :: ice, fondue
    27742737  REAL, DIMENSION (nloc, na), INTENT (OUT)           :: faci            ! ice fraction in precipitation
    2775   REAL, DIMENSION (nloc, na, ntra), INTENT (OUT)     :: trap
     2738!!  REAL, DIMENSION (nloc, na, ntra), INTENT (OUT)     :: trap                                   !jyg: get rid of ntra
    27762739  REAL, DIMENSION (nloc, na), INTENT (OUT)           :: b
    27772740  REAL, DIMENSION (nloc), INTENT (OUT)               :: sigd
     
    28592822    END DO
    28602823  END DO
    2861 
    2862 !AC!        do k=1,ntra
    2863 !AC!         do i=1,nd
    2864 !AC!          do il=1,ncum
    2865 !AC!           trap(il,i,k)=tra(il,i,k)
    2866 !AC!          enddo
    2867 !AC!         enddo
    2868 !AC!        enddo
    28692824
    28702825! ***  check whether ep(inb)=0, if so, skip precipitating    ***
     
    34423397! ***       find tracer concentrations in precipitating downdraft     ***
    34433398
    3444 !AC!      do j=1,ntra
    3445 !AC!       do il = 1,ncum
    3446 !AC!       if (i.lt.inb(il) .and. lwork(il)) then
    3447 !AC!c
    3448 !AC!         if(mplus(il))then
    3449 !AC!          trap(il,i,j)=trap(il,i+1,j)*mp(il,i+1)
    3450 !AC!     :              +trap(il,i,j)*(mp(il,i)-mp(il,i+1))
    3451 !AC!          trap(il,i,j)=trap(il,i,j)/mp(il,i)
    3452 !AC!         else ! if (mplus(il))
    3453 !AC!          if(mp(il,i+1).gt.1.0e-16)then
    3454 !AC!           trap(il,i,j)=trap(il,i+1,j)
    3455 !AC!          endif
    3456 !AC!         endif ! (mplus(il)) else if (.not.mplus(il))
    3457 !AC!c
    3458 !AC!        endif ! (i.lt.inb(il) .and. lwork(il))
    3459 !AC!       enddo
    3460 !AC!      end do
    3461 
    34623399400 END DO
    34633400! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     
    34713408END SUBROUTINE cv3_unsat
    34723409
    3473 SUBROUTINE cv3_yield(nloc, ncum, nd, na, ntra, ok_conserv_q, &
     3410!!SUBROUTINE cv3_yield(nloc, ncum, nd, na, ntra, ok_conserv_q, &                       !jyg: get rid of ntra
     3411SUBROUTINE cv3_yield(nloc, ncum, nd, na, ok_conserv_q, &
    34743412                     icb, inb, delt, &
    3475                      t, rr, t_wake, rr_wake, s_wake, u, v, tra, &
     3413!!                     t, rr, t_wake, rr_wake, s_wake, u, v, tra, &                    !jyg: get rid of ntra
     3414                     t, rr, t_wake, rr_wake, s_wake, u, v, &
    34763415                     gz, p, ph, h, hp, lv, lf, cpn, th, th_wake, &
    3477                      ep, clw, qpreca, m, tp, mp, rp, up, vp, trap, &
     3416!!                     ep, clw, qpreca, m, tp, mp, rp, up, vp, trap, &                 !jyg: get rid of ntra
     3417                     ep, clw, qpreca, m, tp, mp, rp, up, vp, &
    34783418                     wt, water, ice, evap, fondue, faci, b, sigd, &
    34793419                     ment, qent, hent, iflag_mix, uent, vent, &
    3480                      nent, elij, traent, sig, &
     3420!!                     nent, elij, traent, sig, &                                      !jyg: get rid of ntra
     3421                     nent, elij, sig, &
    34813422                     tv, tvp, wghti, &
    34823423                     iflag, precip, Vprecip, Vprecipi, &     ! jyg: Vprecipi
    3483                      ft, fr, fr_comp, fu, fv, ftra, &                 ! jyg
     3424!!                     ft, fr, fr_comp, fu, fv, ftra, &                 ! jyg          !jyg: get rid of ntra
     3425                     ft, fr, fr_comp, fu, fv, &                 ! jyg
    34843426                     cbmf, upwd, dnwd, dnwd0, ma, mip, &
    34853427!!                     tls, tps,                             ! useless . jyg
     
    34993441!inputs:
    35003442      INTEGER, INTENT (IN)                               :: iflag_mix
    3501       INTEGER, INTENT (IN)                               :: ncum, nd, na, ntra, nloc
     3443!!      INTEGER, INTENT (IN)                               :: ncum, nd, na, ntra, nloc !jyg: get rid of ntra
     3444      INTEGER, INTENT (IN)                               :: ncum, nd, na, nloc
    35023445      LOGICAL, INTENT (IN)                               :: ok_conserv_q
    35033446      INTEGER, DIMENSION (nloc), INTENT (IN)             :: icb, inb
     
    35063449      REAL, DIMENSION (nloc, nd), INTENT (IN)            :: t_wake, rr_wake
    35073450      REAL, DIMENSION (nloc), INTENT (IN)                :: s_wake
    3508       REAL, DIMENSION (nloc, nd, ntra), INTENT (IN)      :: tra
     3451!!      REAL, DIMENSION (nloc, nd, ntra), INTENT (IN)      :: tra                      !jyg: get rid of ntra
    35093452      REAL, DIMENSION (nloc, nd), INTENT (IN)            :: p
    35103453      REAL, DIMENSION (nloc, nd+1), INTENT (IN)          :: ph
     
    35163459      REAL, DIMENSION (nloc, na), INTENT (IN)            :: vp
    35173460      REAL, DIMENSION (nloc, nd), INTENT (IN)            :: wt
    3518       REAL, DIMENSION (nloc, nd, ntra), INTENT (IN)      :: trap
     3461!!      REAL, DIMENSION (nloc, nd, ntra), INTENT (IN)      :: trap                     !jyg: get rid of ntra
    35193462      REAL, DIMENSION (nloc, na), INTENT (IN)            :: water, evap, b
    35203463      REAL, DIMENSION (nloc, na), INTENT (IN)            :: fondue, faci, ice
     
    35233466      REAL, DIMENSION (nloc, na, na), INTENT (IN)        :: vent, elij
    35243467      INTEGER, DIMENSION (nloc, nd), INTENT (IN)         :: nent
    3525       REAL, DIMENSION (nloc, na, na, ntra), INTENT (IN)  :: traent
     3468!!      REAL, DIMENSION (nloc, na, na, ntra), INTENT (IN)  :: traent                   !jyg: get rid of ntra
    35263469      REAL, DIMENSION (nloc, nd), INTENT (IN)            :: tv, tvp, wghti
    35273470      REAL, DIMENSION (nloc, nd), INTENT (IN)            :: qta
     
    35403483      REAL, DIMENSION (nloc, nd), INTENT (OUT)           :: ft, fr, fu, fv , fr_comp
    35413484      REAL, DIMENSION (nloc, nd), INTENT (OUT)           :: ftd, fqd
    3542       REAL, DIMENSION (nloc, nd, ntra), INTENT (OUT)     :: ftra
     3485!!      REAL, DIMENSION (nloc, nd, ntra), INTENT (OUT)     :: ftra                     !jyg: get rid of ntra
    35433486      REAL, DIMENSION (nloc, nd), INTENT (OUT)           :: upwd, dnwd, ma
    35443487      REAL, DIMENSION (nloc, nd), INTENT (OUT)           :: dnwd0, mip
     
    35483491      REAL, DIMENSION (nloc, nd), INTENT (OUT)           :: qcondc                      ! cld
    35493492      REAL, DIMENSION (nloc, nd), INTENT (OUT)           :: qtc, sigt                   ! cld
    3550       REAL, DIMENSION (nloc, nd), INTENT (OUT)           :: detrain                     ! Louis : pour le calcul de Klein du terme de variance qui détraine dans lenvironnement
     3493      REAL, DIMENSION (nloc, nd), INTENT (OUT)           :: detrain                     ! Louis : pour le calcul de Klein du terme de variance qui detraine dans lenvironnement
    35513494      REAL, DIMENSION (nloc), INTENT (OUT)               :: wd                          ! gust
    35523495      REAL, DIMENSION (nloc), INTENT (OUT)               :: cbmf
     
    36233566  END DO
    36243567! print*,'cv3_yield initialisation 2'
    3625 !AC!      do j=1,ntra
    3626 !AC!       do i=1,nd
    3627 !AC!        do il=1,ncum
    3628 !AC!          ftra(il,i,j)=0.0
    3629 !AC!        enddo
    3630 !AC!       enddo
    3631 !AC!      enddo
    36323568! print*,'cv3_yield initialisation 3'
    36333569  DO i = 1, nl
     
    38303766
    38313767
    3832 !AC!     do j=1,ntra
    3833 !AC!      do il=1,ncum
    3834 !AC!       if (iflag(il) .le. 1) then
    3835 !AC!       if (cvflag_grav) then
    3836 !AC!        ftra(il,1,j)=ftra(il,1,j)+0.01*grav*work(il)
    3837 !AC!    :                     *(mp(il,2)*(trap(il,2,j)-tra(il,1,j))
    3838 !AC!    :             +am(il)*(tra(il,2,j)-tra(il,1,j)))
    3839 !AC!       else
    3840 !AC!        ftra(il,1,j)=ftra(il,1,j)+0.1*work(il)
    3841 !AC!    :                     *(mp(il,2)*(trap(il,2,j)-tra(il,1,j))
    3842 !AC!    :             +am(il)*(tra(il,2,j)-tra(il,1,j)))
    3843 !AC!       endif
    3844 !AC!       endif  ! iflag
    3845 !AC!      enddo
    3846 !AC!     enddo
    3847 
    38483768  DO j = 2, nl
    38493769    DO il = 1, ncum
     
    38573777  END DO
    38583778
    3859 !AC!      do k=1,ntra
    3860 !AC!       do j=2,nl
    3861 !AC!        do il=1,ncum
    3862 !AC!         if (j.le.inb(il) .and. iflag(il) .le. 1) then
    3863 !AC!
    3864 !AC!          if (cvflag_grav) then
    3865 !AC!           ftra(il,1,k)=ftra(il,1,k)+0.01*grav*work(il)*ment(il,j,1)
    3866 !AC!     :                *(traent(il,j,1,k)-tra(il,1,k))
    3867 !AC!          else
    3868 !AC!           ftra(il,1,k)=ftra(il,1,k)+0.1*work(il)*ment(il,j,1)
    3869 !AC!     :                *(traent(il,j,1,k)-tra(il,1,k))
    3870 !AC!          endif
    3871 !AC!
    3872 !AC!         endif
    3873 !AC!        enddo
    3874 !AC!       enddo
    3875 !AC!      enddo
    38763779! print*,'cv3_yield apres ft'
    38773780
     
    42214124    END DO
    42224125
    4223 !AC!      do k=1,ntra
    4224 !AC!       do il=1,ncum
    4225 !AC!        if (i.le.inb(il) .and. iflag(il) .le. 1) then
    4226 !AC!         dpinv=1.0/(ph(il,i)-ph(il,i+1))
    4227 !AC!         cpinv=1.0/cpn(il,i)
    4228 !AC!         if (cvflag_grav) then
    4229 !AC!           ftra(il,i,k)=ftra(il,i,k)+0.01*grav*dpinv
    4230 !AC!     :         *(amp1(il)*(tra(il,i+1,k)-tra(il,i,k))
    4231 !AC!     :           -ad(il)*(tra(il,i,k)-tra(il,i-1,k)))
    4232 !AC!         else
    4233 !AC!           ftra(il,i,k)=ftra(il,i,k)+0.1*dpinv
    4234 !AC!     :         *(amp1(il)*(tra(il,i+1,k)-tra(il,i,k))
    4235 !AC!     :           -ad(il)*(tra(il,i,k)-tra(il,i-1,k)))
    4236 !AC!         endif
    4237 !AC!        endif
    4238 !AC!       enddo
    4239 !AC!      enddo
    4240 
    42414126    DO k = 1, i - 1
    42424127
     
    42784163    END DO
    42794164
    4280 !AC!      do j=1,ntra
    4281 !AC!       do k=1,i-1
    4282 !AC!        do il=1,ncum
    4283 !AC!         if (i.le.inb(il) .and. iflag(il) .le. 1) then
    4284 !AC!          dpinv=1.0/(ph(il,i)-ph(il,i+1))
    4285 !AC!          cpinv=1.0/cpn(il,i)
    4286 !AC!          if (cvflag_grav) then
    4287 !AC!           ftra(il,i,j)=ftra(il,i,j)+0.01*grav*dpinv*ment(il,k,i)
    4288 !AC!     :        *(traent(il,k,i,j)-tra(il,i,j))
    4289 !AC!          else
    4290 !AC!           ftra(il,i,j)=ftra(il,i,j)+0.1*dpinv*ment(il,k,i)
    4291 !AC!     :        *(traent(il,k,i,j)-tra(il,i,j))
    4292 !AC!          endif
    4293 !AC!         endif
    4294 !AC!        enddo
    4295 !AC!       enddo
    4296 !AC!      enddo
    4297 
    42984165!jyg<
    42994166!!    DO k = i, nl + 1
     
    43254192      END DO
    43264193    END DO
    4327 
    4328 !AC!      do j=1,ntra
    4329 !AC!       do k=i,nl+1
    4330 !AC!        do il=1,ncum
    4331 !AC!         if (i.le.inb(il) .and. k.le.inb(il)
    4332 !AC!     $                .and. iflag(il) .le. 1) then
    4333 !AC!          dpinv=1.0/(ph(il,i)-ph(il,i+1))
    4334 !AC!          cpinv=1.0/cpn(il,i)
    4335 !AC!          if (cvflag_grav) then
    4336 !AC!           ftra(il,i,j)=ftra(il,i,j)+0.01*grav*dpinv*ment(il,k,i)
    4337 !AC!     :         *(traent(il,k,i,j)-tra(il,i,j))
    4338 !AC!          else
    4339 !AC!           ftra(il,i,j)=ftra(il,i,j)+0.1*dpinv*ment(il,k,i)
    4340 !AC!     :             *(traent(il,k,i,j)-tra(il,i,j))
    4341 !AC!          endif
    4342 !AC!         endif ! i and k
    4343 !AC!        enddo
    4344 !AC!       enddo
    4345 !AC!      enddo
    43464194
    43474195! sb: interface with the cloud parameterization:                               ! cld
     
    43964244    END DO
    43974245
    4398 !AC!      do j=1,ntra
    4399 !AC!       do il=1,ncum
    4400 !AC!        if (i.le.inb(il) .and. iflag(il) .le. 1) then
    4401 !AC!         dpinv=1.0/(ph(il,i)-ph(il,i+1))
    4402 !AC!         cpinv=1.0/cpn(il,i)
    4403 !AC!
    4404 !AC!         if (cvflag_grav) then
    4405 !AC!          ftra(il,i,j)=ftra(il,i,j)+0.01*grav*dpinv
    4406 !AC!     :     *(mp(il,i+1)*(trap(il,i+1,j)-tra(il,i,j))
    4407 !AC!     :     -mp(il,i)*(trap(il,i,j)-trap(il,i-1,j)))
    4408 !AC!         else
    4409 !AC!          ftra(il,i,j)=ftra(il,i,j)+0.1*dpinv
    4410 !AC!     :     *(mp(il,i+1)*(trap(il,i+1,j)-tra(il,i,j))
    4411 !AC!     :     -mp(il,i)*(trap(il,i,j)-trap(il,i-1,j)))
    4412 !AC!         endif
    4413 !AC!        endif ! i
    4414 !AC!       enddo
    4415 !AC!      enddo
    4416 
    44174246
    44184247500 END DO
     
    44684297!!   PRINT *, 'cv3_yield, apres 503, sum(dq), precip, somme ', sumdq, Vprecip(1, 1), sumdq + vprecip(1, 1)
    44694298!!!JYG>
    4470 
    4471 !AC!      do j=1,ntra
    4472 !AC!       do il=1,ncum
    4473 !AC!        IF (iflag(il) .le. 1) THEN
    4474 !AC!    IF (cvflag_grav) then
    4475 !AC!        ex=0.01*grav*ment(il,inb(il),inb(il))
    4476 !AC!     :      *(traent(il,inb(il),inb(il),j)-tra(il,inb(il),j))
    4477 !AC!     :      /(ph(i l,inb(il))-ph(il,inb(il)+1))
    4478 !AC!        ftra(il,inb(il),j)=ftra(il,inb(il),j)-ex
    4479 !AC!        ftra(il,inb(il)-1,j)=ftra(il,inb(il)-1,j)
    4480 !AC!     :       +ex*(ph(il,inb(il))-ph(il,inb(il)+1))
    4481 !AC!     :          /(ph(il,inb(il)-1)-ph(il,inb(il)))
    4482 !AC!    else
    4483 !AC!        ex=0.1*ment(il,inb(il),inb(il))
    4484 !AC!     :      *(traent(il,inb(il),inb(il),j)-tra(il,inb(il),j))
    4485 !AC!     :      /(ph(i l,inb(il))-ph(il,inb(il)+1))
    4486 !AC!        ftra(il,inb(il),j)=ftra(il,inb(il),j)-ex
    4487 !AC!        ftra(il,inb(il)-1,j)=ftra(il,inb(il)-1,j)
    4488 !AC!     :       +ex*(ph(il,inb(il))-ph(il,inb(il)+1))
    4489 !AC!     :          /(ph(il,inb(il)-1)-ph(il,inb(il)))
    4490 !AC!        ENDIF   !cvflag grav
    4491 !AC!        ENDIF    !iflag
    4492 !AC!       enddo
    4493 !AC!      enddo
    44944299
    44954300
     
    46554460  END DO
    46564461
    4657 !AC!      DO j = 1,ntra
    4658 !AC!      DO i = 1,nl
    4659 !AC!       DO il = 1,ncum
    4660 !AC!        IF (iflag(il) .le. 1) THEN
    4661 !AC!         ftra(il,i,j) = ftra(il,i,j)/alpha_qpos(il)
    4662 !AC!        ENDIF
    4663 !AC!       ENDDO
    4664 !AC!      ENDDO
    4665 !AC!      ENDDO
    4666 
    46674462
    46684463! ***           reset counter and return           ***
     
    49434738        IF  (k<=inb(il) .AND. i<=inb(il) .AND. iflag(il)<=1) THEN   ! cld
    49444739          sument(il) =sument(il) + abs(ment(il,k,i))
    4945           detrain(il,i) = detrain(il,i) + abs(ment(il,k,i))*(qdet(il,k,i) - rr(il,i))*(qdet(il,k,i) - rr(il,i)) ! Louis terme de détrainement dans le bilan de variance
     4740          detrain(il,i) = detrain(il,i) + abs(ment(il,k,i))*(qdet(il,k,i) - rr(il,i))*(qdet(il,k,i) - rr(il,i)) ! Louis terme de detrainement dans le bilan de variance
    49464741        ENDIF
    49474742      ENDDO     ! il
    49484743    ENDDO       ! k
    49494744
    4950 ! 14/01/15 AJ delta n'a rien � faire l�...                                                 
     4745! 14/01/15 AJ delta n'a rien a faire la...                                                 
    49514746    DO il = 1, ncum                                                  ! cld
    49524747!!      IF (wa(il,i)>0.0 .AND. iflag(il)<=1) &                         ! cld
  • LMDZ6/trunk/libf/phylmd/cv3a_compress.f90

    r5712 r5840  
    33CONTAINS
    44
    5 SUBROUTINE cv3a_compress(len, nloc, ncum, nd, ntra, compress, &
     5!!SUBROUTINE cv3a_compress(len, nloc, ncum, nd, ntra, compress, &   !jyg: get rid of ntra
     6SUBROUTINE cv3a_compress(len, nloc, ncum, nd, compress, &
    67                         iflag1, nk1, icb1, icbs1, &
    78                         plcl1, tnk1, qnk1, gznk1, hnk1, unk1, vnk1, &
     
    910                         t1, q1, qs1, t1_wake, q1_wake, qs1_wake, s1_wake, &
    1011                         u1, v1, gz1, th1, th1_wake, &
    11                          tra1, &
     12!!                         tra1, &                                  !jyg: get rid of ntra
    1213                         h1, lv1, lf1, cpn1, p1, ph1, tv1, tp1, tvp1, clw1, &
    1314                         h1_wake, lv1_wake, lf1_wake, cpn1_wake, tv1_wake, &
     
    1920                         t, q, qs, t_wake, q_wake, qs_wake, s_wake, &
    2021                         u, v, gz, th, th_wake, &
    21                          tra, &
     22!!                         tra, &                                   !jyg: get rid of ntra
    2223                         h, lv, lf, cpn, p, ph, tv, tp, tvp, clw, &
    2324                         h_wake, lv_wake, lf_wake, cpn_wake, tv_wake, &
     
    3839
    3940  ! inputs:
    40   INTEGER, INTENT (IN)                               :: len, nloc, nd, ntra
     41!!  INTEGER, INTENT (IN)                               :: len, nloc, nd, ntra            !jyg: get rid of ntra
     42  INTEGER, INTENT (IN)                               :: len, nloc, nd
    4143!jyg<
    4244  LOGICAL, INTENT (IN)                               :: compress  ! compression is performed if compress is true
     
    5254  REAL, DIMENSION (len, nd), INTENT (IN)             :: u1, v1
    5355  REAL, DIMENSION (len, nd), INTENT (IN)             :: gz1, th1, th1_wake
    54   REAL, DIMENSION (len, nd,ntra), INTENT (IN)        :: tra1
     56!!  REAL, DIMENSION (len, nd,ntra), INTENT (IN)        :: tra1                           !jyg: get rid of ntra
    5557  REAL, DIMENSION (len, nd), INTENT (IN)             :: h1, lv1, lf1, cpn1
    5658  REAL, DIMENSION (len, nd), INTENT (IN)             :: p1
     
    8082  REAL, DIMENSION (nloc, nd), INTENT (OUT)           ::  u, v
    8183  REAL, DIMENSION (nloc, nd), INTENT (OUT)           ::  gz, th, th_wake
    82   REAL, DIMENSION (nloc, nd,ntra), INTENT (OUT)      ::  tra
     84!!  REAL, DIMENSION (nloc, nd,ntra), INTENT (OUT)      ::  tra                           !jyg: get rid of ntra
    8385  REAL, DIMENSION (nloc, nd), INTENT (OUT)           ::  h, lv, lf, cpn
    8486  REAL, DIMENSION (nloc, nd), INTENT (OUT)           ::  p
     
    142144  END DO
    143145!
    144   ! AC!      do 121 j=1,ntra
    145   ! AC!ccccc      do 111 k=1,nl+1
    146   ! AC!      do 111 k=1,nd
    147   ! AC!       nn=0
    148   ! AC!      do 101 i=1,len
    149   ! AC!      if(iflag1(i).eq.0)then
    150   ! AC!       nn=nn+1
    151   ! AC!       tra(nn,k,j)=tra1(i,k,j)
    152   ! AC!      endif
    153   ! AC! 101  continue
    154   ! AC! 111  continue
    155   ! AC! 121  continue
    156146
    157147  IF (nn/=ncum) THEN
  • LMDZ6/trunk/libf/phylmd/cv3a_uncompress.f90

    r5712 r5840  
    77CONTAINS
    88
    9 SUBROUTINE cv3a_uncompress(nloc, len, ncum, nd, ntra, idcum, is_convect, compress, &
     9!!SUBROUTINE cv3a_uncompress(nloc, len, ncum, nd, ntra, idcum, is_convect, compress, &              !jyg: get rid of ntra
     10SUBROUTINE cv3a_uncompress(nloc, len, ncum, nd, idcum, is_convect, compress, &
    1011                           iflag, kbas, ktop, &
    1112                           precip, cbmf, plcl, plfc, wbeff, sig, w0, ptop2, &
    12                            ft, fq, fqcomp, fu, fv, ftra,  &
     13!!                           ft, fq, fqcomp, fu, fv, ftra,  &                                       !jyg: get rid of ntra
     14                           ft, fq, fqcomp, fu, fv,  &
    1315                           sigd, ma, mip, vprecip, vprecipi, upwd, dnwd, dnwd0, &
    1416                           qcondc, wd, cape, cin, &
     
    2527                           iflag1, kbas1, ktop1, &
    2628                           precip1, cbmf1, plcl1, plfc1, wbeff1, sig1, w01, ptop21, &
    27                            ft1, fq1, fqcomp1, fu1, fv1, ftra1, &
     29!!                           ft1, fq1, fqcomp1, fu1, fv1, ftra1, &                                  !jyg: get rid of ntra
     30                           ft1, fq1, fqcomp1, fu1, fv1, &
    2831                           sigd1, ma1, mip1, vprecip1, vprecipi1, upwd1, dnwd1, dnwd01, &
    2932                           qcondc1, wd1, cape1, cin1, &
     
    5356
    5457  ! inputs:
    55   INTEGER, INTENT (IN)                               :: nloc, len, ncum, nd, ntra
     58!!  INTEGER, INTENT (IN)                               :: nloc, len, ncum, nd, ntra                 !jyg: get rid of ntra
     59  INTEGER, INTENT (IN)                               :: nloc, len, ncum, nd
    5660  INTEGER, DIMENSION (nloc), INTENT (IN)             :: idcum(nloc)
    5761  LOGICAL, DIMENSION (nloc), INTENT (IN)             :: is_convect(nloc)
     
    6670  REAL, DIMENSION (nloc), INTENT (IN)                :: epmax_diag
    6771  REAL, DIMENSION (nloc, nd), INTENT (IN)            :: ft, fq, fqcomp, fu, fv
    68   REAL, DIMENSION (nloc, nd, ntra), INTENT (IN)      :: ftra
     72!!  REAL, DIMENSION (nloc, nd, ntra), INTENT (IN)      :: ftra                                      !jyg: get rid of ntra
    6973  REAL, DIMENSION (nloc), INTENT (IN)                :: sigd
    7074  REAL, DIMENSION (nloc, nd), INTENT (IN)            :: ma, mip
     
    104108  REAL, DIMENSION (len), INTENT (OUT)                :: ptop21
    105109  REAL, DIMENSION (len, nd), INTENT (OUT)            :: ft1, fq1, fqcomp1, fu1, fv1
    106   REAL, DIMENSION (len, nd, ntra), INTENT (OUT)      :: ftra1
     110!!  REAL, DIMENSION (len, nd, ntra), INTENT (OUT)      :: ftra1                                     !jyg: get rid of ntra
    107111  REAL, DIMENSION (len), INTENT (OUT)                :: sigd1
    108112  REAL, DIMENSION (len, nd), INTENT (OUT)            :: ma1, mip1
     
    218222    END DO
    219223   
    220     ! AC!        do 2100 j=1,ntra
    221     ! AC!c oct3         do 2110 k=1,nl
    222     ! AC!         do 2110 k=1,nd ! oct3
    223     ! AC!          do 2120 i=1,ncum
    224     ! AC!            ftra1(idcum(i),k,j)=ftra(i,k,j)
    225     ! AC! 2120     continue
    226     ! AC! 2110    continue
    227     ! AC! 2100   continue
    228    
    229     ! AC!
    230224!jyg<
    231225!  Essais pour gagner du temps en diminuant l'adressage indirect
  • LMDZ6/trunk/libf/phylmd/cv3p_mixing.f90

    r5703 r5840  
    88END SUBROUTINE cv3p_mixing_pre
    99
    10 SUBROUTINE cv3p_mixing(nloc, ncum, nd, na, ntra, icb, nk, inb, &
    11                        ph, t, rr, rs, u, v, tra, h, lv, lf, frac, qta, &
     10!!SUBROUTINE cv3p_mixing(nloc, ncum, nd, na, ntra, icb, nk, inb, &                        !jyg: get rid of ntra
     11SUBROUTINE cv3p_mixing(nloc, ncum, nd, na, icb, nk, inb, &
     12!!                       ph, t, rr, rs, u, v, tra, h, lv, lf, frac, qta, &                !jyg: get rid of ntra
     13                       ph, t, rr, rs, u, v, h, lv, lf, frac, qta, &
    1214                       unk, vnk, hp, tv, tvp, ep, clw, sig, &
    1315                       Ment, Qent, hent, uent, vent, nent, &
    14                        Sigij, elij, supmax, Ments, Qents, traent)
     16!!                       Sigij, elij, supmax, Ments, Qents, traent)                       !jyg: get rid of ntra
     17                       Sigij, elij, supmax, Ments, Qents)
    1518! **************************************************************
    1619! *
     
    3336
    3437!inputs:
    35   INTEGER, INTENT (IN)                               :: ncum, nd, na
    36   INTEGER, INTENT (IN)                               :: ntra, nloc
     38  INTEGER, INTENT (IN)                               :: ncum, nd, na                     
     39!!  INTEGER, INTENT (IN)                               :: ntra, nloc                      !jyg: get rid of ntra
     40  INTEGER, INTENT (IN)                               :: nloc
    3741  INTEGER, DIMENSION (nloc), INTENT (IN)             :: icb, inb, nk
    3842  REAL, DIMENSION (nloc, nd), INTENT (IN)            :: sig
     
    4246  REAL, DIMENSION (nloc, nd), INTENT (IN)            :: t, rr, rs
    4347  REAL, DIMENSION (nloc, nd), INTENT (IN)            :: u, v
    44   REAL, DIMENSION (nloc, nd, ntra), INTENT (IN)      :: tra ! input of convect3
     48!!  REAL, DIMENSION (nloc, nd, ntra), INTENT (IN)      :: tra ! input of convect3         !jyg: get rid of ntra
    4549  REAL, DIMENSION (nloc, na), INTENT (IN)            :: lv
    4650  REAL, DIMENSION (nloc, na), INTENT (IN)            :: lf
     
    5761  REAL, DIMENSION (nloc, na), INTENT (OUT)           :: supmax           ! Highest mixing fraction of mixed
    5862                                                                         ! updraughts with the sign of (h-hp)
    59   REAL, DIMENSION (nloc, nd, nd, ntra), INTENT (OUT) :: traent
     63!!  REAL, DIMENSION (nloc, nd, nd, ntra), INTENT (OUT) :: traent                          !jyg: get rid of ntra
    6064  REAL, DIMENSION (nloc, nd, nd), INTENT (OUT)       :: Ments, Qents
    6165  REAL, DIMENSION (nloc, nd, nd), INTENT (OUT)       :: hent
     
    147151  Sigij(1:ncum, 1:nd, 1:nd) = 0.0
    148152!ym
    149 
    150 !jyg!  DO k = 1, ntra
    151 !jyg!    DO j = 1, nd ! instead nlp
    152 !jyg!      DO i = 1, nd ! instead nlp
    153 !jyg!        DO il = 1, ncum
    154 !jyg!          traent(il, i, j, k) = tra(il, j, k)
    155 !jyg!        END DO
    156 !jyg!      END DO
    157 !jyg!    END DO
    158 !jyg!  END DO
    159153
    160154! =====================================================================
     
    264258    END DO
    265259  END DO ! i = minorig + 1, nl
    266 
    267 !jyg!  DO j = 1, ntra
    268 !jyg!    DO i = minorig + 1, nl
    269 !jyg!      DO il = 1, ncum
    270 !jyg!        IF (i>=icb(il) .AND. i<=inb(il) .AND. nent(il,i)==0) THEN
    271 !jyg!          traent(il, i, i, j) = tra(il, nk(il), j)
    272 !jyg!        END IF
    273 !jyg!      END DO
    274 !jyg!    END DO
    275 !jyg!  END DO
    276260
    277261  DO j = minorig, nl
     
    577561        END IF
    578562      END DO
    579 !jyg!      DO k = 1, ntra
    580 !jyg!        DO il = 1, ncum
    581 !jyg!          IF ((i>=icb(il)) .AND. (i<=inb(il)) .AND. &
    582 !jyg!              (j>=(icb(il)-1)) .AND. (j<=inb(il)) .AND. &
    583 !jyg!              lwork(il)) THEN
    584 !jyg!            IF (Sij(il,i,j)>0.0) THEN
    585 !jyg!              traent(il, i, j, k) = Sigij(il, i, j)*tra(il, i, k) + &
    586 !jyg!                                    (1.-Sigij(il,i,j))*tra(il, nk(il), k)
    587 !jyg!            END IF
    588 !jyg!          END IF
    589 !jyg!        END DO
    590 !jyg!      END DO
    591563
    592564! --    If I=J (detrainement and entrainement at the same level), then only the
     
    612584          END IF
    613585        END DO
    614 !jyg!        DO k = 1, ntra
    615 !jyg!          DO il = 1, ncum
    616 !jyg!            IF ((i>=icb(il)) .AND. (i<=inb(il)) .AND. &
    617 !jyg!                (j>=(icb(il)-1)) .AND. (j<=inb(il)) .AND. &
    618 !jyg!                lwork(il)) THEN
    619 !jyg!              IF (Sij(il,i,j)>0.0) THEN
    620 !jyg!                traent(il, i, i, k) = tra(il, nk(il), k)
    621 !jyg!              END IF
    622 !jyg!            END IF
    623 !jyg!          END DO
    624 !jyg!        END DO
    625 
    626       END IF
     586      END IF   !(i==j)
    627587
    628588! ---------------------------------------------------------------
     
    682642    END DO ! il
    683643
    684 !jyg!    DO j = 1, ntra
    685 !jyg!      DO il = 1, ncum
    686 !jyg!        IF (i>=icb(il) .AND. i<=inb(il) .AND. lwork(il) .AND. csum(il,i)<1.) THEN
    687 !jyg!! cc     :     .and. csum(il,i).lt.m(il,i) ) then
    688 !jyg!          traent(il, i, i, j) = tra(il, nk(il), j)
    689 !jyg!        END IF
    690 !jyg!      END DO
    691 !jyg!    END DO
    692 
    693644! ---------------------------------------------------------------
    694645END DO  !ym label 789             ! End loop on origin level "i"
  • LMDZ6/trunk/libf/phylmd/cva_driver.f90

    r5766 r5840  
    7171END SUBROUTINE cva_driver_post
    7272
    73 SUBROUTINE cva_driver(len, nd, ndp1, ntra, nloc, k_upper, &
     73!!SUBROUTINE cva_driver(len, nd, ndp1, ntra, nloc, k_upper, &                             !jyg: get rid of ntra
     74SUBROUTINE cva_driver(len, nd, ndp1, nloc, k_upper, &                                     
    7475                      iflag_con, iflag_mix, iflag_ice_thermo, iflag_clos, ok_conserv_q, &
    7576!!                      delt, t1, q1, qs1, t1_wake, q1_wake, qs1_wake, s1_wake, &  ! jyg
    7677                      delt, comp_threshold, &                                      ! jyg
    7778                      t1, q1, qs1, t1_wake, q1_wake, qs1_wake, s1_wake, &          ! jyg
    78                       u1, v1, tra1, &
     79!!                      u1, v1, tra1, &                                                   !jyg: get rid of ntra
     80                      u1, v1, &                                                           
    7981                      p1, ph1, &
    8082                      Ale1, Alp1, omega1, &
    8183                      sig1feed1, sig2feed1, wght1, &
    82                       iflag1, ft1, fq1, fqcomp1, fu1, fv1, ftra1, &
     84!!                      iflag1, ft1, fq1, fqcomp1, fu1, fv1, ftra1, &                     !jyg: get rid of ntra
     85                      iflag1, ft1, fq1, fqcomp1, fu1, fv1, &                             
    8386                      precip1, kbas1, ktop1, &
    8487                      cbmf1, plcl1, plfc1, wbeff1, &
     
    126129
    127130
    128 ! All argument names (except len,nd,ntra,nloc,delt and the flags) have a "1" appended.
     131! All argument names (except len,nd,nloc,delt and the flags) have a "1" appended.
    129132! The "1" is removed for the corresponding compressed variables.
    130133! PARAMETERS:
     
    135138! nd            Integer        Input        vertical (k) dimension
    136139! ndp1          Integer        Input        nd + 1
    137 ! ntra          Integer        Input        number of tracors
    138140! nloc          Integer        Input        dimension of arrays for compressed fields
    139141! k_upper       Integer        Input        upmost level for vertical loops
     
    157159! u1            Real           Input        u-wind
    158160! v1            Real           Input        v-wind
    159 ! tra1          Real           Input        tracors
    160161! p1            Real           Input        full level pressure
    161162! ph1           Real           Input        half level pressure
     
    171172! fu1           Real           Output       u-wind tend
    172173! fv1           Real           Output       v-wind tend
    173 ! ftra1         Real           Output       tracor tend
    174174! precip1       Real           Output       precipitation
    175175! kbas1         Integer        Output       cloud base level
     
    251251  INTEGER, INTENT (IN)                               :: nd
    252252  INTEGER, INTENT (IN)                               :: ndp1
    253   INTEGER, INTENT (IN)                               :: ntra
     253!!  INTEGER, INTENT (IN)                               :: ntra                                !jyg: get rid of ntra
    254254  INTEGER, INTENT(IN)                                :: nloc ! (nloc=len)  pour l'instant
    255255  INTEGER, INTENT (IN)                               :: k_upper
     
    272272  REAL, DIMENSION (len, nd), INTENT (IN)             :: u1
    273273  REAL, DIMENSION (len, nd), INTENT (IN)             :: v1
    274   REAL, DIMENSION (len, nd, ntra), INTENT (IN)       :: tra1
     274!!  REAL, DIMENSION (len, nd, ntra), INTENT (IN)       :: tra1                                !jyg: get rid of ntra
    275275  REAL, DIMENSION (len, nd), INTENT (IN)             :: p1
    276276  REAL, DIMENSION (len, ndp1), INTENT (IN)           :: ph1
     
    294294  REAL, DIMENSION (len, nd), INTENT (OUT)            :: fu1
    295295  REAL, DIMENSION (len, nd), INTENT (OUT)            :: fv1
    296   REAL, DIMENSION (len, nd, ntra), INTENT (OUT)      :: ftra1
     296!!  REAL, DIMENSION (len, nd, ntra), INTENT (OUT)      :: ftra1                               !jyg: get rid of ntra
    297297  REAL, DIMENSION (len), INTENT (OUT)                :: precip1
    298298  INTEGER, DIMENSION (len), INTENT (OUT)             :: kbas1
     
    398398! v:   Same as u but for meridional velocity.
    399399
    400 ! tra: Array of passive tracer mixing ratio, of dimensions (ND,NTRA),
    401 ! where NTRA is the number of different tracers. If no
    402 ! convective tracer transport is needed, define a dummy
    403 ! input array of dimension (ND,1). Tracers are defined at
    404 ! same vertical levels as T. Note that this array will be altered
    405 ! if dry convective adjustment occurs and if IPBL is not equal to 0.
    406 
    407400! p:   Array of pressure (mb) of dimension ND, with first
    408401! index corresponding to lowest model level. Must be defined
     
    460453
    461454! fv:   Same as FU, but for forcing of meridional velocity.
    462 
    463 ! ftra: Array of forcing of tracer content, in tracer mixing ratio per
    464 !       second, defined at same levels as T. Dimensioned (ND,NTRA).
    465455
    466456! precip: Scalar convective precipitation rate (mm/day).
     
    596586  REAL vprecip(nloc, nd+1)
    597587  REAL vprecipi(nloc, nd+1)
    598   REAL tra(nloc, nd, ntra), trap(nloc, nd, ntra)
    599   REAL ftra(nloc, nd, ntra), traent(nloc, nd, nd, ntra)
     588!!  REAL tra(nloc, nd, ntra), trap(nloc, nd, ntra)                              !jyg: get rid of ntra
     589!!  REAL ftra(nloc, nd, ntra), traent(nloc, nd, nd, ntra)                       !jyg: get rid of ntra
    600590  REAL qcondc(nloc, nd)      ! cld
    601591  REAL wd(nloc)                ! gust
     
    641631  nword1 = len
    642632  nword2 = len*nd
    643   nword3 = len*nd*ntra
     633!!  nword3 = len*nd*ntra                                                        !jyg: get rid of ntra
    644634  nword4 = len*nd*nd
    645635
     
    651641  fqcomp1(:, :) = 0.0
    652642  fu1(:, :) = 0.0
    653   fv1(:, :) = 0.0
    654   ftra1(:, :, :) = 0.
     643  fv1(:, :) = 0.0                                                               
     644!!  ftra1(:, :, :) = 0.                                                         !jyg: get rid of ntra
    655645  precip1(:) = 0.
    656646  cbmf1(:) = 0.
     
    933923    IF (iflag_con==3) THEN
    934924      if (prt_level >= 9) PRINT *, 'cva_driver -> cv3a_compress'
    935       CALL cv3a_compress(len, nloc, ncum, nd, ntra, compress, &
     925!!      CALL cv3a_compress(len, nloc, ncum, nd, ntra, compress, &                                        !jyg: get rid of ntra
     926      CALL cv3a_compress(len, nloc, ncum, nd, compress, &                                               
    936927                         iflag1, nk1, icb1, icbs1, &
    937928                         plcl1, tnk1, qnk1, gznk1, hnk1, unk1, vnk1, &
     
    939930                         t1, q1, qs1, t1_wake, q1_wake, qs1_wake, s1_wake, &
    940931                         u1, v1, gz1, th1, th1_wake, &
    941                          tra1, &
     932!!                         tra1, &                                                                       !jyg: get rid of ntra
    942933                         h1, lv1, lf1, cpn1, p1, ph1, tv1, tp1, tvp1, clw1, &
    943934                         h1_wake, lv1_wake, lf1_wake, cpn1_wake, tv1_wake, &
     
    949940                         t, q, qs, t_wake, q_wake, qs_wake, s_wake, &
    950941                         u, v, gz, th, th_wake, &
    951                          tra, &
     942!!                         tra, &                                                                        !jyg: get rid of ntra
    952943                         h, lv, lf, cpn, p, ph, tv, tp, tvp, clw, &
    953944                         h_wake, lv_wake, lf_wake, cpn_wake, tv_wake, &
     
    10221013        if (prt_level >= 9) &
    10231014             PRINT *, 'cva_driver -> cv3p_mixing'
    1024         CALL cv3p_mixing(nloc, ncum, nd, nd, ntra, icb, nk, inb, &           ! na->nd
     1015!!        CALL cv3p_mixing(nloc, ncum, nd, nd, ntra, icb, nk, inb, &           ! na->nd                  !jyg: get rid of ntra
     1016        CALL cv3p_mixing(nloc, ncum, nd, nd, icb, nk, inb, &           ! na->nd                         
    10251017!!                         ph, t, q, qs, u, v, tra, h, lv, lf, frac, qnk, &
    1026                          ph, t, q, qs, u, v, tra, h, lv, lf, frac_s, qta, &      !!jygprl
     1018!!                         ph, t, q, qs, u, v, tra, h, lv, lf, frac_s, qta, &      !!jygprl              !jyg: get rid of ntra
     1019                         ph, t, q, qs, u, v, h, lv, lf, frac_s, qta, &      !!jygprl                     
    10271020                         unk, vnk, hp, tv, tvp, ep, clw, sig, &
    10281021                         ment, qent, hent, uent, vent, nent, &
    1029                          sigij, elij, supmax, ments, qents, traent)
     1022!!                         sigij, elij, supmax, ments, qents, traent)                                    !jyg: get rid of ntra
     1023                         sigij, elij, supmax, ments, qents)                                             
    10301024! print*, 'cv3p_mixing-> supmax ', (supmax(1,k), k=1,nd)
    10311025
     
    11041098        if (prt_level >= 9) &
    11051099             PRINT *, 'cva_driver -> cv3_mixing'
    1106         CALL cv3_mixing(nloc, ncum, nd, nd, ntra, icb, nk, inb, &             ! na->nd
    1107                         ph, t, q, qs, u, v, tra, h, lv, lf, frac_s, qnk, &
     1100!!        CALL cv3_mixing(nloc, ncum, nd, nd, ntra, icb, nk, inb, &             ! na->nd       !jyg: get rid of ntra
     1101        CALL cv3_mixing(nloc, ncum, nd, nd, icb, nk, inb, &             ! na->nd               
     1102!!                        ph, t, q, qs, u, v, tra, h, lv, lf, frac_s, qnk, &                   !jyg: get rid of ntra
     1103                        ph, t, q, qs, u, v, h, lv, lf, frac_s, qnk, &                         
    11081104                        unk, vnk, hp, tv, tvp, ep, clw, m, sig, &
    1109                         ment, qent, uent, vent, nent, sigij, elij, ments, qents, traent)
     1105!!                        ment, qent, uent, vent, nent, sigij, elij, ments, qents, traent)     !jyg: get rid of ntra
     1106                        ment, qent, uent, vent, nent, sigij, elij, ments, qents)               
    11101107        hent(1:nloc,1:nd,1:nd) = 0.
    11111108      ELSE
     
    11491146        if (prt_level >= 9) &
    11501147             PRINT *, 'cva_driver -> cv3_unsat'
    1151       CALL cv3_unsat(nloc, ncum, nd, nd, ntra, icb, inb, iflag, &              ! na->nd
    1152                      t_wake, q_wake, qs_wake, gz, u, v, tra, p, ph, &
     1148!!      CALL cv3_unsat(nloc, ncum, nd, nd, ntra, icb, inb, iflag, &              ! na->nd         !jyg: get rid of ntra
     1149      CALL cv3_unsat(nloc, ncum, nd, nd, icb, inb, iflag, &              ! na->nd                 
     1150!!                     t_wake, q_wake, qs_wake, gz, u, v, tra, p, ph, &                           !jyg: get rid of ntra
     1151                     t_wake, q_wake, qs_wake, gz, u, v, p, ph, &                                 
    11531152                     th_wake, tv_wake, lv_wake, lf_wake, cpn_wake, &
    11541153                     ep, sigp, clw, frac_s, qpreca, frac_a, qta, &                    !!jygprl
    11551154                     m, ment, elij, delt, plcl, coef_clos_eff, &
    1156                      mp, qp, up, vp, trap, wt, water, evap, fondue, ice, &
     1155!!                     mp, qp, up, vp, trap, wt, water, evap, fondue, ice, &                      !jyg: get rid of ntra
     1156                     mp, qp, up, vp, wt, water, evap, fondue, ice, &                             
    11571157                     faci, b, sigd, &
    11581158!!                     wdtrainA, wdtrainM)                                       ! RomP
     
    11991199        if (prt_level >= 9) &
    12001200             PRINT *, 'cva_driver -> cv3_yield'
    1201       CALL cv3_yield(nloc, ncum, nd, nd, ntra, ok_conserv_q, &                      ! na->nd
     1201!!      CALL cv3_yield(nloc, ncum, nd, nd, ntra, ok_conserv_q, &                      ! na->nd !jyg: get rid of ntra
     1202      CALL cv3_yield(nloc, ncum, nd, nd, ok_conserv_q, &                      ! na->nd         
    12021203                     icb, inb, delt, &
    1203                      t, q, t_wake, q_wake, s_wake, u, v, tra, &
     1204!!                     t, q, t_wake, q_wake, s_wake, u, v, tra, &                              !jyg: get rid of ntra
     1205                     t, q, t_wake, q_wake, s_wake, u, v, &                                     
    12041206                     gz, p, ph, h, hp, lv, lf, cpn, th, th_wake, &
    1205                      ep, clw, qpreca, m, tp, mp, qp, up, vp, trap, &
     1207!!                     ep, clw, qpreca, m, tp, mp, qp, up, vp, trap, &                         !jyg: get rid of ntra
     1208                     ep, clw, qpreca, m, tp, mp, qp, up, vp, &                                 
    12061209                     wt, water, ice, evap, fondue, faci, b, sigd, &
    12071210                     ment, qent, hent, iflag_mix, uent, vent, &
    1208                      nent, elij, traent, sig, &
     1211!!                     nent, elij, traent, sig, &                                              !jyg: get rid of ntra
     1212                     nent, elij, sig, &                                                       
    12091213                     tv, tvp, wghti, &
    1210                      iflag, precip, Vprecip, Vprecipi, ft, fq, fqcomp, fu, fv, ftra, &      ! jyg
     1214!!                     iflag, precip, Vprecip, Vprecipi, ft, fq, fqcomp, fu, fv, ftra, &       !jyg: get rid of ntra
     1215                     iflag, precip, Vprecip, Vprecipi, ft, fq, fqcomp, fu, fv, &               
    12111216                     cbmf, upwd, dnwd, dnwd0, ma, mip, &
    12121217!!                     tls, tps, &                            ! useless . jyg
     
    12701275        if (prt_level >= 9) &
    12711276             PRINT *, 'cva_driver -> cv3a_uncompress'
    1272       CALL cv3a_uncompress(nloc, len, ncum, nd, ntra, idcum, is_convect, compress,  &
     1277!!      CALL cv3a_uncompress(nloc, len, ncum, nd, ntra, idcum, is_convect, compress,  &              !jyg: get rid of ntra
     1278      CALL cv3a_uncompress(nloc, len, ncum, nd, idcum, is_convect, compress,  &                     
    12731279                           iflag, icb, inb, &
    12741280                           precip, cbmf, plcl, plfc, wbeff, sig, w0, ptop2, &
    1275                            ft, fq, fqcomp, fu, fv, ftra, &
     1281!!                           ft, fq, fqcomp, fu, fv, ftra, &                                         !jyg: get rid of ntra
     1282                           ft, fq, fqcomp, fu, fv, &                                                 
    12761283                           sigd, ma, mip, vprecip, vprecipi, upwd, dnwd, dnwd0, &
    12771284                           qcondc, wd, cape, cin, &
     
    12871294                           iflag1, kbas1, ktop1, &
    12881295                           precip1, cbmf1, plcl1, plfc1, wbeff1, sig1, w01, ptop21, &
    1289                            ft1, fq1, fqcomp1, fu1, fv1, ftra1, &
     1296!!                           ft1, fq1, fqcomp1, fu1, fv1, ftra1, &                                   !jyg: get rid of ntra
     1297                           ft1, fq1, fqcomp1, fu1, fv1, &                                           
    12901298                           sigd1, ma1, mip1, vprecip1, vprecipi1, upwd1, dnwd1, dnwd01, &
    12911299                           qcondc1, wd1, cape1, cin1, &
Note: See TracChangeset for help on using the changeset viewer.