diff --git a/CITATION.cff b/CITATION.cff index 4b6eceb6..a24457ca 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -508,18 +508,4 @@ references: year: '2024' doi: 10.32614/CRAN.package.testthat version: '>= 3.0.0' -- type: software - title: tidyterra - abstract: 'tidyterra: ''tidyverse'' Methods and ''ggplot2'' Helpers for ''terra'' - Objects' - notes: Suggests - url: https://dieghernan.github.io/tidyterra/ - repository: https://CRAN.R-project.org/package=tidyterra - authors: - - family-names: Hernangómez - given-names: Diego - email: diego.hernangomezherrero@gmail.com - orcid: https://orcid.org/0000-0001-8457-4658 - year: '2024' - doi: 10.32614/CRAN.package.tidyterra diff --git a/DESCRIPTION b/DESCRIPTION index e9a55ab8..28f45a46 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -44,12 +44,11 @@ Suggests: scales, sf (>= 0.9.0), terra, - testthat (>= 3.0.0), - tidyterra + testthat (>= 3.0.0) VignetteBuilder: knitr Config/Needs/website: cpp11, crosstalk, devtools, geofacet, geoR, gifski, - gstat, leaflet, reactable, scales, sf, tidyverse, usethis + gstat, leaflet, reactable, scales, tidyterra, tidyverse, usethis Config/testthat/edition: 3 Config/testthat/parallel: true Copyright: © AEMET. See file COPYRIGHTS diff --git a/NEWS.md b/NEWS.md index 434d0d3f..619fbe35 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,11 +4,11 @@ - `aemet_alerts()` to get current meteorological alerts issued by AEMET. - Helper function `aemet_alert_zones()` to obtain the zoning defined by AEMET for the alerts. - - `aemet_forecast_fires()` to get a `SpatRaster` with the forecasted risk + - `aemet_forecast_fires()` to get a `SpatRaster` with the forecast of risk level of wildfires. - Increase timeout limit with `httr2::req_timeout()`. - Better management of non valid/duplicated/empty API keys. -- New packages added to 'Suggest': **terra** and **tidyterra**. +- New packages added to 'Suggest': **terra**. # climaemet 1.3.0 diff --git a/R/aemet_forecast_fires.R b/R/aemet_forecast_fires.R index e56343a8..bac5275c 100644 --- a/R/aemet_forecast_fires.R +++ b/R/aemet_forecast_fires.R @@ -22,19 +22,17 @@ #' object. #' #' @details -#' The `SpatRaster` provides 5 ([numeric()])levels with the following meaning: -#' - `1`: Low risk. -#' - `2`: Moderate risk. -#' - `3`: High risk. -#' - `4`: Very high risk. -#' - `5`: Extreme risk. +#' The `SpatRaster` provides 5 ([factor()])levels with the following meaning: +#' - `"1"`: Low risk. +#' - `"2"`: Moderate risk. +#' - `"3"`: High risk. +#' - `"4"`: Very high risk. +#' - `"5"`: Extreme risk. #' #' The resulting object has several layers, each one representing the forecast #' for the upcoming 7 days. It also has additional attributes provided by the #' \CRANpkg{terra} package, such as [terra::time()] and [terra::coltab()]. #' -#' -#' #' @export #' #' @examplesIf aemet_detect_api_key() @@ -43,45 +41,22 @@ #' # Extract alerts #' alerts <- aemet_forecast_fires() #' -#' # Convert to categorical (factors) -#' library(terra) -#' alerts <- terra::as.factor(alerts) -#' #' alerts #' -#' # Nice plotting -#' library(ggplot2) -#' library(tidyterra) -#' -#' pal <- c("#00f6f6", "#00ff00", "#ffff00", "#ff7f00", "#ff0000") -#' names(pal) <- as.character(seq_len(5)) -#' -#' ggplot() + -#' geom_spatraster(data = alerts) + -#' facet_wrap(~lyr, nrow = 2) + -#' scale_fill_manual( -#' values = pal, -#' na.value = "transparent", -#' breaks = names(pal), -#' labels = c("Low", "Moderate", "High", "Very high", "Extreme") -#' ) -#' +#' # Nice plotting with terra +#' library(terra) +#' plot(alerts) #' #' # Zoom in an area #' cyl <- mapSpain::esp_get_ccaa("Castilla y Leon", epsg = 4326) #' -#' fires_cyl <- terra::crop(alerts, cyl) -#' -#' ggplot() + -#' geom_spatraster(data = fires_cyl) + -#' geom_sf(data = cyl, color = "black", linewidth = 0.5, fill = NA) + -#' facet_wrap(~lyr, nrow = 2) + -#' scale_fill_manual( -#' values = pal, -#' na.value = "transparent", -#' breaks = names(pal), -#' labels = c("Low", "Moderate", "High", "Very high", "Extreme") -#' ) +#' # SpatVector +#' cyl <- vect(cyl) +#' +#' fires_cyl <- crop(alerts, cyl) +#' plot(fires_cyl[[1]]) +#' plot(cyl, add = TRUE) +#' #' @export aemet_forecast_fires <- function(area = c("p", "c"), verbose = FALSE, extract_metadata = FALSE) { @@ -135,11 +110,27 @@ aemet_forecast_fires <- function(area = c("p", "c"), verbose = FALSE, dbase$date <- dbase$base_date + dbase$offset # Now create rasters + rrast <- terra::rast(dbase$file) - rrast <- lapply(dbase$file, terra::rast) - - rrast <- do.call("c", rrast) + # To factors and NaNs to NA rrast[is.nan(rrast)] <- NA + rrast <- terra::as.factor(rrast) + + # coltab + ctab <- data.frame(value = seq_len(5), col = c( + "#00f6f6", "#00ff00", "#ffff00", + "#ff7f00", "#ff0000" + )) + + # iter + it <- seq_len(terra::nlyr(rrast)) + + for (i in it) { + terra::coltab(rrast, layer = i) <- ctab + } + + # Time attributes + terra::time(rrast) <- dbase$date names(rrast) <- format(dbase$date, format = "%Y-%m-%d") diff --git a/README.md b/README.md index d95e2097..e8184711 100644 --- a/README.md +++ b/README.md @@ -119,22 +119,21 @@ library(climaemet) # See a tibble in action aemet_last_obs("9434") -#> # A tibble: 13 × 25 +#> # A tibble: 12 × 25 #> idema lon fint prec alt vmax vv dv lat dmax #> -#> 1 9434 -1.00 2024-08-26 04:00:00 0 249 9.8 6 296 41.7 300 -#> 2 9434 -1.00 2024-08-26 05:00:00 0 249 8 5.6 291 41.7 288 -#> 3 9434 -1.00 2024-08-26 06:00:00 0 249 8.2 5.6 297 41.7 288 -#> 4 9434 -1.00 2024-08-26 07:00:00 0 249 6.1 3.9 306 41.7 308 -#> 5 9434 -1.00 2024-08-26 08:00:00 0 249 8.3 5.4 313 41.7 305 -#> 6 9434 -1.00 2024-08-26 09:00:00 0 249 8.4 5.3 319 41.7 295 -#> 7 9434 -1.00 2024-08-26 10:00:00 0 249 8.1 5 306 41.7 325 -#> 8 9434 -1.00 2024-08-26 11:00:00 0 249 7.6 4.6 309 41.7 295 -#> 9 9434 -1.00 2024-08-26 12:00:00 0 249 7.5 3.2 307 41.7 278 -#> 10 9434 -1.00 2024-08-26 13:00:00 0 249 6 3 317 41.7 305 -#> 11 9434 -1.00 2024-08-26 14:00:00 0 249 5.7 2.4 300 41.7 293 -#> 12 9434 -1.00 2024-08-26 15:00:00 0 249 5.2 2.2 331 41.7 305 -#> 13 9434 -1.00 2024-08-26 16:00:00 0 249 4.6 1.6 295 41.7 350 +#> 1 9434 -1.00 2024-08-26 20:00:00 0 249 4 2.8 269 41.7 285 +#> 2 9434 -1.00 2024-08-26 21:00:00 0 249 4.4 2.8 285 41.7 280 +#> 3 9434 -1.00 2024-08-26 22:00:00 0 249 5.9 4.1 317 41.7 323 +#> 4 9434 -1.00 2024-08-26 23:00:00 0 249 7.8 4.2 312 41.7 238 +#> 5 9434 -1.00 2024-08-27 00:00:00 0 249 6.3 4.5 292 41.7 288 +#> 6 9434 -1.00 2024-08-27 01:00:00 0 249 6.5 4.9 284 41.7 290 +#> 7 9434 -1.00 2024-08-27 02:00:00 0 249 6.6 2.8 312 41.7 288 +#> 8 9434 -1.00 2024-08-27 03:00:00 0 249 5.2 3.5 281 41.7 288 +#> 9 9434 -1.00 2024-08-27 04:00:00 0 249 4.9 3.2 294 41.7 288 +#> 10 9434 -1.00 2024-08-27 05:00:00 0 249 5.9 2.1 307 41.7 220 +#> 11 9434 -1.00 2024-08-27 06:00:00 0 249 3.6 2 295 41.7 303 +#> 12 9434 -1.00 2024-08-27 07:00:00 0 249 3.7 2.5 310 41.7 298 #> # ℹ 15 more variables: ubi , pres , hr , stdvv , ts , #> # pres_nmar , tamin , ta , tamax , tpr , #> # stddv , inso , tss5cm , pacutp , tss20cm @@ -173,12 +172,12 @@ knitr::kable(head(data_observation)) | idema | lon | fint | prec | alt | vmax | vv | dv | lat | dmax | ubi | pres | hr | stdvv | ts | pres_nmar | tamin | ta | tamax | tpr | stddv | inso | tss5cm | pacutp | tss20cm | |:------|----------:|:--------------------|-----:|----:|-----:|----:|----:|---------:|-----:|:--------------------|------:|----:|------:|-----:|----------:|------:|-----:|------:|-----:|------:|-----:|-------:|-------:|--------:| -| 9434 | -1.004167 | 2024-08-26 04:00:00 | 0 | 249 | 9.8 | 6.0 | 296 | 41.66056 | 300 | ZARAGOZA AEROPUERTO | 990.4 | 64 | 0.9 | 18.1 | 1020.0 | 17.7 | 17.8 | 18.3 | 10.9 | 6 | 0.0 | 23.8 | 0 | 28.2 | -| 9434 | -1.004167 | 2024-08-26 05:00:00 | 0 | 249 | 8.0 | 5.6 | 291 | 41.66056 | 288 | ZARAGOZA AEROPUERTO | 990.3 | 66 | 0.6 | 17.8 | 1019.9 | 17.4 | 17.4 | 17.8 | 11.0 | 6 | 0.0 | 23.5 | 0 | 27.9 | -| 9434 | -1.004167 | 2024-08-26 06:00:00 | 0 | 249 | 8.2 | 5.6 | 297 | 41.66056 | 288 | ZARAGOZA AEROPUERTO | 990.7 | 67 | 0.6 | 17.8 | 1020.4 | 17.1 | 17.2 | 17.4 | 11.0 | 5 | 9.4 | 23.1 | 0 | 27.6 | -| 9434 | -1.004167 | 2024-08-26 07:00:00 | 0 | 249 | 6.1 | 3.9 | 306 | 41.66056 | 308 | ZARAGOZA AEROPUERTO | 991.0 | 65 | 0.4 | 20.7 | 1020.6 | 17.2 | 18.0 | 18.0 | 11.3 | 8 | 60.0 | 23.2 | 0 | 27.3 | -| 9434 | -1.004167 | 2024-08-26 08:00:00 | 0 | 249 | 8.3 | 5.4 | 313 | 41.66056 | 305 | ZARAGOZA AEROPUERTO | 990.9 | 62 | 1.1 | 20.6 | 1020.4 | 18.0 | 19.0 | 19.0 | 11.6 | 9 | 45.4 | 23.9 | 0 | 27.1 | -| 9434 | -1.004167 | 2024-08-26 09:00:00 | 0 | 249 | 8.4 | 5.3 | 319 | 41.66056 | 295 | ZARAGOZA AEROPUERTO | 991.0 | 58 | 0.8 | 24.2 | 1020.3 | 19.0 | 20.7 | 20.7 | 12.1 | 10 | 53.0 | 24.5 | 0 | 26.9 | +| 9434 | -1.004167 | 2024-08-26 20:00:00 | 0 | 249 | 4.0 | 2.8 | 269 | 41.66056 | 285 | ZARAGOZA AEROPUERTO | 986.5 | 49 | 0.2 | 26.9 | 1015.0 | 27.2 | 27.2 | 28.6 | 15.5 | 7 | 0 | 31.3 | 0 | 30.6 | +| 9434 | -1.004167 | 2024-08-26 21:00:00 | 0 | 249 | 4.4 | 2.8 | 285 | 41.66056 | 280 | ZARAGOZA AEROPUERTO | 986.8 | 49 | 0.4 | 26.3 | 1015.4 | 26.1 | 26.6 | 27.2 | 15.0 | 10 | 0 | 30.4 | 0 | 30.7 | +| 9434 | -1.004167 | 2024-08-26 22:00:00 | 0 | 249 | 5.9 | 4.1 | 317 | 41.66056 | 323 | ZARAGOZA AEROPUERTO | 986.9 | 55 | 0.6 | 24.8 | 1015.6 | 24.8 | 24.8 | 26.7 | 15.2 | 9 | 0 | 29.7 | 0 | 30.6 | +| 9434 | -1.004167 | 2024-08-26 23:00:00 | 0 | 249 | 7.8 | 4.2 | 312 | 41.66056 | 238 | ZARAGOZA AEROPUERTO | 987.0 | 61 | 0.9 | 23.4 | 1015.9 | 23.2 | 23.2 | 24.8 | 15.3 | 17 | 0 | 29.0 | 0 | 30.5 | +| 9434 | -1.004167 | 2024-08-27 00:00:00 | 0 | 249 | 6.3 | 4.5 | 292 | 41.66056 | 288 | ZARAGOZA AEROPUERTO | 987.0 | 62 | 0.5 | 22.9 | 1016.0 | 22.5 | 22.5 | 23.2 | 14.9 | 6 | 0 | 28.4 | 0 | 30.3 | +| 9434 | -1.004167 | 2024-08-27 01:00:00 | 0 | 249 | 6.5 | 4.9 | 284 | 41.66056 | 290 | ZARAGOZA AEROPUERTO | 986.8 | 63 | 0.4 | 22.4 | 1015.8 | 22.0 | 22.0 | 22.5 | 14.6 | 6 | 0 | 27.8 | 0 | 30.1 | ``` r diff --git a/codemeta.json b/codemeta.json index 0d00cbc8..19fa6be8 100644 --- a/codemeta.json +++ b/codemeta.json @@ -208,18 +208,6 @@ "url": "https://cran.r-project.org" }, "sameAs": "https://CRAN.R-project.org/package=testthat" - }, - { - "@type": "SoftwareApplication", - "identifier": "tidyterra", - "name": "tidyterra", - "provider": { - "@id": "https://cran.r-project.org", - "@type": "Organization", - "name": "Comprehensive R Archive Network (CRAN)", - "url": "https://cran.r-project.org" - }, - "sameAs": "https://CRAN.R-project.org/package=tidyterra" } ], "softwareRequirements": { @@ -375,7 +363,7 @@ }, "applicationCategory": "Meteorology", "isPartOf": "https://ropenspain.es/", - "fileSize": "1023.037KB", + "fileSize": "861.704KB", "citation": [ { "@type": "SoftwareSourceCode", diff --git a/man/aemet_forecast_fires.Rd b/man/aemet_forecast_fires.Rd index 85a5cc21..1bed796f 100644 --- a/man/aemet_forecast_fires.Rd +++ b/man/aemet_forecast_fires.Rd @@ -36,13 +36,13 @@ Get a \code{\link[terra:rast]{SpatRaster}} as provided by \CRANpkg{terra} with t daily meteorological risk level for wildfires. } \details{ -The \code{SpatRaster} provides 5 (\code{\link[=numeric]{numeric()}})levels with the following meaning: +The \code{SpatRaster} provides 5 (\code{\link[=factor]{factor()}})levels with the following meaning: \itemize{ -\item \code{1}: Low risk. -\item \code{2}: Moderate risk. -\item \code{3}: High risk. -\item \code{4}: Very high risk. -\item \code{5}: Extreme risk. +\item \code{"1"}: Low risk. +\item \code{"2"}: Moderate risk. +\item \code{"3"}: High risk. +\item \code{"4"}: Very high risk. +\item \code{"5"}: Extreme risk. } The resulting object has several layers, each one representing the forecast @@ -56,45 +56,21 @@ aemet_forecast_fires(extract_metadata = TRUE) # Extract alerts alerts <- aemet_forecast_fires() -# Convert to categorical (factors) -library(terra) -alerts <- terra::as.factor(alerts) - alerts -# Nice plotting -library(ggplot2) -library(tidyterra) - -pal <- c("#00f6f6", "#00ff00", "#ffff00", "#ff7f00", "#ff0000") -names(pal) <- as.character(seq_len(5)) - -ggplot() + - geom_spatraster(data = alerts) + - facet_wrap(~lyr, nrow = 2) + - scale_fill_manual( - values = pal, - na.value = "transparent", - breaks = names(pal), - labels = c("Low", "Moderate", "High", "Very high", "Extreme") - ) - +# Nice plotting with terra +library(terra) +plot(alerts) # Zoom in an area cyl <- mapSpain::esp_get_ccaa("Castilla y Leon", epsg = 4326) -fires_cyl <- terra::crop(alerts, cyl) +# SpatVector +cyl <- vect(cyl) -ggplot() + - geom_spatraster(data = fires_cyl) + - geom_sf(data = cyl, color = "black", linewidth = 0.5, fill = NA) + - facet_wrap(~lyr, nrow = 2) + - scale_fill_manual( - values = pal, - na.value = "transparent", - breaks = names(pal), - labels = c("Low", "Moderate", "High", "Very high", "Extreme") - ) +fires_cyl <- crop(alerts, cyl) +plot(fires_cyl[[1]]) +plot(cyl, add = TRUE) \dontshow{\}) # examplesIf} } \seealso{ diff --git a/tests/testthat/_snaps/aemet_forecast_fires.md b/tests/testthat/_snaps/aemet_forecast_fires.md new file mode 100644 index 00000000..6db52c71 --- /dev/null +++ b/tests/testthat/_snaps/aemet_forecast_fires.md @@ -0,0 +1,8 @@ +# Errors + + Code + aemet_forecast_fires("Idonotexist") + Condition + Error in `match.arg()`: + ! 'arg' should be one of "p", "c" + diff --git a/tests/testthat/test-aemet_forecast_fires.R b/tests/testthat/test-aemet_forecast_fires.R new file mode 100644 index 00000000..2eb61ca6 --- /dev/null +++ b/tests/testthat/test-aemet_forecast_fires.R @@ -0,0 +1,37 @@ +test_that("Errors", { + skip_on_cran() + skip_if_offline() + skip_if_not(aemet_detect_api_key(), message = "No API KEY") + + expect_snapshot(aemet_forecast_fires("Idonotexist"), error = TRUE) +}) + +test_that("Metadata", { + skip_on_cran() + skip_if_offline() + skip_if_not(aemet_detect_api_key(), message = "No API KEY") + + meta <- aemet_forecast_fires(extract_metadata = TRUE) + expect_s3_class(meta, "tbl") +}) + + +test_that("rasters", { + skip_on_cran() + skip_if_offline() + skip_if_not(aemet_detect_api_key(), message = "No API KEY") + + rr <- aemet_forecast_fires() + expect_s4_class(rr, "SpatRaster") + + expect_gt(terra::nlyr(rr), 5) + expect_true(all(terra::is.factor(rr))) + expect_true(all(terra::has.colors(rr))) + expect_true(terra::has.time(rr)) + + # Should be different for c + cc <- aemet_forecast_fires("c") + expect_s4_class(cc, "SpatRaster") + expect_true(terra::identical(rr, rr)) + expect_false(terra::identical(rr, cc)) +}) diff --git a/vignettes/climaemet.Rmd b/vignettes/climaemet.Rmd index 824c3662..6f77886a 100644 --- a/vignettes/climaemet.Rmd +++ b/vignettes/climaemet.Rmd @@ -87,22 +87,21 @@ See how a `tibble` is displayed: # See a tibble in action aemet_last_obs("9434") -#> # A tibble: 13 × 25 +#> # A tibble: 12 × 25 #> idema lon fint prec alt vmax vv dv lat dmax ubi pres hr #> -#> 1 9434 -1.00 2024-08-26 04:00:00 0 249 9.8 6 296 41.7 300 ZARAGOZA… 990. 64 -#> 2 9434 -1.00 2024-08-26 05:00:00 0 249 8 5.6 291 41.7 288 ZARAGOZA… 990. 66 -#> 3 9434 -1.00 2024-08-26 06:00:00 0 249 8.2 5.6 297 41.7 288 ZARAGOZA… 991. 67 -#> 4 9434 -1.00 2024-08-26 07:00:00 0 249 6.1 3.9 306 41.7 308 ZARAGOZA… 991 65 -#> 5 9434 -1.00 2024-08-26 08:00:00 0 249 8.3 5.4 313 41.7 305 ZARAGOZA… 991. 62 -#> 6 9434 -1.00 2024-08-26 09:00:00 0 249 8.4 5.3 319 41.7 295 ZARAGOZA… 991 58 -#> 7 9434 -1.00 2024-08-26 10:00:00 0 249 8.1 5 306 41.7 325 ZARAGOZA… 991. 53 -#> 8 9434 -1.00 2024-08-26 11:00:00 0 249 7.6 4.6 309 41.7 295 ZARAGOZA… 990. 50 -#> 9 9434 -1.00 2024-08-26 12:00:00 0 249 7.5 3.2 307 41.7 278 ZARAGOZA… 989. 48 -#> 10 9434 -1.00 2024-08-26 13:00:00 0 249 6 3 317 41.7 305 ZARAGOZA… 988. 46 -#> 11 9434 -1.00 2024-08-26 14:00:00 0 249 5.7 2.4 300 41.7 293 ZARAGOZA… 988. 44 -#> 12 9434 -1.00 2024-08-26 15:00:00 0 249 5.2 2.2 331 41.7 305 ZARAGOZA… 987. 43 -#> 13 9434 -1.00 2024-08-26 16:00:00 0 249 4.6 1.6 295 41.7 350 ZARAGOZA… 986. 40 +#> 1 9434 -1.00 2024-08-26 20:00:00 0 249 4 2.8 269 41.7 285 ZARAGOZA… 986. 49 +#> 2 9434 -1.00 2024-08-26 21:00:00 0 249 4.4 2.8 285 41.7 280 ZARAGOZA… 987. 49 +#> 3 9434 -1.00 2024-08-26 22:00:00 0 249 5.9 4.1 317 41.7 323 ZARAGOZA… 987. 55 +#> 4 9434 -1.00 2024-08-26 23:00:00 0 249 7.8 4.2 312 41.7 238 ZARAGOZA… 987 61 +#> 5 9434 -1.00 2024-08-27 00:00:00 0 249 6.3 4.5 292 41.7 288 ZARAGOZA… 987 62 +#> 6 9434 -1.00 2024-08-27 01:00:00 0 249 6.5 4.9 284 41.7 290 ZARAGOZA… 987. 63 +#> 7 9434 -1.00 2024-08-27 02:00:00 0 249 6.6 2.8 312 41.7 288 ZARAGOZA… 987. 62 +#> 8 9434 -1.00 2024-08-27 03:00:00 0 249 5.2 3.5 281 41.7 288 ZARAGOZA… 986. 64 +#> 9 9434 -1.00 2024-08-27 04:00:00 0 249 4.9 3.2 294 41.7 288 ZARAGOZA… 986. 65 +#> 10 9434 -1.00 2024-08-27 05:00:00 0 249 5.9 2.1 307 41.7 220 ZARAGOZA… 986. 67 +#> 11 9434 -1.00 2024-08-27 06:00:00 0 249 3.6 2 295 41.7 303 ZARAGOZA… 987. 70 +#> 12 9434 -1.00 2024-08-27 07:00:00 0 249 3.7 2.5 310 41.7 298 ZARAGOZA… 987. 67 #> # ℹ 12 more variables: stdvv , ts , pres_nmar , tamin , ta , #> # tamax , tpr , stddv , inso , tss5cm , pacutp , tss20cm ``` diff --git a/vignettes/example-gif.gif b/vignettes/example-gif.gif index e4abcba0..ac6c33b5 100644 Binary files a/vignettes/example-gif.gif and b/vignettes/example-gif.gif differ diff --git a/vignettes/extending-climaemet.Rmd b/vignettes/extending-climaemet.Rmd index df451235..d43d3fd4 100644 --- a/vignettes/extending-climaemet.Rmd +++ b/vignettes/extending-climaemet.Rmd @@ -73,52 +73,49 @@ cat(paste("---\n\n", clean, "\n---")) AGENCIA ESTATAL DE METEOROLOGÍA PREDICCIÓN GENERAL PARA ESPAÑA -DÍA 26 DE AGOSTO DE 2024 A LAS 11:27 HORA OFICIAL -PREDICCIÓN VÁLIDA PARA EL LUNES 26 +DÍA 27 DE AGOSTO DE 2024 A LAS 09:13 HORA OFICIAL +PREDICCIÓN VÁLIDA PARA EL MARTES 27 A.- FENÓMENOS SIGNIFICATIVOS -Intervalos de tramontana fuerte en litorales de Baleares y -Ampurdán, tendiendo a amainar. Chubascos localmente fuertes en -los Pirineos orientales. +No se descartan chubascos localmente fuertes en el Pirineo +oriental. Ascenso localmente notable de las máximas en el Alto +Ebro. B.- PREDICCIÓN -Tendencia a la estabilización en la Península con predominio de -cielos poco nubosos o con intervalos de nubes altas. Únicamente -en áreas mediterráneas se dará nubosidad baja, con probables -lluvias débiles en zonas de la Comunidad Valenciana, Estrecho y -Alborán, tendiendo a poco nuboso y en áreas del extremo norte -tendrán intervalos nubosos matinales. Por la tarde, crecerá -nubosidad de evolución en el centro, este y sureste peninsular, -así como en el nordeste de Cataluña y norte de Huesca, con -probabilidad de algún chubasco disperso en el Pirineo e Ibérica -orientales y sierras del sureste, sin descartar tormentas -ocasionales. Intervalos nubosos al principio en Baleares tendiendo -a poco nuboso, sin descartar del todo algún chubasco a primeras -horas en Pitiusas. En Canarias, nubosidad baja en el norte de las -islas de mayor relieve con cielos poco nubosos en el resto, con -tendencia a un aumento de la nubosidad media y alta y sin -descartar algún chubasco débil, incluso acompañado de tormenta, -en Tenerife. - -Probables bancos de niebla matinales en zonas de interior de los -tercios norte y este peninsular. No se descarta calima en el sur -peninsular, Melilla y en Canarias. - -Las máximas se recuperarán en la mitad norte e interiores del -este peninsular y descenderán en el tercio sur, Baleares y -nordeste de Cataluña. Únicamente se prevé superar los 35 grados -en áreas del cuadrante suroeste. Las mínimas en general -descenderán, con aumentos por Galicia, Cádiz y zona occidental -del centro peninsular. En Canarias predominarán los ascensos de -las máximas, más acusados en medianías. - -Soplará tramontana en Ampurdán y Baleares, con algún intervalo -fuerte al principio, y cierzo en el Ebro, tendiendo ambos a -amainar. Vientos del este y nordeste en el resto de áreas -mediterráneas, Cantábrico y cuadrante noroeste peninsular, con -algún intervalo de fuerte en litorales atlánticos gallegos, y -viendo flojo variable en el resto. En Canarias alisios moderados, -con algún intervalo fuerte. +Predominio de un tiempo estable en la Península y Baleares con +cielos poco nubosos o despejados y algunos intervalos de nubes +altas. Únicamente en el oeste de Galicia, Cantábrico oriental y +zonas del litoral de Cataluña y del interior sureste se prevé +nubosidad baja matinal, con probables brumas y bancos de niebla. +Asimismo se espera nubosidad, de forma más compacta, en el +Estrecho y Alborán, sin descartar alguna lluvia débil y dispersa +en el Estrecho y en Melilla. Por la tarde se desarrollará +nubosidad de evolución en el tercio este peninsular, así como en +montañas del sur, con probabilidad de chubascos y tormentas +ocasionales en el Pirineo e Ibérica orientales así como en las +sierras del sureste, algo más probables en el entorno de Sierra +Nevada. En Pirineos no se descarta que sean localmente fuertes. +Intervalos nubosos de tipo bajo en los nortes y de medio y alto en +el resto de Canarias, sin descartar chubascos, e incluso +tormentas, en el interior de Tenerife. Tampoco se descartan +calimas débiles en Canarias y sur peninsular. + +Las temperaturas máximas aumentarán en la mitad nordeste +peninsular y norte de Baleares, localmente notable en el Alto Ebro +y con descensos en el oeste de la Península. Se espera superar +los 35 grados en amplias zona de interior de la mitad sur +peninsular, sin descartarlos en las depresiones del nordeste y en +la meseta norte, y sin descartar tampoco llegar a los 38 en puntos +del Guadalquivir. Las mínimas aumentarán en la mitad norte, sin +grandes cambios en el resto. En Canarias, máximas en descenso y +mínimas con pocos cambios. + +Predominarán los vientos de componentes sur y este en la +vertiente mediterránea peninsular y Baleares, con tramontana +soplando al principio en Ampurdán y norte del archipiélago. +Vientos de componente este rolando a oeste en el Cantábrico, y +predominio de la componente oeste en el resto. En Canarias +soplarán alisos moderados. ---