source: LMDZ5/branches/LMDZ_tree_FC/libf/phylmd/freinage.F90 @ 2937

Last change on this file since 2937 was 2937, checked in by fcheruy, 7 years ago

added routine freinage to compute the tendencies on u and v due to drag of vegetation and the drag profile which is used in yamada4 for the computation of the tke

File size: 3.7 KB
Line 
1  SUBROUTINE freinage(knon, uu, vv,  &
2       tt,veget,lai, height,ypaprs,ypplay,drag_pro,d_u,d_v)
3
4
5    !ONLINE:
6    use dimphy, only: klon, klev
7!    USE control, ONLY: nvm
8!    USE indice_sol_mod, only : nvm_orch
9
10
11    include "YOMCST.h"
12    include "clesphys.h"
13    include "YOEGWD.h"
14!FC
15    include "dimpft.h"
16    include "compbl.h"
17
18    ! 0. DECLARATIONS:
19
20    ! 0.1 INPUTS
21
22    REAL, DIMENSION(klon,klev), INTENT(IN)         :: ypplay
23    REAL, DIMENSION(klon,klev+1), INTENT(IN)       :: ypaprs
24
25
26     REAL, DIMENSION(klon, klev), INTENT(IN)     :: uu
27     REAL, DIMENSION(klon, klev), INTENT(IN)     :: vv
28     REAL, DIMENSION(klon, klev), INTENT(IN)     :: tt
29     REAL, DIMENSION(klon,nvm_lmdz), INTENT(IN)          :: veget,lai
30     REAL, DIMENSION(klon,nvm_lmdz), INTENT(IN)          :: height
31
32     REAL, DIMENSION(klon,klev)         :: wind
33     REAL, DIMENSION(klon, klev)        :: yzlay
34     INTEGER knon
35
36    ! 0.2 OUTPUTS
37
38      REAL, DIMENSION(klon, klev),  INTENT(OUT)       :: d_v        ! change in v
39      REAL, DIMENSION(klon, klev),  INTENT(OUT)       :: d_u        ! change in v
40    !knon nombre de points concernes
41      REAL, DIMENSION(klon,klev)         :: sumveg        ! change in v
42   
43     REAL,  DIMENSION(klon,klev), INTENT(OUT)          :: drag_pro
44    ! (KLON, KLEV) tendencies on winds
45
46
47    INTEGER k,jv,i
48
49
50!FCCCC    REAL Cd_frein
51
52    ! 0.3.1 LOCAL VARIABLE
53
54
55    !-----------------------------------------------------------------
56
57    ! 1. INITIALISATIONS
58
59   
60!    Cd_frein = 7.5E-2 ! (0.075) ! Drag from MASSON 2009
61!FC ESSAI
62!    Cd_frein = 1.5E-2 ! (0.075) ! Drag from MASSON 2009
63!    Cd_frein = 0.005 ! (0.075) ! Drag from MASSON 2009
64
65! initialisation
66      d_u(:,:) =0.
67      d_v(:,:) =0.
68      drag_pro(:,:) =0.
69      sumveg(:,:) =0.
70!!        print*, "Cd_frein" , Cd_frein
71     
72       wind(:,:)= sqrt(uu(:,:)*uu(:,:)+vv(:,:)*vv(:,:))
73
74       yzlay(1:knon,1)= &
75            RD*tt(1:knon,1)/(0.5*(ypaprs(1:knon,1)+ypplay(1:knon,1))) &
76            *(ypaprs(1:knon,1)-ypplay(1:knon,1))/RG
77       DO k=2,klev
78             yzlay(1:knon,k)= &
79                  yzlay(1:knon,k-1)+RD*0.5*(tt(1:knon,k-1)+tt(1:knon,k)) &
80                  /ypaprs(1:knon,k)*(ypplay(1:knon,k-1)-ypplay(1:knon,k))/RG
81       END DO
82
83!    verifier les indexes .....
84!!       print*, " calcul de drag_pro FC "
85   
86      do k= 1,klev
87
88      do jv=2,nvm_lmdz   !   (on peut faire 9 ?)
89
90      do i=1,knon
91
92      sumveg(i,k)= sumveg(i,k)+ veget(i,jv)
93
94!      if  ( (height(i,jv) .gt. yzlay(i,k)) .AND. (height(i,jv) .gt. 0.1) .and. LAI(i,jv).gt.0. ) then                     
95      if  ( (height(i,jv) .gt. yzlay(i,k)) .AND. (height(i,jv) .gt. 0.1) ) then                     
96!FC attention veut on le test sur le LAI ?
97         if (ifl_pbltree.eq.1) then
98      drag_pro(i,k)= drag_pro(i,k)+ &
99      veget(i,jv)
100          elseif (ifl_pbltree.eq.2) then
101      drag_pro(i,k)= drag_pro(i,k)+ &
102      6*LAI(i,jv)*veget(i,jv)*( yzlay(i,k)*(height(i,jv)-yzlay(i,k))/(height(i,jv)*height(i,jv)+ 0.01))
103          elseif (ifl_pbltree.eq.3) then
104      drag_pro(i,k)= drag_pro(i,k)+ &
105      veget(i,jv)*( yzlay(i,k)*(height(i,jv)-yzlay(i,k))/(height(i,jv)*height(i,jv)+ 0.01))
106          elseif (ifl_pbltree.eq.0) then
107          drag_pro(i,k)=0.0
108           endif
109      else
110      drag_pro(i,k)= drag_pro(i,k)
111      endif
112
113
114      enddo
115      enddo
116     enddo
117      do k=1,klev
118        where (sumveg(1:knon,k) > 0.05 )
119!        drag_pro(1:knon,k)=Cd_frein*drag_pro(1:knon,k)/sumveg(1:knon,k)
120        drag_pro(1:knon,k)=Cd_frein*drag_pro(1:knon,k)
121        elsewhere
122        drag_pro(1:knon,k)=0.0
123       endwhere
124        d_u(1:knon,k) =(-1)*drag_pro(1:knon,k)*uu(1:knon,k)*wind(1:knon,k)
125        d_v(1:knon,k) =(-1)*drag_pro(1:knon,k)*vv(1:knon,k)*wind(1:knon,k)
126      enddo
127      return
128
129 END SUBROUTINE freinage
130
Note: See TracBrowser for help on using the repository browser.