Skip to content

Commit

Permalink
Merge pull request #1121 from ocefpaf/fix_cf-units_deprecation
Browse files Browse the repository at this point in the history
.is_long_time_interval() is deprecated and will be removed
  • Loading branch information
ocefpaf authored Nov 13, 2024
2 parents aea7af5 + 066a826 commit cf12cf4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions compliance_checker/cf/cf_1_6.py
Original file line number Diff line number Diff line change
Expand Up @@ -1864,8 +1864,7 @@ def check_time_coordinate(self, ds):
ret_val.append(result)
# IMPLEMENTATION CONFORMANCE 4.4 RECOMMENDED 2/2
# catch non-recommended months or years time interval
unit = Unit(variable.units)
if unit.is_long_time_interval():
if any(unit in variable.units for unit in ("months", "years")):
message = f"Using relative time interval of months or years is not recommended for coordinate variable {variable.name}"
result = Result(
BaseCheck.MEDIUM,
Expand Down

0 comments on commit cf12cf4

Please sign in to comment.