Skip to content

Commit

Permalink
Added option to intersperse ALE step between horizontal advection
Browse files Browse the repository at this point in the history
iterations.
  • Loading branch information
Andrew Shao committed Jun 2, 2017
1 parent af73ea8 commit 7ddc722
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/tracer/MOM_offline_main.F90
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ module MOM_offline_main
!! Variables controlling some of the numerical considerations of offline transport
integer :: num_off_iter !< Number of advection iterations per offline step
integer :: num_vert_iter !< Number of vertical iterations per offline step
integer :: off_ale_mod !< Sets how frequently the ALE step is done during the advection
real :: dt_offline ! Timestep used for offline tracers
real :: dt_offline_vertical ! Timestep used for calls to tracer vertical physics
real :: evap_CFL_limit, minimum_forcing_depth !< Copied from diabatic_CS controlling how tracers
Expand Down Expand Up @@ -314,7 +315,7 @@ subroutine offline_advection_ale(fluxes, Time_start, time_interval, CS, &
h_new(i,j,k) = h_new(i,j,k)/G%areaT(i,j)
enddo ; enddo ; enddo

if (MODULO(iter,1)==0) then
if (MODULO(iter,CS%off_ale_mod)==0) then
! Do ALE remapping/regridding to allow for more advection to occur in the next iteration
call pass_var(h_new,G%Domain)
if (CS%debug) then
Expand Down Expand Up @@ -1266,6 +1267,10 @@ subroutine offline_transport_init(param_file, CS, diabatic_CSp, G, GV)
call get_param(param_file, mod, "NUM_OFF_ITER", CS%num_off_iter, &
"Number of iterations to subdivide the offline tracer advection and diffusion", &
default = 60)
call get_param(param_file, mod, "OFF_ALE_MOD", CS%off_ale_mod, &
"Sets how many horizontal advection steps are taken before an ALE\n" //&
"remapping step is done. 1 would be x->y->ALE, 2 would be" //&
"x->y->x->y->ALE", default = 1)
call get_param(param_file, mod, "PRINT_ADV_OFFLINE", CS%print_adv_offline, &
"Print diagnostic output every advection subiteration",default=.false.)
call get_param(param_file, mod, "SKIP_DIFFUSION_OFFLINE", CS%skip_diffusion, &
Expand Down
4 changes: 2 additions & 2 deletions src/tracer/MOM_tracer_registry.F90
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ subroutine add_tracer_diagnostics(name, Reg, ad_x, ad_y, df_x, df_y, &

end subroutine add_tracer_diagnostics

!> This subroutine writes out chksums for tracers.
!> This subroutine writes out chksums for tracers.
subroutine MOM_tracer_chksum(mesg, Tr, ntr, G)
character(len=*), intent(in) :: mesg !< message that appears on the chksum lines
type(tracer_type), intent(in) :: Tr(:) !< array of all of registered tracers
Expand All @@ -265,7 +265,7 @@ subroutine MOM_tracer_chksum(mesg, Tr, ntr, G)

end subroutine MOM_tracer_chksum

!> Calculates and prints the global inventory of all tracers in the registry.
!> Calculates and prints the global inventory of all tracers in the registry.
subroutine MOM_tracer_chkinv(mesg, G, h, Tr, ntr)
character(len=*), intent(in) :: mesg !< message that appears on the chksum lines
type(ocean_grid_type), intent(in) :: G !< ocean grid structure
Expand Down

0 comments on commit 7ddc722

Please sign in to comment.