Skip to content

Commit

Permalink
Merge branch 'master' into enhancement/YAML-diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
mnlevy1981 committed Feb 12, 2018
2 parents a80eab2 + 866c376 commit 6edc61f
Show file tree
Hide file tree
Showing 14 changed files with 405 additions and 267 deletions.
7 changes: 7 additions & 0 deletions autogenerated_src/default_diagnostics.json
Original file line number Diff line number Diff line change
Expand Up @@ -1633,6 +1633,13 @@
"units": "mmol/m^3/s",
"vertical_grid": "layer_avg"
},
"insitu_temp": {
"frequency": "medium",
"longname": "in situ temperature",
"operator": "average",
"units": "degC",
"vertical_grid": "layer_avg"
},
"pCO2SURF": {
"frequency": "medium",
"longname": "surface pCO2",
Expand Down
9 changes: 6 additions & 3 deletions autogenerated_src/default_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -1089,19 +1089,22 @@
"PO4",
"NO3",
"SiO3",
"ALK"
"ALK",
"ALK_ALT_CO2"
],
"GRID = CESM_x1": [
"PO4",
"NO3",
"SiO3",
"ALK"
"ALK",
"ALK_ALT_CO2"
],
"GRID = CESM_x3": [
"PO4",
"NO3",
"SiO3",
"ALK"
"ALK",
"ALK_ALT_CO2"
],
"default": ""
},
Expand Down
6 changes: 6 additions & 0 deletions src/default_diagnostics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,12 @@ CaCO3_form_zint :
operator : average

# General 3D diags
insitu_temp :
longname : in situ temperature
units : degC
vertical_grid : layer_avg
frequency : medium
operator : average
CO3 :
longname : Carbonate Ion Concentration
units : mmol/m^3
Expand Down
1 change: 1 addition & 0 deletions src/default_settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,7 @@ tracer_dependent :
- 'NO3'
- 'SiO3'
- 'ALK'
- 'ALK_ALT_CO2'
GRID = CESM_x3 : *CESM_TRACER_RESTORE
GRID = CESM_x1 : *CESM_TRACER_RESTORE

24 changes: 9 additions & 15 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 @@ -1759,8 +1752,9 @@ subroutine marbl_ciso_set_surface_forcing( &
alpha_k, & ! eps = ( alpa -1 ) * 1000
alpha_k_14c ! for 14C, with fractionation being twice as large for 14C than for 13C

! kinetic fraction during gas transfert (per mil) (air-sea CO2 exchange) at 21C, Zhang et al 1995,
real(r8), parameter :: eps_k = -0.81_r8 ! eps_k = -0.95 at 5C
! kinetic fraction during gas transfer (per mil) (air-sea CO2 exchange)
! average of Zhang et al 1995 values of -0.81 at 21C and -0.95 at 5C
real(r8), parameter :: eps_k = -0.88_r8
!-----------------------------------------------------------------------

associate( &
Expand Down Expand Up @@ -1803,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 @@ -1833,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 6edc61f

Please sign in to comment.