From 593898cdc63d85fbac8a0cfbd0e958f6db069c66 Mon Sep 17 00:00:00 2001 From: aho Date: Wed, 16 Feb 2022 10:43:57 +0100 Subject: [PATCH 1/2] Cancel the ignorance of the tests --- .Rbuildignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.Rbuildignore b/.Rbuildignore index b320a05..90018c7 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -6,7 +6,7 @@ ^README\.md$ #\..*\.RData$ #^vignettes$ -^tests$ +#^tests$ ^inst/doc$ #^inst/doc/*$ #^inst/doc/figures/$ -- GitLab From ad6ca99fe5271709c80f13cee4d9774f901674fd Mon Sep 17 00:00:00 2001 From: aho Date: Wed, 16 Feb 2022 10:44:29 +0100 Subject: [PATCH 2/2] Add name = 'time' as unit adjustment condition --- R/NcDataReader.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/NcDataReader.R b/R/NcDataReader.R index ebc58fc..fb61ef8 100644 --- a/R/NcDataReader.R +++ b/R/NcDataReader.R @@ -183,7 +183,7 @@ NcDataReader <- function(file_path = NULL, file_object = NULL, } }) - if (length(names(attr(result, 'variables'))) == 1) { + if (length(names(attr(result, 'variables'))) == 1 & all(names(attr(result, 'variables')) == 'time')) { var_name <- names(attr(result, 'variables')) units <- attr(result, 'variables')[[var_name]][['units']] -- GitLab