Commit 1cc2533b authored by Chia-Te Chien's avatar Chia-Te Chien

add benthic denitrificationk

parent 438f917b
......@@ -672,7 +672,11 @@
&, 'mesoZ grazing rate on diazotrophs', ' ', 'mol N m-3 s-1')
# endif
call defvar ('O_denitr', iou, 4, it, -c1, c100, ' ', 'F'
&, 'denitrification', ' ', 'mol N m-3 s-1')
&, 'water column denitrification', ' ', 'mol N m-3 s-1')
# if defined O_benthic_denitrification
call defvar ('O_bdeni', iou, 4, it, -c1, c100, ' ', 'F'
&, 'benthic denitrification', ' ', 'mol N m-3 s-1')
# endif
# endif
call defvar ('O_detrremi', iou, 4, it, -c1, c100, ' ', 'F'
&, 'remineralisation rate', ' ', 'mol N m-3 s-1')
......@@ -727,6 +731,9 @@
# endif
# if defined O_npzd_nitrogen || defined O_opem
&, npp_D, graz_D, morp_D, nfix, deni
# if defined O_benthic_denitrification
&, bdeni
# endif
# if defined O_npzzd
&, graz_D2
# endif
......@@ -861,6 +868,9 @@
# endif
# if defined O_npzd_nitrogen || defined O_opem
&, npp_D, graz_D, morp_D, nfix, deni
# if defined O_benthic_denitrification
&, bdeni
# endif
# if defined O_npzzd
&, graz_D2
# endif
......@@ -1718,6 +1728,11 @@
tmpijl(ils:ile,jls:jle,lls:lle) = deni(ils:ile,jls:jle,lls:lle)
call putvaramsk ('O_denitr', iou, ln, ib, ic, tmpijl, tmpijlm
&, c1e3, c0)
# if defined O_benthic_denitrification
tmpijl(ils:ile,jls:jle,lls:lle) = bdeni(ils:ile,jls:jle,lls:lle)
call putvaramsk ('O_bdeni', iou, ln, ib, ic, tmpijl, tmpijlm
&, c1e3, c0)
# endif
# endif
tmpijl(ils:ile,jls:jle,lls:lle) = remi(ils:ile,jls:jle,lls:lle)
call putvaramsk ('O_detrremi', iou, ln, ib, ic, tmpijl, tmpijlm
......@@ -1732,6 +1747,11 @@
tmpijk(ils:ile,jls:jle,kls:kle) = expocal(ils:ile,jls:jle,kls:kle)
call putvaramsk ('O_caco3exp', iou, ln, ib, ic, tmpijk, tmpijkm
&, c1, c0)
!# if defined O_benthic_denitrification
! tmpijk(ils:ile,jls:jle,kls:kle) = bdeni(ils:ile,jls:jle,kls:kle)
! call putvaramsk ('O_bdeni', iou, ln, ib, ic, tmpijk, tmpijkm
! &, c1e3, c0)
!# endif
# endif
deallocate ( tmpij )
......
......@@ -577,6 +577,9 @@
ta_rexpocal(i,k,jj+1) = rnavgt*ta_rexpocal(i,k,jj+1)
# if defined O_npzd_nitrogen || defined O_opem
ta_rdeni(i,k,jj+1) = rnavgt*ta_rdeni(i,k,jj+1)
# if defined O_benthic_denitrification
ta_rbdeni(i,k,jj+1) = rnavgt*ta_rbdeni(i,k,jj+1)
# endif
# endif
enddo
enddo
......@@ -708,6 +711,9 @@
&, ta_rnpp_D(is,1,jj+1), ta_rgraz_D(is,1,jj+1)
&, ta_rmorp_D(is,1,jj+1), ta_rnfix(is,1,jj+1)
&, ta_rdeni(is,1,jj+1)
# if defined O_benthic_denitrification
&, ta_rbdeni(is,1,jj+1)
# endif
# if defined O_npzzd
&, ta_rgraz_D2(is,1,jj+1)
# endif
......@@ -865,6 +871,9 @@
ta_rgraz_D = c0
ta_rmorp_D = c0
ta_rdeni = c0
# if defined O_benthic_denitrification
ta_rbdeni = c0
# endif
ta_rnfix = c0
# if defined O_npzzd
ta_rgraz_D2 = c0
......@@ -1063,6 +1072,9 @@
ta_rmorp_D = c0
ta_rnfix = c0
ta_rdeni = c0
# if defined O_benthic_denitrification
ta_rbdeni = c0
# endif
# if defined O_npzzd
ta_rgraz_D2 = c0
# endif
......
......@@ -24,6 +24,9 @@
real ta_rremi, ta_rexpo, ta_rnpp_D, ta_rgraz_D, ta_rmorp_D
real ta_rnfix, ta_rdeni, ta_rexpocal, ta_rprocal, ta_rgraz_Z
real ta_rgraz_Det
# if defined O_benthic_denitrification
real ta_rbdeni
# endif
# if defined O_npzzd
real ta_rgraz2, ta_rmorz2, ta_rexcr2, ta_rgraz_D2, ta_rgraz1_Z2
real ta_rgraz2_Z2, ta_rgraz_Det2, ta_rgraz2_Z1
......@@ -150,6 +153,9 @@
common /ta_npzd_r/ ta_rmorp_D(imt,km,jmt)
common /ta_npzd_r/ ta_rnfix(imt,km,jmt)
common /ta_npzd_r/ ta_rdeni(imt,km,jmt)
# if defined O_benthic_denitrification
common /ta_npzd_r/ ta_rbdeni(imt,km,jmt)
# endif
common /ta_npzd_r/ ta_rgraz_Det(imt,km,jmt)
common /ta_npzd_r/ ta_rgraz_Z(imt,km,jmt)
# if defined O_npzzd
......
......@@ -75,6 +75,9 @@
real ai, hi, hs, npp_D, graz_D, morp_D, no3flag, deni, nfix
real adv_tx, adv_ty, adv_tz, felimit
real diff_tx, diff_ty, diff_tz, zmax, cont, drho
# if defined O_benthic_denitrification
real bdeni, lno3, din15flag, sg_bdeni
# endif
# if defined O_isopycmix && defined O_gent_mcwilliams && !defined O_fct && !defined O_quicker
real adv_tziso, adv_txiso, adv_tyiso
# endif
......@@ -724,7 +727,16 @@
rdtbio(i,k,j) = tsact*rdtts(k)
# endif
# endif
# endif ! O_save_npzd (587)
# endif ! O_save_npzd (587)
!-----------------------------------------------------------------------
! Initialise variables for benthic fluxes
!-----------------------------------------------------------------------
# if defined O_benthic_denitrification
sg_bdeni = 0.
bdeni = 0.
# endif
!-----------------------------------------------------------------------
! calculate detritus at the bottom and remineralize
!-----------------------------------------------------------------------
......@@ -755,7 +767,36 @@
snpzd(1) = snpzd(1) + redptn*expo*sgb
# endif
# if defined O_npzd_nitrogen || defined O_opem
# if defined O_benthic_denitrification
!-----------------------------------------------------------------------
! Benthic denitrification model of Bohlen et al., 2012, GBC
! NO3 is removed out of bottom water nitrate.
! See Somes et al., 2012, BGS for additional details/results
!-----------------------------------------------------------------------
! sedrr = sgb*expo*dzt(k)
no3flag = 0.5+sign(0.5,t(i,k,j,ino3,taum1)-trcmin)
din15flag = 1.0
lno3 = 0.5*tanh(t(i,k,j,ino3,taum1)*10 - 5.0)
sg_bdeni = (0.06 + 0.19*0.99
& **(max(t(i,k,j,io2,taum1)*1000,trcmin)
& - max(t(i,k,j,ino3,taum1),trcmin)))
# if defined O_opem
& *max(expo_c*sgb,trcmin)
# else
& *max(expo*sgb,trcmin)*6.625
# endif
sg_bdeni = min(sg_bdeni, sgb*expo)
sg_bdeni = max(sg_bdeni, 0.)
if (k .ge. 1 .and. k .le. 10)
& sg_bdeni = 1*sg_bdeni
sg_bdeni = sg_bdeni*(0.5 + lno3)*no3flag*din15flag
snpzd(5) = snpzd(5) + sgb*expo - sg_bdeni
# else
snpzd(5) = snpzd(5) + expo*sgb
# endif
# endif
# if defined O_npzd_iron
# if defined O_opem
......@@ -783,7 +824,7 @@
# endif
endif
# else
# else !No subgridbathymetry
if (k .eq. kmt(i,jrow)) then
# if defined O_sed
......@@ -809,7 +850,36 @@
snpzd(1) = snpzd(1) + redptn*expo
# endif
# if defined O_npzd_nitrogen || defined O_opem
# if defined O_benthic_denitrification
!-----------------------------------------------------------------------
! benthic denitrification model of Bohlen et al., 2012, GBC
! NO3 is removed out of bottom water nitrate.
! See Somes et al., 2012, BGS for additional details/results
!-----------------------------------------------------------------------
! limit denitrification as nitrate approaches 0 uM
no3flag = 0.5+sign(0.5,t(i,k,j,ino3,taum1)-trcmin)
din15flag = 1.0
lno3 = 0.5*tanh(t(i,k,j,ino3,taum1)*10 - 5.0)
bdeni = (0.06 + 0.19*0.99
& **(max(t(i,k,j,io2,taum1)*1000,trcmin)
& - max(t(i,k,j,ino3,taum1),trcmin)))
# if defined O_opem
& *max(expo_c,trcmin)
# else
& *max(expo,trcmin)*6.625
# endif
bdeni = min(bdeni, expo)
bdeni = max(bdeni, 0.)
c if (k .ge. 1 .and. k .le. 10)
c & bdeni = sgbdfac*bdeni
bdeni = bdeni*(0.5 + lno3)*no3flag*din15flag
snpzd(5) = snpzd(5) + expo - bdeni
# else
snpzd(5) = snpzd(5) + expo
# endif
# endif
# if defined O_npzd_iron
# if defined O_opem
......@@ -836,7 +906,7 @@
expo_p = 0.
# endif
endif
# endif ! O_npzd_subgridbathy (656)
# endif ! O_npzd_subgridbathy (747)
# if defined O_save_npzd && defined O_time_averages
! calculate rexpo* here so that remineralisation at the bottom is
......@@ -850,7 +920,15 @@
rexpofe(i,k,j) = expofe
# endif
# endif
!-----------------------------------------------------------------------
! End Subgrid bathymetrie
! Additional output
!-----------------------------------------------------------------------
# if defined O_benthic_denitrification && O_save_npzd
rbdeni(i,k,jrow) = bdeni + sg_bdeni
# endif
!-----------------------------------------------------------------------
! set source/sink terms
!-----------------------------------------------------------------------
......@@ -1039,6 +1117,10 @@
ta_rmorp_D(i,k,jrow) = ta_rmorp_D(i,k,jrow)
& + rmorp_D(i,k,j)
ta_rnfix(i,k,jrow) = ta_rnfix(i,k,jrow) + rnfix(i,k,j)
# if defined O_benthic_denitrification
ta_rbdeni(i,k,jrow) = ta_rbdeni(i,k,jrow)
& + rbdeni(i,k,j)
# endif
# if defined O_npzzd
ta_rgraz_D2(i,k,jrow) = ta_rgraz_D2(i,k,jrow)
& + rgraz_D2(i,k,j)
......@@ -1139,6 +1221,7 @@
so2 = -src(i,k,j,ispo4)*redotp - rnfix(i,k,j)*1.25e-3
# endif
src(i,k,j,iso2) = so2*(0.5 + fo2)
# if defined O_npzd_nitrogen || defined O_opem
! add denitrification as source term for NO3
no3flag = 0.5+sign(0.5,t(i,k,j,ino3,taum1)-trcmin)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment