From 36a49ff138ff62bb90fce6ca958bb78cee84a498 Mon Sep 17 00:00:00 2001 From: Fabian Gans Date: Mon, 28 Oct 2024 14:32:31 +0100 Subject: [PATCH] allow uppercase date units in cf conventions (#463) --- src/DatasetAPI/Datasets.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DatasetAPI/Datasets.jl b/src/DatasetAPI/Datasets.jl index af88a1e3..95cbe90a 100644 --- a/src/DatasetAPI/Datasets.jl +++ b/src/DatasetAPI/Datasets.jl @@ -279,7 +279,7 @@ function toaxis(dimname, g, offs, len) end ar = get_var_handle(g, dimname) aratts = get_var_attrs(g, dimname) - if match(r"^(days)|(hours)|(seconds)|(months) since",get(aratts,"units","")) !== nothing + if match(r"^(days)|(hours)|(seconds)|(months) since",lowercase(get(aratts,"units",""))) !== nothing tsteps = try timedecode(ar[:], aratts["units"], lowercase(get(aratts, "calendar", "standard"))) catch