download_ncep: Download NCEP/NCAR data

Description Usage Arguments Value Examples

View source: R/download_ncep.R

Description

Weather Data from NCEP/NCAR Reanalysis via RNCEP package

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
download_ncep(
  var = "slp",
  level = "surface",
  month_range = c(1, 12),
  year_range = c(2010, 2017),
  lat_range = c(30, 60),
  lon_range = c(-30, 10),
  dailymean = TRUE,
  hour = NULL,
  reanalysis2 = TRUE,
  save_download = TRUE,
  file_name = NULL
)

Arguments

var

slp 'sea level pressure' (default) for more variables see help of ?NCEP.gather

level

surface (default)

month_range

min,max month c(1,12) (default)

year_range

min,max year c(2010,2017) (default)

lat_range

min,max latitude c(30, 60) (default)

lon_range

min,max longitud c(-30, 10) (default)

dailymean

daily avarage of the variable retrived. Default TRUE.

hour

One hour of the following: 0,6,12 or 18.

reanalysis2

Logical. Default TRUE. variables are downloaded from the NCEP-DOE Reanalysis 2. If FALSE, data downloaded from NCEP/NCAR Reanalysis 1

save_download

Logical. Default TRUE. Do yoy want to save the downloaded data into an RDS file?

file_name

character. Provide a name for the file downloaded.

Value

a data.frame with the following variables: lon, lat, time, value

Examples

1
2
3
4
5
6
7
8
## Not run: 
#Daily mean air temperature 2m for 2017
#ta_data <- download_ncep(year_range=2017)

#Air temperature 2m at 06:00 for 2017
#ta_data_h6 <- download_ncep(year_range=2017,dailymean = FALSE,hour=6)

## End(Not run)

synoptReg documentation built on April 22, 2021, 1:06 a.m.