Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(*)Fix bug in rotate_ALE_sponge for fixed sponges #667

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/parameterizations/vertical/MOM_ALE_sponge.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1315,11 +1315,13 @@ subroutine rotate_ALE_sponge(sponge_in, G_in, sponge, G, GV, US, turns, param_fi

! Second part: Provide rotated fields for which relaxation is applied

sponge%fldno = sponge_in%fldno

if (fixed_sponge) then
allocate(sp_val_in(G_in%isd:G_in%ied, G_in%jsd:G_in%jed, nz_data))
allocate(sp_val(G%isd:G%ied, G%jsd:G%jed, nz_data))
! For a fixed sponge, sponge%fldno is incremented from 0 in the calls to set_up_ALE_sponge_field.
sponge%fldno = 0
else
sponge%fldno = sponge_in%fldno
endif

do n=1,sponge_in%fldno
Expand Down Expand Up @@ -1372,8 +1374,7 @@ subroutine rotate_ALE_sponge(sponge_in, G_in, sponge, G, GV, US, turns, param_fi

! TODO: var_u and var_v sponge damping is not yet supported.
if (associated(sponge_in%var_u%p) .or. associated(sponge_in%var_v%p)) &
call MOM_error(FATAL, "Rotation of ALE sponge velocities is not yet " &
// "implemented.")
call MOM_error(FATAL, "Rotation of ALE sponge velocities is not yet implemented.")

! Transfer any existing diag_CS reference pointer
sponge%diag => sponge_in%diag
Expand Down
Loading