source: LMDZ5/trunk/libf/phylmd/surf_land_mod.F90 @ 5446

Last change on this file since 5446 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
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 9.0 KB
Line 
1!
2MODULE surf_land_mod
3
4  IMPLICIT NONE
5
6CONTAINS
7!
8!****************************************************************************************
9
10  SUBROUTINE surf_land(itime, dtime, date0, jour, knon, knindex, &
11       rlon, rlat, yrmu0, &
12       debut, lafin, zlev, ccanopy, swnet, lwnet, albedo, &
13       tsurf, p1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum, &
14       AcoefH, AcoefQ, BcoefH, BcoefQ, &
15       AcoefU, AcoefV, BcoefU, BcoefV, &
16       pref, u1, v1, gustiness, rugoro, pctsrf, &
17       lwdown_m, q2m, t2m, &
18       snow, qsol, agesno, tsoil, &
19       z0m, z0h, SFRWL, alb_dir_new, alb_dif_new, evap, fluxsens, fluxlat, &   
20       qsurf, tsurf_new, dflux_s, dflux_l, &
21       flux_u1, flux_v1 , &
22       veget,lai,height)
23
24    USE dimphy
25    USE surface_data, ONLY    : ok_veget
26
27    ! See comments in each module surf_land_orchidee_xxx for compatiblity with ORCHIDEE
28#ifdef ORCHIDEE_NOOPENMP
29    ! Compilation with cpp key ORCHIDEE NOOPENMP
30    USE surf_land_orchidee_noopenmp_mod
31#else
32#if ORCHIDEE_NOZ0H
33    ! Compilation with cpp key ORCHIDEE NOZ0H
34    USE surf_land_orchidee_noz0h_mod
35#else
36#if ORCHIDEE_NOFREIN
37    ! Compilation with cpp key ORCHIDEE_NOFREIN
38    USE surf_land_orchidee_nofrein_mod
39#else
40    USE surf_land_orchidee_mod
41#endif
42#endif
43#endif
44
45    USE surf_land_bucket_mod
46    USE calcul_fluxs_mod
47    USE indice_sol_mod
48
49    INCLUDE "dimsoil.h"
50    INCLUDE "YOMCST.h"
51    INCLUDE "clesphys.h"
52    INCLUDE "dimpft.h"
53
54
55! Input variables 
56!****************************************************************************************
57    INTEGER, INTENT(IN)                     :: itime, jour, knon
58    INTEGER, DIMENSION(klon), INTENT(IN)    :: knindex
59    REAL, INTENT(IN)                        :: date0
60    REAL, DIMENSION(klon), INTENT(IN)       :: rlon, rlat
61    REAL, DIMENSION(klon), INTENT(IN)       :: yrmu0  ! cosine of solar zenith angle
62    LOGICAL, INTENT(IN)                     :: debut, lafin
63    REAL, INTENT(IN)                        :: dtime
64    REAL, DIMENSION(klon), INTENT(IN)       :: zlev, ccanopy
65    REAL, DIMENSION(klon), INTENT(IN)       :: swnet, lwnet
66    REAL, DIMENSION(klon), INTENT(IN)       :: albedo  ! albedo for whole short-wave interval
67    REAL, DIMENSION(klon), INTENT(IN)       :: tsurf
68    REAL, DIMENSION(klon), INTENT(IN)       :: p1lay
69    REAL, DIMENSION(klon), INTENT(IN)       :: cdragh, cdragm
70    REAL, DIMENSION(klon), INTENT(IN)       :: precip_rain, precip_snow
71    REAL, DIMENSION(klon), INTENT(IN)       :: temp_air, spechum
72    REAL, DIMENSION(klon), INTENT(IN)       :: AcoefH, AcoefQ, BcoefH, BcoefQ
73    REAL, DIMENSION(klon), INTENT(IN)       :: AcoefU, AcoefV, BcoefU, BcoefV
74    REAL, DIMENSION(klon), INTENT(IN)       :: pref   ! pressure reference
75    REAL, DIMENSION(klon), INTENT(IN)       :: u1, v1, gustiness
76    REAL, DIMENSION(klon), INTENT(IN)       :: rugoro
77    REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf
78    REAL, DIMENSION(klon), INTENT(IN)       :: lwdown_m  ! downwelling longwave radiation at mean surface
79                                                         ! corresponds to previous sollwdown
80    REAL, DIMENSION(klon), INTENT(IN)       :: q2m, t2m
81
82! In/Output variables
83!****************************************************************************************
84    REAL, DIMENSION(klon), INTENT(INOUT)          :: snow, qsol
85    REAL, DIMENSION(klon), INTENT(INOUT)          :: agesno
86    REAL, DIMENSION(klon, nsoilmx), INTENT(INOUT) :: tsoil
87
88! Output variables
89!****************************************************************************************
90    REAL, DIMENSION(klon), INTENT(OUT)       :: z0m, z0h
91!albedo SB >>>
92!    REAL, DIMENSION(klon), INTENT(OUT)       :: alb1_new ! albdeo for shortwave interval 1(visible)
93!    REAL, DIMENSION(klon), INTENT(OUT)       :: alb2_new ! albedo for shortwave interval 2(near infrared)
94    REAL, DIMENSION(6), INTENT(IN) :: SFRWL
95    REAL, DIMENSION(klon,nsw), INTENT(OUT)       :: alb_dir_new,alb_dif_new
96!albedo SB <<<
97    REAL, DIMENSION(klon), INTENT(OUT)       :: evap
98    REAL, DIMENSION(klon), INTENT(OUT)       :: fluxsens, fluxlat
99    REAL, DIMENSION(klon), INTENT(OUT)       :: qsurf
100    REAL, DIMENSION(klon), INTENT(OUT)       :: tsurf_new
101    REAL, DIMENSION(klon), INTENT(OUT)       :: dflux_s, dflux_l     
102    REAL, DIMENSION(klon), INTENT(OUT)       :: flux_u1, flux_v1  ! flux for U and V at first model level
103    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: veget,lai
104    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: height
105
106! Local variables
107!****************************************************************************************
108    REAL, DIMENSION(klon) :: p1lay_tmp
109    REAL, DIMENSION(klon) :: pref_tmp
110    REAL, DIMENSION(klon) :: swdown     ! downwelling shortwave radiation at land surface
111    REAL, DIMENSION(klon) :: epot_air           ! potential air temperature
112    REAL, DIMENSION(klon) :: tsol_rad, emis_new ! output from interfsol not used
113    REAL, DIMENSION(klon) :: u0, v0     ! surface speed
114    INTEGER               :: i
115
116!albedo SB >>>
117    REAL, DIMENSION(klon)      :: alb1_new,alb2_new
118!albedo SB <<<
119
120
121!****************************************************************************************
122! Choice between call to vegetation model (ok_veget=true) or simple calculation below
123!
124!****************************************************************************************
125   IF (ok_veget) THEN
126!****************************************************************************************
127!  Call model sechiba in model ORCHIDEE
128!
129!****************************************************************************************
130       p1lay_tmp(:)      = 0.0
131       pref_tmp(:)       = 0.0
132       p1lay_tmp(1:knon) = p1lay(1:knon)/100.
133       pref_tmp(1:knon)  = pref(1:knon)/100.
134!
135!* Calculate incoming flux for SW and LW interval: swdown
136!
137       swdown(:) = 0.0
138       DO i = 1, knon
139          swdown(i) = swnet(i)/(1-albedo(i))
140       END DO
141!
142!* Calculate potential air temperature
143!
144       epot_air(:) = 0.0
145       DO i = 1, knon
146          epot_air(i) = RCPD*temp_air(i)*(pref(i)/p1lay(i))**RKAPPA
147       END DO
148
149       ! temporary for keeping same results using lwdown_m instead of lwdown
150       CALL surf_land_orchidee(itime, dtime, date0, knon, &
151            knindex, rlon, rlat, yrmu0, pctsrf, &
152            debut, lafin, &
153            zlev,  u1, v1, gustiness, temp_air, spechum, epot_air, ccanopy, &
154            cdragh, AcoefH, AcoefQ, BcoefH, BcoefQ, &
155            precip_rain, precip_snow, lwdown_m, swnet, swdown, &
156            pref_tmp, q2m, t2m, &
157            evap, fluxsens, fluxlat, &             
158            tsol_rad, tsurf_new, alb1_new, alb2_new, &
159            emis_new, z0m, z0h, qsurf, &
160            veget, lai, height)       
161
162
163
164!* Add contribution of relief to surface roughness
165
166       DO i=1,knon
167          z0m(i) = MAX(1.5e-05,SQRT(z0m(i)**2 + rugoro(i)**2))
168       ENDDO
169
170    ELSE  ! not ok_veget
171!****************************************************************************************
172! No extern vegetation model choosen, call simple bucket calculations instead.
173!
174!****************************************************************************************
175       CALL surf_land_bucket(itime, jour, knon, knindex, debut, dtime,&
176            tsurf, p1lay, cdragh, precip_rain, precip_snow, temp_air, &
177            spechum, AcoefH, AcoefQ, BcoefH, BcoefQ, pref, &
178            u1, v1, gustiness, rugoro, swnet, lwnet, &
179            snow, qsol, agesno, tsoil, &
180            qsurf, z0m, alb1_new, alb2_new, evap, &
181            fluxsens, fluxlat, tsurf_new, dflux_s, dflux_l)
182        z0h(1:knon)=z0m(1:knon) ! En attendant mieux
183
184    ENDIF ! ok_veget
185
186!****************************************************************************************
187! Calculation for all land models
188! - Flux calculation at first modele level for U and V
189!****************************************************************************************
190! Suppose zero surface speed
191    u0(:)=0.0
192    v0(:)=0.0
193    CALL calcul_flux_wind(knon, dtime, &
194         u0, v0, u1, v1, gustiness, cdragm, &
195         AcoefU, AcoefV, BcoefU, BcoefV, &
196         p1lay, temp_air, &
197         flux_u1, flux_v1)
198
199!albedo SB >>>
200
201
202     select case(NSW)
203     case(2)
204       alb_dir_new(1:knon,1)=alb1_new(1:knon)
205       alb_dir_new(1:knon,2)=alb2_new(1:knon)
206     case(4)
207       alb_dir_new(1:knon,1)=alb1_new(1:knon)
208       alb_dir_new(1:knon,2)=alb2_new(1:knon)
209       alb_dir_new(1:knon,3)=alb2_new(1:knon)
210       alb_dir_new(1:knon,4)=alb2_new(1:knon)
211     case(6)
212       alb_dir_new(1:knon,1)=alb1_new(1:knon)
213       alb_dir_new(1:knon,2)=alb1_new(1:knon)
214       alb_dir_new(1:knon,3)=alb1_new(1:knon)
215       alb_dir_new(1:knon,4)=alb2_new(1:knon)
216       alb_dir_new(1:knon,5)=alb2_new(1:knon)
217       alb_dir_new(1:knon,6)=alb2_new(1:knon)
218     end select
219alb_dif_new=alb_dir_new
220!albedo SB <<<
221
222
223   
224  END SUBROUTINE surf_land
225!
226!****************************************************************************************
227
228END MODULE surf_land_mod
229!
230!****************************************************************************************
231
Note: See TracBrowser for help on using the repository browser.