Skip to content

Commit 358431a

Browse files
committed
Enable fct thickness advection without tracer advection
Enable fct thickness advection without tracer advection and throw error if using unsupported combination of thickness and tracer advection.
1 parent 8f218c3 commit 358431a

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

components/mpas-albany-landice/src/mode_forward/mpas_li_advection.F

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,7 @@ subroutine li_advection_thickness_tracers(&
484484
tend, advectedTracers, layerThicknessOld, &
485485
layerThicknessEdge * layerNormalVelocity, 0 * normalVelocity, dt, &
486486
nTracers, activeTracerHorizontalAdvectionEdgeFlux, computeBudgets=.false.)!{{{
487-
elseif ((trim(config_thickness_advection) .eq. 'fct') .and. &
488-
trim(config_tracer_advection) .eq. 'fct') then
487+
elseif (trim(config_thickness_advection) .eq. 'fct') then
489488
! Call fct routine for thickness first, and use activeTracerHorizontalAdvectionEdgeFlux
490489
! returned by that call as normalThicknessFlux for call to tracer fct
491490
call li_tracer_advection_fct_tend(&
@@ -497,17 +496,25 @@ subroutine li_advection_thickness_tracers(&
497496
! This does conserve mass:
498497
layerThickness(:,:) = layerThickness(:,:) + tend(nTracers,:,:) * dt
499498

500-
! Call fct for tracers, using activeTracerHorizontalAdvectionEdgeFlux
501-
! from fct thickness advection as normalThicknessFlux
502-
call li_tracer_advection_fct_tend(&
503-
tend(1:nTracers-1,:,:), advectedTracers(1:nTracers-1,:,:), layerThicknessOld, &
504-
activeTracerHorizontalAdvectionEdgeFlux(nTracers,:,:), 0.0_RKIND * normalVelocity, dt, &
505-
nTracers-1, computeBudgets=.false.)
506-
elseif ((trim(config_thickness_advection) .eq. 'fct') .and. &
507-
trim(config_tracer_advection) .eq. 'fo') then
499+
if (trim(config_tracer_advection) .eq. 'fct') then
500+
! Call fct for tracers, using activeTracerHorizontalAdvectionEdgeFlux
501+
! from fct thickness advection as normalThicknessFlux
502+
call li_tracer_advection_fct_tend(&
503+
tend(1:nTracers-1,:,:), advectedTracers(1:nTracers-1,:,:), layerThicknessOld, &
504+
activeTracerHorizontalAdvectionEdgeFlux(nTracers,:,:), 0.0_RKIND * normalVelocity, dt, &
505+
nTracers-1, computeBudgets=.false.)
506+
elseif (trim(config_tracer_advection) .eq. 'none') then
507+
! do nothing
508+
else
509+
err_tmp = 1
510+
call mpas_log_write(trim(config_tracer_advection) // &
511+
' tracer advection is not currently supported with fct thickness advection.', MPAS_LOG_ERR)
512+
endif
513+
else
508514
err_tmp = 1
509-
call mpas_log_write("config_tracer_advection = fo is not currently supposed &
510-
with config_thickness_advection = fct", MPAS_LOG_ERR)
515+
call mpas_log_write("config_thickness_advection = " // trim(config_thickness_advection) // &
516+
", config_tracer_advection = " // trim(config_tracer_advection) // &
517+
" is not a supported combination.", MPAS_LOG_ERR)
511518
endif
512519

513520
if (config_print_thickness_advection_info) then

0 commit comments

Comments
 (0)