obpg_fetch: Fetch a single OBPG raster

Description Usage Arguments Value

View source: R/nc.R

Description

Fetch a single OBPG raster

Usage

1
2
3
4
5
6
7
8
obpg_fetch(
  x,
  nav,
  outpath = NA,
  overwrite = TRUE,
  fmt = "GTiff",
  try_nrt = TRUE
)

Arguments

x

ncdf4 object or URL. If an ncdf4 object, then it will be left open so be sure to close it when you are done.

nav

list as returned by obpg_nc_nav

outpath

character or NA to prevent file writing. If provided, the actually path written to will be <path>/YYYY/mmdd/filename

overwrite

logical, see raster

fmt

character either 'raster' or 'GTiff' (default)

try_nrt

logical, if TRUE and the connection fails, then try again after modifying the url to ".NRT.nc" instead of ".nc"

Value

a raster layer or NULL


BigelowLab/ohwobpg documentation built on Aug. 11, 2020, 11:51 p.m.