Changeset 9435
 Timestamp:
 20180327T15:20:18+02:00 (2 years ago)
 Location:
 branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc/NEMOGCM/NEMO/OPA_SRC/ASM
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc/NEMOGCM/NEMO/OPA_SRC/ASM/asmbgc.F90
r9432 r9435 249 249 ENDIF 250 250 251 IF ( ln_phytobal .AND. & 252 & ( ( ln_slchlnoninc .AND.( .NOT. ln_slchldiainc ) ).OR. & 253 & ( ln_slchldiainc .AND.( .NOT. ln_slchlnoninc ) ) ) ) THEN 254 CALL ctl_stop( ' Cannot calculate phytoplankton balancing increments', & 255 & ' unless assimilating all model PFTs,') 256 ENDIF 257 251 258 IF ( ln_slphytotinc .AND. ( ln_slphydiainc .OR. ln_slphynoninc ) ) THEN 252 259 CALL ctl_stop( ' Can only assimilate total or PFT surface phytoplankton carbon, not both' ) 260 ENDIF 261 262 IF ( ln_phytobal .AND. & 263 & ( ( ln_slphynoninc .AND.( .NOT. ln_slphydiainc ) ).OR. & 264 & ( ln_slphydiainc .AND.( .NOT. ln_slphynoninc ) ) ) ) THEN 265 CALL ctl_stop( ' Cannot calculate phytoplankton balancing increments', & 266 & ' unless assimilating all model PFTs,') 253 267 ENDIF 254 268 … … 905 919 906 920 ! Unlog any log increments for passing to balancing routines 921 ! Remember that two sets of nonlog increments should not be 922 ! expected to be in the same ratio as their log equivalents 923 907 924 ! Total chlorophyll 908 925 IF ( ln_slchltotinc ) THEN 
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc/NEMOGCM/NEMO/OPA_SRC/ASM/asmphyto2dbal_hadocc.F90
r9432 r9435 117 117 !! 118 118 119 IF ( ld_chltot ) THEN 120 ! If p_maxchlinc > 0 then cap total absolute chlorophyll increment at that value 121 DO jj = 1, jpj 122 DO ji = 1, jpi 123 IF ( p_maxchlinc > 0.0 ) THEN 119 IF ( ( .NOT. ld_chltot ) .AND. ( .NOT. ld_phytot ) ) THEN 120 CALL ctl_stop( ' Trying to do phyto2d balancing but nothing to assimilate' ) 121 ENDIF 122 123 ! If p_maxchlinc > 0 then cap total absolute chlorophyll increment at that value 124 IF ( p_maxchlinc > 0.0 ) THEN 125 IF ( ld_chltot ) THEN 126 DO jj = 1, jpj 127 DO ji = 1, jpi 124 128 pinc_chltot(ji,jj) = MAX( 1.0 * p_maxchlinc, MIN( pinc_chltot(ji,jj), p_maxchlinc ) ) 125 END IF129 END DO 126 130 END DO 127 END DO 128 ELSE 129 CALL ctl_stop( ' No PFT assimilation quite yet' ) 131 ENDIF 132 ENDIF 133 134 IF ( ld_phytot ) THEN 135 CALL ctl_stop( ' No phytoplankton carbon assimilation quite yet' ) 130 136 ENDIF 131 137 
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc/NEMOGCM/NEMO/OPA_SRC/ASM/asmphyto2dbal_medusa.F90
r9432 r9435 130 130 REAL(wp) :: n2be_z ! N:biomass for total zoo 131 131 REAL(wp) :: n2be_d ! N:biomass for detritus 132 REAL(wp) :: zfrac ! Fraction 132 133 REAL(wp) :: zfrac_chn ! Fraction of jpchn 133 134 REAL(wp) :: zfrac_chd ! Fraction of jpchd … … 139 140 REAL(wp) :: zrat_chd_phd ! Ratio of jpchd:jpphd 140 141 REAL(wp) :: zrat_chn_phn ! Ratio of jpchn:jpphn 142 REAL(wp) :: zrat_phn_chn ! Ratio of jpphn:jpchn 143 REAL(wp) :: zrat_phd_chd ! Ratio of jpphd:jpchd 144 REAL(wp) :: zrat_pds_chd ! Ratio of jppds:jpchd 141 145 REAL(wp) :: zrat_dtc_det ! Ratio of jpdtc:jpdet 142 REAL(wp), DIMENSION(jpi,jpj) :: medusa_chl ! MEDUSA total chlorophyll143 146 REAL(wp), DIMENSION(jpi,jpj) :: cchl_p ! C:Chl for total phy 144 147 REAL(wp), DIMENSION(16) :: modparm ! Model parameters … … 150 153 !! 151 154 152 IF ( ld_chltot ) THEN153 ! If p_maxchlinc > 0 then cap total absolute chlorophyll increment at that value154 DO jj = 1, jpj155 DO j i = 1, jpi156 IF ( p_maxchlinc > 0.0 ) THEN155 ! If p_maxchlinc > 0 then cap total absolute chlorophyll increment at that value 156 IF ( p_maxchlinc > 0.0 ) THEN 157 IF ( ld_chltot ) THEN 158 DO jj = 1, jpj 159 DO ji = 1, jpi 157 160 pinc_chltot(ji,jj) = MAX( 1.0 * p_maxchlinc, MIN( pinc_chltot(ji,jj), p_maxchlinc ) ) 158 ENDIF 159 END DO 160 END DO 161 ELSE 162 CALL ctl_stop( ' No PFT assimilation quite yet' ) 161 END DO 162 END DO 163 ELSE IF ( ld_chldia .AND. ld_chlnon ) THEN 164 DO jj = 1, jpj 165 DO ji = 1, jpi 166 pinc_chltot(ji,jj) = pinc_chldia(ji,jj) + pinc_chlnon(ji,jj) 167 pinc_chltot(ji,jj) = MAX( 1.0 * p_maxchlinc, MIN( pinc_chltot(ji,jj), p_maxchlinc ) ) 168 IF ( pinc_chltot(ji,jj) .NE. ( pinc_chldia(ji,jj) + pinc_chlnon(ji,jj) ) ) THEN 169 zfrac = pinc_chltot(ji,jj) / ( pinc_chldia(ji,jj) + pinc_chlnon(ji,jj) ) 170 pinc_chldia(ji,jj) = pinc_chldia(ji,jj) * zfrac 171 pinc_chlnon(ji,jj) = pinc_chlnon(ji,jj) * zfrac 172 ENDIF 173 END DO 174 END DO 175 ELSE IF ( ld_chldia ) THEN 176 DO jj = 1, jpj 177 DO ji = 1, jpi 178 pinc_chldia(ji,jj) = MAX( 1.0 * p_maxchlinc, MIN( pinc_chldia(ji,jj), p_maxchlinc ) ) 179 pinc_chltot(ji,jj) = pinc_chldia(ji,jj) 180 END DO 181 END DO 182 ELSE IF ( ld_chlnon ) THEN 183 DO jj = 1, jpj 184 DO ji = 1, jpi 185 pinc_chlnon(ji,jj) = MAX( 1.0 * p_maxchlinc, MIN( pinc_chlnon(ji,jj), p_maxchlinc ) ) 186 pinc_chltot(ji,jj) = pinc_chlnon(ji,jj) 187 END DO 188 END DO 189 ENDIF 190 ENDIF 191 192 IF ( ld_phytot .OR. ld_phydia .OR. ld_phynon ) THEN 193 CALL ctl_stop( ' No phytoplankton carbon assimilation quite yet' ) 163 194 ENDIF 164 195 … … 263 294 DO ji = 1, jpi 264 295 265 IF ( ( tracer_bkg(ji,jj,jk,jpphn) > 0.0 ) .AND. ( tracer_bkg(ji,jj,jk,jpphd) > 0.0 ) ) THEN 266 ! Phytoplankton nitrogen and silicate split up based on existing ratios 267 zfrac_phn = tracer_bkg(ji,jj,jk,jpphn) / (tracer_bkg(ji,jj,jk,jpphn) + tracer_bkg(ji,jj,jk,jpphd)) 268 zfrac_phd = 1.0  zfrac_phn 296 ! Phytoplankton 297 IF ( ( tracer_bkg(ji,jj,jk,jpphn) > 0.0 ) .AND. & 298 & ( tracer_bkg(ji,jj,jk,jpphd) > 0.0 ) .AND. & 299 & ( pinc_chltot(ji,jj) /= 0.0 ) ) THEN 300 IF ( ld_chltot ) THEN 301 ! Phytoplankton nitrogen split up based on existing ratios 302 zfrac_phn = tracer_bkg(ji,jj,jk,jpphn) / & 303 & (tracer_bkg(ji,jj,jk,jpphn) + tracer_bkg(ji,jj,jk,jpphd)) 304 zfrac_phd = tracer_bkg(ji,jj,jk,jpphd) / & 305 & (tracer_bkg(ji,jj,jk,jpphn) + tracer_bkg(ji,jj,jk,jpphd)) 306 ELSE IF ( ld_chldia .AND. ld_chlnon ) THEN 307 ! Phytoplankton nitrogen split up based on assimilation increments 308 zfrac_phn = pinc_chlnon(ji,jj) / pinc_chltot(ji,jj) 309 zfrac_phd = pinc_chldia(ji,jj) / pinc_chltot(ji,jj) 310 ENDIF 311 312 ! Phytoplankton silicate split up based on existing ratios 269 313 zrat_pds_phd = tracer_bkg(ji,jj,jk,jppds) / tracer_bkg(ji,jj,jk,jpphd) 270 phyto2d_balinc(ji,jj,jk,jpphn) = outincs(ji,jj,jk,i_tracer(2)) * zfrac_phn 271 phyto2d_balinc(ji,jj,jk,jpphd) = outincs(ji,jj,jk,i_tracer(2)) * zfrac_phd 272 phyto2d_balinc(ji,jj,jk,jppds) = phyto2d_balinc(ji,jj,jk,jpphd) * zrat_pds_phd 273 314 274 315 ! Chlorophyll split up based on existing ratios to phytoplankton nitrogen 275 316 ! Not using pinc_chltot directly as it's only 2D … … 277 318 zrat_chn_phn = tracer_bkg(ji,jj,jk,jpchn) / tracer_bkg(ji,jj,jk,jpphn) 278 319 zrat_chd_phd = tracer_bkg(ji,jj,jk,jpchd) / tracer_bkg(ji,jj,jk,jpphd) 320 321 phyto2d_balinc(ji,jj,jk,jpphn) = outincs(ji,jj,jk,i_tracer(2)) * zfrac_phn 322 phyto2d_balinc(ji,jj,jk,jpphd) = outincs(ji,jj,jk,i_tracer(2)) * zfrac_phd 323 phyto2d_balinc(ji,jj,jk,jppds) = phyto2d_balinc(ji,jj,jk,jpphd) * zrat_pds_phd 279 324 phyto2d_balinc(ji,jj,jk,jpchn) = phyto2d_balinc(ji,jj,jk,jpphn) * zrat_chn_phn 280 325 phyto2d_balinc(ji,jj,jk,jpchd) = phyto2d_balinc(ji,jj,jk,jpphd) * zrat_chd_phd 281 326 ENDIF 282 327 328 ! Zooplankton nitrogen split up based on existing ratios 283 329 IF ( ( tracer_bkg(ji,jj,jk,jpzmi) > 0.0 ) .AND. ( tracer_bkg(ji,jj,jk,jpzme) > 0.0 ) ) THEN 284 ! Zooplankton nitrogen split up based on existing ratios 285 zfrac_zmi = tracer_bkg(ji,jj,jk,jpzmi) / (tracer_bkg(ji,jj,jk,jpzmi) + tracer_bkg(ji,jj,jk,jpzme)) 286 zfrac_zme = 1.0  zfrac_zmi 330 zfrac_zmi = tracer_bkg(ji,jj,jk,jpzmi) / & 331 & (tracer_bkg(ji,jj,jk,jpzmi) + tracer_bkg(ji,jj,jk,jpzme)) 332 zfrac_zme = tracer_bkg(ji,jj,jk,jpzme) / & 333 & (tracer_bkg(ji,jj,jk,jpzmi) + tracer_bkg(ji,jj,jk,jpzme)) 287 334 phyto2d_balinc(ji,jj,jk,jpzmi) = outincs(ji,jj,jk,i_tracer(3)) * zfrac_zmi 288 335 phyto2d_balinc(ji,jj,jk,jpzme) = outincs(ji,jj,jk,i_tracer(3)) * zfrac_zme … … 306 353 ENDIF 307 354 355 ! Carbon detritus based on existing ratios 308 356 IF ( ( tracer_bkg(ji,jj,jk,jpdet) > 0.0 ) .AND. ( tracer_bkg(ji,jj,jk,jpdtc) > 0.0 ) ) THEN 309 ! Carbon detritus based on existing ratios310 357 zrat_dtc_det = tracer_bkg(ji,jj,jk,jpdtc) / tracer_bkg(ji,jj,jk,jpdet) 311 358 phyto2d_balinc(ji,jj,jk,jpdtc) = phyto2d_balinc(ji,jj,jk,jpdet) * zrat_dtc_det … … 329 376 DO jj = 1, jpj 330 377 DO ji = 1, jpi 331 IF ( medusa_chl(ji,jj) > 0.0 ) THEN 332 zfrac_chn = tracer_bkg(ji,jj,1,jpchn) / medusa_chl(ji,jj) 333 zfrac_chd = 1.0  zfrac_chn 334 phyto2d_balinc(ji,jj,1,jpchn) = pinc_chltot(ji,jj) * zfrac_chn 335 phyto2d_balinc(ji,jj,1,jpchd) = pinc_chltot(ji,jj) * zfrac_chd 378 IF ( ( tracer_bkg(ji,jj,1,jpchn) > 0.0 ) .AND. & 379 & ( tracer_bkg(ji,jj,1,jpchd) > 0.0 ) ) THEN 380 IF ( ld_chltot ) THEN 381 ! Chlorophyll split up based on existing ratios 382 zfrac_chn = tracer_bkg(ji,jj,1,jpchn) / & 383 & ( tracer_bkg(ji,jj,1,jpchn) + tracer_bkg(ji,jj,1,jpchd) ) 384 zfrac_chd = tracer_bkg(ji,jj,1,jpchd) / & 385 & ( tracer_bkg(ji,jj,1,jpchn) + tracer_bkg(ji,jj,1,jpchd) ) 386 phyto2d_balinc(ji,jj,1,jpchn) = pinc_chltot(ji,jj) * zfrac_chn 387 phyto2d_balinc(ji,jj,1,jpchd) = pinc_chltot(ji,jj) * zfrac_chd 388 ENDIF 389 IF( ld_chldia ) THEN 390 phyto2d_balinc(ji,jj,1,jpchd) = pinc_chldia(ji,jj) 391 ENDIF 392 IF( ld_chlnon ) THEN 393 phyto2d_balinc(ji,jj,1,jpchn) = pinc_chlnon(ji,jj) 394 ENDIF 395 396 ! Maintain stoichiometric ratios of nitrogen and silicate 397 IF ( ld_chltot .OR. ld_chlnon ) THEN 398 zrat_phn_chn = tracer_bkg(ji,jj,1,jpphn) / tracer_bkg(ji,jj,1,jpchn) 399 phyto2d_balinc(ji,jj,1,jpphn) = phyto2d_balinc(ji,jj,1,jpchn) * zrat_phn_chn 400 ENDIF 401 IF ( ld_chltot .OR. ld_chldia ) THEN 402 zrat_phd_chd = tracer_bkg(ji,jj,1,jpphd) / tracer_bkg(ji,jj,1,jpchd) 403 phyto2d_balinc(ji,jj,1,jpphd) = phyto2d_balinc(ji,jj,1,jpchd) * zrat_phd_chd 404 zrat_pds_chd = tracer_bkg(ji,jj,1,jppds) / tracer_bkg(ji,jj,1,jpchd) 405 phyto2d_balinc(ji,jj,1,jppds) = phyto2d_balinc(ji,jj,1,jpchd) * zrat_pds_chd 406 ENDIF 336 407 ENDIF 337 408 END DO … … 354 425 phyto2d_balinc(ji,jj,jk,jpchn) = phyto2d_balinc(ji,jj,1,jpchn) 355 426 phyto2d_balinc(ji,jj,jk,jpchd) = phyto2d_balinc(ji,jj,1,jpchd) 427 phyto2d_balinc(ji,jj,jk,jpphn) = phyto2d_balinc(ji,jj,1,jpphn) 428 phyto2d_balinc(ji,jj,jk,jpphd) = phyto2d_balinc(ji,jj,1,jpphd) 429 phyto2d_balinc(ji,jj,jk,jppds) = phyto2d_balinc(ji,jj,1,jppds) 356 430 END DO 357 431 ! … … 360 434 361 435 ! Set other balancing increments to zero 362 phyto2d_balinc(:,:,:,jpphn) = 0.0363 phyto2d_balinc(:,:,:,jpphd) = 0.0364 phyto2d_balinc(:,:,:,jppds) = 0.0365 436 phyto2d_balinc(:,:,:,jpzmi) = 0.0 366 437 phyto2d_balinc(:,:,:,jpzme) = 0.0
Note: See TracChangeset
for help on using the changeset viewer.