During the Aeroecology course we will be using the R-package bioRad, a collection of tools to analyze and visualize biological signals in weather radar data.

Please take some time to install the software before the practicals

We recommend upgrading to a recent version of R (latest version is 4.4.1, found at https://www.r-project.org/) and using Rstudio as a graphical user interface.

Installation on Windows and Mac OSX systems:

Step 1: install bioRad

# Step 1a: enable both the CRAN and bioconductor repositories:
setRepositories(ind=1:2)
# Step 1b: install all of bioRad's dependencies:
install.packages("bioRad", dependencies=TRUE)

Step 2: download mistnet libraries and model

The bioRad installation of the previous step should have installed the vol2birdR package, which is an important dependency package for bioRad. Next, we need to run a few vol2birdR commands to enable MistNet (expect a ~ 150 Mb download), a model you can use to screen out precipitation from radar scans:

vol2birdR::install_mistnet()

Next, we download the MistNet model into vol2birdR (expect >500 Mb download, this step can take a while when you have a slow internet connection)

vol2birdR::install_mistnet_model()

Step 3: load bioRad

You should now be able to load bioRad. The welcome message should mention version 0.8.1, and MistNet installed.

# load bioRad:
library(bioRad)

# expected message:
#> Welcome to bioRad version 0.8.1
#> using vol2birdR version 1.0.3 (MistNet installed)

Step 4: do a test run

# Locate and read the polar volume example file included with bioRad
pvolfile_source <- system.file("extdata", "volume.h5", package = "bioRad")
     
# Copy the file to a temporary directory with read/write permissions
pvolfile <- paste0(tempdir(),"/volume.h5")
file.copy(pvolfile_source, pvolfile)
     
# Calculate a vertical profile
# (You can ignore the 'pj_obj_create: Cannot find proj.db' message, which is harmless)
vp <- calculate_vp(pvolfile, mistnet = TRUE)
     
# Get summary info
vp

# Verify the following information is printed to screen:
# > vp
#                Vertical profile (class vp)
# 
#        radar:  seang 
#       source:  WMO:02606,RAD:SE50,PLC:Angelholm,NOD:seang,ORG:82,CTY:643,CMT:Swedish radar 
# nominal time:  2015-10-18 18:00:00 
   
# Clean up
file.remove(pvolfile)

Installation on Linux systems:

Step 0: install system libraries:

We first need to install several system libraries that are used by vol2birdR package, which will be installed as part of bioRad.

On Debian-based systems (including Ubuntu), run in a terminal:

# libraries required for vol2birdR:
sudo apt-get install libhdf5-dev libproj-dev gsl-bin libgsl-dev pkg-config libbz2-dev
# libraries required for other dependency packages:
sudo apt-get install libcurl4-openssl-dev libssl-dev libgdal-dev

On other Linux systems supporting yum and RPMs, run in a terminal:

sudo yum install hdf5-devel proj-devel gsl gsl-devel pkgconfig

Step 1-4: see Windows/Mac instructions above

Please follow the same steps 1-4 for Windows/Mac systems