Changeset 132 in lmdz_wrf


Ignore:
Timestamp:
Jul 28, 2014, 6:19:53 PM (10 years ago)
Author:
lfita
Message:

Adding checks for rhobarz0

File:
1 edited

Legend:

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

    r131 r132  
    953953    do ig =1,ngrid
    954954     zmax(ig)=pphi(ig,lmax(ig))/rg
    955      if (ok_lcl(ig)) then
    956       rhobarz0(ig)=rhobarz(ig,klcl(ig))+(rhobarz(ig,klcl(ig)+1) &
     955!     if (ok_lcl(ig)) then
     956! L. Fita, LMD July 2014. Adding avoiding divisons by zero...
     957     if ( ok_lcl(ig) .and. (klcl(ig).gt.0) .and. (klcl(ig)+1.le.nlay-1) .and.        &
     958       (klcl(ig)+1.gt.0) ) then
     959       rhobarz0(ig)=rhobarz(ig,klcl(ig))+(rhobarz(ig,klcl(ig)+1) &
    957960 &               -rhobarz(ig,klcl(ig)))*interp(ig)
    958       zlcl(ig)=(pplev(ig,1)-pcon(ig))/(rhobarz0(ig)*RG)
    959       zlcl(ig)=min(zlcl(ig),zmax(ig))   ! Si zlcl > zmax alors on pose zlcl = zmax
     961       zlcl(ig)=(pplev(ig,1)-pcon(ig))/(rhobarz0(ig)*RG)
     962       zlcl(ig)=min(zlcl(ig),zmax(ig))   ! Si zlcl > zmax alors on pose zlcl = zmax
    960963     else
    961964      rhobarz0(ig)=0.
Note: See TracChangeset for help on using the changeset viewer.