source: LMDZ5/trunk/libf/phylmd/surf_landice_mod.F90 @ 1829

Last change on this file since 1829 was 1785, checked in by Ehouarn Millour, 11 years ago

Transformation de l'include indicesol.h en un module indice_sol_mod et modification des appels dans tous les fichiers concernés.
Aucun changement des résultats ni des sorties du modèle vs 1784.
UG

...................................................

Replacement of the indicesol.h include by a module named indice_sol_mod. Modification of the calls in every affected files.
Results and outputs of simulations are unchanged in comparison with rev 1784.
UG

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