- Timestamp:
- 2021-02-06T14:04:27+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r12985_TOP-04_IMMERSE_BGC_interface/src/TOP/trcopt.F90
r14362 r14415 24 24 LOGICAL :: ln_varpar ! boolean for variable PAR fraction 25 25 REAL(wp) :: parlux ! Fraction of shortwave as PAR 26 CHARACTER (len=25) :: light_loc 26 CHARACTER (len=25) :: light_loc ! Light location in the water cell ('center', 'integral') 27 27 28 28 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_par ! structure of input par … … 133 133 ENDDO 134 134 135 ! weighted broadband diffuse attenuation coefficient136 WHERE(etot .ne. 0.) &137 xeps = ( ze1 * ekr + ze2 * ekb + ze3 * ekg ) / e3t(:,:,:,Kmm) / etot138 ! Compute PAR at cell center (T-level) or integrate over cell depth139 IF ( TRIM(light_loc) == 'center' ) THEN140 IF(lwp) WRITE(numout,*) 'trcopt : center'141 etot = etot * EXP( -xeps * 0.5 * e3t(:,:,:,Kmm))142 ELSE IF ( TRIM(light_loc) == 'integral' ) THEN143 IF(lwp) WRITE(numout,*) 'trcopt : integral'144 WHERE(etot == 0.) &145 etot = etot / xeps * (1. - EXP(-xeps*e3t(:,:,:,Kmm)))146 ENDIF147 148 !149 135 ! No Diurnal cycle PAR 150 136 IF( l_trcdm2dc ) THEN … … 158 144 etot_ndcy(:,:,:) = etot(:,:,:) 159 145 ENDIF 146 147 ! Weighted broadband attenuation coefficient 148 ! ------------------------------------------ 149 xeps = (ze1(:,:,:) * ekb(:,:,:) + ze2(:,:,:) * ekg(:,:,:) + ze3(:,:,:) * ekr(:,:,:)) / e3t(:,:,:,Kmm) / (etot(:,:,:) + rtrn) 160 150 161 151 ! Light at the euphotic depth … … 202 192 !! 203 193 !! ** purpose : compute PAR of each wavelength (Red-Green-Blue) 204 !! f or a given shortwave radiation at w-level194 !! from given surface shortwave radiation 205 195 !! 206 196 !!---------------------------------------------------------------------- … … 209 199 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(out) :: pe1 , pe2 , pe3 ! PAR (R-G-B) 210 200 ! 211 INTEGER :: ji, jj, jk ! dummy loop indices 201 INTEGER :: ji, jj, jk ! dummy loop indices 202 REAL(wp), DIMENSION(jpi,jpj) :: we1, we2, we3 ! PAR (R-G-B) at w-level 212 203 !!---------------------------------------------------------------------- 213 204 pe1(:,:,:) = 0. ; pe2(:,:,:) = 0. ; pe3(:,:,:) = 0. 214 205 ! 215 pe1(:,:,1) = zqsr(:,:) * EXP( -0.5 * ekb(:,:,1) ) 216 pe2(:,:,1) = zqsr(:,:) * EXP( -0.5 * ekg(:,:,1) ) 217 pe3(:,:,1) = zqsr(:,:) * EXP( -0.5 * ekr(:,:,1) ) 218 ! 219 DO_3D( 1, 1, 1, 1, 2, nksrp ) 220 pe1(ji,jj,jk) = pe1(ji,jj,jk-1) * EXP( -0.5 * ( ekb(ji,jj,jk-1) + ekb(ji,jj,jk) ) ) 221 pe2(ji,jj,jk) = pe2(ji,jj,jk-1) * EXP( -0.5 * ( ekg(ji,jj,jk-1) + ekg(ji,jj,jk) ) ) 222 pe3(ji,jj,jk) = pe3(ji,jj,jk-1) * EXP( -0.5 * ( ekr(ji,jj,jk-1) + ekr(ji,jj,jk) ) ) 223 END_3D 206 IF ( TRIM(light_loc) == 'center' ) THEN 207 ! cell-center (t-pivot) 208 pe1(:,:,1) = zqsr(:,:) * EXP( -0.5 * ekb(:,:,1) ) 209 pe2(:,:,1) = zqsr(:,:) * EXP( -0.5 * ekg(:,:,1) ) 210 pe3(:,:,1) = zqsr(:,:) * EXP( -0.5 * ekr(:,:,1) ) 211 ! 212 DO_3D( 1, 1, 1, 1, 2, nksrp ) 213 pe1(ji,jj,jk) = pe1(ji,jj,jk-1) * EXP( -0.5 * ( ekb(ji,jj,jk-1) + ekb(ji,jj,jk) ) ) 214 pe2(ji,jj,jk) = pe2(ji,jj,jk-1) * EXP( -0.5 * ( ekg(ji,jj,jk-1) + ekg(ji,jj,jk) ) ) 215 pe3(ji,jj,jk) = pe3(ji,jj,jk-1) * EXP( -0.5 * ( ekr(ji,jj,jk-1) + ekr(ji,jj,jk) ) ) 216 END_3D 217 ! 218 ELSE IF ( TRIM(light_loc) == 'integral' ) THEN 219 ! integrate over cell thickness 220 we1(:,:) = zqsr(:,:) 221 we2(:,:) = zqsr(:,:) 222 we3(:,:) = zqsr(:,:) 223 ! 224 DO_3D( 1, 1, 1, 1, 1, nksrp ) 225 ! integrate PAR over current t-level 226 pe1(ji,jj,jk) = we1(ji,jj) / (ekb(ji,jj,jk) + rtrn) * (1. - EXP( -ekb(ji,jj,jk) )) 227 pe2(ji,jj,jk) = we2(ji,jj) / (ekg(ji,jj,jk) + rtrn) * (1. - EXP( -ekg(ji,jj,jk) )) 228 pe3(ji,jj,jk) = we3(ji,jj) / (ekr(ji,jj,jk) + rtrn) * (1. - EXP( -ekr(ji,jj,jk) )) 229 ! PAR at next w-level 230 we1(ji,jj) = we1(ji,jj) * EXP( -ekb(ji,jj,jk) ) 231 we2(ji,jj) = we2(ji,jj) * EXP( -ekg(ji,jj,jk) ) 232 we3(ji,jj) = we3(ji,jj) * EXP( -ekr(ji,jj,jk) ) 233 END_3D 234 ! 235 ENDIF 224 236 ! 225 237 !
Note: See TracChangeset
for help on using the changeset viewer.