Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/216
Browse files Browse the repository at this point in the history
  • Loading branch information
mnlevy1981 committed Jan 18, 2018
2 parents 6a10254 + 85fc88d commit 2b48013
Show file tree
Hide file tree
Showing 10 changed files with 358 additions and 205 deletions.
19 changes: 6 additions & 13 deletions src/marbl_ciso_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ subroutine marbl_ciso_set_interior_forcing( &
!-----------------------------------------------------------------------
! local variables
!-----------------------------------------------------------------------
character(len=*), parameter :: subname = 'marbl_ciso_mod:marbl_ciso_set_interior forcing'
character(len=*), parameter :: subname = 'marbl_ciso_mod:marbl_ciso_set_interior_forcing'

logical (log_kind) :: zero_mask

Expand Down Expand Up @@ -459,6 +459,7 @@ subroutine marbl_ciso_set_interior_forcing( &
!-----------------------------------------------------------------------
! set local 13C/12C ratios, assuming ecosystem carries 12C (C=C12+C13+C14)
! If any Carbon boxes are zero, set corresponding 13C to zeros.
! Calculate fraction of CO3
!-----------------------------------------------------------------------

if (DOC_loc(k) > c0) then
Expand All @@ -472,9 +473,11 @@ subroutine marbl_ciso_set_interior_forcing( &
if (DIC_loc(k) > c0) then
R13C_DIC(k) = DI13C_loc(k) / DIC_loc(k)
R14C_DIC(k) = DI14C_loc(k) / DIC_loc(k)
frac_co3(k) = CO3(k) / DIC_loc(k)
else
R13C_DIC(k) = c0
R14C_DIC(k) = c0
frac_co3(k) = c0
end if

work1 = sum(zooC_loc(:,k),dim=1)
Expand Down Expand Up @@ -504,16 +507,6 @@ subroutine marbl_ciso_set_interior_forcing( &
end if
end do

!-----------------------------------------------------------------------
! Calculate fraction of CO3
!-----------------------------------------------------------------------

if (k > column_kmt) then
frac_co3(k) = c0
else
frac_co3(k) = CO3(k) / DIC_loc(k)
end if

!-----------------------------------------------------------------------
! discrimination factors of carbone chemistry based on
! Zhang et al, 1995, Geochim. et Cosmochim. Acta, 59 (1), 107-114
Expand Down Expand Up @@ -1804,9 +1797,11 @@ subroutine marbl_ciso_set_surface_forcing( &
where ( dic(:) /= c0 )
R13C_dic(:) = surface_vals(:,di13c_ind) / dic(:)
R14C_dic(:) = surface_vals(:,di14c_ind) / dic(:)
frac_co3(:) = CO3_SURF_fields(:) / dic(:)
elsewhere
R13C_dic(:) = c0
R14C_dic(:) = c0
frac_co3(:) = c0
end where

!-----------------------------------------------------------------------
Expand Down Expand Up @@ -1834,8 +1829,6 @@ subroutine marbl_ciso_set_surface_forcing( &
! the measured e_dic_g_surf of Zhang et al. 1995
!---------------------------------------------------------------------

frac_co3(:) = CO3_SURF_fields(:) / dic(:)

eps_dic_g_surf(:) = 0.014_r8 * sst(:) * frac_co3(:) - 0.105_r8 * sst(:) + 10.53_r8

!-----------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 2b48013

Please sign in to comment.