source: lmdz_wrf/trunk/WRFV3/lmdz/surf_land_mod.F90 @ 1939

Last change on this file since 1939 was 186, checked in by lfita, 10 years ago

Removing checking printings

  • Property svn:executable set to *
File size: 7.5 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, &
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, rugoro, pctsrf, &
17       lwdown_m, q2m, t2m, &
18       snow, qsol, agesno, tsoil, &
19       z0_new, alb1_new, alb2_new, evap, fluxsens, fluxlat, &
20       qsurf, tsurf_new, dflux_s, dflux_l, &
21       flux_u1, flux_v1 )
22
23    USE dimphy
24    USE surface_data, ONLY    : ok_veget
25
26#ifdef ORCHIDEE_NOOPENMP
27    USE surf_land_orchidee_noopenmp_mod
28#else
29    USE surf_land_orchidee_mod
30#endif
31    USE surf_land_bucket_mod
32    USE calcul_fluxs_mod
33    USE indice_sol_mod
34
35    INCLUDE "dimsoil.h"
36    INCLUDE "YOMCST.h"
37
38! Input variables 
39!****************************************************************************************
40    INTEGER, INTENT(IN)                     :: itime, jour, knon
41    INTEGER, DIMENSION(klon), INTENT(IN)    :: knindex
42    REAL, INTENT(IN)                        :: date0
43    REAL, DIMENSION(klon), INTENT(IN)       :: rlon, rlat
44    LOGICAL, INTENT(IN)                     :: debut, lafin
45    REAL, INTENT(IN)                        :: dtime
46    REAL, DIMENSION(klon), INTENT(IN)       :: zlev, ccanopy
47    REAL, DIMENSION(klon), INTENT(IN)       :: swnet, lwnet
48    REAL, DIMENSION(klon), INTENT(IN)       :: albedo  ! albedo for whole short-wave interval
49    REAL, DIMENSION(klon), INTENT(IN)       :: tsurf
50    REAL, DIMENSION(klon), INTENT(IN)       :: p1lay
51    REAL, DIMENSION(klon), INTENT(IN)       :: cdragh, cdragm
52    REAL, DIMENSION(klon), INTENT(IN)       :: precip_rain, precip_snow
53    REAL, DIMENSION(klon), INTENT(IN)       :: temp_air, spechum
54    REAL, DIMENSION(klon), INTENT(IN)       :: AcoefH, AcoefQ, BcoefH, BcoefQ
55    REAL, DIMENSION(klon), INTENT(IN)       :: AcoefU, AcoefV, BcoefU, BcoefV
56    REAL, DIMENSION(klon), INTENT(IN)       :: pref   ! pressure reference
57    REAL, DIMENSION(klon), INTENT(IN)       :: u1, v1
58    REAL, DIMENSION(klon), INTENT(IN)       :: rugoro
59    REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf
60    REAL, DIMENSION(klon), INTENT(IN)       :: lwdown_m  ! downwelling longwave radiation at mean surface
61                                                         ! corresponds to previous sollwdown
62    REAL, DIMENSION(klon), INTENT(IN)       :: q2m, t2m
63
64! In/Output variables
65!****************************************************************************************
66    REAL, DIMENSION(klon), INTENT(INOUT)          :: snow, qsol
67    REAL, DIMENSION(klon), INTENT(INOUT)          :: agesno
68    REAL, DIMENSION(klon, nsoilmx), INTENT(INOUT) :: tsoil
69
70! Output variables
71!****************************************************************************************
72    REAL, DIMENSION(klon), INTENT(OUT)       :: z0_new
73    REAL, DIMENSION(klon), INTENT(OUT)       :: alb1_new ! albdeo for shortwave interval 1(visible)
74    REAL, DIMENSION(klon), INTENT(OUT)       :: alb2_new ! albedo for shortwave interval 2(near infrared)
75    REAL, DIMENSION(klon), INTENT(OUT)       :: evap
76    REAL, DIMENSION(klon), INTENT(OUT)       :: fluxsens, fluxlat
77    REAL, DIMENSION(klon), INTENT(OUT)       :: qsurf
78    REAL, DIMENSION(klon), INTENT(OUT)       :: tsurf_new
79    REAL, DIMENSION(klon), INTENT(OUT)       :: dflux_s, dflux_l     
80    REAL, DIMENSION(klon), INTENT(OUT)       :: flux_u1, flux_v1  ! flux for U and V at first model level
81
82! Local variables
83!****************************************************************************************
84    REAL, DIMENSION(klon) :: p1lay_tmp
85    REAL, DIMENSION(klon) :: pref_tmp
86    REAL, DIMENSION(klon) :: swdown     ! downwelling shortwave radiation at land surface
87    REAL, DIMENSION(klon) :: lwdown     ! downwelling longwave radiation at land surface
88    REAL, DIMENSION(klon) :: epot_air           ! potential air temperature
89    REAL, DIMENSION(klon) :: tsol_rad, emis_new ! output from interfsol not used
90    REAL, DIMENSION(klon) :: u0, v0     ! surface speed
91    INTEGER               :: i
92
93! Lluis
94    INTEGER                                              :: lpt
95    lpt = 1
96
97!****************************************************************************************
98! Choice between call to vegetation model (ok_veget=true) or simple calculation below
99!
100!****************************************************************************************
101   IF (ok_veget) THEN
102!****************************************************************************************
103!  Call model sechiba in model ORCHIDEE
104!
105!****************************************************************************************
106       p1lay_tmp(:)      = 0.0
107       pref_tmp(:)       = 0.0
108       p1lay_tmp(1:knon) = p1lay(1:knon)/100.
109       pref_tmp(1:knon)  = pref(1:knon)/100.
110!
111!* Calculate incoming flux for SW and LW interval: swdown, lwdown
112!
113       swdown(:) = 0.0
114       lwdown(:) = 0.0
115       DO i = 1, knon
116          swdown(i) = swnet(i)/(1-albedo(i))
117          lwdown(i) = lwnet(i) + RSIGMA*tsurf(i)**4
118       END DO
119!
120!* Calculate potential air temperature
121!
122       epot_air(:) = 0.0
123       DO i = 1, knon
124          epot_air(i) = RCPD*temp_air(i)*(pref(i)/p1lay(i))**RKAPPA
125       END DO
126
127       ! temporary for keeping same results using lwdown_m instead of lwdown
128       CALL surf_land_orchidee(itime, dtime, date0, knon, &
129            knindex, rlon, rlat, pctsrf, &
130            debut, lafin, &
131            zlev,  u1, v1, temp_air, spechum, epot_air, ccanopy, &
132            cdragh, AcoefH, AcoefQ, BcoefH, BcoefQ, &
133            precip_rain, precip_snow, lwdown_m, swnet, swdown, &
134            pref_tmp, q2m, t2m, &
135            evap, fluxsens, fluxlat, &             
136            tsol_rad, tsurf_new, alb1_new, alb2_new, &
137            emis_new, z0_new, qsurf)       
138
139
140!* Add contribution of relief to surface roughness
141
142       DO i=1,knon
143          z0_new(i) = MAX(1.5e-05,SQRT(z0_new(i)**2 + rugoro(i)**2))
144       ENDDO
145
146    ELSE  ! not ok_veget
147!****************************************************************************************
148! No extern vegetation model choosen, call simple bucket calculations instead.
149!
150!****************************************************************************************
151       CALL surf_land_bucket(itime, jour, knon, knindex, debut, dtime,&
152            tsurf, p1lay, cdragh, precip_rain, precip_snow, temp_air, &
153            spechum, AcoefH, AcoefQ, BcoefH, BcoefQ, pref, &
154            u1, v1, rugoro, swnet, lwnet, &
155            snow, qsol, agesno, tsoil, &
156            qsurf, z0_new, alb1_new, alb2_new, evap, &
157            fluxsens, fluxlat, tsurf_new, dflux_s, dflux_l)
158
159    ENDIF ! ok_veget
160
161!****************************************************************************************
162! Calculation for all land models
163! - Flux calculation at first modele level for U and V
164!****************************************************************************************
165! Suppose zero surface speed
166    u0(:)=0.0
167    v0(:)=0.0
168    CALL calcul_flux_wind(knon, dtime, &
169         u0, v0, u1, v1, cdragm, &
170         AcoefU, AcoefV, BcoefU, BcoefV, &
171         p1lay, temp_air, &
172         flux_u1, flux_v1)
173   
174  END SUBROUTINE surf_land
175!
176!****************************************************************************************
177
178END MODULE surf_land_mod
179!
180!****************************************************************************************
181
Note: See TracBrowser for help on using the repository browser.