From 6379c26bfb714f21eaa62df944e8509b60b82f99 Mon Sep 17 00:00:00 2001 From: Angus Gibson Date: Thu, 13 Apr 2017 10:50:40 -0400 Subject: [PATCH] Fix GNU build error Commit aecb9989 ("Fixes perfect restart issue in the ICE_SHELF module", 2017-04-07) introduced calls to `pass_var()` within a subroutine whose `ocean_grid_type` structure was `intent(in)`. Most compilers seem to be happy with this, but certain versions of gfortran would fail with the following error: call pass_var(CS%area_shelf_h, G%domain) 1 Error: Procedure argument at (1) is INTENT(IN) while interface specifies INTENT(INOUT) Changing the argument to `intent(inout)` fixes this. --- src/ice_shelf/MOM_ice_shelf.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ice_shelf/MOM_ice_shelf.F90 b/src/ice_shelf/MOM_ice_shelf.F90 index ff782de4bd..5ab0383412 100644 --- a/src/ice_shelf/MOM_ice_shelf.F90 +++ b/src/ice_shelf/MOM_ice_shelf.F90 @@ -2063,7 +2063,7 @@ end subroutine initialize_shelf_mass !> Updates the ice shelf mass using data from a file. subroutine update_shelf_mass(G, CS, Time, fluxes) - type(ocean_grid_type), intent(in) :: G + type(ocean_grid_type), intent(inout) :: G type(ice_shelf_CS), pointer :: CS type(time_type), intent(in) :: Time type(forcing), intent(inout) :: fluxes