Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Icepack Consortium #cabfe0f111b61057db16c Nov 20, 2022 #16

Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions columnphysics/icepack_parameters.F90
Original file line number Diff line number Diff line change
@@ -1071,7 +1071,16 @@ subroutine icepack_init_parameters( &
if (present(modal_aero_in) ) modal_aero = modal_aero_in
if (present(conserv_check_in) ) conserv_check = conserv_check_in
if (present(skl_bgc_in) ) skl_bgc = skl_bgc_in
#ifdef UNDEPRECATE_ZSAL
if (present(solve_zsal_in) ) solve_zsal = solve_zsal_in
#else
if (present(solve_zsal_in)) then
if (solve_zsal_in) then
call icepack_warnings_add(subname//' zsalinity is being deprecated')
call icepack_warnings_setabort(.true.,__FILE__,__LINE__)
endif
endif
#endif
if (present(grid_o_in) ) grid_o = grid_o_in
if (present(l_sk_in) ) l_sk = l_sk_in
if (present(initbio_frac_in) ) initbio_frac = initbio_frac_in
3 changes: 2 additions & 1 deletion columnphysics/icepack_warnings.F90
Original file line number Diff line number Diff line change
@@ -25,7 +25,8 @@ module icepack_warnings
icepack_warnings_flush, &
icepack_warnings_aborted, &
icepack_warnings_add, &
icepack_warnings_setabort
icepack_warnings_setabort, &
icepack_warnings_getall

private :: &
icepack_warnings_getone
5 changes: 4 additions & 1 deletion columnphysics/icepack_zbgc.F90
Original file line number Diff line number Diff line change
@@ -45,7 +45,9 @@ module icepack_zbgc
use icepack_algae, only: zbio, sklbio
use icepack_therm_shared, only: calculate_Tin_from_qin
use icepack_itd, only: column_sum, column_conservation_check
#ifdef UNDEPRECATE_ZSAL
use icepack_zsalinity, only: zsalinity
#endif

implicit none

@@ -1055,6 +1057,7 @@ subroutine icepack_biogeochemistry(dt, &

hbri = hbri + hbrin * aicen(n)

#ifdef UNDEPRECATE_ZSAL
if (solve_zsal) then

call zsalinity (n, dt, &
@@ -1083,7 +1086,7 @@ subroutine icepack_biogeochemistry(dt, &
if (icepack_warnings_aborted(subname)) return

endif ! solve_zsal

#endif
endif ! tr_brine

!-----------------------------------------------------------------
3 changes: 3 additions & 0 deletions columnphysics/icepack_zbgc_shared.F90
Original file line number Diff line number Diff line change
@@ -158,9 +158,12 @@ module icepack_zbgc_shared
real (kind=dbl_kind), parameter, public :: &
bphimin = 0.03_dbl_kind ! minimum porosity for zbgc only

#ifdef UNDEPRECATE_ZSAL
! these parameters are used more generally for zbgc
!-----------------------------------------------------------------------
! Parameters for zsalinity
!-----------------------------------------------------------------------
#endif

real (kind=dbl_kind), parameter, public :: &
viscos_dynamic = 2.2_dbl_kind , & ! 1.8e-3_dbl_kind (pure water at 0^oC) (kg/m/s)
8 changes: 7 additions & 1 deletion columnphysics/icepack_zsalinity.F90
Original file line number Diff line number Diff line change
@@ -13,6 +13,12 @@
!
module icepack_zsalinity

! zsalinity is being deprecated
! Additional code cleanup will follow including removal of
! solve_zsal, tr_bgc_S, grid_oS, l_skS, iki, TRZS,
! Rayleigh_real, Rayleigh_criteria, and all *zsal*
! icepack_brine.F90 subroutines icepack_init_zsalinity, compute_microS
#ifdef UNDEPRECATE_ZSAL
use icepack_kinds
use icepack_parameters, only: c0, c1, c2, p001, p5, puny, rhow, depressT, gravit
use icepack_parameters, only: rhosi, min_salin, salt_loss
@@ -1148,7 +1154,7 @@ subroutine column_sum_zsal (zsal_totn, nblyr, &
enddo ! k

end subroutine column_sum_zsal

#endif
!=======================================================================

end module icepack_zsalinity
6 changes: 6 additions & 0 deletions configuration/driver/icedrv_init_column.F90
Original file line number Diff line number Diff line change
@@ -1028,6 +1028,7 @@ subroutine init_zbgc
!-----------------------------------------------------------------
! zsalinity and brine
!-----------------------------------------------------------------
#ifdef UNDEPRECATE_ZSAL
if (solve_zsal .and. TRZS == 0) then
write(nu_diag,*) 'WARNING: solve_zsal=T but 0 zsalinity tracers'
write(nu_diag,*) 'WARNING: setting solve_zsal = F'
@@ -1044,6 +1045,11 @@ subroutine init_zbgc
tr_brine = .true.
ktherm = 1
endif
#else
if (solve_zsal) then
write(nu_diag,*) 'WARNING: zsalinity is being deprecated'
endif
#endif

if (tr_brine .and. TRBRI == 0 ) then
write(nu_diag,*) &
2 changes: 0 additions & 2 deletions configuration/scripts/tests/base_suite.ts
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@ smoke col 1x1 debug,run1year
smoke col 1x1 debug,bgcispol
smoke col 1x1 debug,bgcnice
smoke col 1x1 debug,bgcsklnice
smoke col 1x1 debug,run1year,zsal
smoke col 1x1 debug,run1year,thermo1
smoke col 1x1 debug,run1year,swredist
smoke col 1x1 debug,run1year,swccsm3
@@ -25,7 +24,6 @@ restart col 1x1 diag1
restart col 1x1 pondlvl
restart col 1x1 pondtopo
restart col 1x1 bgcispol
restart col 1x1 zsal
restart col 1x1 thermo1
restart col 1x1 swccsm3
restart col 1x1 isotope
1 change: 0 additions & 1 deletion configuration/scripts/tests/travis_suite.ts
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@ restart col 1x1 diag1
restart col 1x1 pondlvl
restart col 1x1 pondtopo
restart col 1x1 bgcispol
restart col 1x1 zsal
restart col 1x1 thermo1
restart col 1x1 swccsm3
restart col 1x1 isotope
12 changes: 6 additions & 6 deletions doc/source/science_guide/sg_bgc.rst
Original file line number Diff line number Diff line change
@@ -129,8 +129,7 @@ difference between the brine height and the equilibrium sea surface.
Brine height motion is computed in **icepack\_brine.F90** from thermodynamic
variables and the ice microstructural state
deduced from internal bulk salinities and temperature. This tracer is
required for the transport of vertically resolved biogeochemical tracers
and is closely coupled to the z-salinity prognostic salinity model.
required for the transport of vertically resolved biogeochemical tracers.

Vertical transport processes are, generally, a result of the brine
motion. Therefore the vertical transport equations for biogeochemical
@@ -450,10 +449,11 @@ flags in **icepack\_in** must be true: a) ``tr_brine``, b) ``z_tracers``, and c)
This is appropriate for the black carbon and dust aerosols specified
by ``tr_zaero`` true.

In addition, a halodynamics scheme must also be used. The default
thermo-halodynamics is mushy layer ``ktherm`` set to 2. An alternative uses
the Bitz and Lipscomb thermodynamics ``ktherm`` set to 1 and ``solve_zsal``
true (referred to as "zsalinity").
.. zsalinity is being deprecated
.. In addition, a halodynamics scheme must also be used. The default
.. thermo-halodynamics is mushy layer ``ktherm`` set to 2. An alternative uses
.. the Bitz and Lipscomb thermodynamics ``ktherm`` set to 1 and ``solve_zsal``
.. true (referred to as "zsalinity").

With the above flags, the default biochemistry is a simple
algal-nitrate system: ``tr_bgc_N`` and ``tr_bgc_Nit`` are true. Options
6 changes: 4 additions & 2 deletions doc/source/user_guide/ug_case_settings.rst
Original file line number Diff line number Diff line change
@@ -97,7 +97,7 @@ can be modified as needed.
"NTRAERO", "integer", "number of aerosol tracers", "1"
"NTRISO", "integer", "number of water isotope tracers", "1"
"TRBRI", "0,1", "brine height tracer", "0"
"TRZS", "0,1", "zsalinity tracer, needs TRBRI=1", "0"
"TRZS", "", "DEPRECATED", ""
"TRBGCS", "0,1", "skeletal layer tracer, needs TRBGCZ=0", "0"
"TRBGCZ", "0,1", "zbgc tracers, needs TRBGCS=0 and TRBRI=1", "0"
"NBGCLYR", "integer", "number of zbgc layers", "1"
@@ -507,7 +507,7 @@ zbgc_nml
"``silicatetype``", "real", "mobility type between stationary and mobile silicate", "-1.0"
"``skl_bgc``", "logical", "biogeochemistry", "``.false.``"
"``solve_zbgc``", "logical", "", "``.false.``"
"``solve_zsal``", "logical", "update salinity tracer profile", "``.false.``"
"``solve_zsal``", "logical", "DEPRECATED", "``.false.``"
"``tau_max``", "real", "long time mobile to stationary exchanges", "1.73e-5"
"``tau_min``", "real", "rapid module to stationary exchanges", "5200."
"``tr_bgc_Am``", "logical", "ammonium tracer", "``.false.``"
@@ -548,6 +548,8 @@ zbgc_nml
.. "``restart_bgc``", "logical", "restart tracer values from file", "``.false.``"
.. "``restart_hbrine``", "logical", "", "``.false.``"
.. "``restart_zsal``", "logical", "", "``.false.``"
.. "``solve_zsal``", "logical", "update salinity tracer profile", "``.false.``"
.. "TRZS", "0,1", "zsalinity tracer, needs TRBRI=1", "0"

* = If Icepack is run stand-alone and wave_spec_type is not set to none, then a fixed wave spectrum is defined in the code to use for testing. As with other input data, this spectrum should not be used for production runs or publications.

5 changes: 4 additions & 1 deletion doc/source/user_guide/ug_implementation.rst
Original file line number Diff line number Diff line change
@@ -228,7 +228,7 @@ i.e. f\_fbio, except they are averaged by ice area.
"f\_aero", "aerosol mass (snow and ice ssl and int)", "aerosnossl, aerosnoint,aeroicessl, aeroiceint", "kg/kg"
"f\_fbio", "biological ice to ocean flux", "fN, fDOC, fNit, fAm,fDON,fFep\ :math:`^a`, fFed\ :math:`^a`, fSil,fhum, fPON, fDMSPd,fDMS, fDMSPp, fzaero", "mmol m\ :math:`^{-2}` s\ :math:`^{-1}`"
"f\_zaero", "bulk z-aerosol mass fraction", "zaero", "kg/kg"
"f\_bgc\_S", "bulk z-salinity", "bgc\_S", "ppt"
"f\_bgc\_S", "DEPRECATED", "bgc\_S", "ppt"
"f\_bgc\_N", "bulk algal N concentration", "bgc\_N", "mmol m\ :math:`^{-3}`"
"f\_bgc\_C", "bulk algal C concentration", "bgc\_C", "mmol m\ :math:`^{-3}`"
"f\_bgc\_DOC", "bulk DOC concentration", "bgc\_DOC", "mmol m\ :math:`^{-3}`"
@@ -267,3 +267,6 @@ i.e. f\_fbio, except they are averaged by ice area.
:math:`^b` units are :math:`\mu`\ mol m\ :math:`^{-3}`

:math:`^c` units are :math:`\mu`\ mol m\ :math:`^{-2}`

.. deprecated
.. "f\_bgc\_S", "bulk z-salinity", "bgc\_S", "ppt"