source: LMDZ4/branches/LMDZ4-dev-20091210/libf/phylmd/surf_landice_mod.F90 @ 5297

Last change on this file since 5297 was 1080, checked in by jghattas, 16 years ago

Modifications pour que la rugosite ne devient jamais zero (ajout des valeurs minimales).

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 7.2 KB
Line 
1!
2MODULE surf_landice_mod
3 
4  IMPLICIT NONE
5
6CONTAINS
7!
8!****************************************************************************************
9!
10  SUBROUTINE surf_landice(itime, dtime, knon, knindex, &
11       swnet, lwnet, tsurf, p1lay, &
12       cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum, &
13       AcoefH, AcoefQ, BcoefH, BcoefQ, &
14       AcoefU, AcoefV, BcoefU, BcoefV, &
15       ps, u1, v1, rugoro, pctsrf, &
16       snow, qsurf, qsol, agesno, &
17       tsoil, z0_new, alb1, alb2, evap, fluxsens, fluxlat, &
18       tsurf_new, dflux_s, dflux_l, &
19       flux_u1, flux_v1)
20
21    USE dimphy
22    USE surface_data,     ONLY : type_ocean, calice, calsno
23    USE fonte_neige_mod,  ONLY : fonte_neige, run_off_lic
24    USE cpl_mod,          ONLY : cpl_send_landice_fields
25    USE calcul_fluxs_mod
26
27    INCLUDE "indicesol.h"
28    INCLUDE "dimsoil.h"
29    INCLUDE "YOMCST.h"
30    INCLUDE "clesphys.h"
31
32! Input variables
33!****************************************************************************************
34    INTEGER, INTENT(IN)                           :: itime, knon
35    INTEGER, DIMENSION(klon), INTENT(in)          :: knindex
36    REAL, INTENT(in)                              :: dtime
37    REAL, DIMENSION(klon), INTENT(IN)             :: swnet ! net shortwave radiance
38    REAL, DIMENSION(klon), INTENT(IN)             :: lwnet ! net longwave radiance
39    REAL, DIMENSION(klon), INTENT(IN)             :: tsurf
40    REAL, DIMENSION(klon), INTENT(IN)             :: p1lay
41    REAL, DIMENSION(klon), INTENT(IN)             :: cdragh, cdragm
42    REAL, DIMENSION(klon), INTENT(IN)             :: precip_rain, precip_snow
43    REAL, DIMENSION(klon), INTENT(IN)             :: temp_air, spechum
44    REAL, DIMENSION(klon), INTENT(IN)             :: AcoefH, AcoefQ
45    REAL, DIMENSION(klon), INTENT(IN)             :: BcoefH, BcoefQ
46    REAL, DIMENSION(klon), INTENT(IN)             :: AcoefU, AcoefV, BcoefU, BcoefV
47    REAL, DIMENSION(klon), INTENT(IN)             :: ps
48    REAL, DIMENSION(klon), INTENT(IN)             :: u1, v1
49    REAL, DIMENSION(klon), INTENT(IN)             :: rugoro
50    REAL, DIMENSION(klon,nbsrf), INTENT(IN)       :: pctsrf
51
52! In/Output variables
53!****************************************************************************************
54    REAL, DIMENSION(klon), INTENT(INOUT)          :: snow, qsol
55    REAL, DIMENSION(klon), INTENT(INOUT)          :: agesno
56    REAL, DIMENSION(klon, nsoilmx), INTENT(INOUT) :: tsoil
57
58! Output variables
59!****************************************************************************************
60    REAL, DIMENSION(klon), INTENT(OUT)            :: qsurf
61    REAL, DIMENSION(klon), INTENT(OUT)            :: z0_new
62    REAL, DIMENSION(klon), INTENT(OUT)            :: alb1  ! new albedo in visible SW interval
63    REAL, DIMENSION(klon), INTENT(OUT)            :: alb2  ! new albedo in near IR interval
64    REAL, DIMENSION(klon), INTENT(OUT)            :: evap, fluxsens, fluxlat
65    REAL, DIMENSION(klon), INTENT(OUT)            :: tsurf_new
66    REAL, DIMENSION(klon), INTENT(OUT)            :: dflux_s, dflux_l     
67    REAL, DIMENSION(klon), INTENT(OUT)            :: flux_u1, flux_v1
68
69! Local variables
70!****************************************************************************************
71    REAL, DIMENSION(klon)    :: soilcap, soilflux
72    REAL, DIMENSION(klon)    :: cal, beta, dif_grnd
73    REAL, DIMENSION(klon)    :: zfra, alb_neig
74    REAL, DIMENSION(klon)    :: radsol
75    REAL, DIMENSION(klon)    :: u0, v0, u1_lay, v1_lay
76
77! End definition
78!****************************************************************************************
79!
80! Initialize output variables
81    alb2(:) = 999999.
82    alb1(:) = 999999.
83
84!****************************************************************************************
85! Calculate total absorbed radiance at surface
86!
87!****************************************************************************************
88    radsol(:) = 0.0
89    radsol(1:knon) = swnet(1:knon) + lwnet(1:knon)
90
91!****************************************************************************************
92! Soil calculations
93!
94!****************************************************************************************
95    IF (soil_model) THEN
96       CALL soil(dtime, is_lic, knon, snow, tsurf, tsoil, soilcap, soilflux)
97       cal(1:knon) = RCPD / soilcap(1:knon)
98       radsol(1:knon)  = radsol(1:knon) + soilflux(1:knon)
99    ELSE
100       cal = RCPD * calice
101       WHERE (snow > 0.0) cal = RCPD * calsno
102    ENDIF
103
104
105!****************************************************************************************
106! Calulate fluxes
107!
108!****************************************************************************************
109    beta(:) = 1.0
110    dif_grnd(:) = 0.0
111
112! Suppose zero surface speed
113    u0(:)=0.0
114    v0(:)=0.0
115    u1_lay(:) = u1(:) - u0(:)
116    v1_lay(:) = v1(:) - v0(:)
117
118    CALL calcul_fluxs(knon, is_lic, dtime, &
119         tsurf, p1lay, cal, beta, cdragh, ps, &
120         precip_rain, precip_snow, snow, qsurf,  &
121         radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, &
122         AcoefH, AcoefQ, BcoefH, BcoefQ, &
123         tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l)
124
125    CALL calcul_flux_wind(knon, dtime, &
126         u0, v0, u1, v1, cdragm, &
127         AcoefU, AcoefV, BcoefU, BcoefV, &
128         p1lay, temp_air, &
129         flux_u1, flux_v1)
130
131!****************************************************************************************
132! Calculate snow height, age, run-off,..
133!   
134!****************************************************************************************
135    CALL fonte_neige( knon, is_lic, knindex, dtime, &
136         tsurf, precip_rain, precip_snow, &
137         snow, qsol, tsurf_new, evap)
138
139
140!****************************************************************************************
141! Calculate albedo
142!
143!****************************************************************************************
144    CALL albsno(klon,knon,dtime,agesno(:),alb_neig(:), precip_snow(:)) 
145    WHERE (snow(1 : knon) .LT. 0.0001) agesno(1 : knon) = 0.
146    zfra(1:knon) = MAX(0.0,MIN(1.0,snow(1:knon)/(snow(1:knon)+10.0)))
147    alb1(1:knon) = alb_neig(1:knon)*zfra(1:knon) + &
148         0.6 * (1.0-zfra(1:knon))
149!
150!IM: plusieurs choix/tests sur l'albedo des "glaciers continentaux"
151!       alb1(1 : knon)  = 0.6 !IM cf FH/GK
152!       alb1(1 : knon)  = 0.82
153!       alb1(1 : knon)  = 0.77 !211003 Ksta0.77
154!       alb1(1 : knon)  = 0.8 !KstaTER0.8 & LMD_ARMIP5
155!IM: KstaTER0.77 & LMD_ARMIP6   
156
157! Attantion: alb1 and alb2 are the same!
158    alb1(1:knon)  = 0.77
159    alb2(1:knon)  = alb1(1:knon)
160
161
162!****************************************************************************************
163! Rugosity
164!
165!****************************************************************************************
166    z0_new(:) = MAX(1.E-3,rugoro(:))
167
168!****************************************************************************************
169! Send run-off on land-ice to coupler if coupled ocean.
170! run_off_lic has been calculated in fonte_neige
171!
172!****************************************************************************************
173    IF (type_ocean=='couple') THEN
174       CALL cpl_send_landice_fields(itime, knon, knindex, run_off_lic)
175    ENDIF
176
177
178  END SUBROUTINE surf_landice
179!
180!****************************************************************************************
181!
182END MODULE surf_landice_mod
183
184
185
Note: See TracBrowser for help on using the repository browser.