source: LMDZ5/trunk/libf/phylmd/surf_land_mod.F90 @ 3227

Last change on this file since 3227 was 2952, checked in by Laurent Fairhead, 7 years ago

Parametrization of drag by copses
Need version 4465 of ORCHIDEE at least

  1. Cheruy
  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 9.0 KB
RevLine 
[781]1!
2MODULE surf_land_mod
[2952]3
[781]4  IMPLICIT NONE
5
6CONTAINS
7!
8!****************************************************************************************
9
10  SUBROUTINE surf_land(itime, dtime, date0, jour, knon, knindex, &
[2410]11       rlon, rlat, yrmu0, &
[888]12       debut, lafin, zlev, ccanopy, swnet, lwnet, albedo, &
[1067]13       tsurf, p1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum, &
14       AcoefH, AcoefQ, BcoefH, BcoefQ, &
15       AcoefU, AcoefV, BcoefU, BcoefV, &
[2240]16       pref, u1, v1, gustiness, rugoro, pctsrf, &
[1146]17       lwdown_m, q2m, t2m, &
[888]18       snow, qsol, agesno, tsoil, &
[2243]19       z0m, z0h, SFRWL, alb_dir_new, alb_dif_new, evap, fluxsens, fluxlat, &   
[996]20       qsurf, tsurf_new, dflux_s, dflux_l, &
[2952]21       flux_u1, flux_v1 , &
22       veget,lai,height)
[781]23
[1067]24    USE dimphy
25    USE surface_data, ONLY    : ok_veget
[1146]26
[2571]27    ! See comments in each module surf_land_orchidee_xxx for compatiblity with ORCHIDEE
[1146]28#ifdef ORCHIDEE_NOOPENMP
[2571]29    ! Compilation with cpp key ORCHIDEE NOOPENMP
[1146]30    USE surf_land_orchidee_noopenmp_mod
31#else
[2571]32#if ORCHIDEE_NOZ0H
33    ! Compilation with cpp key ORCHIDEE NOZ0H
34    USE surf_land_orchidee_noz0h_mod
35#else
[2952]36#if ORCHIDEE_NOFREIN
37    ! Compilation with cpp key ORCHIDEE_NOFREIN
38    USE surf_land_orchidee_nofrein_mod
39#else
[1067]40    USE surf_land_orchidee_mod
[1146]41#endif
[2571]42#endif
[2952]43#endif
[2571]44
[1067]45    USE surf_land_bucket_mod
46    USE calcul_fluxs_mod
[1785]47    USE indice_sol_mod
[1067]48
[781]49    INCLUDE "dimsoil.h"
[888]50    INCLUDE "YOMCST.h"
[2227]51    INCLUDE "clesphys.h"
[2952]52    INCLUDE "dimpft.h"
[781]53
[2952]54
[781]55! Input variables 
56!****************************************************************************************
57    INTEGER, INTENT(IN)                     :: itime, jour, knon
58    INTEGER, DIMENSION(klon), INTENT(IN)    :: knindex
59    REAL, INTENT(IN)                        :: date0
60    REAL, DIMENSION(klon), INTENT(IN)       :: rlon, rlat
[2410]61    REAL, DIMENSION(klon), INTENT(IN)       :: yrmu0  ! cosine of solar zenith angle
[781]62    LOGICAL, INTENT(IN)                     :: debut, lafin
63    REAL, INTENT(IN)                        :: dtime
[888]64    REAL, DIMENSION(klon), INTENT(IN)       :: zlev, ccanopy
65    REAL, DIMENSION(klon), INTENT(IN)       :: swnet, lwnet
66    REAL, DIMENSION(klon), INTENT(IN)       :: albedo  ! albedo for whole short-wave interval
[781]67    REAL, DIMENSION(klon), INTENT(IN)       :: tsurf
68    REAL, DIMENSION(klon), INTENT(IN)       :: p1lay
[1067]69    REAL, DIMENSION(klon), INTENT(IN)       :: cdragh, cdragm
[781]70    REAL, DIMENSION(klon), INTENT(IN)       :: precip_rain, precip_snow
71    REAL, DIMENSION(klon), INTENT(IN)       :: temp_air, spechum
[1067]72    REAL, DIMENSION(klon), INTENT(IN)       :: AcoefH, AcoefQ, BcoefH, BcoefQ
73    REAL, DIMENSION(klon), INTENT(IN)       :: AcoefU, AcoefV, BcoefU, BcoefV
[888]74    REAL, DIMENSION(klon), INTENT(IN)       :: pref   ! pressure reference
[2240]75    REAL, DIMENSION(klon), INTENT(IN)       :: u1, v1, gustiness
[781]76    REAL, DIMENSION(klon), INTENT(IN)       :: rugoro
77    REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf
[888]78    REAL, DIMENSION(klon), INTENT(IN)       :: lwdown_m  ! downwelling longwave radiation at mean surface
79                                                         ! corresponds to previous sollwdown
[1146]80    REAL, DIMENSION(klon), INTENT(IN)       :: q2m, t2m
[888]81
[781]82! In/Output variables
83!****************************************************************************************
84    REAL, DIMENSION(klon), INTENT(INOUT)          :: snow, qsol
85    REAL, DIMENSION(klon), INTENT(INOUT)          :: agesno
86    REAL, DIMENSION(klon, nsoilmx), INTENT(INOUT) :: tsoil
87
88! Output variables
89!****************************************************************************************
[2243]90    REAL, DIMENSION(klon), INTENT(OUT)       :: z0m, z0h
[2227]91!albedo SB >>>
92!    REAL, DIMENSION(klon), INTENT(OUT)       :: alb1_new ! albdeo for shortwave interval 1(visible)
93!    REAL, DIMENSION(klon), INTENT(OUT)       :: alb2_new ! albedo for shortwave interval 2(near infrared)
94    REAL, DIMENSION(6), INTENT(IN) :: SFRWL
95    REAL, DIMENSION(klon,nsw), INTENT(OUT)       :: alb_dir_new,alb_dif_new
96!albedo SB <<<
[888]97    REAL, DIMENSION(klon), INTENT(OUT)       :: evap
98    REAL, DIMENSION(klon), INTENT(OUT)       :: fluxsens, fluxlat
[781]99    REAL, DIMENSION(klon), INTENT(OUT)       :: qsurf
[888]100    REAL, DIMENSION(klon), INTENT(OUT)       :: tsurf_new
[781]101    REAL, DIMENSION(klon), INTENT(OUT)       :: dflux_s, dflux_l     
[1067]102    REAL, DIMENSION(klon), INTENT(OUT)       :: flux_u1, flux_v1  ! flux for U and V at first model level
[2952]103    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: veget,lai
104    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: height
[781]105
106! Local variables
107!****************************************************************************************
[888]108    REAL, DIMENSION(klon) :: p1lay_tmp
109    REAL, DIMENSION(klon) :: pref_tmp
110    REAL, DIMENSION(klon) :: swdown     ! downwelling shortwave radiation at land surface
111    REAL, DIMENSION(klon) :: epot_air           ! potential air temperature
[781]112    REAL, DIMENSION(klon) :: tsol_rad, emis_new ! output from interfsol not used
[1067]113    REAL, DIMENSION(klon) :: u0, v0     ! surface speed
[781]114    INTEGER               :: i
115
[2227]116!albedo SB >>>
117    REAL, DIMENSION(klon)      :: alb1_new,alb2_new
118!albedo SB <<<
[781]119
[2227]120
[781]121!****************************************************************************************
122! Choice between call to vegetation model (ok_veget=true) or simple calculation below
123!
124!****************************************************************************************
125   IF (ok_veget) THEN
126!****************************************************************************************
[888]127!  Call model sechiba in model ORCHIDEE
[781]128!
129!****************************************************************************************
130       p1lay_tmp(:)      = 0.0
[888]131       pref_tmp(:)       = 0.0
[781]132       p1lay_tmp(1:knon) = p1lay(1:knon)/100.
[888]133       pref_tmp(1:knon)  = pref(1:knon)/100.
134!
[2188]135!* Calculate incoming flux for SW and LW interval: swdown
[888]136!
137       swdown(:) = 0.0
138       DO i = 1, knon
139          swdown(i) = swnet(i)/(1-albedo(i))
140       END DO
141!
142!* Calculate potential air temperature
143!
144       epot_air(:) = 0.0
145       DO i = 1, knon
146          epot_air(i) = RCPD*temp_air(i)*(pref(i)/p1lay(i))**RKAPPA
147       END DO
[781]148
[888]149       ! temporary for keeping same results using lwdown_m instead of lwdown
[781]150       CALL surf_land_orchidee(itime, dtime, date0, knon, &
[2410]151            knindex, rlon, rlat, yrmu0, pctsrf, &
[781]152            debut, lafin, &
[2240]153            zlev,  u1, v1, gustiness, temp_air, spechum, epot_air, ccanopy, &
[1067]154            cdragh, AcoefH, AcoefQ, BcoefH, BcoefQ, &
[888]155            precip_rain, precip_snow, lwdown_m, swnet, swdown, &
[1146]156            pref_tmp, q2m, t2m, &
[781]157            evap, fluxsens, fluxlat, &             
[888]158            tsol_rad, tsurf_new, alb1_new, alb2_new, &
[2952]159            emis_new, z0m, z0h, qsurf, &
160            veget, lai, height)       
[781]161
[2952]162
[781]163
[888]164!* Add contribution of relief to surface roughness
[781]165
166       DO i=1,knon
[2243]167          z0m(i) = MAX(1.5e-05,SQRT(z0m(i)**2 + rugoro(i)**2))
[781]168       ENDDO
169
170    ELSE  ! not ok_veget
171!****************************************************************************************
172! No extern vegetation model choosen, call simple bucket calculations instead.
173!
174!****************************************************************************************
175       CALL surf_land_bucket(itime, jour, knon, knindex, debut, dtime,&
[1067]176            tsurf, p1lay, cdragh, precip_rain, precip_snow, temp_air, &
177            spechum, AcoefH, AcoefQ, BcoefH, BcoefQ, pref, &
[2240]178            u1, v1, gustiness, rugoro, swnet, lwnet, &
[888]179            snow, qsol, agesno, tsoil, &
[2243]180            qsurf, z0m, alb1_new, alb2_new, evap, &
[888]181            fluxsens, fluxlat, tsurf_new, dflux_s, dflux_l)
[2243]182        z0h(1:knon)=z0m(1:knon) ! En attendant mieux
[781]183
184    ENDIF ! ok_veget
185
[1067]186!****************************************************************************************
187! Calculation for all land models
188! - Flux calculation at first modele level for U and V
189!****************************************************************************************
190! Suppose zero surface speed
191    u0(:)=0.0
192    v0(:)=0.0
193    CALL calcul_flux_wind(knon, dtime, &
[2240]194         u0, v0, u1, v1, gustiness, cdragm, &
[1067]195         AcoefU, AcoefV, BcoefU, BcoefV, &
196         p1lay, temp_air, &
197         flux_u1, flux_v1)
[2227]198
199!albedo SB >>>
200
201
202     select case(NSW)
203     case(2)
204       alb_dir_new(1:knon,1)=alb1_new(1:knon)
205       alb_dir_new(1:knon,2)=alb2_new(1:knon)
206     case(4)
207       alb_dir_new(1:knon,1)=alb1_new(1:knon)
208       alb_dir_new(1:knon,2)=alb2_new(1:knon)
209       alb_dir_new(1:knon,3)=alb2_new(1:knon)
210       alb_dir_new(1:knon,4)=alb2_new(1:knon)
211     case(6)
212       alb_dir_new(1:knon,1)=alb1_new(1:knon)
213       alb_dir_new(1:knon,2)=alb1_new(1:knon)
214       alb_dir_new(1:knon,3)=alb1_new(1:knon)
215       alb_dir_new(1:knon,4)=alb2_new(1:knon)
216       alb_dir_new(1:knon,5)=alb2_new(1:knon)
217       alb_dir_new(1:knon,6)=alb2_new(1:knon)
218     end select
219alb_dif_new=alb_dir_new
220!albedo SB <<<
221
222
[1067]223   
[781]224  END SUBROUTINE surf_land
225!
226!****************************************************************************************
227
228END MODULE surf_land_mod
229!
230!****************************************************************************************
231
Note: See TracBrowser for help on using the repository browser.