Skip to content

Commit 0e8fb6c

Browse files
authored
WOMBATmid: Integrate sed* tracers over configurable bottom thickness (#62)
As done for WOMBATlite in #42 and #61
1 parent 4e1dd3c commit 0e8fb6c

File tree

1 file changed

+77
-25
lines changed

1 file changed

+77
-25
lines changed

generic_tracers/generic_WOMBATmid.F90

Lines changed: 77 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ module generic_WOMBATmid
213213
meslmor, &
214214
mesqmor, &
215215
detlrem, &
216+
bottom_thickness, &
216217
detlrem_sed, &
217218
wdetbio, &
218219
wdetmax, &
@@ -1645,7 +1646,7 @@ subroutine generic_WOMBATmid_register_diag(diag_list)
16451646
init_time, vardesc_temp%longname, vardesc_temp%units, missing_value=missing_value1)
16461647

16471648
vardesc_temp = vardesc( &
1648-
'seddep', 'Depth of the sediment', 'h', '1', 's', 'm', 'f')
1649+
'seddep', 'Depth of the bottom layer', 'h', '1', 's', 'm', 'f')
16491650
wombat%id_seddep = register_diag_field(package_name, vardesc_temp%name, axes(1:2), &
16501651
init_time, vardesc_temp%longname, vardesc_temp%units, missing_value=missing_value1)
16511652

@@ -1655,52 +1656,52 @@ subroutine generic_WOMBATmid_register_diag(diag_list)
16551656
init_time, vardesc_temp%longname, vardesc_temp%units, missing_value=missing_value1)
16561657

16571658
vardesc_temp = vardesc( &
1658-
'sedtemp', 'Temperature at the deepest grid cell', 'h', '1', 's', 'deg C', 'f')
1659+
'sedtemp', 'Temperature in the bottom layer', 'h', '1', 's', 'deg C', 'f')
16591660
wombat%id_sedtemp = register_diag_field(package_name, vardesc_temp%name, axes(1:2), &
16601661
init_time, vardesc_temp%longname, vardesc_temp%units, missing_value=missing_value1)
16611662

16621663
vardesc_temp = vardesc( &
1663-
'sedsalt', 'Salinity at the deepest grid cell', 'h', '1', 's', 'psu', 'f')
1664+
'sedsalt', 'Salinity in the bottom layer', 'h', '1', 's', 'psu', 'f')
16641665
wombat%id_sedsalt = register_diag_field(package_name, vardesc_temp%name, axes(1:2), &
16651666
init_time, vardesc_temp%longname, vardesc_temp%units, missing_value=missing_value1)
16661667

16671668
vardesc_temp = vardesc( &
1668-
'sedno3', 'Nitrate at the deepest grid cell', 'h', '1', 's', 'mol/kg', 'f')
1669+
'sedno3', 'Nitrate concentration in the bottom layer', 'h', '1', 's', 'mol/kg', 'f')
16691670
wombat%id_sedno3 = register_diag_field(package_name, vardesc_temp%name, axes(1:2), &
16701671
init_time, vardesc_temp%longname, vardesc_temp%units, missing_value=missing_value1)
16711672

16721673
vardesc_temp = vardesc( &
1673-
'sednh4', 'Ammonium at the deepest grid cell', 'h', '1', 's', 'mol/kg', 'f')
1674+
'sednh4', 'Ammonium concentration in the bottom layer', 'h', '1', 's', 'mol/kg', 'f')
16741675
wombat%id_sednh4 = register_diag_field(package_name, vardesc_temp%name, axes(1:2), &
16751676
init_time, vardesc_temp%longname, vardesc_temp%units, missing_value=missing_value1)
16761677

16771678
vardesc_temp = vardesc( &
1678-
'sedo2', 'Oxygen at the deepest grid cell', 'h', '1', 's', 'mol/kg', 'f')
1679+
'sedo2', 'Oxygen concentration in the bottom layer', 'h', '1', 's', 'mol/kg', 'f')
16791680
wombat%id_sedo2 = register_diag_field(package_name, vardesc_temp%name, axes(1:2), &
16801681
init_time, vardesc_temp%longname, vardesc_temp%units, missing_value=missing_value1)
16811682

16821683
vardesc_temp = vardesc( &
1683-
'seddic', 'Dissolved inorganic carbon at the deepest grid cell', 'h', '1', 's', 'mol/kg', 'f')
1684+
'seddic', 'Dissolved inorganic carbon concentration in the bottom layer', 'h', '1', 's', 'mol/kg', 'f')
16841685
wombat%id_seddic = register_diag_field(package_name, vardesc_temp%name, axes(1:2), &
16851686
init_time, vardesc_temp%longname, vardesc_temp%units, missing_value=missing_value1)
16861687

16871688
vardesc_temp = vardesc( &
1688-
'sedalk', 'Alkalinity at the deepest grid cell', 'h', '1', 's', 'mol/kg', 'f')
1689+
'sedalk', 'Alkalinity concentration in the bottom layer', 'h', '1', 's', 'mol/kg', 'f')
16891690
wombat%id_sedalk = register_diag_field(package_name, vardesc_temp%name, axes(1:2), &
16901691
init_time, vardesc_temp%longname, vardesc_temp%units, missing_value=missing_value1)
16911692

16921693
vardesc_temp = vardesc( &
1693-
'sedhtotal', 'H+ ions at the deepest grid cell', 'h', '1', 's', 'mol/kg', 'f')
1694+
'sedhtotal', 'H+ ion concentration in the bottom layer', 'h', '1', 's', 'mol/kg', 'f')
16941695
wombat%id_sedhtotal = register_diag_field(package_name, vardesc_temp%name, axes(1:2), &
16951696
init_time, vardesc_temp%longname, vardesc_temp%units, missing_value=missing_value1)
16961697

16971698
vardesc_temp = vardesc( &
1698-
'sedco3', 'CO3 ions at the deepest grid cell', 'h', '1', 's', 'mol/kg', 'f')
1699+
'sedco3', 'CO3 ion concentration in the bottom layer', 'h', '1', 's', 'mol/kg', 'f')
16991700
wombat%id_sedco3 = register_diag_field(package_name, vardesc_temp%name, axes(1:2), &
17001701
init_time, vardesc_temp%longname, vardesc_temp%units, missing_value=missing_value1)
17011702

17021703
vardesc_temp = vardesc( &
1703-
'sedomega_cal', 'Calcite saturation state at the deepest grid cell', 'h', '1', 's', ' ', 'f')
1704+
'sedomega_cal', 'Calcite saturation state in the bottom layer', 'h', '1', 's', ' ', 'f')
17041705
wombat%id_sedomega_cal = register_diag_field(package_name, vardesc_temp%name, axes(1:2), &
17051706
init_time, vardesc_temp%longname, vardesc_temp%units, missing_value=missing_value1)
17061707

@@ -2050,6 +2051,11 @@ subroutine user_add_params
20502051
!-----------------------------------------------------------------------
20512052
call g_tracer_add_param('wdetmax', wombat%wdetmax, 45.0/86400.0)
20522053

2054+
! Bottom thickness [m]
2055+
!-----------------------------------------------------------------------
2056+
! Thickness over which tracer values are integrated to define the bottom layer
2057+
call g_tracer_add_param('bottom_thickness', wombat%bottom_thickness, 1.0)
2058+
20532059
! Detritus remineralisation rate constant in sediments [1/s]
20542060
!-----------------------------------------------------------------------
20552061
! This would normally equal detlrem, but we set the default value to be
@@ -2743,7 +2749,7 @@ subroutine generic_WOMBATmid_update_from_source(tracer_list, Temp, Salt, &
27432749
real, dimension(:,ilb:,jlb:,:), intent(in) :: opacity_band
27442750

27452751
integer :: isc, iec, jsc, jec, isd, ied, jsd, jed, nk, ntau, tn
2746-
integer :: i, j, k, n, nz
2752+
integer :: i, j, k, n, nz, k_bot
27472753
real, dimension(:,:,:), pointer :: grid_tmask
27482754
integer, dimension(:,:), pointer :: grid_kmt
27492755
integer, dimension(:,:), allocatable :: kmeuph ! deepest level of euphotic zone
@@ -2789,6 +2795,7 @@ subroutine generic_WOMBATmid_update_from_source(tracer_list, Temp, Salt, &
27892795
real :: zoo_slmor, mes_slmor, epsmin
27902796
real :: hco3, diss_cal, diss_ara, diss_det
27912797
real :: avedetbury, avecaco3bury
2798+
real :: dzt_bot, dzt_bot_os
27922799
real, dimension(:,:,:,:), allocatable :: n_pools, c_pools
27932800
logical :: used
27942801

@@ -4219,6 +4226,7 @@ subroutine generic_WOMBATmid_update_from_source(tracer_list, Temp, Salt, &
42194226
print *, " Nested timestep number =", tn
42204227
print *, " "
42214228
print *, " Biological N budget (molN/kg) at two timesteps =", n_pools(i,j,k,1), n_pools(i,j,k,2)
4229+
print *, " Difference in budget between timesteps =", n_pools(i,j,k,2) - n_pools(i,j,k,1)
42224230
print *, " "
42234231
print *, " NO3 (molNO3/kg) =", wombat%f_no3(i,j,k)
42244232
print *, " NH4 (molNH4/kg) =", wombat%f_nh4(i,j,k)
@@ -4256,6 +4264,7 @@ subroutine generic_WOMBATmid_update_from_source(tracer_list, Temp, Salt, &
42564264
print *, " Nested timestep number =", tn
42574265
print *, " "
42584266
print *, " Biological C budget (molC/kg) at two timesteps =", c_pools(i,j,k,1), c_pools(i,j,k,2)
4267+
print *, " Difference in budget between timesteps =", c_pools(i,j,k,2) - c_pools(i,j,k,1)
42594268
print *, " "
42604269
print *, " DIC (molC/kg) =", wombat%f_dic(i,j,k)
42614270
print *, " ALK (molC/kg) =", wombat%f_alk(i,j,k)
@@ -4432,28 +4441,71 @@ subroutine generic_WOMBATmid_update_from_source(tracer_list, Temp, Salt, &
44324441
call g_tracer_get_pointer(tracer_list, 'detfe_sediment', 'field', wombat%p_detfe_sediment) ! [mol/m2]
44334442
call g_tracer_get_pointer(tracer_list, 'caco3_sediment', 'field', wombat%p_caco3_sediment) ! [mol/m2]
44344443

4444+
! Get bottom conditions, including those that influence bottom fluxes. Bottom conditions are
4445+
! calculated over a layer defined by wombat%bottom_thickness (default 1 m). This is done because
4446+
! the bottom layers in MOM6 are usually "vanished" layers. This approach is based on what is done
4447+
! in COBALT v3.
44354448
do j = jsc,jec; do i = isc,iec;
4436-
k = grid_kmt(i,j)
4437-
if (k .gt. 0) then
4438-
! Get bottom conditions: mask, PO4, temp, salt, DIC, Alk, H+ ion
4439-
wombat%seddep(i,j) = wombat%zw(i,j,k)
4449+
if (grid_kmt(i,j).gt.0) then
4450+
k_bot = 0
4451+
dzt_bot = 0.0
4452+
do k = grid_kmt(i,j),1,-1
4453+
if (dzt_bot .lt. wombat%bottom_thickness) then
4454+
k_bot = k
4455+
dzt_bot = dzt_bot + dzt(i,j,k) ! [m]
4456+
wombat%sedtemp(i,j) = wombat%sedtemp(i,j) + Temp(i,j,k) * dzt(i,j,k) ! [m*degC]
4457+
wombat%sedsalt(i,j) = wombat%sedsalt(i,j) + Salt(i,j,k) * dzt(i,j,k) ! [m*psu]
4458+
wombat%sedno3(i,j) = wombat%sedno3(i,j) + wombat%f_no3(i,j,k) * dzt(i,j,k) ! [m*mol/kg]
4459+
wombat%sednh4(i,j) = wombat%sednh4(i,j) + wombat%f_nh4(i,j,k) * dzt(i,j,k) ! [m*mol/kg]
4460+
wombat%sedo2(i,j) = wombat%sedo2(i,j) + wombat%f_o2(i,j,k) * dzt(i,j,k) ! [m*mol/kg]
4461+
wombat%seddic(i,j) = wombat%seddic(i,j) + wombat%f_dic(i,j,k) * dzt(i,j,k) ! [m*mol/kg]
4462+
wombat%sedalk(i,j) = wombat%sedalk(i,j) + wombat%f_alk(i,j,k) * dzt(i,j,k) ! [m*mol/kg]
4463+
wombat%sedhtotal(i,j) = wombat%sedhtotal(i,j) + wombat%htotal(i,j,k) * dzt(i,j,k) ! [m*mol/kg]
4464+
endif
4465+
enddo
4466+
! Subtract off overshoot
4467+
dzt_bot_os = dzt_bot - wombat%bottom_thickness
4468+
wombat%sedtemp(i,j) = wombat%sedtemp(i,j) - Temp(i,j,k_bot) * dzt_bot_os ! [m*degC]
4469+
wombat%sedsalt(i,j) = wombat%sedsalt(i,j) - Salt(i,j,k_bot) * dzt_bot_os ! [m*psu]
4470+
wombat%sedno3(i,j) = wombat%sedno3(i,j) - wombat%f_no3(i,j,k_bot) * dzt_bot_os ! [m*mol/kg]
4471+
wombat%sednh4(i,j) = wombat%sednh4(i,j) - wombat%f_nh4(i,j,k_bot) * dzt_bot_os ! [m*mol/kg]
4472+
wombat%sedo2(i,j) = wombat%sedo2(i,j) - wombat%f_o2(i,j,k_bot) * dzt_bot_os ! [m*mol/kg]
4473+
wombat%seddic(i,j) = wombat%seddic(i,j) - wombat%f_dic(i,j,k_bot) * dzt_bot_os ! [m*mol/kg]
4474+
wombat%sedalk(i,j) = wombat%sedalk(i,j) - wombat%f_alk(i,j,k_bot) * dzt_bot_os ! [m*mol/kg]
4475+
wombat%sedhtotal(i,j) = wombat%sedhtotal(i,j) - wombat%htotal(i,j,k_bot) * dzt_bot_os ! [m*mol/kg]
4476+
! Convert to mol/kg
4477+
wombat%sedtemp(i,j) = wombat%sedtemp(i,j) / wombat%bottom_thickness ! [degC]
4478+
wombat%sedsalt(i,j) = wombat%sedsalt(i,j) / wombat%bottom_thickness ! [psu]
4479+
wombat%sedno3(i,j) = wombat%sedno3(i,j) / wombat%bottom_thickness ! [mol/kg]
4480+
wombat%sednh4(i,j) = wombat%sednh4(i,j) / wombat%bottom_thickness ! [mol/kg]
4481+
wombat%sedo2(i,j) = wombat%sedo2(i,j) / wombat%bottom_thickness ! [mol/kg]
4482+
wombat%seddic(i,j) = wombat%seddic(i,j) / wombat%bottom_thickness ! [mol/kg]
4483+
wombat%sedalk(i,j) = wombat%sedalk(i,j) / wombat%bottom_thickness ! [mol/kg]
4484+
wombat%sedhtotal(i,j) = wombat%sedhtotal(i,j) / wombat%bottom_thickness ! [mol/kg]
4485+
4486+
! Set seddep as full depth minus half the bottom thickness and sedmask from bottom layer
4487+
k = grid_kmt(i,j)
4488+
wombat%seddep(i,j) = max(0.0, wombat%zw(i,j,k) - (wombat%bottom_thickness / 2.0))
44404489
wombat%sedmask(i,j) = grid_tmask(i,j,k)
4441-
wombat%sedtemp(i,j) = Temp(i,j,k)
4442-
wombat%sedsalt(i,j) = Salt(i,j,k)
4443-
wombat%sedno3(i,j) = wombat%f_no3(i,j,k)
4444-
wombat%sednh4(i,j) = wombat%f_nh4(i,j,k)
4445-
wombat%sedo2(i,j) = wombat%f_o2(i,j,k)
4446-
wombat%seddic(i,j) = wombat%f_dic(i,j,k) + wombat%p_det_sediment(i,j,1) / wombat%Rho_0 ![mol/kg]
4447-
wombat%sedalk(i,j) = wombat%f_alk(i,j,k)
4448-
wombat%sedhtotal(i,j) = wombat%htotal(i,j,k)
4490+
4491+
! pjb: Sum the water column concentration of DIC and the organic carbon content of the
4492+
! sediment to approximate the interstitial (i.e., porewater) DIC concentration.
4493+
! We assume that the organic carbon content of the sediment (p_det_sediment) in mol/m2 is
4494+
! relevant over one meter, and therefore can be automatically converted to mol/m3 and then
4495+
! subsequently converted through the mol/kg using Rho_0. With this assumption these arrays
4496+
! can be added together.
4497+
! We add these arrays together to simulate the reducing conditions of organic-rich sediments,
4498+
! and to calculate a lower omega for calcite, which ensures greater rates of dissolution of
4499+
! CaCO3 within the sediment as organic matter accumulates.
4500+
wombat%seddic(i,j) = wombat%seddic(i,j) + wombat%p_det_sediment(i,j,1) / wombat%Rho_0
44494501
endif
44504502
enddo; enddo
44514503

44524504
call FMS_ocmip2_co2calc(CO2_dope_vec, wombat%sedmask(:,:), &
44534505
wombat%sedtemp(:,:), wombat%sedsalt(:,:), &
44544506
min(wombat%dic_max*mmol_m3_to_mol_kg, max(wombat%seddic(:,:), wombat%dic_min*mmol_m3_to_mol_kg)), &
44554507
max(wombat%sedno3(:,:) / 16., 1e-9), &
4456-
wombat%sio2(:,:), &
4508+
wombat%sio2(:,:), & ! dts: This is currently constant, equal to wombat%sio2_surf
44574509
min(wombat%alk_max*mmol_m3_to_mol_kg, max(wombat%sedalk(:,:), wombat%alk_min*mmol_m3_to_mol_kg)), &
44584510
wombat%sedhtotal(:,:)*wombat%htotal_scale_lo, &
44594511
wombat%sedhtotal(:,:)*wombat%htotal_scale_hi, &

0 commit comments

Comments
 (0)