From 4bbe3eb9a698f3e8bce0e24cdbe00c6b2b737a82 Mon Sep 17 00:00:00 2001 From: bczernecki Date: Sun, 19 Sep 2021 12:44:49 +0200 Subject: [PATCH] cran fixes --- NEWS.md | 3 ++- R/ogimet_daily.R | 7 ++++++- README.md | 2 +- vignettes/getstarted.Rmd | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/NEWS.md b/NEWS.md index 969b340..9442862 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,7 +2,8 @@ * Adding possibility to download BUFR vertical sounding dataset from `http://weather.uwyo.edu/upperair/sounding.html`; extra information with supporting example added to the `sounding_wyoming`'s documentation * `hydro_imgw` supports now exception for current year which has no flow data until it is verified by the IMGW-PIB -* `ogimet_daily` automatically detects column names to be used for extraction in final data.frame +* `ogimet_daily` automatically detects column names to be used for extraction in final data.frame; extra debugging info when temperature or precipitation columns are missing +* minor changes in documentation (e.g. updated links to NOAA website) # climate 1.0.1 diff --git a/R/ogimet_daily.R b/R/ogimet_daily.R index 2b9fd64..a7e06a8 100644 --- a/R/ogimet_daily.R +++ b/R/ogimet_daily.R @@ -117,7 +117,12 @@ ogimet_daily = function(date = c(Sys.Date() - 30, Sys.Date()), coords = FALSE, s if (all(is.na(test[2,]))) { message("no values in column names") } else { - + + # number of columns contain weird/non-standard data (e.g. only wind speed) + if(ncol(test) <= 4){ + warning(paste0("Mandatory meteorological parameters (i.e. Temperature or precipitations) are not present. \nCheck content of the current URL:\n", + linkpl2)) + } if ((length(test[2, !is.na(test[2, ])]) == 6 & test[2, 5] == "Int.")) { diff --git a/README.md b/README.md index bc7c817..ba02c86 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ and hydrological data from publicly available repositories: - OGIMET [(ogimet.com)](http://ogimet.com/index.phtml.en) - University of Wyoming - atmospheric vertical profiling data (http://weather.uwyo.edu/upperair/) -- National Oceanic & Atmospheric Administration - Earth System Research Laboratory - Global Monitoring Division [(NOAA)](https://www.esrl.noaa.gov/gmd/ccgg/trends/) +- National Oceanic & Atmospheric Administration - Earth System Research Laboratories - Global Monitoring Laboratory [(NOAA)](https://gml.noaa.gov/ccgg/trends/) - Polish Institute of Meterology and Water Management - National Research Institute [(IMGW-PIB)](https://dane.imgw.pl/) - National Oceanic & Atmospheric Administration - National Climatic Data Center - Integrated Surface Hourly (ISH) [(NOAA)](https://www1.ncdc.noaa.gov/pub/data/noaa/) diff --git a/vignettes/getstarted.Rmd b/vignettes/getstarted.Rmd index b0c2b00..af0435b 100644 --- a/vignettes/getstarted.Rmd +++ b/vignettes/getstarted.Rmd @@ -197,7 +197,7 @@ kable(head(h2), caption = "Examplary data frame of hydrological preprocesssing." ## Acknowledgment -Ogimet.com, University of Wyoming, and Institute of Meteorology and Water Management - National Research Institute (IMGW-PIB), National Oceanic & Atmospheric Administration (NOAA) - Earth System Research Laboratory, Global Monitoring Division and Integrated Surface Hourly (NOAA ISH) are the sources of the data. +Ogimet.com, University of Wyoming, and Institute of Meteorology and Water Management - National Research Institute (IMGW-PIB), National Oceanic & Atmospheric Administration (NOAA) - Earth System Research Laboratories - Global Monitoring Laboratory, Global Monitoring Division and Integrated Surface Hourly (NOAA ISH) are the sources of the data. ## Contribution