Ignore:
Timestamp:
Feb 7, 2019, 11:33:33 AM (6 years ago)
Author:
aboissinot
Message:

Uncomment two "corrections" (or "bidouilles" ccording to the author) in thermcell_flux. They are used only if
iflag_thermals_optflux is set to 0

Remove useless parameter fact_shell in thermcell_mod.

File:
1 edited

Legend:

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

    r2060 r2092  
    159159         
    160160!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    161 ! AB : I comment the correction and replace it by an uncompromising test.
     161! AB : I remove the correction and replace it by an uncompromising test.
    162162!      According to the previous derivations, we MUST have positive mass flux
    163163!      everywhere! Indeed, as soon as fm becomes negative, the plume stops.
     
    186186! Test sur fraca constante ou croissante au-dessus de lalim
    187187!------------------------------------------------------------------------------
    188 ! AB : do we have to decree that?
    189 !         IF (iflag_thermals_optflux.eq.0) THEN
    190 !            DO ig=1,ngrid
    191 !               IF (l.ge.lalim(ig).and.l.le.lmax(ig).and.(zw2(ig,l+1).gt.1.e-10).and.(zw2(ig,l).gt.1.e-10) ) THEN
    192 !                  zzz = fm(ig,l) * rhobarz(ig,l+1) * zw2(ig,l+1)              &
    193 !                  &   / (rhobarz(ig,l) * zw2(ig,l))
    194 !                 
    195 !                  IF (fm(ig,l+1).gt.zzz) THEN
    196 !                     detr(ig,l) = detr(ig,l) + fm(ig,l+1) - zzz
    197 !                     fm(ig,l+1) = zzz
    198 !                     ncorecfm4  = ncorecfm4 + 1
    199 !                  ENDIF
    200 !               ENDIF
    201 !            ENDDO
    202 !         ENDIF
     188! AB : Do we have to decree that? If so, set iflag_thermals_optflux to 0
     189         IF (iflag_thermals_optflux==0) THEN
     190            DO ig=1,ngrid
     191               IF (l.ge.lalim(ig).and.l.le.lmax(ig).and.(zw2(ig,l+1).gt.1.e-10).and.(zw2(ig,l).gt.1.e-10) ) THEN
     192                  zzz = fm(ig,l) * rhobarz(ig,l+1) * zw2(ig,l+1)              &
     193                  &   / (rhobarz(ig,l) * zw2(ig,l))
     194                 
     195                  IF (fm(ig,l+1).gt.zzz) THEN
     196                     detr(ig,l) = detr(ig,l) + fm(ig,l+1) - zzz
     197                     fm(ig,l+1) = zzz
     198                     ncorecfm4  = ncorecfm4 + 1
     199                  ENDIF
     200               ENDIF
     201            ENDDO
     202         ENDIF
    203203         
    204204!------------------------------------------------------------------------------
    205205! Test sur flux de masse constant ou decroissant au-dessus de lalim
    206206!------------------------------------------------------------------------------
    207 ! AB : do we have to decree that?
    208 !         IF (iflag_thermals_optflux==0) THEN
    209 !            DO ig=1,ngrid
    210 !               IF ((fm(ig,l+1).gt.fm(ig,l)).and.(l.gt.lalim(ig))) then
    211 !                  f_old = fm(ig,l+1)
    212 !                  fm(ig,l+1) = fm(ig,l)
    213 !                  detr(ig,l) = detr(ig,l) + f_old - fm(ig,l+1)
    214 !                  ncorecfm5  = ncorecfm5 + 1
    215 !               ENDIF
    216 !            ENDDO
    217 !         ENDIF
     207! AB : Do we have to decree that? If so, set iflag_thermals_optflux to 0
     208         IF (iflag_thermals_optflux==0) THEN
     209            DO ig=1,ngrid
     210               IF ((fm(ig,l+1).gt.fm(ig,l)).and.(l.gt.lalim(ig))) then
     211                  f_old = fm(ig,l+1)
     212                  fm(ig,l+1) = fm(ig,l)
     213                  detr(ig,l) = detr(ig,l) + f_old - fm(ig,l+1)
     214                  ncorecfm5  = ncorecfm5 + 1
     215               ENDIF
     216            ENDDO
     217         ENDIF
    218218         
    219219!------------------------------------------------------------------------------
     
    488488     
    489489!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    490 ! AB : test added to avoid problem when lmax = 0, which is not a
    491 !      fortran array index.
     490! AB : test added to avoid problem when lmax = 0, which is not a fortran index.
    492491!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    493492      IF (lmax(ig).gt.0) THEN
     
    505504      IF (prt_level.ge.1) THEN
    506505         
    507 ! AB : those tests were removed for their uselessness.
     506! AB : those outputs are commented for their uselessness.
    508507!         IF (ncorecfm2.ge.1) THEN
    509508!            print *, 'WARNING: Outgoing mass flux has negative value(s)!'
     
    511510!         ENDIF
    512511         
    513 ! AB : those tests were removed because I don't know if we should decree them.
    514 !         IF (ncorecfm4.ge.1) THEN
    515 !            print *, 'WARNING: Deacreasing updraft fraction above lalim!'
    516 !            print *, 'in', ncorecfm4, 'point(s)'
    517 !         ENDIF
    518 !         IF (ncorecfm5.ge.1) THEN
    519 !            print *, 'WARNING: Increasing mass flux above lalim!'
    520 !            print *, 'in', ncorecfm5, 'point(s)'
    521 !         ENDIF
     512         IF (ncorecfm4.ge.1) THEN
     513            print *, 'WARNING: Deacreasing updraft fraction above lalim!'
     514            print *, 'in', ncorecfm4, 'point(s)'
     515         ENDIF
     516         
     517         IF (ncorecfm5.ge.1) THEN
     518            print *, 'WARNING: Increasing mass flux above lalim!'
     519            print *, 'in', ncorecfm5, 'point(s)'
     520         ENDIF
    522521         
    523522         IF (ncorecfm6.ge.1) THEN
     
    526525         ENDIF
    527526         
    528 ! AB : that test was removed because I don't know if we should decree it.
     527! AB : those outputs are commented because corresponding test is also commented.
    529528!         IF (ncorecfm7.ge.1) THEN
    530529!            print *, 'WARNING: Detrainment is greater than mass flux!'
Note: See TracChangeset for help on using the changeset viewer.