Skip to content

Commit

Permalink
Avoid an uninitialized string in categorize_axes
Browse files Browse the repository at this point in the history
Added a line initializing the string Cartesian to a blank string in categorize_axes, so that it not be uninitialized when it is used a few lines later.
  • Loading branch information
Hallberg-NOAA authored Oct 28, 2022
1 parent 02e260e commit 8040676
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions config_src/infra/FMS2/MOM_io_infra.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1570,6 +1570,7 @@ subroutine categorize_axes(fileObj, filename, ndims, dim_names, is_x, is_y, is_t
! First look for indicative variable attributes
if (.not.is_t(i)) then
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)
elseif (variable_att_exists(fileobj, trim(dim_names(i)), "axis")) then
Expand Down

0 comments on commit 8040676

Please sign in to comment.