readDWD.binary {rdwd} | R Documentation |
read dwd gridded radolan binary data
Description
read gridded radolan binary data.
Intended to be called via readDWD()
.
Usage
readDWD.binary(
file,
exdir = sub(".tar.gz$", "", file),
toraster = TRUE,
quiet = rdwdquiet(),
progbar = !quiet,
selection = NULL,
...
)
Arguments
file |
Name of file on harddrive, like e.g. DWDdata/daily_radolan_historical_bin_2017_SF201712.tar.gz |
exdir |
Directory to unzip into. If existing, only the needed files
will be unpacked with |
toraster |
Logical: convert output (list of matrixes + meta informations)
to a list with dat ( |
quiet |
Suppress progress messages?
DEFAULT: FALSE through |
progbar |
Show progress bars? |
selection |
Optionally read only a subset of the ~24*31=744 files.
Called as |
... |
Further arguments passed to |
Value
list depending on argument toraster
, see there for details
Author(s)
Berry Boessenkool, berry-b@gmx.de, Dec 2018.
Significant input for the underlying dwdradar::readRadarFile()
came
from Henning Rust & Christoph Ritschel at FU Berlin.
See Also
readDWD()
, especially readDWD.radar()
https://wradlib.org for much more extensive radar analysis in Python
Kompositformatbeschreibung at https://www.dwd.de/DE/leistungen/radolan/radolan.html
for format description
Examples
## Not run: # Excluded from CRAN checks, but run in localtests
# SF file as example: ----
SF_link <- "/daily/radolan/historical/bin/2017/SF201712.tar.gz"
SF_file <- dataDWD(url=SF_link, base=gridbase, joinbf=TRUE, # 204 MB
dir=locdir(), read=FALSE)
# exdir radardir set to speed up my tests:
SF_exdir <- "C:/Users/berry/Desktop/DWDbinarySF"
if(!file.exists(SF_exdir)) SF_exdir <- tempdir()
# no need to read all 24*31=744 files, so setting selection:
SF_rad <- readDWD(SF_file, selection=1:10, exdir=SF_exdir) #with toraster=TRUE
if(length(SF_rad)!=2) stop("length(SF_rad) should be 2, but is ", length(SF_rad))
SF_radp <- plotRadar(SF_rad$dat, layer=1:3, main=SF_rad$meta$date)
plotRadar(SF_radp, layer=1, project=FALSE)
# RW file as example: ----
RW_link <- "hourly/radolan/reproc/2017_002/bin/2017/RW2017.002_201712.tar.gz"
RW_file <- dataDWD(url=RW_link, base=gridbase, joinbf=TRUE, # 25 MB
dir=locdir(), read=FALSE)
RW_exdir <- "C:/Users/berry/Desktop/DWDbinaryRW"
if(!file.exists(RW_exdir)) RW_exdir <- tempdir()
RW_rad <- readDWD(RW_file, selection=1:10, exdir=RW_exdir)
RW_radp <- plotRadar(RW_rad$dat[[1]], main=RW_rad$meta$date[1], extent="rw")
# ToDo: why are values + patterns not the same?
# list of all Files: ----
data(gridIndex)
head(grep("historical", gridIndex, value=TRUE))
## End(Not run)