From 79a8fe2aa515e8b5dd9ac2fdb334ae096daf2695 Mon Sep 17 00:00:00 2001 From: Marshall Ward Date: Wed, 16 Oct 2019 11:00:17 -0400 Subject: [PATCH] Ice shelf and barotropic rescale variable init Some index bounds in the ice shelf code were not initialized to the grid values. This patch sets those values. The vel_rescale parameter used in barotropic_init was also absent from one block of code, and has been added. (This is probably a temporary variable that will be phased out as dimensional scaling progresses.) Presumably none of this code was being run, because it would have normally caused severe problems. --- src/core/MOM_barotropic.F90 | 1 + src/ice_shelf/MOM_ice_shelf_dynamics.F90 | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/core/MOM_barotropic.F90 b/src/core/MOM_barotropic.F90 index 7984fa97ce..5f97f5933a 100644 --- a/src/core/MOM_barotropic.F90 +++ b/src/core/MOM_barotropic.F90 @@ -4310,6 +4310,7 @@ subroutine barotropic_init(u, v, h, eta, Time, G, GV, US, param_file, diag, CS, enddo ; enddo ; enddo elseif ((US%s_to_T_restart*US%m_to_L_restart /= 0.0) .and. & (US%m_to_L*US%s_to_T_restart) /= (US%m_to_L_restart*US%s_to_T)) then + vel_rescale = (US%m_to_L*US%s_to_T_restart) / (US%m_to_L_restart*US%s_to_T) do j=js,je ; do I=is-1,ie ; CS%ubtav(I,j) = vel_rescale * CS%ubtav(I,j) ; enddo ; enddo do J=js-1,je ; do i=is,ie ; CS%vbtav(i,J) = vel_rescale * CS%vbtav(I,j) ; enddo ; enddo endif diff --git a/src/ice_shelf/MOM_ice_shelf_dynamics.F90 b/src/ice_shelf/MOM_ice_shelf_dynamics.F90 index 5e53c09923..80f2d8f60f 100644 --- a/src/ice_shelf/MOM_ice_shelf_dynamics.F90 +++ b/src/ice_shelf/MOM_ice_shelf_dynamics.F90 @@ -287,6 +287,9 @@ subroutine initialize_ice_shelf_dyn(param_file, Time, ISS, CS, G, US, diag, new_ logical :: debug integer :: i, j, is, ie, js, je, isd, ied, jsd, jed, Isdq, Iedq, Jsdq, Jedq, iters + Isdq = G%isdB ; Iedq = G%iedB ; Jsdq = G%jsdB ; Jedq = G%jedB + isd = G%isd ; ied = G%ied ; jsd = G%jsd ; jed = G%jed + if (.not.associated(CS)) then call MOM_error(FATAL, "MOM_ice_shelf_dyn.F90, initialize_ice_shelf_dyn: "// & "called with an associated control structure.")