Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- ESMA_cmake v4.37.0
- Add `Coverage` CMake build type
- Update CTest configuration for Coverage tests
- Changed standard_name to long_name in handling of non-CF dimensionless vertical coordinate in ExtData2G

### Removed

Expand Down
8 changes: 4 additions & 4 deletions vertical/VerticalCoordinate.F90
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function new_verticalCoordinate(metadata, var_name, rc) result(vertical_coord)
class(CoordinateVariable), pointer :: coord_var
character(len=:), pointer :: dim_name
logical :: is_vertical_coord_var, has_pressure_units, has_height_units
character(len=:), allocatable :: lev_name, temp_units, formula_terms, standard_name, bounds_var, ak_name, bk_name, ps_name, source_file
character(len=:), allocatable :: lev_name, temp_units, formula_terms, standard_name, long_name, bounds_var, ak_name, bk_name, ps_name, source_file
type(NETCDF4_FileFormatter) :: file_formatter
real, allocatable :: temp_ak(:,:), temp_bk(:,:)

Expand Down Expand Up @@ -110,16 +110,16 @@ function new_verticalCoordinate(metadata, var_name, rc) result(vertical_coord)
! for backwards compatibility with non-cf files
if ((.not. coord_var%is_attribute_present("positive")) .and. &
(.not. has_pressure_units)) then
standard_name = coord_var%get_attribute_string("standard_name")
long_name = coord_var%get_attribute_string("long_name")
! metadata combinations that imply integer levels
if ( any(standard_name == ["level ", "levels"]) .and. &
if ( any(long_name == ["level ", "levels"]) .and. &
any(temp_units == ["1 ", "level"])) then
vertical_coord%positive = "up"
if (vertical_coord%levels(1) >= vertical_coord%levels(2)) then
vertical_coord%positive = "down"
endif
else
_FAIL('lev positive attribute not in file and no rule defined for setting it from standard_name and units')
_FAIL('lev positive attribute not in file and no rule defined for setting it from long_name and units')
endif
endif

Expand Down
Loading