Skip to content

Commit

Permalink
Renamed memory macros in MOM_ice_shelf.F90
Browse files Browse the repository at this point in the history
- The CPP redefinition of NIMEMB_SYM_ and NJMEMB_SYM_
  caused warning as reported in #226.
- I've renamed the macros used in MOM_ice_shelf.F90 to
  NILIMB_SYM_ and NJLIMB_SYM_.
- This compiles without warnings but I have no test case
  to check answers and since nobody with a test case stepped
  forward to fix this, any problems with the commit are on them.
- Closes #226.
  • Loading branch information
adcroft committed Oct 27, 2015
1 parent a33499e commit 769ab6d
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/ice_shelf/MOM_ice_shelf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ module MOM_ice_shelf
#include <MOM_memory.h>
#ifdef SYMMETRIC_LAND_ICE
# define GRID_SYM_ .true.
# define NIMEMB_SYM_ NIMEMB_SYM_
# define NJMEMB_SYM_ NJMEMB_SYM_
# define NILIMB_SYM_ NIMEMB_SYM_
# define NJLIMB_SYM_ NJMEMB_SYM_
# define ISUMSTART_INT_ CS%grid%iscB+1
# define JSUMSTART_INT_ CS%grid%jscB+1
#else
# define GRID_SYM_ .false.
# define NIMEMB_SYM_ NIMEMB_
# define NJMEMB_SYM_ NJMEMB_
# define NILIMB_SYM_ NIMEMB_
# define NJLIMB_SYM_ NJMEMB_
# define ISUMSTART_INT_ CS%grid%iscB
# define JSUMSTART_INT_ CS%grid%jscB
#endif
Expand Down Expand Up @@ -2040,7 +2040,7 @@ end subroutine ice_shelf_advect

subroutine ice_shelf_solve_outer (CS, u, v, FE, iters, time)
type(ice_shelf_CS), pointer :: CS
real, dimension(NIMEMB_SYM_,NJMEMB_SYM_), intent(inout) :: u, v
real, dimension(NILIMB_SYM_,NJLIMB_SYM_), intent(inout) :: u, v
integer, intent(in) :: FE
integer, intent(out) :: iters
type(time_type), intent(in) :: time
Expand Down Expand Up @@ -2398,8 +2398,8 @@ end subroutine ice_shelf_solve_outer

subroutine ice_shelf_solve_inner (CS, u, v, taudx, taudy, H_node, float_cond, FE, conv_flag, iters, time, Phi, Phisub)
type(ice_shelf_CS), pointer :: CS
real, dimension(NIMEMB_SYM_,NJMEMB_SYM_), intent(inout) :: u, v
real, dimension(NIMEMB_SYM_,NJMEMB_SYM_), intent(in) :: taudx, taudy, H_node
real, dimension(NILIMB_SYM_,NJLIMB_SYM_), intent(inout) :: u, v
real, dimension(NILIMB_SYM_,NJLIMB_SYM_), intent(in) :: taudx, taudy, H_node
real, dimension(:,:),intent(in) :: float_cond
integer, intent(in) :: FE
integer, intent(out) :: conv_flag, iters
Expand Down Expand Up @@ -3532,7 +3532,7 @@ end subroutine calve_to_mask
subroutine calc_shelf_driving_stress (CS, TAUD_X, TAUD_Y, OD, FE)
type(ice_shelf_CS), pointer :: CS
real, dimension(:,:), intent(in) :: OD
real, dimension(NIMEMB_SYM_,NJMEMB_SYM_), intent(inout) :: TAUD_X, TAUD_Y
real, dimension(NILIMB_SYM_,NJLIMB_SYM_), intent(inout) :: TAUD_X, TAUD_Y
integer, intent(in) :: FE

! driving stress!
Expand Down Expand Up @@ -4003,11 +4003,11 @@ end subroutine CG_action_triangular
subroutine CG_action_bilinear (uret, vret, u, v, Phi, Phisub, umask, vmask, hmask, H_node, &
nu, float_cond, D, beta, dxdyh, is, ie, js, je, dens_ratio)

real, dimension (NIMEMB_SYM_,NJMEMB_SYM_), intent (inout) :: uret, vret
real, dimension (NILIMB_SYM_,NJLIMB_SYM_), intent (inout) :: uret, vret
real, dimension (:,:,:,:), pointer :: Phi
real, dimension (:,:,:,:,:,:),pointer :: Phisub
real, dimension (NIMEMB_SYM_,NJMEMB_SYM_), intent (in) :: u, v
real, dimension (NIMEMB_SYM_,NJMEMB_SYM_), intent (in) :: umask, vmask, H_node
real, dimension (NILIMB_SYM_,NJLIMB_SYM_), intent (in) :: u, v
real, dimension (NILIMB_SYM_,NJLIMB_SYM_), intent (in) :: umask, vmask, H_node
real, dimension (:,:), intent (in) :: hmask, nu, float_cond, D, beta, dxdyh
real, intent(in) :: dens_ratio
integer, intent(in) :: is, ie, js, je
Expand Down Expand Up @@ -4404,11 +4404,11 @@ end subroutine matrix_diagonal_triangle
subroutine matrix_diagonal_bilinear(CS, float_cond, H_node, dens_ratio, Phisub, u_diagonal, v_diagonal)

type(ice_shelf_CS), pointer :: CS
real, dimension (NIMEMB_SYM_,NJMEMB_SYM_), intent(in) :: H_node
real, dimension (NILIMB_SYM_,NJLIMB_SYM_), intent(in) :: H_node
real :: dens_ratio
real, dimension (:,:), intent(in) :: float_cond
real, dimension (:,:,:,:,:,:),pointer :: Phisub
real, dimension (NIMEMB_SYM_,NJMEMB_SYM_), intent(inout) :: u_diagonal, v_diagonal
real, dimension (NILIMB_SYM_,NJLIMB_SYM_), intent(inout) :: u_diagonal, v_diagonal


! returns the diagonal entries of the matrix for a Jacobi preconditioning
Expand Down Expand Up @@ -4763,10 +4763,10 @@ subroutine apply_boundary_values_bilinear (CS, time, Phisub, H_node, float_cond,
type(time_type), intent(in) :: Time
real, dimension (:,:,:,:,:,:),pointer:: Phisub
type(ice_shelf_CS), pointer :: CS
real, dimension (NIMEMB_SYM_,NJMEMB_SYM_), intent (in) :: H_node
real, dimension (NILIMB_SYM_,NJLIMB_SYM_), intent (in) :: H_node
real, dimension (:,:), intent (in) :: float_cond
real :: dens_ratio
real, dimension (NIMEMB_SYM_,NJMEMB_SYM_), intent(inout) :: u_boundary_contr, v_boundary_contr
real, dimension (NILIMB_SYM_,NJLIMB_SYM_), intent(inout) :: u_boundary_contr, v_boundary_contr

! this will be a per-setup function. the boundary values of thickness and velocity
! (and possibly other variables) will be updated in this function
Expand Down Expand Up @@ -5023,7 +5023,7 @@ end subroutine calc_shelf_visc_triangular

subroutine calc_shelf_visc_bilinear (CS, u, v)
type(ice_shelf_CS), pointer :: CS
real, dimension(NIMEMB_SYM_,NJMEMB_SYM_), intent(inout) :: u, v
real, dimension(NILIMB_SYM_,NJLIMB_SYM_), intent(inout) :: u, v

! update DEPTH_INTEGRATED viscosity, based on horizontal strain rates - this is for triangle FEM solve so there is
! an "upper" and "lower" triangular viscosity
Expand Down Expand Up @@ -5471,7 +5471,7 @@ end subroutine update_velocity_masks
subroutine interpolate_H_to_B (CS, h_shelf, hmask, H_node)
type(ice_shelf_CS), pointer :: CS
real, dimension (:,:), intent(in) :: h_shelf, hmask
real, dimension (NIMEMB_SYM_,NJMEMB_SYM_), intent(inout) :: H_node
real, dimension (NILIMB_SYM_,NJLIMB_SYM_), intent(inout) :: H_node

type(ocean_grid_type), pointer :: G
integer :: i, j, isc, iec, jsc, jec, num_h, k, l
Expand Down

0 comments on commit 769ab6d

Please sign in to comment.