source: LMDZ4/trunk/libf/phylmd/surf_landice_mod.F90 @ 1320

Last change on this file since 1320 was 1146, checked in by Laurent Fairhead, 16 years ago

Réintegration dans le tronc des modifications issues de la branche LMDZ-dev
comprises entre la révision 1074 et 1145
Validation: une simulation de 1 jour en séquentiel sur PC donne les mêmes
résultats entre la trunk et la dev
LF

  • 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
RevLine 
[781]1!
2MODULE surf_landice_mod
3 
4  IMPLICIT NONE
5
6CONTAINS
7!
8!****************************************************************************************
9!
10  SUBROUTINE surf_landice(itime, dtime, knon, knindex, &
[888]11       swnet, lwnet, tsurf, p1lay, &
[1067]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, &
[888]16       snow, qsurf, qsol, agesno, &
17       tsoil, z0_new, alb1, alb2, evap, fluxsens, fluxlat, &
[1067]18       tsurf_new, dflux_s, dflux_l, &
19       flux_u1, flux_v1)
[781]20
[1067]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
[793]27    INCLUDE "indicesol.h"
[781]28    INCLUDE "dimsoil.h"
[793]29    INCLUDE "YOMCST.h"
30    INCLUDE "clesphys.h"
[781]31
32! Input variables
33!****************************************************************************************
34    INTEGER, INTENT(IN)                           :: itime, knon
35    INTEGER, DIMENSION(klon), INTENT(in)          :: knindex
36    REAL, INTENT(in)                              :: dtime
[888]37    REAL, DIMENSION(klon), INTENT(IN)             :: swnet ! net shortwave radiance
38    REAL, DIMENSION(klon), INTENT(IN)             :: lwnet ! net longwave radiance
[781]39    REAL, DIMENSION(klon), INTENT(IN)             :: tsurf
40    REAL, DIMENSION(klon), INTENT(IN)             :: p1lay
[1067]41    REAL, DIMENSION(klon), INTENT(IN)             :: cdragh, cdragm
[781]42    REAL, DIMENSION(klon), INTENT(IN)             :: precip_rain, precip_snow
43    REAL, DIMENSION(klon), INTENT(IN)             :: temp_air, spechum
[1067]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
[781]47    REAL, DIMENSION(klon), INTENT(IN)             :: ps
[1067]48    REAL, DIMENSION(klon), INTENT(IN)             :: u1, v1
[781]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
[888]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
[781]64    REAL, DIMENSION(klon), INTENT(OUT)            :: evap, fluxsens, fluxlat
[888]65    REAL, DIMENSION(klon), INTENT(OUT)            :: tsurf_new
[781]66    REAL, DIMENSION(klon), INTENT(OUT)            :: dflux_s, dflux_l     
[1067]67    REAL, DIMENSION(klon), INTENT(OUT)            :: flux_u1, flux_v1
[781]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
[888]74    REAL, DIMENSION(klon)    :: radsol
[1067]75    REAL, DIMENSION(klon)    :: u0, v0, u1_lay, v1_lay
[781]76
77! End definition
78!****************************************************************************************
79!
80! Initialize output variables
[888]81    alb2(:) = 999999.
82    alb1(:) = 999999.
[781]83
[888]84!****************************************************************************************
85! Calculate total absorbed radiance at surface
86!
87!****************************************************************************************
88    radsol(:) = 0.0
89    radsol(1:knon) = swnet(1:knon) + lwnet(1:knon)
[781]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
[1067]112! Suppose zero surface speed
113    u0(:)=0.0
114    v0(:)=0.0
115    u1_lay(:) = u1(:) - u0(:)
116    v1_lay(:) = v1(:) - v0(:)
117
[781]118    CALL calcul_fluxs(knon, is_lic, dtime, &
[1067]119         tsurf, p1lay, cal, beta, cdragh, ps, &
[781]120         precip_rain, precip_snow, snow, qsurf,  &
121         radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, &
[1067]122         AcoefH, AcoefQ, BcoefH, BcoefQ, &
[781]123         tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l)
124
[1067]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)
[781]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)))
[888]147    alb1(1:knon) = alb_neig(1:knon)*zfra(1:knon) + &
[781]148         0.6 * (1.0-zfra(1:knon))
149!
150!IM: plusieurs choix/tests sur l'albedo des "glaciers continentaux"
[888]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
[781]155!IM: KstaTER0.77 & LMD_ARMIP6   
156
[888]157! Attantion: alb1 and alb2 are the same!
158    alb1(1:knon)  = 0.77
159    alb2(1:knon)  = alb1(1:knon)
[781]160
161
162!****************************************************************************************
163! Rugosity
164!
165!****************************************************************************************
[1146]166    z0_new(:) = MAX(1.E-3,rugoro(:))
[781]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!****************************************************************************************
[996]173    IF (type_ocean=='couple') THEN
[781]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.