source: LMDZ5/trunk/libf/phylmd/freinage.F90 @ 5342

Last change on this file since 5342 was 2952, checked in by Laurent Fairhead, 7 years ago

Parametrization of drag by copses
Need version 4465 of ORCHIDEE at least

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