source: LMDZ6/branches/Amaury_dev/libf/phylmd/ocean_albedo.F90 @ 5136

Last change on this file since 5136 was 5101, checked in by abarral, 4 months ago

Handle DEBUG_IO in lmdz_cppkeys_wrapper.F90
Transform some files .F -> .[fF]90
[ne compile pas à cause de writefield_u non défini - en attente de réponse Laurent]

File size: 10.1 KB
Line 
1
2! $Id$
3
4SUBROUTINE ocean_albedo(knon,zrmu0,knindex,pwind,SFRWL,alb_dir_new,alb_dif_new)
5!!
6!!****  *ALBEDO_RS14* 
7!!
8!!    PURPOSE
9!!    -------
10!!     computes the direct & diffuse albedo over open water
11!!     
12!!**  METHOD
13!!    ------
14!!
15!!    EXTERNAL
16!!    --------
17!!
18!!    IMPLICIT ARGUMENTS
19!!    ------------------
20!!     
21!!    REFERENCE
22!!    ---------
23!!     
24!!    AUTHOR
25!!    ------
26!!      R. Séférian           * Meteo-France *
27!!
28!!    MODIFICATIONS
29!!    -------------
30!!      Original    03/2014
31!!                  05/2014 R. Séférian & B. Decharme :: Adaptation to spectral
32!!                  computation for diffuse and direct albedo
33!!                  08/2014 S. Baek :: for wider wavelength range 200-4000nm and
34!!                  adaptation to LMDZ + whitecap effect by Koepke + chrolophyll
35!!                  map from climatology file
36!!                  10/2016 O. Boucher :: some optimisation following R.
37!!                  Seferian's work in the CNRM Model
38!!       
39!-------------------------------------------------------------------------------
40
41!*           DECLARATIONS
42!            ------------
43
44USE ocean_albedo_para
45USE dimphy
46USE phys_state_var_mod, ONLY: chl_con
47
48
49IMPLICIT NONE
50
51!*      0.1    declarations of arguments
52!              -------------------------
53
54include "clesphys.h"
55
56INTEGER, INTENT(IN) :: knon
57INTEGER, DIMENSION(klon), INTENT(IN) :: knindex
58REAL, DIMENSION(klon), INTENT(IN) :: zrmu0         !--cos(SZA) on full vector
59REAL, DIMENSION(klon), INTENT(IN) :: pwind         !--wind speed on compressed vector
60REAL, DIMENSION(6),INTENT(IN) :: SFRWL
61REAL, DIMENSION(klon,nsw), INTENT(OUT) :: alb_dir_new, alb_dif_new
62
63!*      0.2    declarations of local variables
64!              -------------------------
65
66REAL, DIMENSION(klon)           :: ZCHL        ! surface chlorophyll
67REAL, DIMENSION(klon)           :: ZCOSZEN     ! Cosine of the zenith solar angle
68
69INTEGER                         :: JWL, INU    ! indexes
70INTEGER                         :: JI
71REAL                            :: ZWL         ! input parameter: wavelength and diffuse/direct fraction of light
72REAL:: ZCHLABS, ZAW, ZBW, ZREFM, ZYLMD, ZUE, ZUE2 ! scalar computation variables
73
74REAL, DIMENSION(klon) :: ZAP, ZXX2, ZR00, ZRR0, ZRRR               ! computation variables
75REAL, DIMENSION(klon) :: ZR22, ZR11DF                              ! computation variables
76REAL, DIMENSION(klon) :: ZBBP, ZNU, ZHB                            ! computation variables
77REAL, DIMENSION(klon) :: ZR11, ZRW, ZRWDF, ZRDF                    ! 4 components of the OSA
78REAL, DIMENSION(klon) :: ZSIG, ZFWC, ZWORK1, ZWORK2, ZWORK3
79
80!--initialisations-------------
81
82IF (knon==0) RETURN ! A verifier pourquoi on en a besoin...
83
84alb_dir_new(:,:) = 0.
85alb_dif_new(:,:) = 0.
86
87! Initialisation of chlorophyll content
88! ZCHL(:) = CHL_CON!0.05 ! averaged global values for surface chlorophyll
89IF (ok_chlorophyll) THEN
90  ZCHL(1:knon)=CHL_CON(knindex(1:knon))
91ELSE
92  ZCHL(1:knon) = 0.05
93ENDIF
94
95! variables that do not depend on wavelengths
96! loop over the grid points
97! functions of chlorophyll content
98ZWORK1(1:knon)= EXP(LOG(ZCHL(1:knon))*0.65)
99ZWORK2(1:knon)= 0.416 * EXP(LOG(ZCHL(1:knon))*0.766)
100ZWORK3(1:knon)= LOG10(ZCHL(1:knon))
101! store the cosine of the solar zenith angle
102ZCOSZEN(1:knon) = zrmu0(knindex(1:knon))
103! Compute sigma derived from wind speed (Cox & Munk reflectance model)
104ZSIG(1:knon)=SQRT(0.003+0.00512*PWIND(1:knon))
105! original : correction for foam (Eq 16-17)
106! has to be update once we have information from wave model (discussion with G. Madec)
107ZFWC(1:knon)=3.97e-4*PWIND(1:knon)**1.59 ! Salisbury 2014 eq(2) at 37GHz, value in fraction
108
109DO JWL=1,NNWL           ! loop over the wavelengths
110
111  !---------------------------------------------------------------------------------
112  ! 0- Compute baseline values
113  !---------------------------------------------------------------------------------
114   
115  ! Get refractive index for the correspoding wavelength
116  ZWL=XAKWL(JWL)      !!!--------- wavelength value
117  ZREFM= XAKREFM(JWL) !!!--------- refraction index value
118 
119  !---------------------------------------------------------------------------------
120  ! 1- Compute direct surface albedo (ZR11)
121  !---------------------------------------------------------------------------------
122
123  ZXX2(1:knon)=SQRT(1.0-(1.0-ZCOSZEN(1:knon)**2)/ZREFM**2)
124  ZRR0(1:knon)=0.50*(((ZXX2(1:knon)-ZREFM*ZCOSZEN(1:knon))/(ZXX2(1:knon)+ZREFM*ZCOSZEN(1:knon)))**2 +  &
125               ((ZCOSZEN(1:knon)-ZREFM*ZXX2(1:knon))/(ZCOSZEN(1:knon)+ZREFM*ZXX2(1:knon)))**2)
126  ZRRR(1:knon)=0.50*(((ZXX2(1:knon)-1.34*ZCOSZEN(1:knon))/(ZXX2(1:knon)+1.34*ZCOSZEN(1:knon)))**2 + &
127               ((ZCOSZEN(1:knon)-1.34*ZXX2(1:knon))/(ZCOSZEN(1:knon)+1.34*ZXX2(1:knon)))**2)
128  ZR11(1:knon)=ZRR0(1:knon)-(0.0152-1.7873*ZCOSZEN(1:knon)+6.8972*ZCOSZEN(1:knon)**2-8.5778*ZCOSZEN(1:knon)**3+ &
129               4.071*ZSIG(1:knon)-7.6446*ZCOSZEN(1:knon)*ZSIG(1:knon)) *  &
130               EXP(0.1643-7.8409*ZCOSZEN(1:knon)-3.5639*ZCOSZEN(1:knon)**2-2.3588*ZSIG(1:knon)+ &
131               10.0538*ZCOSZEN(1:knon)*ZSIG(1:knon))*ZRR0(1:knon)/ZRRR(1:knon)
132
133  !---------------------------------------------------------------------------------
134  ! 2- Compute surface diffuse albedo (ZRDF)
135  !---------------------------------------------------------------------------------
136  ! Diffuse albedo from Jin et al., 2006 + estimation from diffuse fraction of
137  ! light (relying later on AOD). CNRM model has opted for Eq 5b
138  ZRDF(1:knon)=-0.1482-0.012*ZSIG(1:knon)+0.1609*ZREFM-0.0244*ZSIG(1:knon)*ZREFM ! surface diffuse (Eq 5a)
139  !!ZRDF(1:knon)=-0.1479+0.1502*ZREFM-0.0176*ZSIG(1:knon)*ZREFM   ! surface diffuse (Eq 5b)
140 
141  !---------------------------------------------------------------------------------
142  ! *- Determine absorption and backscattering
143  ! coefficients to determine reflectance below the surface (Ro) once for all
144
145  ! *.1- Absorption by chlorophyll
146  ZCHLABS= XAKACHL(JWL)
147  ! *.2- Absorption by seawater
148  ZAW= XAKAW3(JWL)
149  ! *.3- Backscattering by seawater
150  ZBW= XAKBW(JWL)
151  ! *.4- Backscattering by chlorophyll
152  ZYLMD = EXP(0.014*(440.0-ZWL))
153  ZAP(1:knon) = 0.06*ZCHLABS*ZWORK1(1:knon) +0.2*(XAW440+0.06*ZWORK1(1:knon))*ZYLMD
154   
155!!  WHERE ( ZCHL(1:knon) > 0.02 )
156!!    ZNU(:)=MIN(0.0,0.5*(ZWORK3(:)-0.3))
157!!    ZBBP(:)=(0.002+0.01*(0.5-0.25*ZWORK3(:))*(ZWL/550.)**ZNU(:))*ZWORK2(:)
158!!  ELSEWHERE
159!!    ZBBP(:)=0.019*(550./ZWL)*ZWORK2(:)       !ZBBPf=0.0113 at chl<=0.02
160!!  ENDWHERE
161
162    do JI = 1, knon
163      IF (ZCHL(JI) > 0.02) THEN
164        ZNU(JI)=MIN(0.0,0.5*(ZWORK3(JI)-0.3))
165        ZBBP(JI)=(0.002+0.01*(0.5-0.25*ZWORK3(JI))*(ZWL/550.)**ZNU(JI)) &
166                  *ZWORK2(JI)
167      ELSE
168        ZBBP(JI)=0.019*(550./ZWL)*ZWORK2(JI)       !ZBBPf=0.0113 at chl<=0.02
169      ENDIF
170    ENDDO
171
172  ! Morel-Gentili(1991), Eq (12)
173  ! ZHB=h/(h+2*ZBBPf*(1.-h))       
174  ZHB(1:knon)=0.5*ZBW/(0.5*ZBW+ZBBP(1:knon))
175   
176  !---------------------------------------------------------------------------------
177  ! 3- Compute direct water-leaving albedo (ZRW)
178  !---------------------------------------------------------------------------------
179  ! Based on Morel & Gentilli 1991 parametrization
180  ZR22(1:knon)=0.48168549-0.014894708*ZSIG(1:knon)-0.20703885*ZSIG(1:knon)**2
181
182  ! Use Morel 91 formula to compute the direct reflectance
183  ! below the surface
184  ZR00(1:knon)=(0.5*ZBW+ZBBP(1:knon))/(ZAW+ZAP(1:knon)) *  &
185               (0.6279-0.2227*ZHB(1:knon)-0.0513*ZHB(1:knon)**2 + &
186               (-0.3119+0.2465*ZHB(1:knon))*ZCOSZEN(1:knon))
187  ZRW(1:knon)=ZR00(1:knon)*(1.-ZR22(1:knon))/(1.-ZR00(1:knon)*ZR22(1:knon))
188
189  !---------------------------------------------------------------------------------
190  ! 4- Compute diffuse water-leaving albedo (ZRWDF)
191  !---------------------------------------------------------------------------------
192  ! as previous water-leaving computation but assumes a uniform incidence of
193  ! shortwave at surface (ue)
194  ZUE=0.676               ! equivalent u_unif for diffuse incidence
195  ZUE2=SQRT(1.0-(1.0-ZUE**2)/ZREFM**2)
196  ZRR0(1:knon)=0.50*(((ZUE2-ZREFM*ZUE)/(ZUE2+ZREFM*ZUE))**2 +((ZUE-ZREFM*ZUE2)/(ZUE+ZREFM*ZUE2))**2)
197  ZRRR(1:knon)=0.50*(((ZUE2-1.34*ZUE)/(ZUE2+1.34*ZUE))**2 +((ZUE-1.34*ZUE2)/(ZUE+1.34*ZUE2))**2)
198  ZR11DF(1:knon)=ZRR0(1:knon)-(0.0152-1.7873*ZUE+6.8972*ZUE**2-8.5778*ZUE**3+4.071*ZSIG(1:knon)-7.6446*ZUE*ZSIG(1:knon)) * &
199                 EXP(0.1643-7.8409*ZUE-3.5639*ZUE**2-2.3588*ZSIG(1:knon)+10.0538*ZUE*ZSIG(1:knon))*ZRR0(1:knon)/ZRRR(1:knon)
200
201  ! Use Morel 91 formula to compute the diffuse
202  ! reflectance below the surface
203  ZR00(1:knon) = (0.5*ZBW+ZBBP(1:knon)) / (ZAW+ZAP(1:knon)) &
204       * (0.6279-0.2227*ZHB(1:knon)-0.0513*ZHB(1:knon)**2 &
205       + (-0.3119+0.2465*ZHB(1:knon))*ZUE)
206  ZRWDF(1:knon)=ZR00(1:knon)*(1.-ZR22(1:knon))*(1.-ZR11DF(1:knon))/(1.-ZR00(1:knon)*ZR22(1:knon))
207   
208  ! get waveband index inu for each nsw band
209  SELECT CASE(nsw)
210  CASE(2)
211    IF (JWL<=49) THEN       ! from 200  to 680 nm
212     inu=1
213    ELSE                      ! from 690  to 4000 nm
214     inu=2
215    ENDIF
216  CASE(4)
217    IF (JWL<=49) THEN       ! from 200  to 680 nm
218     inu=1
219    ELSE IF (JWL<=99) THEN  ! from 690  to 1180 nm
220     inu=2
221    ELSE IF (JWL<=218) THEN ! from 1190 to 2370 nm
222     inu=3
223    ELSE                      ! from 2380 to 4000 nm
224     inu=4
225    ENDIF
226  CASE(6)
227    IF (JWL<=5) THEN        ! from 200  to 240 nm
228     inu=1
229    ELSE IF (JWL<=24) THEN  ! from 250  to 430 nm
230     inu=2
231    ELSE IF (JWL<=49) THEN  ! from 440  to 680 nm
232     inu=3
233    ELSE IF (JWL<=99) THEN  ! from 690  to 1180 nm
234     inu=4
235    ELSE IF (JWL<=218) THEN ! from 1190 to 2370 nm
236     inu=5
237    ELSE                      ! from 2380 to 4000 nm
238     inu=6
239    ENDIF
240  END SELECT
241
242  ! partitionning direct and diffuse albedo
243  ! excluding diffuse albedo ZRW on ZDIR_ALB
244
245  !--direct
246  alb_dir_new(1:knon,inu)=alb_dir_new(1:knon,inu) + &
247                          ( XFRWL(JWL) * ((1.-ZFWC(1:knon)) * (ZR11(1:knon)+ZRW(1:knon))   + ZFWC(1:knon)*XRWC(JWL)) )/SFRWL(inu)
248  !--diffuse
249  alb_dif_new(1:knon,inu)=alb_dif_new(1:knon,inu) + &
250                          ( XFRWL(JWL) * ((1.-ZFWC(1:knon)) * (ZRDF(1:knon)+ZRWDF(1:knon)) + ZFWC(1:knon)*XRWC(JWL)) )/SFRWL(inu)
251
252ENDDO ! ending loop over wavelengths
253
254END SUBROUTINE ocean_albedo
Note: See TracBrowser for help on using the repository browser.