Changeset 3496 for branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90
- Timestamp:
- 2012-10-11T10:39:32+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90
r3481 r3496 37 37 38 38 LOGICAL :: ln_check_mass = .false. !: Flag to check mass conservation 39 40 INTEGER :: numno3 !: logical unit for NO3 budget 41 INTEGER :: numalk !: logical unit for talk budget 42 INTEGER :: numsil !: logical unit for Si budget 43 INTEGER :: numfer !: logical unit for Fer budget 44 INTEGER :: numco2 !: logical unit for co2 budget 39 REAL(wp) :: alkbudget, no3budget, silbudget, ferbudget 40 INTEGER :: numco2, numnut !: logical unit for co2 budget 45 41 46 42 !!---------------------------------------------------------------------- … … 84 80 IF( ln_rsttr .AND. ln_pisclo ) CALL p4z_clo ! damping on closed seas 85 81 IF( ln_pisdmp .AND. MOD( kt - nn_dttrc, nn_pisdmp ) == 0 ) CALL p4z_dmp( kt ) ! Relaxation of some tracers 86 CALL p4z_chk_mass( kt ) ! Mass conservation checking82 ! 87 83 IF( ndayflxtr /= nday_year ) THEN ! New days 88 84 ! … … 148 144 END IF 149 145 ! 150 ! 151 IF( kt == nitend ) THEN 152 ! 153 t_atm_co2_flx = t_atm_co2_flx / glob_sum( e1e2t(:,:) ) 154 t_oce_co2_flx = t_oce_co2_flx * 12. / 1.e15 * (-1 ) 155 tpp = tpp * 1000. * 12. / 1.E15 156 t_oce_co2_exp = t_oce_co2_exp * 1000. * 12. / 1.E15 157 ! 158 IF(lwp) WRITE(numco2,9000) ndastp, t_atm_co2_flx, t_oce_co2_flx, tpp, t_oce_co2_exp 159 ! 160 ENDIF 146 CALL p4z_chk_mass( kt ) ! Mass conservation checking 161 147 162 148 IF( nn_timing == 1 ) CALL timing_stop('p4z_sms') 163 149 ! 164 9000 FORMAT(i8,f10.5,e18.10,f10.5,f10.5)165 150 ! 166 151 END SUBROUTINE p4z_sms … … 362 347 INTEGER, INTENT( in ) :: kt ! ocean time-step index 363 348 !! 364 REAL(wp) :: zalkbudget, zno3budget, zsilbudget, zferbudget365 !366 349 NAMELIST/nampismass/ ln_check_mass 367 350 !!--------------------------------------------------------------------- … … 378 361 379 362 IF( ln_check_mass .AND. lwp) THEN ! Open budget file of NO3, ALK, Si, Fer 380 CALL ctl_opn( numno3, 'no3.budget' , 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 381 CALL ctl_opn( numsil, 'sil.budget' , 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 382 CALL ctl_opn( numalk, 'talk.budget', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 383 CALL ctl_opn( numfer, 'iron.budget', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 363 CALL ctl_opn( numco2, 'carbon.budget' , 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 364 CALL ctl_opn( numnut, 'nutrient.budget', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 384 365 ENDIF 385 IF(lwp) CALL ctl_opn( numco2, 'carbon.budget', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 386 ENDIF 387 388 IF( ln_check_mass ) THEN ! Compute the budget of NO3, ALK, Si, Fer 389 zno3budget = glob_sum( ( trn(:,:,:,jpno3) + trn(:,:,:,jpnh4) & 366 ENDIF 367 368 IF( ln_check_mass .AND. kt == nitend ) THEN ! Compute the budget of NO3, ALK, Si, Fer 369 no3budget = glob_sum( ( trn(:,:,:,jpno3) + trn(:,:,:,jpnh4) & 390 370 & + trn(:,:,:,jpphy) + trn(:,:,:,jpdia) & 391 371 & + trn(:,:,:,jpzoo) + trn(:,:,:,jpmes) & … … 397 377 & + trn(:,:,:,jpdoc) ) * cvol(:,:,:) ) 398 378 ! 399 zsilbudget = glob_sum( ( trn(:,:,:,jpsil) + trn(:,:,:,jpgsi) &379 silbudget = glob_sum( ( trn(:,:,:,jpsil) + trn(:,:,:,jpgsi) & 400 380 & + trn(:,:,:,jpdsi) ) * cvol(:,:,:) ) 401 381 ! 402 zalkbudget = glob_sum( ( trn(:,:,:,jpno3) * rno3 &382 alkbudget = glob_sum( ( trn(:,:,:,jpno3) * rno3 & 403 383 & + trn(:,:,:,jptal) & 404 384 & + trn(:,:,:,jpcal) * 2. ) * cvol(:,:,:) ) 405 385 ! 406 zferbudget = glob_sum( ( trn(:,:,:,jpfer) + trn(:,:,:,jpnfe) &386 ferbudget = glob_sum( ( trn(:,:,:,jpfer) + trn(:,:,:,jpnfe) & 407 387 & + trn(:,:,:,jpdfe) + trn(:,:,:,jpbfe) & 408 388 & + trn(:,:,:,jpsfe) + & … … 410 390 & + trn(:,:,:,jpmes) * ferat3 ) * cvol(:,:,:) ) 411 391 412 IF( lwp ) THEN 413 WRITE(numno3,9500) kt, zno3budget / areatot 414 WRITE(numsil,9500) kt, zsilbudget / areatot 415 WRITE(numalk,9500) kt, zalkbudget / areatot 416 WRITE(numfer,9500) kt, zferbudget / areatot 392 ! 393 t_atm_co2_flx = t_atm_co2_flx / glob_sum( e1e2t(:,:) ) 394 t_oce_co2_flx = t_oce_co2_flx * 12. / 1.e15 * (-1 ) 395 tpp = tpp * 1000. * 12. / 1.E15 396 t_oce_co2_exp = t_oce_co2_exp * 1000. * 12. / 1.E15 397 ! 398 no3budget = no3budget / areatot 399 silbudget = silbudget / areatot 400 alkbudget = alkbudget / areatot 401 ferbudget = ferbudget / areatot 402 ! 403 IF(lwp) THEN 404 WRITE(numco2,9000) ndastp, t_atm_co2_flx, t_oce_co2_flx, tpp, t_oce_co2_exp 405 WRITE(numnut,9500) ndastp, alkbudget, no3budget, silbudget, ferbudget 417 406 ENDIF 418 ENDIF 407 ! 408 ENDIF 419 409 ! 420 9500 FORMAT(i10,e18.10) 410 9000 FORMAT(i8,f10.5,e18.10,f10.5,f10.5) 411 9500 FORMAT(i8,4e18.10) 421 412 ! 422 413 END SUBROUTINE p4z_chk_mass
Note: See TracChangeset
for help on using the changeset viewer.