/harp-20220607

Forked version of harp before Andrew introduces his refactoring changes

OtherNOASSERTION

harp

{harp} is a meta-package that attaches functionality from the {harpIO}, {harpPoint}, {harpVis} and {harpSpatial} packages to your session.

Installation

if (!require("remotes")) {
  install.packages("remotes")
}
remotes::install_github("harphub/harp")

Installing on ecgate

Before installing on ecgate you need to load the proj4 and R modules before starting R and executing the above:

module load proj4
module load R

System libraries

The {harpIO} and {harpSpatial} packages use the {meteogrid} package for interpolation and the geogrid class for storing gridded data. This package makes use of the PROJ4 library for handling projections. If you do not have PROJ4 installed you can install with:

sudo apt-get install libproj-dev

If you do not have sudo rights, try installing a user local version, or speak to your system administrator.

If you have the PROJ4 libraries installed in a standard location (e.g. /usr/local) {meteogrid} will install without problems. However, if the PROJ4 libraries are in a non standard location, you need to tell the install function where they are:

remotes::install_github(
  "harphub/harpIO",
  configure.args = c(
    meteogrid = "--with-proj=/path/to/proj"
  )
)

Alternatively you can set environment variables

export PROJ4_DIR=/path/to/proj

If you include these environment variables in your .bashrc file, or equivalent, you won’t need to worry about it when you wish to install an update to meteogrid.

Or you can set compiler and linker options in the file $HOME/.R/Makevars

CPPFLAGS=-I/path/to/proj/include
LDFLAGS=-L/path/to/proj/lib -Wl,-rpath,/path/to/proj/lib

In this case you only have to set them once and not worry about it when you wish to install an update to {meteogrid}.

When setting environment variables or creating a Makevars file, R must be restarted for the changes to take effect before running remotes::install_github("harphub/harp").

Workflows

The purpose of this website is to demonstrate common workflows, such as point and spatial verification, score card generation, and data analysis using the {harp} packages.

harp book

An online book that collects together tutorials on how to use harp is currently being worked on. Feel free to make suggestions, or to contribute by filing issues or pull requests here