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

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