source: LMDZ6/trunk/libf/phylmd/surf_land_mod.F90 @ 4484

Last change on this file since 4484 was 4283, checked in by jghattas, 2 years ago

Added landice_opt=2 : Treat continental land ice fractions in ORCHIDEE => pctsrf(:,is_lic) = 0.0 in LMDZ.

For this option, some more variables are needed from ORCHIDEE. Therfor change in the interface LMDZ-ORCHIDEE in surf_land_orchidee_mod is done. Previous interface is moved to surf_land_orchidee_nolic_mod.f90. To compile with previous interface, cpp key ORCHIDEE_NOLIC is added. Previous interface is compiled with argument orchidee2.1 in makelmdz and makelmdz_fcm.

At the same time, when the interface was changed, the variable yrmu0(coszang) was added in the call to intersurf_initialize_gathered. This is needed in ORCHIDEE to better initialize the model.

Modifications done by Etienne Vignon and Josefine Ghattas

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