Changeset 8372 for branches/NERC/dev_r5518_GO6_CleanMedusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_fin.F90
- Timestamp:
- 2017-07-25T18:58:24+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/NERC/dev_r5518_GO6_CleanMedusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_fin.F90
r8352 r8372 51 51 zn_sed_c, zn_sed_ca, zn_sed_fe, & 52 52 zn_sed_n, zn_sed_si 53 USE trc, ONLY: ctrc2d, ctrc3d, ln_diatrc, & 54 med_diag, nittrc000, & 55 trbio, trc2d, trc3d 53 USE trc, ONLY: med_diag, nittrc000 56 54 USE trcnam_trp, ONLY: ln_trcadv_cen2, ln_trcadv_tvd 57 55 … … 100 98 zn_sed_ca(:,:) = za_sed_ca(:,:) 101 99 endif 102 IF( ln_diatrc ) THEN103 DO jj = 2,jpjm1104 DO ji = 2,jpim1105 trc2d(ji,jj,131) = za_sed_n(ji,jj)106 trc2d(ji,jj,132) = za_sed_fe(ji,jj)107 trc2d(ji,jj,133) = za_sed_c(ji,jj)108 trc2d(ji,jj,134) = za_sed_si(ji,jj)109 trc2d(ji,jj,135) = za_sed_ca(ji,jj)110 ENDDO111 ENDDO112 ENDIF113 100 !! 114 101 if (ibenthic.eq.2) then … … 314 301 # endif 315 302 316 IF( ln_diatrc ) THEN317 !!-----------------------------------------------------------------318 !! Output several accumulated diagnostics319 !! - biomass-average phytoplankton limitation terms320 !! - integrated tendency terms321 !!-----------------------------------------------------------------322 !!323 DO jj = 2,jpjm1324 DO ji = 2,jpim1325 !! non-diatom phytoplankton limitations326 trc2d(ji,jj,25) = trc2d(ji,jj,25) / MAX(ftot_pn(ji,jj), rsmall)327 trc2d(ji,jj,26) = trc2d(ji,jj,26) / MAX(ftot_pn(ji,jj), rsmall)328 trc2d(ji,jj,27) = trc2d(ji,jj,27) / MAX(ftot_pn(ji,jj), rsmall)329 !! diatom phytoplankton limitations330 trc2d(ji,jj,28) = trc2d(ji,jj,28) / MAX(ftot_pd(ji,jj), rsmall)331 trc2d(ji,jj,29) = trc2d(ji,jj,29) / MAX(ftot_pd(ji,jj), rsmall)332 trc2d(ji,jj,30) = trc2d(ji,jj,30) / MAX(ftot_pd(ji,jj), rsmall)333 trc2d(ji,jj,31) = trc2d(ji,jj,31) / MAX(ftot_pd(ji,jj), rsmall)334 trc2d(ji,jj,32) = trc2d(ji,jj,32) / MAX(ftot_pd(ji,jj), rsmall)335 !! tendency terms336 trc2d(ji,jj,76) = fflx_n(ji,jj)337 trc2d(ji,jj,77) = fflx_si(ji,jj)338 trc2d(ji,jj,78) = fflx_fe(ji,jj)339 !! Integrated biomass.340 !! integrated non-diatom phytoplankton341 trc2d(ji,jj,79) = ftot_pn(ji,jj)342 !! integrated diatom phytoplankton343 trc2d(ji,jj,80) = ftot_pd(ji,jj)344 !! Integrated microzooplankton345 trc2d(ji,jj,217) = ftot_zmi(ji,jj)346 !! Integrated mesozooplankton347 trc2d(ji,jj,218) = ftot_zme(ji,jj)348 !! Integrated slow detritus, nitrogen349 trc2d(ji,jj,219) = ftot_det(ji,jj)350 !! Integrated slow detritus, carbon351 trc2d(ji,jj,220) = ftot_dtc(ji,jj)352 # if defined key_roam353 !! The balance of nitrogen production/consumption.354 !! integrated nitrogen production355 trc2d(ji,jj,111) = fnit_prod(ji,jj)356 !! integrated nitrogen consumption357 trc2d(ji,jj,112) = fnit_cons(ji,jj)358 !! The balance of carbon production/consumption.359 !! integrated carbon production360 trc2d(ji,jj,113) = fcar_prod(ji,jj)361 !! integrated carbon consumption362 trc2d(ji,jj,114) = fcar_cons(ji,jj)363 !! The balance of oxygen production/consumption.364 !! integrated oxygen production365 trc2d(ji,jj,115) = foxy_prod(ji,jj)366 !! integrated oxygen consumption367 trc2d(ji,jj,116) = foxy_cons(ji,jj)368 !! integrated unrealised oxygen consumption369 trc2d(ji,jj,117) = foxy_anox(ji,jj)370 # endif371 ENDDO372 ENDDO373 374 # if defined key_roam375 # if defined key_axy_nancheck376 !!---------------------------------------------------------------377 !! Check for NaNs in diagnostic outputs378 !!---------------------------------------------------------------379 !!380 !! 2D diagnostics381 DO jn = 1,150382 fq0 = SUM(trc2d(:,:,jn))383 !! AXY (30/01/14): "isnan" problem on HECTOR384 !! if (fq0 /= fq0 ) then385 if ( ieee_is_nan( fq0 ) ) then386 !! there's a NaN here387 if (lwp) write(numout,*) &388 'NAN detected in 2D diagnostic field', jn, 'at time', &389 kt, 'at position:'390 DO jj = 1,jpj391 DO ji = 1,jpi392 if ( ieee_is_nan( trc2d(ji,jj,jn) ) ) then393 if (lwp) write (numout,'(a,3i6)') 'NAN-CHECK', &394 ji, jj, jn395 endif396 ENDDO397 ENDDO398 CALL ctl_stop( 'trcbio_medusa, NAN in 2D diagnostic field' )399 endif400 ENDDO401 !!402 !! 3D diagnostics403 DO jn = 1,5404 fq0 = SUM(trc3d(:,:,:,jn))405 !! AXY (30/01/14): "isnan" problem on HECTOR406 !! if (fq0 /= fq0 ) then407 if ( ieee_is_nan( fq0 ) ) then408 !! there's a NaN here409 if (lwp) write(numout,*) &410 'NAN detected in 3D diagnostic field', jn, 'at time', &411 kt, 'at position:'412 DO jk = 1,jpk413 DO jj = 1,jpj414 DO ji = 1,jpi415 if ( ieee_is_nan( trc3d(ji,jj,jk,jn) ) ) then416 if (lwp) write (numout,'(a,4i6)') 'NAN-CHECK', &417 ji, jj, jk, jn418 endif419 ENDDO420 ENDDO421 ENDDO422 CALL ctl_stop( 'trcbio_medusa, NAN in 3D diagnostic field' )423 endif424 ENDDO425 CALL flush(numout)426 # endif427 # endif428 429 !!----------------------------------------------------------------430 !! Don't know what this does; belongs to someone else ...431 !!----------------------------------------------------------------432 !!433 !! Lateral boundary conditions on trc2d434 DO jn=1,jp_medusa_2d435 CALL lbc_lnk(trc2d(:,:,jn),'T',1. )436 ENDDO437 438 !! Lateral boundary conditions on trc3d439 DO jn=1,jp_medusa_3d440 CALL lbc_lnk(trc3d(:,:,1,jn),'T',1. )441 ENDDO442 443 444 # if defined key_axy_nodiag445 !!----------------------------------------------------------------446 !! Blank diagnostics as a NaN-trap447 !!----------------------------------------------------------------448 !!449 !! blank 2D diagnostic array450 trc2d(:,:,:) = 0.e0451 !!452 !! blank 3D diagnostic array453 trc3d(:,:,:,:) = 0.e0454 # endif455 456 457 !!----------------------------------------------------------------458 !! Add in XML diagnostics stuff459 !!----------------------------------------------------------------460 !!461 !! ** 2D diagnostics462 DO jn=1,jp_medusa_2d463 CALL iom_put(TRIM(ctrc2d(jn)), trc2d(:,:,jn))464 END DO465 !! AXY (17/02/14): don't think I need this if I modify the above for466 !! all diagnostics467 !! # if defined key_roam468 !! DO jn=91,jp_medusa_2d469 !! CALL iom_put(TRIM(ctrc2d(jn)), trc2d(:,:,jn))470 !! END DO471 !! # endif472 !!473 !! ** 3D diagnostics474 DO jn=1,jp_medusa_3d475 CALL iom_put(TRIM(ctrc3d(jn)), trc3d(:,:,:,jn))476 END DO477 !! AXY (17/02/14): don't think I need this if I modify the above for478 !! all diagnostics479 !! # if defined key_roam480 !! CALL iom_put(TRIM(ctrc3d(5)), trc3d(:,:,:,5))481 !! # endif482 483 484 ELSE IF( lk_iomput .AND. .NOT. ln_diatrc ) THEN485 303 !!!--------------------------------------------------------------- 486 304 !! Add very last diag calculations … … 1173 991 DEALLOCATE( zw2d ) 1174 992 1175 ENDIF ! end of ln_diatrc option1176 1177 993 END SUBROUTINE bio_medusa_fin 1178 994
Note: See TracChangeset
for help on using the changeset viewer.