Ignore:
Timestamp:
Nov 12, 2019, 10:49:35 AM (5 years ago)
Author:
aboissinot
Message:

In physiq_mod.F90, variables fm0, entr0 and detr0 are now allocatable.

File:
1 edited

Legend:

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

    r2138 r2176  
    258258     
    259259      real,allocatable,save :: f0(:)      ! Mass flux norm
     260      real,allocatable,save :: fm0(:,:)   ! Mass flux
     261      real,allocatable,save :: entr0(:,:) ! Entrainment
     262      real,allocatable,save :: detr0(:,:) ! Detrainment
    260263      real dqevap(ngrid,nlayer,nq)        ! water tracer mass mixing ratio variations due to evaporation
    261264      real dtevap(ngrid,nlayer)           ! temperature variation due to evaporation
    262265      real zqtherm(ngrid,nlayer,nq)       ! vapor mass mixing ratio after evaporation
    263266      real zttherm(ngrid,nlayer)          ! temperature after evaporation
    264       real fm0(ngrid, nlayer+1)           ! Mass flux
    265       real entr0(ngrid, nlayer)           ! Entrainment
    266       real detr0(ngrid, nlayer)           ! Detrainment
    267267      real fraca(ngrid, nlayer+1)         ! Fraction of the surface that plumes occupies
    268       real zw2(ngrid, nlayer+1)           ! Squared vertical speed or its square root
     268      real zw2(ngrid, nlayer+1)           ! Vertical speed
     269      real zw2_bis(ngrid, nlayer)         !
    269270      real zqsatth(ngrid, nlayer)         ! Water vapor mixing ratio at saturation
    270271      real zqta(ngrid, nlayer)            ! Total water mass mixing ratio in the plume
     
    686687!        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    687688         if (calltherm) then
    688             call init_thermcell_mod(g, rcp, r, pi, T_h2o_ice_liq, RV)
     689            CALL init_thermcell_mod(g, rcp, r, pi, T_h2o_ice_liq, RV)
    689690            ALLOCATE(f0(ngrid))
     691            ALLOCATE(fm0(ngrid,nlayer+1))
     692            ALLOCATE(entr0(ngrid,nlayer))
     693            ALLOCATE(detr0(ngrid,nlayer))
    690694         endif
    691695         
     
    13551359                     
    13561360                  endif ! end of 'enertest'
    1357                endif
     1361               endif ! end of '.not.calltherm'
    13581362               
    13591363               ! Large scale condensation/evaporation.
     
    17381742      zu(1:ngrid,1:nlayer) = pu(1:ngrid,1:nlayer) + pdu(1:ngrid,1:nlayer)*ptimestep
    17391743      zv(1:ngrid,1:nlayer) = pv(1:ngrid,1:nlayer) + pdv(1:ngrid,1:nlayer)*ptimestep
     1744     
     1745      ! Recast thermal plume vertical velocity array for outputs
     1746      IF (calltherm) THEN
     1747         DO ig=1,ngrid
     1748            DO l=1,nlayer
     1749               zw2_bis(ig,l) = zw2(ig,l)
     1750            ENDDO
     1751         ENDDO
     1752      ENDIF
    17401753
    17411754      ! Diagnostic.
     
    21282141         call writediagfi(ngrid,'detr','Detrainment','kg m$^{-2}$ s$^{-1}$', 3, detr0)
    21292142         call writediagfi(ngrid,'fm','Mass flux','kg m$^{-2}$ s$^{-1}$', 3, fm0)
    2130          call writediagfi(ngrid,'w_plm','Squared vertical velocity','m s$^{-1}$', 3, zw2)
     2143         call writediagfi(ngrid,'w_plm','Squared vertical velocity','m s$^{-1}$', 3, zw2_bis)
    21312144         call writediagfi(ngrid,'fraca','Updraft fraction','', 3, fraca)
    21322145!         call writediagfi(ngrid,'pmin', 'pmin', 'Pa', 2, pmin)
     
    23372350      CALL send_xios_field("omega",omega)
    23382351     
    2339       IF (callrad) CALL send_xios_field('dt_rad',dtrad)
    2340       IF (calldifv) CALL send_xios_field('dt_dif',zdtdif)
    2341       IF (calladj) CALL send_xios_field('dt_adj',zdtadj)
    23422352      IF (calltherm) THEN
    2343          CALL send_xios_field('w_plm',zw2(:,2:))
    2344          CALL send_xios_field('fm',fm0(:,2:))
    2345          CALL send_xios_field('frac',fraca(:,2:))
     2353         CALL send_xios_field('w_plm',zw2_bis)
    23462354         CALL send_xios_field('entr',entr0)
    23472355         CALL send_xios_field('detr',detr0)
Note: See TracChangeset for help on using the changeset viewer.