forked from NOAA-GFDL/FMS
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
@thomas-robinson MOM outputs their diagnostic time variable as "Time", rather than "time", leading to a 'variable does not exist' error in diag_write_time after the axis is registered to the file.
The following solution checks the file for the variable called "Time" with the new fms variable_exists function, and sets name_time accordingly if the result is true. This permits the simple ocean-only test case to run to completion:
!> Get the name of the time variable
if (present(time_name)) then
allocate(character(len=len(time_name)) :: name_time)
name_time = time_name
elseif (variable_exists(fileob,"Time")) then
allocate(character(len=4) :: name_time)
name_time = "Time"
else
allocate(character(len=4) :: name_time)
name_time = "time"
endif
Unless CF guidelines specify string case for axis names, the next iteration of diag_manager should use fms utilities to check for variables and attributes registered to file if necessary before writing data rather than assuming a default name.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels