Skip to content

Commit

Permalink
axis_utils: Fix get_axis_cart test with Cray
Browse files Browse the repository at this point in the history
This modification to the get_axis_cart test is a workaround for the Cray
compiler's erroneous handling of string parameter arrays.
  • Loading branch information
Jesse Lentz authored and Jesse Lentz committed Aug 29, 2024
1 parent 53c55b4 commit d850585
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions test_fms/axis_utils/test_axis_utils.F90
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,23 @@ subroutine test_get_axis_cart
character(:), allocatable :: var_name, attr_name, attr_value
integer :: i, j

character(*), parameter, dimension(*) :: &
& special_axis_names_x = [character(12) :: "lon", "x", "degrees_e", "degrees_east", "degreese"], &
& special_axis_names_y = [character(13) :: "lat", "y", "degrees_n", "degrees_north", "degreesn"], &
& special_axis_names_z = [character(6) :: "depth", "height", "z", "cm", "m", "pa", "hpa"], &
& special_axis_names_t = [character(4) :: "time", "t", "sec", "min", "hou", "day", "mon", "yea"], &
& attr_names = [character(14) :: "cartesian_axis", "axis"], &
& xyzt_uc = ["X", "Y", "Z", "T"]
character(12), dimension(*), parameter :: special_axis_names_x = &
& [character(12) :: "lon", "x", "degrees_e", "degrees_east", "degreese"]

character(13), dimension(*), parameter :: special_axis_names_y = &
& [character(13) :: "lat", "y", "degrees_n", "degrees_north", "degreesn"]

character( 6), dimension(*), parameter :: special_axis_names_z = &
& [character(6) :: "depth", "height", "z", "cm", "m", "pa", "hpa"]

character( 4), dimension(*), parameter :: special_axis_names_t = &
& [character(4) :: "time", "t", "sec", "min", "hou", "day", "mon", "yea"]

character(14), dimension(*), parameter :: attr_names = &
& [character(14) :: "cartesian_axis", "axis"]

character( 1), dimension(*), parameter :: xyzt_uc = &
& ["X", "Y", "Z", "T"]

call open_netcdf_w(test%fileobj)
call register_axis(test%fileobj, "dim1", 1)
Expand Down

0 comments on commit d850585

Please sign in to comment.