Skip to content

Commit 81b36a9

Browse files
committed
Merge branch 'trhille/fix_fct_tracer_conservation_bug' into MALI-Dev/develop
Add a halo update on layerThicknessEdgeFlux to fix a small tracer conservation error when using fct thickness and tracer advection.
2 parents 1343d1d + 7df9b12 commit 81b36a9

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ module li_advection
7474
!-----------------------------------------------------------------------
7575

7676
subroutine li_advection_thickness_tracers(&
77+
domain, &
7778
dt, &
7879
meshPool, &
7980
velocityPool, &
@@ -107,6 +108,7 @@ subroutine li_advection_thickness_tracers(&
107108
! input/output variables
108109
!
109110
!-----------------------------------------------------------------
111+
type (domain_type), intent(inout) :: domain !< Input/Output: domain object
110112

111113
type (mpas_pool_type), intent(inout) :: &
112114
velocityPool !< Input/output: velocity information
@@ -494,6 +496,10 @@ subroutine li_advection_thickness_tracers(&
494496
! This does conserve mass:
495497
layerThickness(:,:) = layerThickness(:,:) + tend(nTracers,:,:) * dt
496498

499+
call mpas_timer_start("halo updates")
500+
call mpas_dmpar_field_halo_exch(domain, 'layerThicknessEdgeFlux')
501+
call mpas_timer_stop("halo updates")
502+
497503
if (trim(config_tracer_advection) .eq. 'fct') then
498504
! Call fct for tracers, using layerThicknessEdgeFlux
499505
! from fct thickness advection as normalThicknessFlux

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,7 @@ subroutine advection_solver(domain, err)
715715
endif
716716

717717
call li_advection_thickness_tracers(&
718+
domain, &
718719
deltat, &
719720
meshPool, &
720721
velocityPool, &
@@ -733,6 +734,7 @@ subroutine advection_solver(domain, err)
733734
endif
734735

735736
call li_advection_thickness_tracers(&
737+
domain, &
736738
deltat, &
737739
meshPool, &
738740
velocityPool, &

0 commit comments

Comments
 (0)