Skip to content

Commit

Permalink
Fix PGI runtime issue with class(*)
Browse files Browse the repository at this point in the history
- Some tests such as global_ALE_z crash under PGI (ncrc4.pgi20 or
ncrc5.pgi227) with
FATAL from PE    27: unsupported attribute type: get_variable_attribute_0d: file:INPUT/tideamp.nc- variable:GRID_X_T attribute: axis
- PGI in general has issues with class(*) construct and in this case
cannot recognize the axis argument to be a string.
- This mod helps PGI recognize that the argument is a string.
  • Loading branch information
nikizadehgfdl authored and marshallward committed Jun 12, 2023
1 parent b075794 commit cb4574b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config_src/infra/FMS2/MOM_io_infra.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1524,9 +1524,9 @@ subroutine categorize_axes(fileObj, filename, ndims, dim_names, is_x, is_y, is_t
if (variable_exists(fileobj, trim(dim_names(i)))) then
cartesian = ""
if (variable_att_exists(fileobj, trim(dim_names(i)), "cartesian_axis")) then
call get_variable_attribute(fileobj, trim(dim_names(i)), "cartesian_axis", cartesian)
call get_variable_attribute(fileobj, trim(dim_names(i)), "cartesian_axis", cartesian(1:1))
elseif (variable_att_exists(fileobj, trim(dim_names(i)), "axis")) then
call get_variable_attribute(fileobj, trim(dim_names(i)), "axis", cartesian)
call get_variable_attribute(fileobj, trim(dim_names(i)), "axis", cartesian(1:1))
endif
cartesian = adjustl(cartesian)
if ((index(cartesian, "X") == 1) .or. (index(cartesian, "x") == 1)) is_x(i) = .true.
Expand Down

0 comments on commit cb4574b

Please sign in to comment.