From ad214d60c27c4aae67ef98fad1190c90a3b1bbac Mon Sep 17 00:00:00 2001 From: orichters Date: Wed, 5 Feb 2025 13:34:59 +0100 Subject: [PATCH] find MAgPIE logs also if folder is ../magpie/ --- .buildlibrary | 2 +- CITATION.cff | 4 ++-- DESCRIPTION | 4 ++-- R/getRunStatus.R | 1 + README.md | 8 ++++---- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index aeae73d..80a7fc7 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '4484084' +ValidationKey: '4507776' AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' - 'Warning: namespace ''.*'' is not available and has been replaced' diff --git a/CITATION.cff b/CITATION.cff index f7dd742..8744b5e 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -2,8 +2,8 @@ cff-version: 1.2.0 message: If you use this software, please cite it using the metadata from this file. type: software title: 'modelstats: Run Analysis Tools' -version: 0.22.3 -date-released: '2025-01-20' +version: 0.22.4 +date-released: '2025-02-05' abstract: A collection of tools to analyze model runs. authors: - family-names: Giannousakis diff --git a/DESCRIPTION b/DESCRIPTION index ca33a25..63ef525 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: modelstats Type: Package Title: Run Analysis Tools -Version: 0.22.3 -Date: 2025-01-20 +Version: 0.22.4 +Date: 2025-02-05 Authors@R: c( person("Anastasis", "Giannousakis", email = "giannou@pik-potsdam.de", role = c("aut","cre")), person("Oliver", "Richters", role = "aut") diff --git a/R/getRunStatus.R b/R/getRunStatus.R index 93e7c8e..c4d3080 100644 --- a/R/getRunStatus.R +++ b/R/getRunStatus.R @@ -216,6 +216,7 @@ getRunStatus <- function(mydir = dir(), sort = "nf", user = NULL) { endmag <- suppressWarnings(system(paste0("tac ", logmagtxt, " | grep -m 1 'MAgPIE output was stored'"), intern = TRUE)) if (length(startmag) > length(endmag)) { fulllogmag <- gsub("-rem-", "-mag-", gsub("output", file.path("magpie", "output"), fulllog)) + if (! file.exists(fulllogmag)) fulllogmag <- gsub("-rem-", "-mag-", gsub("output", file.path("..", "magpie", "output"), fulllog)) loopmag <- NULL if (file.exists(fulllogmag)) { suppressWarnings(try(loopmag <- sub("^.*.= ", "", system(paste0("grep 'LOOPS' ", fulllogmag, " | tail -1"), intern = TRUE)), silent = TRUE)) diff --git a/README.md b/README.md index abca069..da20ba4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Run Analysis Tools -R package **modelstats**, version **0.22.3** +R package **modelstats**, version **0.22.4** [![CRAN status](https://www.r-pkg.org/badges/version/modelstats)](https://cran.r-project.org/package=modelstats) [![R build status](https://github.com/pik-piam/modelstats/workflows/check/badge.svg)](https://github.com/pik-piam/modelstats/actions) [![codecov](https://codecov.io/gh/pik-piam/modelstats/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/modelstats) [![r-universe](https://pik-piam.r-universe.dev/badges/modelstats)](https://pik-piam.r-universe.dev/builds) @@ -47,7 +47,7 @@ In case of questions / problems please contact Anastasis Giannousakis . +Giannousakis A, Richters O (2025). "modelstats: Run Analysis Tools." Version: 0.22.4, . A BibTeX entry for LaTeX users is @@ -55,9 +55,9 @@ A BibTeX entry for LaTeX users is @Misc{, title = {modelstats: Run Analysis Tools}, author = {Anastasis Giannousakis and Oliver Richters}, - date = {2025-01-20}, + date = {2025-02-05}, year = {2025}, url = {https://github.com/pik-piam/modelstats}, - note = {Version: 0.22.3}, + note = {Version: 0.22.4}, } ```