Changeset 339 for trunk/LMDZ.MARS/libf


Ignore:
Timestamp:
Nov 3, 2011, 11:19:09 AM (14 years ago)
Author:
acolaitis
Message:

Minor commit: interpolation can be called with or without thermals, with or without convadj.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/LMDZ.MARS/libf/phymars/surflayer_interpol.F

    r319 r339  
    3232
    3333#include "comcstfi.h"
     34#include "callkeys.h"
    3435
    3536!   Arguments:
     
    7778      REAL pz0tcomp(ngrid)     ! computed z0t
    7879      REAL ite
    79       REAL residual
     80      REAL residual,zcd0,z1
    8081      REAL pcdv(ngrid),pcdh(ngrid)
    8182! For output :
     
    8586!   couche de surface:
    8687!   ------------------
    87       zout=z_out
     88
     89c Init :
     90
     91      L_mo(:)=0.
     92      ustar(:)=0.
    8893      tstar(:)=0.
    89       ustar(:)=0.
     94      zout=z_out
     95
    9096      reynolds(:)=0.
    9197
     
    140146!        ENDIF
    141147
     148      if(.not.callrichsl) then
     149         rib(ig) = (pg/ph(ig,1))
     150     &      *sqrt(pz(ig,1)*pz0(ig))
     151     &      *(((log(pz(ig,1)/pz0(ig)))**2)/(log(pz(ig,1)/pz0t)))
     152     &      *(ph(ig,1)-pts(ig))/(zu2(ig)+6.)
     153      else
    142154          rib(ig) = (pg/ph(ig,1))
    143155!     &      *pz(ig,1)*pz0(ig)/sqrt(pz(ig,1)*pz0t)
     
    148160!     &  /(MAX(pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1),wmax(ig)**2))
    149161!     &  /( pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1) + wmax(ig)**2)
     162
     163      endif
    150164
    151165         else
     
    211225      ENDDO
    212226
     227!      endif !of if callrichsl
     228
    213229! Large-scale wind at first layer (without gustiness) and
    214230! u* theta* computation
    215231      DO ig=1,ngrid
    216232
    217          if (rib(ig) .gt. ric) then
     233         if (rib(ig) .ge. ric) then
    218234           ustar(ig)=0.
    219235           tstar(ig)=0.
     
    230246     &     /sqrt(pcdv(ig))
    231247
    232            if (tstar(ig) .lt. -50) then
     248           if ((tstar(ig) .lt. -50) .and. callrichsl) then
    233249             print*, fh(ig),rib(ig),(ph(ig,1)-pts(ig))
    234250     &               ,log(pz(ig,1)/pz0tcomp(ig)),sqrt(fm(ig))
     
    329345      ENDDO
    330346
     347! when using convective adjustment without thermals, a vertical potential temperature
     348! profile is assumed up to the thermal roughness length. Hence, theoretically, theta
     349! interpolated at any height in the surface layer is theta at the first level.
     350
     351      IF ((.not.calltherm).and.(calladj)) THEN
     352           Teta_out(:)=ph(:,1)
     353      ENDIF
     354
    331355! Usefull diagnostics for the interpolation routine :
    332356
     357!
     358!         call WRITEDIAGFI(ngrid,'Ri',
     359!     &              'Richardson','m',
     360!     &                         2,rib)
     361!
    333362!         call WRITEDIAGFI(ngrid,'z0T',
    334363!     &              'thermal roughness length','m',
Note: See TracChangeset for help on using the changeset viewer.