SURFEX v8.1
General documentation of Surfex
radiative_transfert.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 ! #########
6 SUBROUTINE radiative_transfert(OAGRI_TO_GRASS, PVEGTYPE, &
7  PALBVIS_VEG, PALBVIS_SOIL, PALBNIR_VEG, PALBNIR_SOIL, &
8  PSW_RAD, PLAI, PZENITH, PABC, &
9  PFAPARC, PFAPIRC, PMUS, PLAI_EFFC, OSHADE, PIACAN, &
10  PIACAN_SUNLIT, PIACAN_SHADE, PFRAC_SUN, &
11  PFAPAR, PFAPIR, PFAPAR_BS, PFAPIR_BS )
12 ! #########################################################################
13 !
14 !!**** *RADIATIVE_TRANSFERT*
15 !!
16 !! PURPOSE
17 !! -------
18 !!
19 !! Calculates the fraction of absorbed photosynthetic radiation (FAPAR),
20 !! the fraction of absorbed near-infrared radiation (FAPIR), based on
21 !! the fraction of diffuse and direct radiation (Erbs et al 1982 formulation).
22 !! Calculates also the clumping index and the resulting transmittance
23 !! distinguishing between the upper part of the canopy (SUP) and the rest (INF),
24 !! direct and diffuse radiation, sunlit and shaded leaves.
25 !!
26 !!** METHOD
27 !! ------
28 !! Carrer et al, 2013 (doi:10.1002/jgrg20070)
29 !!
30 !! EXTERNAL
31 !! --------
32 !! none
33 !!
34 !! IMPLICIT ARGUMENTS
35 !! ------------------
36 !!
37 !! USE MODD_CSTS
38 !! USE MODD_CO2V_PAR
39 !! USE MODD_SURF_PAR
40 !! USE MODI_FAPAIR
41 !!
42 !! REFERENCE
43 !! ---------
44 !!
45 !! Carrer et al, 2013 (doi:10.1002/jgrg20070)
46 !!
47 !! AUTHOR
48 !! ------
49 !!
50 !! D. Carrer * Meteo-France *
51 !!
52 !! MODIFICATIONS
53 !! -------------
54 !! Original 04/11
55 !! C. Delire 08/13 : moved calculation of diffuse fraction from fapair to here
56 !! Commented by C. Delire 07/13
57 !!
58 !-------------------------------------------------------------------------------
59 !!
60 USE modd_csts, ONLY : xi0 ! Solar constant
61 USE modd_co2v_par, ONLY : xparcf, xlai_shade, &
62  xxb_sup, xxb_inf, & ! sigma parameter in clumping (Table 1, eq4)
63  xssa_sup, xssa_inf, & ! single scatering albedo (PAR)
64  xssa_sup_pir, xssa_inf_pir, & ! single scatering albedo (NIR)
65  itransfert_esg
66 !
67 USE modd_data_cover_par, ONLY : nvt_c3, nvt_c4, &
68  nvt_irr, nvt_gras, &
69  nvt_c3w, nvt_c3s, nvegtype, nvegtype_ecosg
70 !
71 USE modd_surf_par, ONLY : xundef
72 !
73 USE modi_fapair
74 !
75 !* 0. DECLARATIONS
76 ! ------------
77 !
78 !
79 USE yomhook ,ONLY : lhook, dr_hook
80 USE parkind1 ,ONLY : jprb
81 !
82 IMPLICIT NONE
83 !
84 !* 0.1 declarations of arguments
85 !
86 LOGICAL, INTENT(IN) :: OAGRI_TO_GRASS
87 !
88 REAL, DIMENSION(:,:),INTENT(IN) :: PVEGTYPE ! PVEGTYPE = type de vegetation (1 a 9)
89 !
90 REAL, DIMENSION(:), INTENT(IN) :: PALBVIS_VEG ! visible snow free albedo of vegetation
91 REAL, DIMENSION(:), INTENT(IN) :: PALBVIS_SOIL ! visible snow free albedo of soil
92 REAL, DIMENSION(:), INTENT(IN) :: PALBNIR_VEG ! NIR snow free albedo of vegetation
93 REAL, DIMENSION(:), INTENT(IN) :: PALBNIR_SOIL ! NIR snow free albedo of soil
94 !
95 REAL,DIMENSION(:), INTENT(IN) :: PSW_RAD ! incident broadband solar radiation (PAR+NIR)
96 REAL,DIMENSION(:), INTENT(IN) :: PLAI ! PLAI = leaf area index
97 !
98 REAL,DIMENSION(:), INTENT(IN) :: PZENITH ! solar zenith angle needed
99 ! for computation of diffusion of solar
100 ! radiation
101 !
102 REAL,DIMENSION(:), INTENT(INOUT) :: PABC ! normalized canopy height (0=bottom, 1=top)
103 !
104 !
105 REAL, DIMENSION(:), INTENT(INOUT) :: PFAPARC !fraction of absorbed photosynthetic active radiation (cumulated over patches)
106 REAL, DIMENSION(:), INTENT(INOUT) :: PFAPIRC !fraction of absorbed NIR (cumulated)
107 REAL, DIMENSION(:), INTENT(INOUT) :: PMUS ! cosine of solar zenith angle (averaged)
108 REAL, DIMENSION(:), INTENT(INOUT) :: PLAI_EFFC ! Effective LAI (cumulated)
109 !
110 LOGICAL, DIMENSION(:),INTENT(OUT) :: OSHADE ! OSHADE = if 1 shading activated
111 REAL, DIMENSION(:,:), INTENT(OUT) :: PIACAN ! APAR in the canopy at different gauss level
112 REAL, DIMENSION(:,:), INTENT(OUT) :: PIACAN_SUNLIT, PIACAN_SHADE
113 ! ! absorbed PAR at each level within the
114 ! ! canopy - Split into shaded and SUNLIT
115 REAL, DIMENSION(:,:), INTENT(OUT) :: PFRAC_SUN ! fraction of sunlit leaves
116 !
117 REAL, DIMENSION(:), INTENT(OUT) :: PFAPAR, PFAPIR, PFAPAR_BS, PFAPIR_BS
118 !
119 !* 0.2 declarations of local variables
120 !
121 !
122 REAL, DIMENSION(SIZE(PLAI)) :: ZIA, ZLAI, ZLAI_EFF, ZXMUS, ZFD_SKY
123 ! ZXMUS = cosine of solar zenith angle
124 ! ZFD_SKY = fraction of diffuse radiation in sky
125 REAL, DIMENSION(SIZE(PLAI)) :: ZB_INF, ZB_SUP
126 INTEGER, DIMENSION(1) :: IDMAX, IDMAX2
127 REAL :: ZTAU, ZRATIO
128 ! ZTAU = exp(-aerosol optical depth taken as 0.1)
129 ! ZRATIO = clearness index K_t eq.1 from Carrer et al
130 INTEGER :: JJ, I ! index for loops
131 !
132 REAL(KIND=JPRB) :: ZHOOK_HANDLE
133 !-------------------------------------------------------------------------------
134 !
135 IF (lhook) CALL dr_hook('RADIATIVE_TRANSFERT',0,zhook_handle)
136 !
137 zlai(:) = plai(:)
138 zfd_sky(:) = 0.
139 !
140 WHERE (plai(:)==xundef) zlai(:) = 0.0
141 !
142 ! Geometrical configuration and density of leaves induce different
143 ! min value of LAI to start the shading.
144 oshade(:)= .true.
145 DO jj = 1, SIZE(plai)
146 ! CD value calculated for patch with largest fraction ?
147  idmax = maxloc(pvegtype(jj,:))
148  IF(oagri_to_grass.AND. (idmax(1)==nvt_c3 .OR. idmax(1)==nvt_c3w .OR. &
149  idmax(1)==nvt_c3s .OR. idmax(1)==nvt_c4 .OR. idmax(1)==nvt_irr)) idmax(1) = nvt_gras
150  idmax2(1) = idmax(1)
151  IF (nvegtype==nvegtype_ecosg) idmax2(1) = itransfert_esg(idmax(1))
152  IF (plai(jj).LT.xlai_shade(idmax2(1))) oshade(jj) = .false.
153  zb_inf(jj) = xxb_inf(idmax2(1))
154  zb_sup(jj) = xxb_sup(idmax2(1))
155 ENDDO
156 !
157 !to consider all the tickness of the canopy
158 pabc(1) = 0.
159 !
160 ! cosine of solar zenith angle
161 !
162 zxmus(:) = max(cos(pzenith(:)),0.01)
163 !
164 ! CD Calculation of diffuse fraction done here because depends on solar radiation and not PAR
165 !
166 ztau = exp(-0.1) ! Aerosol Optical Depth fixed at low value (Carrer et al, section 2.1.2 eq. 1)
167 !
168 ! Diffuse fraction based on clearness index (Carrer et la, eq. 1 & 2.)
169 DO i=1,SIZE(plai)
170  IF (psw_rad(i) > 0.) THEN
171  ! estimates fraction of diffuse radiation by Erbs (1982)
172  zratio = psw_rad(i)/xi0/zxmus(i)
173  IF (zratio < 0.22) THEN
174  zfd_sky(i) = (1 - 0.09*zratio)
175  ELSE IF (zratio < 0.8) THEN
176  zfd_sky(i) = (0.9511 + (-0.1604 + (4.388 + (-16.64 + 12.34*zratio)*zratio)*zratio)*zratio)
177  ELSE
178  !!$ PXFD_SKY(I) = PIA(I)*0.165 ! original Erbs formulation
179  !if clear sky, the diffuse fraction depends on aerosol load
180  zfd_sky(i) = (1. - ztau) /(1. - (1.-zxmus(i))*ztau)
181  ENDIF
182  ENDIF
183 END DO
184 !
185 ! NIR calculations
186 zia(:) = psw_rad(:)*(1.-xparcf)
187  CALL fapair(pabc, zfd_sky, zia, zlai, zxmus, xssa_sup_pir, xssa_inf_pir, &
188  zb_sup, zb_inf, palbnir_veg, palbnir_soil, oshade, &
189  pfapir, pfapir_bs )
190 !
191 zia(:) = psw_rad(:)*xparcf
192  CALL fapair(pabc, zfd_sky, zia, zlai, zxmus, xssa_sup, xssa_inf, &
193  zb_sup, zb_inf, palbvis_veg, palbvis_soil, oshade, &
194  pfapar, pfapar_bs, plai_eff=zlai_eff, piacan=piacan, &
195  piacan_shade=piacan_shade, piacan_sunlit=piacan_sunlit, &
196  pfrac_sun=pfrac_sun )
197 !
198 DO jj = 1,SIZE(plai)
199  IF (zia(jj).NE.0.) THEN
200  pfapirc(jj) = pfapirc(jj) + pfapir(jj) * zxmus(jj)
201  pfaparc(jj) = pfaparc(jj) + pfapar(jj) * zxmus(jj)
202  plai_effc(jj) = plai_effc(jj) + zlai_eff(jj) * zxmus(jj)
203  pmus(jj) = pmus(jj) + zxmus(jj)
204  ENDIF
205 ENDDO
206 !
207 IF (lhook) CALL dr_hook('RADIATIVE_TRANSFERT',1,zhook_handle)
208 !
209 END SUBROUTINE radiative_transfert
real, parameter xundef
integer, parameter jprb
Definition: parkind1.F90:32
subroutine fapair(PABC, PFD_SKY, PIA, PLAI, PXMUS, PSSA_SUP, PSSA_INF, PB_SUP, PB_INF, PALB_VEG, PALB_SOIL, OSHADE, PFAPR, PFAPR_BS, PLAI_EFF, PIACAN, PIACAN_SHADE, PIACAN_SUNLIT, PFRAC_SUN)
Definition: fapair.F90:10
logical lhook
Definition: yomhook.F90:15
static ll_t maxloc
Definition: getcurheap.c:48
real, save xi0
Definition: modd_csts.F90:59
subroutine radiative_transfert(OAGRI_TO_GRASS, PVEGTYPE, PALBVIS_VEG, PALBVIS_SOIL, PALBNIR_VEG, PALBNIR_SOIL, PSW_RAD, PLAI, PZENITH, PABC, PFAPARC, PFAPIRC, PMUS, PLAI_EFFC, OSHADE, PIACAN, PIACAN_SUNLIT, PIACAN_SHADE, PFRAC_SUN, PFAPAR, PFAPIR, PFAPAR_BS, PFAPIR_BS)