From 5cf5c76fe55528d49feeee42b7ab78b49220a16c Mon Sep 17 00:00:00 2001 From: Ruth Comer Date: Thu, 22 Jun 2023 16:47:42 +0100 Subject: [PATCH] Avoid cftime warnings on pp-load --- lib/iris/fileformats/pp.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/iris/fileformats/pp.py b/lib/iris/fileformats/pp.py index ad0c6272ad0..65e0e16d725 100644 --- a/lib/iris/fileformats/pp.py +++ b/lib/iris/fileformats/pp.py @@ -1486,7 +1486,7 @@ def t1(self): """ if not hasattr(self, "_t1"): - has_year_zero = self.lbyr == 0 + has_year_zero = self.lbyr == 0 or None calendar = ( None if self.lbmon == 0 or self.lbdat == 0 else self.calendar ) @@ -1520,7 +1520,7 @@ def t2(self): """ if not hasattr(self, "_t2"): - has_year_zero = self.lbyrd == 0 + has_year_zero = self.lbyrd == 0 or None calendar = ( None if self.lbmond == 0 or self.lbdatd == 0 else self.calendar ) @@ -1567,7 +1567,7 @@ def t1(self): """ if not hasattr(self, "_t1"): - has_year_zero = self.lbyr == 0 + has_year_zero = self.lbyr == 0 or None calendar = ( None if self.lbmon == 0 or self.lbdat == 0 else self.calendar ) @@ -1602,7 +1602,7 @@ def t2(self): """ if not hasattr(self, "_t2"): - has_year_zero = self.lbyrd == 0 + has_year_zero = self.lbyrd == 0 or None calendar = ( None if self.lbmond == 0 or self.lbdatd == 0 else self.calendar )