Changeset 127 in lmdz_wrf


Ignore:
Timestamp:
Jul 28, 2014, 5:42:58 PM (10 years ago)
Author:
lfita
Message:

Adding condition to avoid pintep == NaN

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/LMDZ_WRFmeas/WRFV3/lmdz/thermcell_main.F90

    r126 r127  
    914914      do ig=1,ngrid
    915915        if (ok_lcl(ig)) then
    916           if ((pplay(ig,l) .ge. pcon(ig)) .and. (pplay(ig,l+1) .le. pcon(ig))) then
     916!          if ((pplay(ig,l) .ge. pcon(ig)) .and. (pplay(ig,l+1) .le. pcon(ig))) then
     917! L. Fita, LMD July 2014. Adding avoiding divisons by zero...
     918          if ((pplay(ig,l) .ge. pcon(ig)) .and. (pplay(ig,l+1) .le. pcon(ig)) .and.  &
     919            (pplay(ig,klcl(ig)+1)-pplay(ig,klcl(ig))) .ne. 0.) then
    917920          klcl(ig)=l
    918921          interp(ig)=(pcon(ig)-pplay(ig,klcl(ig)))/(pplay(ig,klcl(ig)+1)-pplay(ig,klcl(ig)))
     
    922925    enddo
    923926      lfname='thermcell_main calculation of LCL'
    924       lvarname = 'inerp'
     927      lvarname = 'interp'
    925928      CALL check_var3D(lfname, lvarname, interp, ngrid, nlay, largest, .FALSE.)
    926929      lvarname = 'klcl'
     
    930933      lvarname = 'pplay'
    931934      CALL check_var3D(lfname, lvarname, pplay, ngrid, nlay, largest, .FALSE.)
     935      lvarname = '1/pplay'
     936      CALL check_var3D(lfname, lvarname, 1./pplay, ngrid, nlay, largest, .FALSE.)
     937
    932938
    933939!------------Hauteur des thermiques
Note: See TracChangeset for help on using the changeset viewer.