The process_goes() function imports and cleans NOAA GOES-16/18
Aerosol Detection Product (ADP) NetCDF files downloaded by
download_goes(), returning a single SpatRaster object with
CRS EPSG:4326.
Usage
process_goes(
date = c("2024-01-01", "2024-01-01"),
variable = NULL,
path = NULL,
extent = NULL,
daily_agg = FALSE,
fun = "mean",
...
)Arguments
- date
character(1 or 2). Date (YYYY-MM-DD) or start and end dates.
- variable
character(1). Variable name to extract:
"Smoke"or"Dust".- path
character(1+). Directory with downloaded GOES ADP NetCDF files or a vector of full NetCDF file paths.
- extent
numeric(4) or SpatExtent. Crop extent (
xmin, xmax, ymin, ymaxin EPSG:4326). DefaultNULLloads the full raster.- daily_agg
logical(1). If
TRUE, aggregate sub-daily layers to daily values usingfun. DefaultFALSEpreserves original sub-daily layers.- fun
character(1). Aggregation function passed to
terra::tapp()(e.g."mean"or"sum"). Ignored whendaily_agg = FALSE.- ...
Placeholders.
Note
Layer names follow the convention
{variable}_{YYYYMMDD}_{HHMMSS}whendaily_agg = FALSE, e.g."Smoke_20240101_000000". Withdaily_agg = TRUE, layer names contain{variable}_{YYYYMMDD}andterra::time()is set to midnight UTC.terra::time()is set to POSIXct UTC for each layer.Files with GOES geostationary projection are reprojected to EPSG:4326.
Examples
## NOTE: Example is wrapped in `\dontrun{}` as function requires downloaded
## data files.
if (FALSE) { # \dontrun{
goes <- process_goes(
date = c("2024-01-01", "2024-01-01"),
variable = "Smoke",
path = "./data/goes/"
)
goes_daily <- process_goes(
date = c("2024-01-01", "2024-01-01"),
variable = "Smoke",
path = "./data/goes/",
daily_agg = TRUE,
fun = "mean"
)
} # }