From 24dc3ddaf0340d4b4f0cb47604ae4b4104405db7 Mon Sep 17 00:00:00 2001 From: Michael Sumner Date: Tue, 24 Sep 2024 18:50:31 +1000 Subject: [PATCH] drop oldformat --- DESCRIPTION | 2 +- NEWS.md | 3 +++ R/altimetry-files.R | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index af0c338..c23642c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: raadfiles Title: File Database Management for 'raadtools' -Version: 0.1.4.9009 +Version: 0.1.4.9010 Authors@R: c(person("Michael D.","Sumner", role = c("aut", "cre"), email = "michael.sumner@aad.gov.au"), person("Ben", "Raymond", role = "ctb"), person("Kimberlee", "Baldry", role = c("ctb"), comment = c(ORCID = "0000-0003-3286-8624"))) diff --git a/NEWS.md b/NEWS.md index 961b224..8fede22 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,8 @@ # raadfiles dev +* Avoid oldformat in Copernicus altimetry files. + + * New function `gebco23_files()` for our local copy. * `srtm_files()` now defunct, use opentopography or similar (one example is in gh:hypertidy/sds::cop30()). diff --git a/R/altimetry-files.R b/R/altimetry-files.R index 8ce6459..d8bfe90 100644 --- a/R/altimetry-files.R +++ b/R/altimetry-files.R @@ -86,6 +86,10 @@ altimetry_daily_files <- function(all = FALSE) { } else { files <- files[!is.na(files$date), ] } + bad <- grepl("oldformat", files$fullname) + if (any(bad) && !all) { + files <- files[!bad, ] + } if (!all) { files <- dplyr::arrange(dplyr::distinct(files, .data$date, .keep_all = TRUE), .data$date) } else {