Skip to content

Commit

Permalink
Deprecate ktransport and update advection="none" implementation
Browse files Browse the repository at this point in the history
Update documentation as needed
ktransport still exists as a namelist only
ktransport<=0 will override the advection setting, set
  advection='none', and print out a warning message
advection can only be set to remap, upwind, or none
  • Loading branch information
apcraig committed Dec 2, 2020
1 parent c5c1a83 commit 6aeb366
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 25 deletions.
1 change: 0 additions & 1 deletion cicecore/cicedynB/dynamics/ice_dyn_shared.F90
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ module ice_dyn_shared
integer (kind=int_kind), public :: &
kdyn , & ! type of dynamics ( -1, 0 = off, 1 = evp, 2 = eap )
kridge , & ! set to "-1" to turn off ridging
ktransport , & ! set to "-1" to turn off transport
ndte ! number of subcycles: ndte=dt/dte

character (len=char_len), public :: &
Expand Down
27 changes: 15 additions & 12 deletions cicecore/cicedynB/general/ice_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ subroutine input_data
kevp_kernel, &
basalstress, k1, k2, alphab, threshold_hw, &
Ktens, e_ratio, coriolis, ssh_stress, &
kridge, ktransport, brlx, arlx
kridge, brlx, arlx
use ice_dyn_vp, only: maxits_nonlin, precond, dim_fgmres, dim_pgmres, maxits_fgmres, &
maxits_pgmres, monitor_nonlin, monitor_fgmres, &
monitor_pgmres, reltol_nonlin, reltol_fgmres, reltol_pgmres, &
Expand Down Expand Up @@ -127,7 +127,7 @@ subroutine input_data
sw_frac, sw_dtemp

integer (kind=int_kind) :: ktherm, kstrength, krdg_partic, krdg_redist, natmiter, &
kitd, kcatbound
kitd, kcatbound, ktransport

character (len=char_len) :: shortwave, albedo_type, conduct, fbot_xfer_type, &
tfrz_option, frzpnd, atmbndy, wave_spec_type
Expand Down Expand Up @@ -1265,18 +1265,21 @@ subroutine input_data
endif
write(nu_diag,*) 'ssh_stress = ',trim(ssh_stress),trim(tmpstr2)

if (ktransport == 1) then
tmpstr2 = ' transport enabled'
if (trim(advection) == 'remap') then
tmpstr2 = ': linear remapping advection'
elseif (trim(advection) == 'upwind') then
tmpstr2 = ': donor cell (upwind) advection'
endif
write(nu_diag,*) 'advection = ', trim(advection),trim(tmpstr2)
if (ktransport <= 0) then
write(nu_diag,*) 'WARNING: ktransport <= 0, setting advection to none'
write(nu_diag,*) 'WARNING: ktransport has been deprecated, use advection=none instead'
advection = 'none'
endif
if (trim(advection) == 'remap') then
tmpstr2 = ': linear remapping advection'
elseif (trim(advection) == 'upwind') then
tmpstr2 = ': donor cell (upwind) advection'
elseif (trim(advection) == 'none') then
tmpstr2 = ': advection disabled'
else
tmpstr2 = ' transport disabled'
tmpstr2 = ': unknown advection scheme'
endif
write(nu_diag,1022) ' ktransport = ', ktransport,trim(tmpstr2)
write(nu_diag,*) 'advection = ', trim(advection),trim(tmpstr2)

if (basalstress) then
tmpstr2 = ' use basal stress parameterization for landfast ice'
Expand Down
6 changes: 2 additions & 4 deletions cicecore/cicedynB/general/ice_step_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ subroutine step_dyn_horiz (dt)
use ice_dyn_evp, only: evp
use ice_dyn_eap, only: eap
use ice_dyn_vp, only: implicit_solver
use ice_dyn_shared, only: kdyn, ktransport
use ice_dyn_shared, only: kdyn
use ice_flux, only: init_history_dyn
use ice_transport_driver, only: advection, transport_upwind, transport_remap

Expand All @@ -874,13 +874,11 @@ subroutine step_dyn_horiz (dt)
! Horizontal ice transport
!-----------------------------------------------------------------

if (ktransport > 0) then
if (advection == 'upwind') then
call transport_upwind (dt) ! upwind
else
elseif (advection == 'remap') then
call transport_remap (dt) ! incremental remapping
endif
endif

end subroutine step_dyn_horiz

Expand Down
1 change: 0 additions & 1 deletion configuration/scripts/ice_in
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@
threshold_hw = 30.
coriolis = 'latitude'
kridge = 1
ktransport = 1
ssh_stress = 'geostrophic'
maxits_nonlin = 4
precond = 'pgmres'
Expand Down
2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.box2001
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ktherm = -1
kstrength = 0
kdyn = 1
kridge = -1
ktransport = -1
advection = 'none'
coriolis = 'constant'
atmbndy = 'constant'
atm_data_type = 'box2001'
Expand Down
2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.boxslotcyl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ close_boundaries = .true.
ktherm = -1
kdyn = -1
kridge = -1
ktransport = 1
advection = 'remap'
ice_data_type = 'boxslotcyl'
histfreq = 'h','x','x','x','x'
histfreq_n = 6 , 1 , 1 , 1 , 1
Expand Down
2 changes: 1 addition & 1 deletion doc/source/cice_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ either Celsius or Kelvin units).
"a_min", "minimum area concentration for computing velocity", "0.001"
"a_rapid_mode", ":math:`{\bullet}` brine channel diameter", ""
"add_mpi_barriers", ":math:`\bullet` turns on MPI barriers for communication throttling", ""
"advection", ":math:`\bullet` type of advection algorithm used (‘remap’ or ‘upwind’)", "remap"
"advection", ":math:`\bullet` type of advection algorithm used (‘remap’, ‘upwind’, or 'none')", "remap"
"afsd(n)", "floe size distribution (in category n)", ""
"ahmax", ":math:`\bullet` thickness above which ice albedo is constant", "0.3m"
"aice_extmin", "minimum value for ice extent diagnostic", "0.15"
Expand Down
3 changes: 2 additions & 1 deletion doc/source/developer_guide/dg_dynamics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ Transport
-----------------

The transport (advection) methods are found in **cicecore/cicedynB/dynamics/**. Two methods are supported,
upwind and remap. These are set in namelist via the advection variable.
upwind and remap. In addition, transport can be turned off by setting ``advection = none``.
These are set in namelist via the ``advection`` variable.


Infrastructure
Expand Down
5 changes: 2 additions & 3 deletions doc/source/user_guide/ug_case_settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,8 @@ dynamics_nml
:widths: 15, 15, 30, 15

"", "", "", ""
"``advection``", "``remap``", "linear remapping advection scheme", "``remap``"
"``advection``", "``none``", "advection disabled", "``remap``"
"", "``remap``", "linear remapping advection scheme", ""
"", "``upwind``", "donor cell advection", ""
"``alphab``", "real", ":math:`\alpha_{b}` factor in :cite:`Lemieux16`", "20.0"
"``arlx``", "real", "revised_evp value", "300.0"
Expand Down Expand Up @@ -384,8 +385,6 @@ dynamics_nml
"", "``1``", "new ridging redistribution function", ""
"``kridge``", "``-1``", "ridging disabled", "1"
"", "``1``", "ridging enabled", ""
"``ktransport``", "``-1``", "transport disabled", "1"
"", "``1``", "transport enabled", ""
"``Ktens``", "real", "Tensile strength factor (see :cite:`Konig10`)", "0.0"
"``k1``", "real", "1st free parameter for landfast parameterization", "8.0"
"``k2``", "real", "2nd free parameter (N/m\ :math:`^3`) for landfast parameterization", "15.0"
Expand Down

0 comments on commit 6aeb366

Please sign in to comment.