source: LMDZ4/trunk/libf/phylmd/surf_land_bucket_mod.F90 @ 1015

Last change on this file since 1015 was 996, checked in by lsce, 16 years ago
  • Modifications liées au calcul des nouveau sous-fractions
  • Nettoyage de ocean slab : il reste uniquement la version avec glace de mer forcé
  • Nouveaux variables pour distiguer la version et type d'ocean : type_ocean=force/slab/couple, version_ocean=opa8/nemo pour couplé ou version_ocean=sicOBS pour slab

JG

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.7 KB
Line 
1!
2! $Header$
3!
4MODULE surf_land_bucket_mod
5!
6! Surface land bucket module
7!
8! This module is used when no external land model is choosen.
9!
10  IMPLICIT NONE
11
12CONTAINS
13
14  SUBROUTINE surf_land_bucket(itime, jour, knon, knindex, debut, dtime,&
15       tsurf, p1lay, tq_cdrag, precip_rain, precip_snow, temp_air, &
16       spechum, petAcoef, peqAcoef, petBcoef, peqBcoef, pref, &
17       u1_lay, v1_lay, rugoro, swnet, lwnet, &
18       snow, qsol, agesno, tsoil, &
19       qsurf, z0_new, alb1_new, alb2_new, evap, &
20       fluxsens, fluxlat, tsurf_new, dflux_s, dflux_l)
21
22    USE limit_read_mod
23    USE surface_data
24    USE fonte_neige_mod
25    USE calcul_fluxs_mod
26    USE cpl_mod
27    USE dimphy
28    USE mod_grid_phy_lmdz
29    USE mod_phys_lmdz_para
30!****************************************************************************************
31! Bucket calculations for surface.
32!
33    INCLUDE "clesphys.h"
34    INCLUDE "indicesol.h"
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    LOGICAL, INTENT(IN)                     :: debut
43    REAL, INTENT(IN)                        :: dtime
44    REAL, DIMENSION(klon), INTENT(IN)       :: tsurf
45    REAL, DIMENSION(klon), INTENT(IN)       :: p1lay
46    REAL, DIMENSION(klon), INTENT(IN)       :: tq_cdrag
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)       :: petAcoef, peqAcoef
50    REAL, DIMENSION(klon), INTENT(IN)       :: petBcoef, peqBcoef
51    REAL, DIMENSION(klon), INTENT(IN)       :: pref
52    REAL, DIMENSION(klon), INTENT(IN)       :: u1_lay, v1_lay
53    REAL, DIMENSION(klon), INTENT(IN)       :: rugoro
54    REAL, DIMENSION(klon), INTENT(IN)       :: swnet, lwnet
55
56! In/Output variables
57!****************************************************************************************
58    REAL, DIMENSION(klon), INTENT(INOUT)          :: snow, qsol
59    REAL, DIMENSION(klon), INTENT(INOUT)          :: agesno
60    REAL, DIMENSION(klon, nsoilmx), INTENT(INOUT) :: tsoil
61
62! Output variables
63!****************************************************************************************
64    REAL, DIMENSION(klon), INTENT(OUT)       :: qsurf
65    REAL, DIMENSION(klon), INTENT(OUT)       :: z0_new
66    REAL, DIMENSION(klon), INTENT(OUT)       :: alb1_new, alb2_new
67    REAL, DIMENSION(klon), INTENT(OUT)       :: evap, fluxsens, fluxlat
68    REAL, DIMENSION(klon), INTENT(OUT)       :: tsurf_new
69    REAL, DIMENSION(klon), INTENT(OUT)       :: dflux_s, dflux_l     
70
71! Local variables
72!****************************************************************************************
73    REAL, DIMENSION(klon) :: soilcap, soilflux
74    REAL, DIMENSION(klon) :: cal, beta, dif_grnd, capsol
75    REAL, DIMENSION(klon) :: alb_neig, alb_lim
76    REAL, DIMENSION(klon) :: zfra
77    REAL, DIMENSION(klon) :: radsol       ! total net radiance at surface
78    REAL, DIMENSION(klon) :: dummy_riverflow,dummy_coastalflow
79    INTEGER               :: i
80!
81!****************************************************************************************
82
83
84!
85!* Read from limit.nc : albedo(alb_lim), length of rugosity(z0_new)
86!
87    CALL limit_read_rug_alb(itime, dtime, jour,&
88         knon, knindex, &
89         z0_new, alb_lim)
90!
91!* Calcultaion of fluxes
92!
93
94! calculate total absorbed radiance at surface
95       radsol(:) = 0.0
96       radsol(1:knon) = swnet(1:knon) + lwnet(1:knon)
97
98! calculate constants
99    CALL calbeta(dtime, is_ter, knon, snow, qsol, beta, capsol, dif_grnd)
100       
101! calculate temperature, heat capacity and conduction flux in soil
102    IF (soil_model) THEN
103       CALL soil(dtime, is_ter, knon, snow, tsurf, tsoil, soilcap, soilflux)
104       DO i=1, knon
105          cal(i) = RCPD / soilcap(i)
106          radsol(i) = radsol(i)  + soilflux(i)
107       END DO
108    ELSE
109       cal(:) = RCPD * capsol(:)
110    ENDIF
111   
112    CALL calcul_fluxs(knon, is_ter, dtime, &
113         tsurf, p1lay, cal, beta, tq_cdrag, pref, &
114         precip_rain, precip_snow, snow, qsurf,  &
115         radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, &
116         petAcoef, peqAcoef, petBcoef, peqBcoef, &
117         tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l)
118   
119!
120!* Calculate snow height, run_off, age of snow
121!     
122    CALL fonte_neige( knon, is_ter, knindex, dtime, &
123         tsurf, precip_rain, precip_snow, &
124         snow, qsol, tsurf_new, evap)
125!
126!* Calculate the age of snow
127!
128    CALL albsno(klon,knon,dtime,agesno(:),alb_neig(:), precip_snow(:)) 
129   
130    WHERE (snow(1 : knon) .LT. 0.0001) agesno(1 : knon) = 0.
131   
132    DO i=1, knon
133       zfra(i) = MAX(0.0,MIN(1.0, snow(i)/(snow(i)+10.0)))
134       alb_lim(i)  = alb_neig(i) *zfra(i) + alb_lim(i)*(1.0-zfra(i))
135    END DO
136
137!
138!* Return albedo :
139!    alb1_new and alb2_new are here given the same values
140!
141    alb1_new(:) = 0.0
142    alb2_new(:) = 0.0
143    alb1_new(1:knon) = alb_lim(1:knon)
144    alb2_new(1:knon) = alb_lim(1:knon)
145       
146!
147!* Calculate the rugosity
148!
149    DO i = 1, knon
150       z0_new(i) = SQRT(z0_new(i)**2+rugoro(i)**2)
151    END DO
152
153!* Send to coupler
154!  The run-off from river and coast are not calculated in the bucket modele.
155!  For testing purpose of the coupled modele we put the run-off to zero.
156    IF (type_ocean=='couple') THEN
157       dummy_riverflow(:)   = 0.0
158       dummy_coastalflow(:) = 0.0
159       CALL cpl_send_land_fields(itime, knon, knindex, &
160            dummy_riverflow, dummy_coastalflow)
161    ENDIF
162
163!
164!* End
165!
166  END SUBROUTINE surf_land_bucket
167!
168!****************************************************************************************
169!
170END MODULE surf_land_bucket_mod
Note: See TracBrowser for help on using the repository browser.