@@ -202,6 +202,7 @@ module generic_COBALT
202
202
real :: irr_inhibit = 10.
203
203
real :: gamma_nitrif= 3.5e6 !month(-1)
204
204
real :: k_nh3_nitrif= 3.1e-9 !mol/kg
205
+ real :: imbalance_tolerance=1.0e-10 !the tolerance for non-conservation in C,N,P,Sc,Fe
205
206
206
207
integer :: scheme_no3_nh4_lim = 2 !1-Frost and Franzen (1992)
207
208
!2-O'Neill
@@ -212,8 +213,7 @@ module generic_COBALT
212
213
213
214
namelist /generic_COBALT_nml/ do_14c, co2_calc, debug, do_nh3_atm_ocean_exchange, scheme_nitrif, &
214
215
k_nh4_small,k_nh4_large,k_nh4_diazo,scheme_no3_nh4_lim,k_no3_small,k_no3_large,k_no3_diazo, &
215
- o2_min_nit,k_o2_nit,irr_inhibit,k_nh3_nitrif, &
216
- gamma_nitrif
216
+ o2_min_nit,k_o2_nit,irr_inhibit,k_nh3_nitrif,gamma_nitrif,imbalance_tolerance
217
217
218
218
! Declare phytoplankton, zooplankton and cobalt variable types, which contain
219
219
! the vast majority of all variables used in this module.
@@ -6494,7 +6494,6 @@ subroutine generic_COBALT_update_from_source(tracer_list,Temp,Salt,rho_dzt,dzt,h
6494
6494
real, dimension(:,:), Allocatable :: pka_nh3,phos_nh3_exchange
6495
6495
6496
6496
real :: tr,ltr
6497
-
6498
6497
real :: imbal
6499
6498
integer :: stdoutunit, imbal_flag, outunit
6500
6499
@@ -8477,7 +8476,7 @@ subroutine generic_COBALT_update_from_source(tracer_list,Temp,Salt,rho_dzt,dzt,h
8477
8476
cobalt%p_nsmz(i,j,k,tau) + cobalt%p_nmdz(i,j,k,tau) + &
8478
8477
cobalt%p_nlgz(i,j,k,tau))*grid_tmask(i,j,k)
8479
8478
imbal = (post_totn(i,j,k) - pre_totn(i,j,k) - net_srcn(i,j,k))*86400.0/dt*1.03e6
8480
- if (abs(imbal).gt.1.0e-10 ) then
8479
+ if (abs(imbal).gt.imbalance_tolerance ) then
8481
8480
call mpp_error(FATAL,&
8482
8481
'==>biological source/sink imbalance (generic_COBALT_update_from_source): Nitrogen')
8483
8482
endif
@@ -8491,7 +8490,7 @@ subroutine generic_COBALT_update_from_source(tracer_list,Temp,Salt,rho_dzt,dzt,h
8491
8490
cobalt%p_nsmz(i,j,k,tau) + cobalt%p_nmdz(i,j,k,tau) + &
8492
8491
cobalt%p_nlgz(i,j,k,tau)))*grid_tmask(i,j,k)
8493
8492
imbal = (post_totc(i,j,k) - pre_totc(i,j,k))*86400.0/dt*1.03e6
8494
- if (abs(imbal).gt.1.0e-10 ) then
8493
+ if (abs(imbal).gt.imbalance_tolerance ) then
8495
8494
call mpp_error(FATAL,&
8496
8495
'==>biological source/sink imbalance (generic_COBALT_update_from_source): Carbon')
8497
8496
endif
@@ -8506,7 +8505,7 @@ subroutine generic_COBALT_update_from_source(tracer_list,Temp,Salt,rho_dzt,dzt,h
8506
8505
cobalt%p_nlgz(i,j,k,tau)*zoo(3)%q_p_2_n + &
8507
8506
bact(1)%q_p_2_n*cobalt%p_nbact(i,j,k,tau))*grid_tmask(i,j,k)
8508
8507
imbal = (post_totp(i,j,k) - pre_totp(i,j,k))*86400.0/dt*1.03e6
8509
- if (abs(imbal).gt.1.0e-10 ) then
8508
+ if (abs(imbal).gt.imbalance_tolerance ) then
8510
8509
call mpp_error(FATAL,&
8511
8510
'==>biological source/sink imbalance (generic_COBALT_update_from_source): Phosphorus')
8512
8511
endif
@@ -8515,15 +8514,15 @@ subroutine generic_COBALT_update_from_source(tracer_list,Temp,Salt,rho_dzt,dzt,h
8515
8514
cobalt%p_felg(i,j,k,tau) + cobalt%p_fesm(i,j,k,tau) + &
8516
8515
cobalt%p_fedet(i,j,k,tau))*grid_tmask(i,j,k)
8517
8516
imbal = (post_totfe(i,j,k) - pre_totfe(i,j,k) - net_srcfe(i,j,k))*86400.0/dt*1.03e6
8518
- if (abs(imbal).gt.1.0e-10 ) then
8517
+ if (abs(imbal).gt.imbalance_tolerance ) then
8519
8518
call mpp_error(FATAL,&
8520
8519
'==>biological source/sink imbalance (generic_COBALT_update_from_source): Iron')
8521
8520
endif
8522
8521
8523
8522
post_totsi(i,j,k) = (cobalt%p_sio4(i,j,k,tau) + cobalt%p_silg(i,j,k,tau) + &
8524
8523
cobalt%p_sidet(i,j,k,tau))*grid_tmask(i,j,k)
8525
8524
imbal = (post_totsi(i,j,k) - pre_totsi(i,j,k))*86400.0/dt*1.03e6
8526
- if (abs(imbal).gt.1.0e-10 ) then
8525
+ if (abs(imbal).gt.imbalance_tolerance ) then
8527
8526
call mpp_error(FATAL,&
8528
8527
'==>biological source/sink imbalance (generic_COBALT_update_from_source): Silica')
8529
8528
endif
0 commit comments