! $Id$ SUBROUTINE freinage(knon, uu, vv, & tt,veget,lai, height,ypaprs,ypplay,drag_pro,d_u,d_v) !ONLINE: USE dimphy, ONLY: klon, klev USE lmdz_clesphys USE lmdz_compbl, ONLY: iflag_pbl, iflag_pbl_split, iflag_order2_sollw, ifl_pbltree ! USE control, ONLY: nvm ! USE indice_sol_mod, ONLY: nvm_orch IMPLICIT NONE include "YOMCST.h" include "YOEGWD.h" !FC include "dimpft.h" ! 0. DECLARATIONS: ! 0.1 INPUTS REAL, DIMENSION(klon,klev), INTENT(IN) :: ypplay REAL, DIMENSION(klon,klev+1), INTENT(IN) :: ypaprs REAL, DIMENSION(klon, klev), INTENT(IN) :: uu REAL, DIMENSION(klon, klev), INTENT(IN) :: vv REAL, DIMENSION(klon, klev), INTENT(IN) :: tt REAL, DIMENSION(klon,nvm_lmdz), INTENT(IN) :: veget,lai REAL, DIMENSION(klon,nvm_lmdz), INTENT(IN) :: height REAL, DIMENSION(klon,klev) :: wind REAL, DIMENSION(klon, klev) :: yzlay INTEGER knon ! 0.2 OUTPUTS REAL, DIMENSION(klon, klev), INTENT(OUT) :: d_v ! change in v REAL, DIMENSION(klon, klev), INTENT(OUT) :: d_u ! change in v !knon nombre de points concernes REAL, DIMENSION(klon,klev) :: sumveg ! change in v REAL, DIMENSION(klon,klev), INTENT(OUT) :: drag_pro ! (KLON, KLEV) tendencies on winds INTEGER k,jv,i !FCCCC REAL Cd_frein ! 0.3.1 LOCAL VARIABLE !----------------------------------------------------------------- ! 1. INITIALISATIONS ! Cd_frein = 7.5E-2 ! (0.075) ! Drag from MASSON 2009 !FC ESSAI ! Cd_frein = 1.5E-2 ! (0.075) ! Drag from MASSON 2009 ! Cd_frein = 0.005 ! (0.075) ! Drag from MASSON 2009 ! initialisation d_u(:,:) =0. d_v(:,:) =0. drag_pro(:,:) =0. sumveg(:,:) =0. !! PRINT*, "Cd_frein" , Cd_frein wind(:,:)= sqrt(uu(:,:)*uu(:,:)+vv(:,:)*vv(:,:)) yzlay(1:knon,1)= & RD*tt(1:knon,1)/(0.5*(ypaprs(1:knon,1)+ypplay(1:knon,1))) & *(ypaprs(1:knon,1)-ypplay(1:knon,1))/RG DO k=2,klev yzlay(1:knon,k)= & yzlay(1:knon,k-1)+RD*0.5*(tt(1:knon,k-1)+tt(1:knon,k)) & /ypaprs(1:knon,k)*(ypplay(1:knon,k-1)-ypplay(1:knon,k))/RG END DO ! verifier les indexes ..... !! PRINT*, " calcul de drag_pro FC " do k= 1,klev do jv=2,nvm_lmdz ! (on peut faire 9 ?) do i=1,knon sumveg(i,k)= sumveg(i,k)+ veget(i,jv) ! if ( (height(i,jv) .gt. yzlay(i,k)) .AND. (height(i,jv) .gt. 0.1) .AND. LAI(i,jv).gt.0. ) THEN IF ( (height(i,jv) > yzlay(i,k)) .AND. (height(i,jv) > 0.1) ) THEN !FC attention veut on le test sur le LAI ? IF (ifl_pbltree==1) THEN drag_pro(i,k)= drag_pro(i,k)+ & veget(i,jv) elseif (ifl_pbltree==2) THEN drag_pro(i,k)= drag_pro(i,k)+ & 6*LAI(i,jv)*veget(i,jv)*( yzlay(i,k)*(height(i,jv)-yzlay(i,k))/(height(i,jv)*height(i,jv)+ 0.01)) elseif (ifl_pbltree==3) THEN drag_pro(i,k)= drag_pro(i,k)+ & veget(i,jv)*( yzlay(i,k)*(height(i,jv)-yzlay(i,k))/(height(i,jv)*height(i,jv)+ 0.01)) elseif (ifl_pbltree==0) THEN drag_pro(i,k)=0.0 endif else drag_pro(i,k)= drag_pro(i,k) endif enddo enddo enddo do k=1,klev where (sumveg(1:knon,k) > 0.05 ) ! drag_pro(1:knon,k)=Cd_frein*drag_pro(1:knon,k)/sumveg(1:knon,k) drag_pro(1:knon,k)=Cd_frein*drag_pro(1:knon,k) elsewhere drag_pro(1:knon,k)=0.0 endwhere d_u(1:knon,k) =(-1)*drag_pro(1:knon,k)*uu(1:knon,k)*wind(1:knon,k) d_v(1:knon,k) =(-1)*drag_pro(1:knon,k)*vv(1:knon,k)*wind(1:knon,k) enddo END SUBROUTINE freinage