From 5635e7ab213b8306313afe6cfa8b02d054b636b1 Mon Sep 17 00:00:00 2001 From: aho Date: Thu, 25 Feb 2021 20:05:51 +0100 Subject: [PATCH] Fix the calendar retrieving line to consider synonims. --- R/NcDataReader.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/NcDataReader.R b/R/NcDataReader.R index 72abc09..741ffbb 100644 --- a/R/NcDataReader.R +++ b/R/NcDataReader.R @@ -198,7 +198,7 @@ NcDataReader <- function(file_path = NULL, file_object = NULL, } else if (grepl(' since ', units)) { # Find the calendar - calendar <- attr(result, 'variables')$time$calendar + calendar <- attr(result, 'variables')[[var_name]]$calendar if (calendar == 'standard') calendar <- 'gregorian' parts <- strsplit(units, ' since ')[[1]] -- GitLab