@@ -68,7 +68,7 @@ function new_verticalCoordinate(metadata, var_name, rc) result(vertical_coord)
6868 class(CoordinateVariable), pointer :: coord_var
6969 character (len= :), pointer :: dim_name
7070 logical :: is_vertical_coord_var, has_pressure_units, has_height_units
71- character (len= :), allocatable :: lev_name, temp_units, formula_terms, standard_name, bounds_var, ak_name, bk_name, ps_name, source_file
71+ character (len= :), allocatable :: lev_name, temp_units, formula_terms, standard_name, long_name, bounds_var, ak_name, bk_name, ps_name, source_file
7272 type (NETCDF4_FileFormatter) :: file_formatter
7373 real , allocatable :: temp_ak(:,:), temp_bk(:,:)
7474
@@ -114,16 +114,16 @@ function new_verticalCoordinate(metadata, var_name, rc) result(vertical_coord)
114114 ! for backwards compatibility with non-cf files
115115 if ((.not. coord_var% is_attribute_present(" positive" )) .and. &
116116 (.not. has_pressure_units)) then
117- standard_name = coord_var% get_attribute_string(" standard_name " )
117+ long_name = coord_var% get_attribute_string(" long_name " )
118118 ! metadata combinations that imply integer levels
119- if ( any (standard_name == [" level " , " levels" ]) .and. &
119+ if ( any (long_name == [" level " , " levels" ]) .and. &
120120 any (temp_units == [" 1 " , " level" ])) then
121121 vertical_coord% positive = " up"
122122 if (vertical_coord% levels(1 ) >= vertical_coord% levels(2 )) then
123123 vertical_coord% positive = " down"
124124 endif
125125 else
126- _FAIL(' lev positive attribute not in file and no rule defined for setting it from standard_name and units' )
126+ _FAIL(' lev positive attribute not in file and no rule defined for setting it from long_name and units' )
127127 endif
128128 endif
129129
0 commit comments