14 - use case: monthy gridded data

From the monthly folder at gridbase, we want to download .asc.gz files for selected years and open them in R for further processing.

data("gridIndex")
index <- grep("monthly/precipitation", gridIndex, value=TRUE) # 1'709
index <- grep('2014|2015|2016',index, value=TRUE) # n=36 (3*12)

precip <- dataDWD(index[6:8], base=gridbase, joinbf=TRUE)

For .asc.gz files, readDWD calls readDWD.raster. This runs faster if called a second time due to skip=TRUE in gunzip.
Now we can project and visualize with:

plotRadar(precip[[1]], proj="seasonal", extent=NULL, main=names(precip)[1])

For further processing, we can create a terra raster from the list, which e.g. enables fast and easy indexing.

precip <- terra::rast(precip)

This is expanded upon in the next use case.

A few projection references:

The Beschreibung file leads to https://spatialreference.org/ref/epsg/31467/ which is used internally in projectRasterDWD, currently at line 70.