Home

Awesome

meteoForecast

img img img

meteoForecast is a package to access outputs from Numerical Weather Prediction models both in raster format and as a time series for a location. The current version works with these services:

img

New services will be added gradually, using this collection of meteorological data sources as reference.

This package has been developed in the framework of the European Project PVCROPS.

Installation

The development version is available at GitHub:

## install.packages("remotes")
remotes::install_github("oscarperpinan/meteoForecast")

The stable version is available at CRAN:

install.packages('meteoForecast')

Usage

library(meteoForecast)

grepVar will help you to find the variable you need. If no day is defined, it will return the variables available in the current version of the service.

grepVar('cloud', service = 'gfs')

[1] "Cloud_water_entire_atmosphere_single_layer"
[2] "Cloud_mixing_ratio_isobaric"               

However, you may be interested in the variables available in previous versions. It that is the case, choose a certain day to get this information:

grepVar('cloud', service = 'meteogalicia', day = as.Date('2016-09-15'))

[1] "cft" "cfm" "cfl" "cfh"

You can use the empty string to retrieve the full list of variables provided by the service.

grepVar("", service = 'meteogalicia', complete = TRUE)

Services

Each function admits an argument named service to choose the service. After loading meteoForecast the default service is Meteogalicia as reported with:

mfService()

[1] "meteogalicia"

You can choose a different service (for the running session) using mfService with the name of the service.

mfService('gfs')

Option service changed to gfs

mfService('meteogalicia')

Option service changed to meteogalicia

Basic information about services

Raster Data

img

img

Point Data

getPoint, getPointDays, and getPointRuns get data for a certain location and produce a time series using the zoo class.

img

img

img

## variability around the average
radAv <- rowMeans(radRuns)
radVar <- sweep(radRuns, 1, radAv)
xyplot(radVar, superpose = TRUE)

img