Changeset 13152
 Timestamp:
 20200624T14:54:29+02:00 (13 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

NEMO/branches/NERC/dev_r4.0.2_NERC_Externals/src/TOP/trcrst.F90
r13150 r13152 24 24 USE daymod 25 25 USE lib_mpp 26 USE sms_medusa27 26 28 27 IMPLICIT NONE … … 33 32 PUBLIC trc_rst_wri ! called by ??? 34 33 PUBLIC trc_rst_cal 35 PUBLIC trc_rst_stat36 PUBLIC trc_rst_conserve ! Conservation Checks37 38 34 39 35 !! … … 153 149 IF( kt == nitrst ) THEN 154 150 CALL trc_rst_stat ! statistics 155 CALL trc_rst_conserve ! Conservation Checks156 151 CALL iom_close( numrtw ) ! close the restart file (only at last time step) 157 152 #if ! defined key_trdmxl_trc … … 343 338 END SUBROUTINE trc_rst_stat 344 339 345 SUBROUTINE trc_rst_conserve346 !!347 !! *** trc_rst_conserve ***348 !!349 !! ** purpose : Compute tracers conservation statistics350 !!351 !! AXY (17/11/2017)352 !! This routine calculates the "now" inventories of the elemental353 !! cycles of MEDUSA and compares them to those calculate when the354 !! model was initialised / restarted; the cycles calculated are:355 !! nitrogen, silicon, iron, carbon, alkalinity and oxygen356 !!357 INTEGER :: ji, jj, jk, jn358 REAL(wp) :: zsum3d, zsum2d, zinvt, zdelta, zratio359 REAL(wp), DIMENSION(jpi,jpj,jpk) :: z3d, zvol360 REAL(wp), DIMENSION(jpi,jpj) :: z2d, zarea361 REAL(wp), DIMENSION(6) :: loc_cycletot3, loc_cycletot2362 !!363 !364 IF( lwp ) THEN365 WRITE(numout,*)366 WRITE(numout,*) ' TRACER CONSERVATION '367 WRITE(numout,*)368 ENDIF369 !370 ! ocean volume371 DO jk = 1, jpk372 zvol(:,:,jk) = e1e2t(:,:) * e3t_a(:,:,jk) * tmask(:,:,jk)373 END DO374 !375 ! ocean area (for sediments)376 zarea(:,:) = e1e2t(:,:) * tmask(:,:,1)377 !378 !379 ! nitrogen380 z3d(:,:,:) = trn(:,:,:,jpphn) + trn(:,:,:,jpphd) + trn(:,:,:,jpzmi) + &381 trn(:,:,:,jpzme) + trn(:,:,:,jpdet) + trn(:,:,:,jpdin)382 z2d(:,:) = zn_sed_n(:,:)383 zsum3d = glob_sum( z3d(:,:,:) * zvol(:,:,:) )384 zsum2d = glob_sum( z2d(:,:) * zarea(:,:) )385 ! total tracer, and delta386 zinvt = zsum3d + zsum2d387 zdelta = zinvt  cycletot(1)388 zratio = 1.0e2 * zdelta / cycletot(1)389 !390 IF ( lwp ) WRITE(numout,9010) 'nitrogen', zsum3d, zsum2d, zinvt, &391 cycletot(1), zdelta, zratio392 IF ( lwp ) WRITE(numout,*)393 !394 !395 ! silicon396 z3d(:,:,:) = trn(:,:,:,jppds) + trn(:,:,:,jpsil)397 z2d(:,:) = zn_sed_si(:,:)398 zsum3d = glob_sum( z3d(:,:,:) * zvol(:,:,:) )399 zsum2d = glob_sum( z2d(:,:) * zarea(:,:) )400 ! total tracer, and delta401 zinvt = zsum3d + zsum2d402 zdelta = zinvt  cycletot(2)403 zratio = 1.0e2 * zdelta / cycletot(2)404 !405 IF ( lwp ) WRITE(numout,9010) 'silicon', zsum3d, zsum2d, zinvt, &406 cycletot(2), zdelta, zratio407 IF ( lwp ) WRITE(numout,*)408 !409 !410 ! iron411 z3d(:,:,:) = ((trn(:,:,:,jpphn) + trn(:,:,:,jpphd) + trn(:,:,:,jpzmi) + &412 trn(:,:,:,jpzme) + trn(:,:,:,jpdet)) * xrfn) + trn(:,:,:,jpfer)413 z2d(:,:) = zn_sed_fe(:,:)414 zsum3d = glob_sum( z3d(:,:,:) * zvol(:,:,:) )415 zsum2d = glob_sum( z2d(:,:) * zarea(:,:) )416 ! total tracer, and delta417 zinvt = zsum3d + zsum2d418 zdelta = zinvt  cycletot(3)419 zratio = 1.0e2 * zdelta / cycletot(3)420 !421 IF ( lwp ) WRITE(numout,9010) 'iron', zsum3d, zsum2d, zinvt, &422 cycletot(3), zdelta, zratio423 IF ( lwp ) WRITE(numout,*)424 !425 !426 ! carbon427 z3d(:,:,:) = (trn(:,:,:,jpphn) * xthetapn) + (trn(:,:,:,jpphd) * xthetapd) + &428 (trn(:,:,:,jpzmi) * xthetazmi) + (trn(:,:,:,jpzme) * xthetazme) + &429 trn(:,:,:,jpdtc) + trn(:,:,:,jpdic)430 z2d(:,:) = zn_sed_c(:,:) + zn_sed_ca(:,:)431 zsum3d = glob_sum( z3d(:,:,:) * zvol(:,:,:) )432 zsum2d = glob_sum( z2d(:,:) * zarea(:,:) )433 ! total tracer, and delta434 zinvt = zsum3d + zsum2d435 zdelta = zinvt  cycletot(4)436 zratio = 1.0e2 * zdelta / cycletot(4)437 !438 IF ( lwp ) WRITE(numout,9010) 'carbon', zsum3d, zsum2d, zinvt, &439 cycletot(4), zdelta, zratio440 IF ( lwp ) WRITE(numout,*)441 !442 !443 ! alkalinity444 z3d(:,:,:) = trn(:,:,:,jpalk)445 z2d(:,:) = zn_sed_ca(:,:) * 2.0446 zsum3d = glob_sum( z3d(:,:,:) * zvol(:,:,:) )447 zsum2d = glob_sum( z2d(:,:) * zarea(:,:) )448 ! total tracer, and delta449 zinvt = zsum3d + zsum2d450 zdelta = zinvt  cycletot(5)451 zratio = 1.0e2 * zdelta / cycletot(5)452 !453 IF ( lwp ) WRITE(numout,9010) 'alkalinity', zsum3d, zsum2d, zinvt, &454 cycletot(5), zdelta, zratio455 IF ( lwp ) WRITE(numout,*)456 !457 !458 ! oxygen459 z3d(:,:,:) = trn(:,:,:,jpoxy)460 z2d(:,:) = 0.0461 zsum3d = glob_sum( z3d(:,:,:) * zvol(:,:,:) )462 zsum2d = glob_sum( z2d(:,:) * zarea(:,:) )463 ! total tracer, and delta464 zinvt = zsum3d + zsum2d465 zdelta = zinvt  cycletot(6)466 zratio = 1.0e2 * zdelta / cycletot(6)467 !468 IF ( lwp ) WRITE(numout,9010) 'oxygen', zsum3d, zsum2d, zinvt, &469 cycletot(6), zdelta, zratio470 !471 !472 ! Check473 zsum3d = glob_sum( zvol(:,:,:) )474 zsum2d = glob_sum( zarea(:,:) )475 IF ( lwp ) THEN476 WRITE(numout,*)477 WRITE(numout,*) ' check : cvol : ', zsum3d478 WRITE(numout,*) ' check : carea : ', zsum2d479 WRITE(numout,*)480 ENDIF481 !482 9010 FORMAT(' element:',a10, &483 ' 3d sum:',e18.10,' 2d sum:',e18.10, &484 ' total:',e18.10,' initial:',e18.10, &485 ' delta:',e18.10,' %:',e18.10)486 !487 END SUBROUTINE trc_rst_conserve488 489 340 #else 490 341 !!
Note: See TracChangeset
for help on using the changeset viewer.