Changeset 4996 for trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90
- Timestamp:
- 2014-12-22T12:56:38+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90
r4990 r4996 120 120 ENDDO 121 121 ENDIF 122 123 122 CALL p4z_lys( kt ) ! Compute CaCO3 saturation 124 123 CALL p4z_flx( kt ) ! Compute surface fluxes … … 151 150 END IF 152 151 ! 153 CALL p4z_chk_mass( kt ) ! Mass conservation checking152 IF( lk_iomput .OR. ln_check_mass ) CALL p4z_chk_mass( kt ) ! Mass conservation checking 154 153 155 154 IF ( lwm .AND. kt == nittrc000 ) CALL FLUSH ( numonp ) ! flush output namelist PISCES … … 328 327 ENDIF 329 328 ! 329 IF( iom_varid( numrtr, 'tcflxcum', ldstop = .FALSE. ) > 0 ) THEN ! cumulative total flux of carbon 330 CALL iom_get( numrtr, 'tcflxcum' , t_oce_co2_flx_cum ) 331 ELSE 332 t_oce_co2_flx_cum = 0._wp 333 ENDIF 334 ! 330 335 ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN 331 336 IF( kt == nitrst ) THEN … … 337 342 CALL iom_rstput( kt, nitrst, numrtw, 'Silicalim', xksi(:,:) ) 338 343 CALL iom_rstput( kt, nitrst, numrtw, 'Silicamax', xksimax(:,:) ) 344 CALL iom_rstput( kt, nitrst, numrtw, 'tcflxcum', t_oce_co2_flx_cum ) 339 345 ENDIF 340 346 ! … … 398 404 !!--------------------------------------------------------------------- 399 405 ! 400 INTEGER, INTENT( in ) :: kt ! ocean time-step index 406 INTEGER , INTENT( in ) :: kt ! ocean time-step index 407 REAL(wp) :: zfact 401 408 !! 402 409 !!--------------------------------------------------------------------- … … 409 416 ENDIF 410 417 411 IF( ln_check_mass .AND. kt == nitend ) THEN ! Compute the budget of NO3, ALK, Si, Fer 418 IF( iom_use( "pno3tot" ) .OR. ( ln_check_mass .AND. kt == nitend ) ) THEN 419 ! Compute the budget of NO3, ALK, Si, Fer 412 420 no3budget = glob_sum( ( trn(:,:,:,jpno3) + trn(:,:,:,jpnh4) & 413 421 & + trn(:,:,:,jpphy) + trn(:,:,:,jpdia) & … … 417 425 & + trn(:,:,:,jpgoc) & 418 426 #endif 419 & + trn(:,:,:,jpdoc) ) * cvol(:,:,:) ) 420 ! 427 & + trn(:,:,:,jpdoc) ) * cvol(:,:,:) ) 428 ! 429 no3budget = no3budget / areatot 430 CALL iom_put( "pno3tot", no3budget ) 431 ENDIF 432 ! 433 IF( iom_use( "psiltot" ) .OR. ( ln_check_mass .AND. kt == nitend ) ) THEN 421 434 silbudget = glob_sum( ( trn(:,:,:,jpsil) + trn(:,:,:,jpgsi) & 422 435 & + trn(:,:,:,jpdsi) ) * cvol(:,:,:) ) 423 ! 436 ! 437 silbudget = silbudget / areatot 438 CALL iom_put( "psiltot", silbudget ) 439 ENDIF 440 ! 441 IF( iom_use( "palktot" ) .OR. ( ln_check_mass .AND. kt == nitend ) ) THEN 424 442 alkbudget = glob_sum( ( trn(:,:,:,jpno3) * rno3 & 425 443 & + trn(:,:,:,jptal) & 426 444 & + trn(:,:,:,jpcal) * 2. ) * cvol(:,:,:) ) 427 ! 445 ! 446 alkbudget = alkbudget / areatot 447 CALL iom_put( "palktot", alkbudget ) 448 ENDIF 449 ! 450 IF( iom_use( "pfertot" ) .OR. ( ln_check_mass .AND. kt == nitend ) ) THEN 428 451 ferbudget = glob_sum( ( trn(:,:,:,jpfer) + trn(:,:,:,jpnfe) & 429 452 & + trn(:,:,:,jpdfe) & … … 434 457 & + trn(:,:,:,jpzoo) * ferat3 & 435 458 & + trn(:,:,:,jpmes) * ferat3 ) * cvol(:,:,:) ) 436 437 ! 459 ! 460 ferbudget = ferbudget / areatot 461 CALL iom_put( "pfertot", ferbudget ) 462 ENDIF 463 ! 464 IF( ln_check_mass .AND. kt == nitend ) THEN ! Compute the budget of NO3, ALK, Si, Fer 465 zfact = rfact2r * 12. / 1.e15 * ryyss ! conversion molC/kt --> PgC/year 438 466 t_atm_co2_flx = t_atm_co2_flx / glob_sum( e1e2t(:,:) ) 439 t_oce_co2_flx = t_oce_co2_flx * 12. / 1.e15 * (-1 ) 440 tpp = tpp * 1000. * 12. / 1.E15 441 t_oce_co2_exp = t_oce_co2_exp * 1000. * 12. / 1.E15 442 ! 443 no3budget = no3budget / areatot 444 silbudget = silbudget / areatot 445 alkbudget = alkbudget / areatot 446 ferbudget = ferbudget / areatot 447 ! 448 IF(lwp) THEN 449 WRITE(numco2,9000) ndastp, t_atm_co2_flx, t_oce_co2_flx, tpp, t_oce_co2_exp 450 WRITE(numnut,9500) ndastp, alkbudget, no3budget, silbudget, ferbudget 451 ENDIF 452 ! 453 ENDIF 454 ! 467 t_oce_co2_flx = t_oce_co2_flx * zfact * (-1 ) 468 tpp = tpp * 1000. * zfact 469 t_oce_co2_exp = t_oce_co2_exp * 1000. * zfact 470 IF( lwp ) WRITE(numco2,9000) ndastp, t_atm_co2_flx, t_oce_co2_flx, tpp, t_oce_co2_exp 471 IF( lwp ) WRITE(numnut,9500) ndastp, alkbudget * 1.e+06, & 472 & no3budget * rno3 * 1.e+06, & 473 & silbudget * 1.e+06, & 474 & ferbudget * 1.e+09 475 ENDIF 476 ! 455 477 9000 FORMAT(i8,f10.5,e18.10,f10.5,f10.5) 456 9500 FORMAT(i8,4e18.10) 478 9500 FORMAT(i8,4e18.10) 457 479 ! 458 480 END SUBROUTINE p4z_chk_mass
Note: See TracChangeset
for help on using the changeset viewer.