Skip to content

Commit

Permalink
Reorder arguments in FMS_cap functions
Browse files Browse the repository at this point in the history
Some functions in the FMS cap used arguments which depended on other
arguments, which were declared out of order.

* ocean_model_data2D_get
* ocean_model_get_UV_surf

This patch moves the array index size definitions before the array
definitions.

This is required for language standard compliance.
  • Loading branch information
marshallward committed Sep 17, 2024
1 parent e05cc01 commit b67e93a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config_src/drivers/FMS_cap/ocean_model_MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1065,10 +1065,10 @@ subroutine ocean_model_data2D_get(OS, Ocean, name, array2D, isc, jsc)
type(ocean_public_type), intent(in) :: Ocean !< A structure containing various publicly
!! visible ocean surface fields.
character(len=*) , intent(in) :: name !< The name of the field to extract
real, dimension(isc:,jsc:), intent(out):: array2D !< The values of the named field, it must
!! cover only the computational domain [various]
integer , intent(in) :: isc !< The starting i-index of array2D
integer , intent(in) :: jsc !< The starting j-index of array2D
real, dimension(isc:,jsc:), intent(out):: array2D !< The values of the named field, it must
!! cover only the computational domain [various]

integer :: g_isc, g_iec, g_jsc, g_jec, g_isd, g_ied, g_jsd, g_jed, i, j

Expand Down Expand Up @@ -1188,10 +1188,10 @@ subroutine ocean_model_get_UV_surf(OS, Ocean, name, array2D, isc, jsc)
type(ocean_public_type), intent(in) :: Ocean !< A structure containing various publicly
!! visible ocean surface fields.
character(len=*) , intent(in) :: name !< The name of the current (ua or va) to extract
real, dimension(isc:,jsc:), intent(out):: array2D !< The values of the named field, it must
!! cover only the computational domain [L T-1 ~> m s-1]
integer , intent(in) :: isc !< The starting i-index of array2D
integer , intent(in) :: jsc !< The starting j-index of array2D
real, dimension(isc:,jsc:), intent(out):: array2D !< The values of the named field, it must
!! cover only the computational domain [L T-1 ~> m s-1]

type(ocean_grid_type) , pointer :: G !< The ocean's grid structure
type(surface), pointer :: sfc_state !< A structure containing fields that
Expand Down

0 comments on commit b67e93a

Please sign in to comment.