PSM.get: Get NREL PSM version 3 data

Description Usage Arguments Details Value Author(s) References

View source: R/PSM.r

Description

Use API to download NREL Physical Solar Model (PSM) version 3 data in .csv format.

Usage

1
2
PSM.get(lon, lat, api.key, attributes, name, affiliation, year, leap.year,
interval, utc, reason.for.use, email, mailing.list, directory = "data-raw")

Arguments

lon

a number or a numeric array, longitude of the location(s) for downloading

lat

a number or a numeric array, latitude of the location(s) for downloading

api.key

the API key as a character string, can be obtained at https://developer.nrel.gov/signup/

attributes

the parameters to be downloaded, options are: "air_temperature", "clearsky_dhi", "clearsky_dni", "clearsky_ghi", "cloud_type", "dew_point", "dhi", "dni", "fill_flag", "ghi", "relative_humidity", "solar_zenith_angle", "surface_albedo", "surface_pressure", "total_precipitable_water", "wind_direction", "wind_speed". This argument should be passed in as a character string. If more than one, separate them using comma without spaces.

name

your name as a character string, e.g., "John+Smith". Spaces need to be replace with the + sign

affiliation

your affiliation as a character string, e.g., "National+Renewable+Energy+Lab". Spaces need to be replace with the + sign.

year

the year to be downloaded, options are: "1998", "1999", , "2016", "tmy". This argument should be passed in as a character string. The API only allows downloading one year at a time

leap.year

a character string ("true" or "false") indicating whether you want the data on 29 Feb if it is a leap year

interval

a character string ("30" or "60") indicating whether you want 30 min or 60 min data

utc

a character string ("true" or "false") indicating whether you want the time to be UTC

reason.for.use

a character string indicating your purpose, e.g., "research+development"

email

your email as a character string, e.g., "john.smith@gmail.com"

mailing.list

a character string ("true" or "false") indicating whether you want to be on the NREL mainling list

directory

the directory for the downloads, default to "~/data-raw"

Details

NREL PSM v3 contains half-hourly, regularly-gridded, satellite-derived irradiance and other meteorological parameters.

Value

A .csv file, or .csv files if length(lat) > 1, saved into your intended directory

Author(s)

D. Yang

References

Manajit Sengupta, Yu Xie, Anthony Lopez, Aron Habte, Galen Maclaurin, and James Shelby, The National Solar Radiation Data Base (NSRDB), Renewable and Sustainable Energy Reviews, Volume 89, 2018, Pages 51-60, https://doi.org/10.1016/j.rser.2018.03.003.


dazhiyang/SolarData documentation built on April 19, 2021, noon