SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
circumsolar_rad.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 circumsolar_rad(PDIR_SW, PSCA_SW, PZENITH, PF1_o_B)
7 ! ###############################################################################
8 !
9 !!**** *CIRCUMSOLAR_RAD *
10 !!
11 !! PURPOSE
12 !! -------
13 !!
14 ! compute the fraction of the scattered solar radiation that has a
15 ! directionnal behaviour, it is from the circumsolar region
16 ! for an horizontal surface
17 !!
18 !!** METHOD
19 !! ------
20 !!
21 !! REFERENCE
22 !! ---------
23 !!
24 ! Engeneering Reference, EnergyPlus DOE, 2012
25 ! Perez, 1990
26 !!
27 !! AUTHOR
28 !! ------
29 !! G. Pigeon
30 !!
31 !! MODIFICATIONS
32 !! -------------
33 !! Original 27/11/2012
34 !!---------------------------------------------------------------
35 !
36 !
37 USE yomhook ,ONLY : lhook, dr_hook
38 USE parkind1 ,ONLY : jprb
39 USE modd_csts ,ONLY : xpi
40 
41 IMPLICIT NONE
42 !
43 !* 0.1 declarations of arguments
44 !
45 REAL, DIMENSION(:), INTENT(IN) :: pdir_sw ! direct radiation
46 REAL, DIMENSION(:), INTENT(IN) :: psca_sw ! scattered radiation
47 REAL, DIMENSION(:), INTENT(IN) :: pzenith ! solar zenith angle
48 REAL, DIMENSION(:), INTENT(OUT) :: pf1_o_b ! coef
49 !
50 !* 0.2 declarations of local variables
51 !
52 REAL, DIMENSION(SIZE(PZENITH)) :: ze !sky clearness factor
53 REAL, DIMENSION(SIZE(PZENITH)) :: zb ! b coef
54 REAL, DIMENSION(SIZE(PZENITH)) :: zf1 !factors depending on ZE and Z
55 REAL, DIMENSION(SIZE(PZENITH)) :: zf11, zf13 !factors depending on ZE
56 REAL, PARAMETER :: zk = 1.041 !coef. from EP Engineering Reference
57 REAL, PARAMETER :: zbmin = 0.087 !coef. from EP Engineering Reference
58 REAL(KIND=JPRB) :: zhook_handle
59 REAL, DIMENSION(SIZE(PZENITH)) :: zelev
60 INTEGER :: jj
61 !-------------------------------------------------------------------------------
62 IF (lhook) CALL dr_hook('MODE_CONV_DOE:CHTC_VERT_DOE',0,zhook_handle)
63 
64 zelev = xpi/2. - pzenith
65 
66 pf1_o_b = 0.
67 WHERE(psca_sw > 0)
68  ze = ((psca_sw + pdir_sw) / psca_sw + zk * zelev**3) / (1 + zk * zelev**3)
69 ELSEWHERE
70  ze = -1
71 ENDWHERE
72 
73 DO jj=1,SIZE(zelev)
74  zb(jj) = max(zbmin, cos(zelev(jj)))
75 ENDDO
76 
77  CALL fij(ze, zf11, zf13)
78 zf1 = zf11 + zf13 * zelev
79 
80 pf1_o_b = zf1 / zb
81 DO jj=1,SIZE(pf1_o_b)
82  pf1_o_b(jj) = min(pf1_o_b(jj), 1.)
83  pf1_o_b(jj) = max(pf1_o_b(jj), 0.)
84 ENDDO
85 
86 IF (lhook) CALL dr_hook('MODE_CONV_DOE:CHTC_VERT_DOE',1,zhook_handle)
87 !-------------------------------------------------------------------------------
88  CONTAINS
89 SUBROUTINE fij(PE, PF11, PF13)
90 REAL, DIMENSION(:), INTENT(IN) :: pe !sky clearness factor
91 REAL, DIMENSION(:), INTENT(OUT):: pf11
92 REAL, DIMENSION(:), INTENT(OUT):: pf13
93 
94 WHERE(pe < 0 )
95  pf11 = 0
96  pf13 = 0
97 ELSEWHERE(pe < 1.065)
98  pf11 = -0.0083117
99  pf13 = -0.0620636
100 ELSEWHERE(pe >= 1.065 .AND. pe < 1.230 )
101  pf11 = 0.1299457
102  pf13 = -0.1513752
103 ELSEWHERE(pe >= 1.230 .AND. pe < 1.500 )
104  pf11 = 0.3296958
105  pf13 = -0.2210958
106 ELSEWHERE(pe >= 1.500 .AND. pe < 1.950)
107  pf11 = 0.5682053
108  pf13 = -0.2951290
109 ELSEWHERE(pe >= 1.950 .AND. pe < 2.800 )
110  pf11 = 0.8730280
111  pf13 = -0.3616149
112 ELSEWHERE(pe >= 2.800 .AND. pe < 4.500)
113  pf11 = 1.1326077
114  pf13 = -0.4118494
115 ELSEWHERE(pe >= 4.500 .AND. pe < 6.200)
116  pf11 = 1.0601591
117  pf13 = -0.3589221
118 ELSEWHERE
119  pf11 = 0.6777470
120  pf13 = -0.2504286
121 ENDWHERE
122 
123 END SUBROUTINE fij
124 
125 END SUBROUTINE circumsolar_rad
subroutine fij(PE, PF11, PF13)
subroutine circumsolar_rad(PDIR_SW, PSCA_SW, PZENITH, PF1_o_B)