meps: Function to read weather forecast data for the Nordic domain...

View source: R/meps.R

mepsR Documentation

Function to read weather forecast data for the Nordic domain from thredds.met.no

Description

The data are post processed forecasts or analysis based on the MetCoOp Ensemble Prediction System (MEPS). As the resolution is high both in space (1x1km) and time (1 hours), it may be necessary to limit the spatial and/or temporal scope (see input options 'it', 'lon', 'lat') as you will otherwise run out of memory.

Usage

meps(
  url = "https://thredds.met.no/thredds/catalog/metpplatest",
  type = "forecast",
  param = "slp",
  lon = c(9.5, 11.5),
  lat = c(59, 61),
  it = "latest",
  dt = 50,
  verbose = FALSE,
  plot = FALSE
)

Arguments

url

URL for the data on thredds.met.no

param

Variable name (rr = precipitation, tg = temperature)

lon

Longitude selection (=NULL reads all)

lat

Latitude selection (=NULL reads all)

it

Index time - a range of dates or years to select (e.g., it=as.Date(c("2010-01-01","2010-01-31")))

dt

Number of time steps to access at a time (default: 50). A smaller value can be set when requesting a large spatial domain as the server doesn't like to deal with large data amounts.

verbose

write out diagnostics

plot

plot the results while reading.

FUN

Function for daily aggregation. =NULL gives raw data

ncfile

netCDF file to access (path to a file or url)

path

path to ncfile (use only if ncfile doesn't contain the full path)

Value

A "zoo" "station" object with additional attributes used for further processing.

See Also

senorge, station.thredds

Examples

## Not run: 
it <- "latest"
lon <- c(-2,15)
lat <- c(55,63)
slp <- meps(param="slp", lon=lon, lat=lat, it=it, verbose=TRUE)
map(slp, FUN="mean")

## End(Not run)


metno/esd documentation built on April 29, 2024, 3:34 p.m.