Ignore:
Timestamp:
Nov 27, 2014, 4:06:03 PM (10 years ago)
Author:
Laurent Fairhead
Message:

Modification pour éviter de faire des calculs avec un q négatif qui peut entraîner
des calculs de t2m irréalistes (raison du plantage avec ORCHIDEE en mode debug a priori)


Modifications to prevent calculations with a negative humidity that would lead to
unrealistic calculations for temperature

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/coefcdrag.F90

    r2126 r2158  
    7878       ztsolv(i) = ts(i)
    7979!       ztvd(i) = t(i) * (psol(i)/pref(i))**RKAPPA
    80        ztvd(i) = (t(i)+zdphi(i)/RCPD/(1.+RVTMP2*q(i))) &
    81           *(1.+RETV*q(i))
     80!       ztvd(i) = (t(i)+zdphi(i)/RCPD/(1.+RVTMP2*q(i))) &
     81!          *(1.+RETV*q(i))
     82       ztvd(i) = (t(i)+zdphi(i)/RCPD/(1.+RVTMP2*q(i)))
    8283       trm0(i) = 1. + RETV * max(qsurf(i),0.0)
    8384       trm1(i) = 1. + RETV * max(q(i),0.0)
    8485       ztsolv(i) = ztsolv(i) * trm0(i)
    85 !       ztvd(i) = ztvd(i) * trm1(i)
     86       ztvd(i) = ztvd(i) * trm1(i)
    8687       zri1(i) = zdphi(i)*(ztvd(i)-ztsolv(i))/(zdu2(i)*ztvd(i))
    8788!
Note: See TracChangeset for help on using the changeset viewer.