Skip to content

Commit

Permalink
Added nk argument to calls to initize_remapping
Browse files Browse the repository at this point in the history
  • Loading branch information
adcroft committed Oct 19, 2024
1 parent 62b69bd commit 2c23ca1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/ALE/MOM_ALE.F90
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,14 @@ subroutine ALE_init( param_file, GV, US, max_depth, CS)
default=default_answer_date, do_not_log=.not.GV%Boussinesq)
if (.not.GV%Boussinesq) CS%answer_date = max(CS%answer_date, 20230701)

call initialize_remapping( CS%remapCS, string, &
call initialize_remapping( CS%remapCS, string, nk=GV%ke, &
boundary_extrapolation=init_boundary_extrap, &
check_reconstruction=check_reconstruction, &
check_remapping=check_remapping, &
force_bounds_in_subcell=force_bounds_in_subcell, &
om4_remap_via_sub_cells=om4_remap_via_sub_cells, &
answer_date=CS%answer_date)
call initialize_remapping( CS%vel_remapCS, vel_string, &
call initialize_remapping( CS%vel_remapCS, vel_string, nk=GV%ke, &
boundary_extrapolation=init_boundary_extrap, &
check_reconstruction=check_reconstruction, &
check_remapping=check_remapping, &
Expand Down
13 changes: 9 additions & 4 deletions src/ALE/MOM_remapping.F90
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,13 @@ subroutine remapping_set_param(CS, remapping_scheme, boundary_extrapolation, &

if (present(remapping_scheme)) then
call setReconstructionType( remapping_scheme, CS )
if (index(trim(remapping_scheme),'C_')>0 .and. present(nk)) then
call CS%reconstruction%init(nk, h_neglect=h_neglect)
if (index(trim(remapping_scheme),'C_')>0) then
if (present(nk)) then
call CS%reconstruction%init(nk, h_neglect=h_neglect)
else
call MOM_error( FATAL, 'MOM_remapping, remapping_set_param: '//&
'Using the Recon1d class for remapping requires nk to be passed' )
endif
endif
endif
if (present(boundary_extrapolation)) then
Expand Down Expand Up @@ -1845,8 +1850,8 @@ subroutine test_recon_consistency(test, scheme, n0, niter, h_neglect)
integer :: iter ! Loop counter
character(len=8) :: label ! Generated label

call initialize_remapping(remapCS, scheme, force_bounds_in_subcell=.false. )
call remapCS%reconstruction%init(n0, h_neglect, check=.false.)
call initialize_remapping(remapCS, scheme, nk=n0, h_neglect=h_neglect, &
force_bounds_in_subcell=.false. )

error = .false.
do iter = 1, niter
Expand Down

0 comments on commit 2c23ca1

Please sign in to comment.