source: LMDZ4/trunk/libf/phylmd/surf_land_mod.F90 @ 1091

Last change on this file since 1091 was 1067, checked in by Laurent Fairhead, 16 years ago
  • Modifications lie au premier niveau du modele pour la diffusion turbulent

du vent.

  • Preparation pour un couplage des courrant oceaniques.

JG

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