-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsummarise_raster.Rd
41 lines (35 loc) · 1.29 KB
/
summarise_raster.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summmarise_raster.R
\name{summarise_raster}
\alias{summarise_raster}
\title{Summarise rasters to year}
\usage{
summarise_raster(input, index, fun, cores = 1, na.rm = TRUE, overwrite)
}
\arguments{
\item{input}{Input raster data.}
\item{index}{options for time, see above}
\item{fun}{summarise function see above)}
\item{cores}{number of cores, see tapp() for details}
\item{na.rm}{see tapp() for details}
\item{overwrite}{logical. If TRUE, filename is overwritten}
}
\value{
summarise raster
}
\description{
wrapper for tapp()
Input rast requires time format (as.Date())
Options for index are time periods:
"years", "months", "yearmonths", "dekads", "yeardekads", "weeks" (the ISO 8601 week number, see tapp() for Details),
"yearweeks", "days", "doy" (day of the year), "7days" (seven-day periods starting at Jan 1 of each year), "10days", or "15days"
Fun as min, max, mean etc.
}
\examples{
\dontrun{
noaa_dhw_file <- "https://pae-paha.pacioos.hawaii.edu/erddap/griddap/dhw_5km.nc?CRW_SST\%5B(2024-12-20T12:00:00Z):1:(2024-12-25T12:00:00Z)\%5D\%5B(-8.9):1:(-25)\%5D\%5B(141):1:(153.5)\%5D"
noaa_dhw_raster <- rast(noaa_dhw_file) |> flip() |> project("EPSG:4283")
tmp <- summarise_raster(noaa_dhw_raster, index="years", fun="min")
tmp
}
}