@@ -64,7 +64,7 @@ function new_verticalCoordinate(metadata, var_name, rc) result(vertical_coord)
6464 class(CoordinateVariable), pointer :: coord_var
6565 character (len= :), pointer :: dim_name
6666 logical :: is_vertical_coord_var, has_pressure_units, has_height_units
67- character (len= :), allocatable :: lev_name, temp_units, formula_terms, standard_name, bounds_var, ak_name, bk_name, ps_name, source_file
67+ character (len= :), allocatable :: lev_name, temp_units, formula_terms, standard_name, long_name, bounds_var, ak_name, bk_name, ps_name, source_file
6868 type (NETCDF4_FileFormatter) :: file_formatter
6969 real , allocatable :: temp_ak(:,:), temp_bk(:,:)
7070
@@ -110,16 +110,16 @@ function new_verticalCoordinate(metadata, var_name, rc) result(vertical_coord)
110110 ! for backwards compatibility with non-cf files
111111 if ((.not. coord_var% is_attribute_present(" positive" )) .and. &
112112 (.not. has_pressure_units)) then
113- standard_name = coord_var% get_attribute_string(" standard_name " )
113+ long_name = coord_var% get_attribute_string(" long_name " )
114114 ! metadata combinations that imply integer levels
115- if ( any (standard_name == [" level " , " levels" ]) .and. &
115+ if ( any (long_name == [" level " , " levels" ]) .and. &
116116 any (temp_units == [" 1 " , " level" ])) then
117117 vertical_coord% positive = " up"
118118 if (vertical_coord% levels(1 ) >= vertical_coord% levels(2 )) then
119119 vertical_coord% positive = " down"
120120 endif
121121 else
122- _FAIL(' lev positive attribute not in file and no rule defined for setting it from standard_name and units' )
122+ _FAIL(' lev positive attribute not in file and no rule defined for setting it from long_name and units' )
123123 endif
124124 endif
125125
0 commit comments