From 066a8268d440f83810df042e3686493532a6b012 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Wed, 13 Nov 2024 10:28:00 +0100 Subject: [PATCH] .is_long_time_interval() is deprecated and will be removed --- compliance_checker/cf/cf_1_6.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compliance_checker/cf/cf_1_6.py b/compliance_checker/cf/cf_1_6.py index 3979777e..c77d5ea4 100644 --- a/compliance_checker/cf/cf_1_6.py +++ b/compliance_checker/cf/cf_1_6.py @@ -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,