Skip to content
/ caliver Public

caliver: CALIbration and VERification of gridded fire danger models

Notifications You must be signed in to change notification settings

ecmwf/caliver

Repository files navigation

caliver R package

CALIbration and VERification of gridded (fire risk) models

DOI Travis-CI Build Status Coverage Status

The name 'caliver' stands for CALIbration and VERification of gridded model outputs. It is an extension package developed for the R programming language and available with a APACHE-2 license from a public repository.

As the name suggests, the caliver package contains utility functions for the post-processing, calibration and validation/verification of gridded model outputs. Initial test cases include the outputs of the following forest fire models: GEFF and RISICO. However, the algorithms can be applied to any gridded model output.

Complete documentation, including a vignette, is available within the package. Contributions are welcome!

External dependencies

The installation of the caliver package depends on the Climate Data Operators (cdo), a large tool set for working on climate and NWP model data); the NCAR Command Language (ncl), an interpred language with built-in functionalities to convert hdf5 files to netcdf format; the Geospatial Data Abstraction Library (GDAL, a translator library for raster and vector geospatial data formats) and the NetCDF4 library (netcdf4).

Assuming the user has already installed R, below are the instructions to install caliver's external dependencies on various operating systems.

Windows

On Windows, follow the steps below:

  • install Rtools.
  • launch an R console and run the following commands:

MAC

Use homebrew and run the following in a terminal:

  • brew install netcdf
  • brew install hdf5
  • brew install proj
  • brew install gdal
  • brew install ncl
  • brew install udunits
  • brew install cdo

Ubuntu-Linux

Run the following in a terminal:

  • sudo apt-get install libssl-dev
  • sudo apt-get install libproj-dev
  • sudo apt-get install libgdal-dev
  • sudo apt-get install libhdf5-dev
  • sudo apt-get install libnetcdf-dev
  • sudo apt-get install netcdf-bin
  • sudo apt-get install ncl-ncarg cdo

R dependencies

The caliver package also depends on additional R packages from both CRAN and Bioconductor, here is how to install them from an R console:

# Install packages from CRAN
packs <- c("rgdal", "ncdf4", "ggplot2", "raster", "sp", "rworldmap", "httr", "stringr", "lubridate", "RCurl", "plotrix", "reshape2", "R.utils", "devtools", "proto", "roxygen2", "png", "rmarkdown", "pkgdown")
install.packages(packs)

# Install package from BIOCONDUCTOR 
source("https://bioconductor.org/biocLite.R")
biocLite("rhdf5")

# Install packages from GitHub (only needed if you intend to run unit tests)
devtools::install_github("jimhester/covr")
devtools::install_github("jimhester/lintr")
devtools::install_github("MangoTheCat/visualTest")

Get caliver's development version from github using devtools:

install.packages("devtools")
devtools::install_github("ecmwf/caliver")

Load the caliver package:

library("caliver")

Meta

  • This package and functions herein are part of an experimental open-source project. They are provided as is, without any guarantee.
  • Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
  • Please report any issues or bugs.
  • License: APACHE-2
  • Get citation information for caliver in R doing citation(package = "caliver")