rdwd (version 1.4.0)

fileType: determine DWD file type

Description

determine which subfunction to call in readDWD() from the file extension (ext). The first block is for observational data (overview), the second for gridded data (overview). Click on the type for the subfunction documentation, e.g. data for readDWD.data().

type ext notes
data .zip For regular data at dwdbase.
meta .txt For Beschreibung.txt files. For zip files containing station meta information, see readMeta().
multia [SO] [SO]: file ends with "Standort.txt". Overrides meta.
stand [SF] [SF]: file contains "standard_format". For subdaily/standard_format files.
-------
radar .gz For when the file contains a single binary file.
binary .tar.gz The common radolan format, as far as I can tell.
raster .asc.gz E.g. for seasonal data at gridbase.
nc .nc.gz For netcdf files.
asc .tar For a file containing asc files.

Usage

fileType(file)

Arguments

file

Filename(s) with extension.

Value

Character (vector)

See Also

readDWD()

Examples

Run this code
# NOT RUN {
ft <- read.table(header=TRUE, stringsAsFactors=FALSE, text="
type    filename
data    daily_kl_recent_tageswerte_KL_03987_akt.zip
stand   subdaily_standard_format_kl_10381_00_akt.txt
meta    daily_kl_recent_KL_Tageswerte_Beschreibung_Stationen.txt
multia  multi_annual_mean_81-10_Temperatur_1981-2010_aktStandort.txt

binary  daily_radolan_historical_bin_2017_SF201712.tar.gz
raster  16_DJF_grids_germany_seasonal_air_temp_mean_188216.asc.gz
nc      daily_Project_TRY_humidity_RH_199509_daymean.nc.gz
radar   radolan_recent_bin_raa01-rw_10000-1802020250-dwd---bin.gz
asc     radolan_historical_asc_2018_RW-201809.tar
")
fileType(ft$filename)

stopifnot(fileType(ft$filename)==ft$type)
fileType("random_stuff.odt")

# }

Run the code above in your browser using DataLab