| Title: | Read Binary Radar Files from 'DWD' (German Weather Service) | 
| Version: | 0.2.10 | 
| Date: | 2023-09-27 | 
| Description: | The 'DWD' provides gridded radar data for Germany in binary format. 'dwdradar' reads these files and enables a fast conversion into numerical format. | 
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] | 
| Encoding: | UTF-8 | 
| Suggests: | testthat, terra, berryFunctions, R.utils | 
| NeedsCompilation: | yes | 
| RoxygenNote: | 7.2.3 | 
| Packaged: | 2023-09-27 12:08:08 UTC; berry | 
| Author: | Berry Boessenkool [aut, cre], Henning Rust [ctb], Christoph Ritschel [ctb] | 
| Maintainer: | Berry Boessenkool <berry-b@gmx.de> | 
| Repository: | CRAN | 
| Date/Publication: | 2023-09-27 12:40:02 UTC | 
binary to numeric
Description
Call FORTRAN routines
Usage
bin2num(dat, len, na = NA, clutter = NA, RX = FALSE)
Arguments
| dat | Binary data returned by  | 
| len | Length of data. | 
| na | Value to be set for missing data (bit 14). DEFAULT: NA | 
| clutter | Value to be set for clutter data (bit 16). DEFAULT: NA | 
| RX | Logical: call rx routine? DEFAULT: FALSE | 
Value
numerical vector
Author(s)
Berry Boessenkool, berry-b@gmx.de, May + Oct 2019
See Also
Read header part of binary DWD files
Description
Read and process header of binary radar files
Usage
readHeader(file)
Arguments
| file | Name of a single binary file | 
Value
List with original string, nchar, derived information
Author(s)
Berry Boessenkool, berry-b@gmx.de, Feb 2020
See Also
Used in readRadarFile
Examples
# See readRadarFile
read binary radolan radar file
Description
Read a single binary DWD Radolan file. To be used in rdwd,
especially for proper [1/10 mm] unit correction in rdwd::readDWD.
If any files ar not read correctly, please let me know, referencing the
Kompositformatbeschreibung at https://www.dwd.de/DE/leistungen/radolan/radolan.html.
The meta-info is extracted with readHeader (not exported, but documented).
Binary bits are converted to decimal numbers with Fortran routines, see
https://github.com/brry/dwdradar/tree/master/src.
They are called via bin2num (not exported, but documented).
Usage
readRadarFile(binfile, na = NA, clutter = NA)
Arguments
| binfile | Name of a single binary file | 
| na | Value to be set for missing data (bit 14). DEFAULT: NA | 
| clutter | Value to be set for clutter data (bit 16). DEFAULT: NA | 
Value
Invisible list with dat (matrix) and meta
(list with elements from header, see Kompositformatbeschreibung).
Author(s)
Maintained by Berry Boessenkool, berry-b@gmx.de, May + Oct 2019.
Original codebase by Henning Rust & Christoph Ritschel at FU Berlin
See Also
real-world usage in rdwd: https://bookdown.org/brry/rdwd/raster-data.html
Examples
f <- system.file("extdata/raa01_sf_2019-10-14_1950", package="dwdradar")
out <- readRadarFile(f)
out$meta
if(requireNamespace("terra", quietly=TRUE))
  terra::plot(terra::rast(out$dat))
# for more files, see the tests.
# for real-world usage, readDWD.binary / readDWD.radar in the rdwd package