Get POWER global meteorology and surface solar energy climatology data and return a tidy data frame tibble. All options offered by the official POWER API are supported.

get_power(community, pars, temporal_average, lonlat, dates = NULL)

Arguments

community

A character vector providing community name: “AG”, “SB” or “SSE”. See argument details for more.

pars

A character vector of solar, meteorological or climatology parameters to download. See parameters for a full list of valid values and definitions. If downloading “CLIMATOLOGY” a maximum of three pars can be specified at one time, for “DAILY” and “INTERANNUAL” a maximum of 20 can be specified at one time.

temporal_average

Temporal average for data being queried, supported values are “DAILY”, “INTERANNUAL” and “CLIMATOLOGY”. See argument details for more.

lonlat

A numeric vector of geographic coordinates for a cell or region entered as x, y coordinates or “GLOBAL” for global coverage (only used for “CLIMATOLOGY”). See argument details for more.

dates

A character vector of start and end dates in that order,
e.g., dates = c("1983-01-01", "2017-12-31"). Not used when
temporal_average is set to “CLIMATOLOGY”. See argument details for more.

Value

A data frame of POWER data including location, dates (not including “CLIMATOLOGY”) and requested parameters. A header of metadata is included.

Note

The associated metadata are not saved if the data are exported to a file format other than a native R data format, e.g., .Rdata, .rda or .rds.

Argument details for “community”

There are three valid values, one must be supplied. This will affect the units of the parameter and the temporal display of time series data.

AG

Provides access to the Agroclimatology Archive, which contains industry-friendly parameters formatted for input to crop models.

SB

Provides access to the Sustainable Buildings Archive, which contains industry-friendly parameters for the buildings community to include parameters in multi-year monthly averages.

SSE

Provides access to the Renewable Energy Archive, which contains parameters specifically tailored to assist in the design of solar and wind powered renewable energy systems.

Argument details for temporal_average

There are three valid values.

DAILY

The daily average of pars by day, month and year.

INTERANNUAL

The monthly average of pars by year.

CLIMATOLOGY

The monthly average of pars at the surface of the earth for a given month, averaged for that month over the 30-year period (Jan. 1984 - Dec. 2013).

Argument details for lonlat

For a single point

To get a specific cell, 1/2 x 1/2 degree, supply a length-two numeric vector giving the decimal degree longitude and latitude in that order for data to download,
e.g., lonlat = c(-89.5, -179.5).

For regional coverage

To get a region, supply a length-four numeric vector as lower left (lon, lat) and upper right (lon, lat) coordinates, e.g., lonlat = c(xmin, ymin, xmax, ymax) in that order for a given region, e.g., a bounding box for the southwestern corner of Australia: lonlat = c(112.5, -55.5, 115.5, -50.5). *Maximum area processed is 4.5 x 4.5 degrees (100 points).

For global coverage

To get global coverage for CLIMATOLOGY, supply “GLOBAL” while also specifying “CLIMATOLOGY” for the temporal_average.

Argument details for dates

If one date only is provided, it will be treated as both the start date and the end date and only a single day's values will be returned, e.g., dates = "1983-01-01". When temporal_average is set to “INTERANNUAL”, use only two year values (YYYY), e.g. dates = c(1983, 2010). This argument should not be used when temporal_average is set to “CLIMATOLOGY”.

References

https://power.larc.nasa.gov/documents/POWER_Data_v9_methodology.pdf https://power.larc.nasa.gov

Examples

# \donttest{ # Fetch daily "AG" community temperature, relative # humidity and precipitation for January 1 1985 # for Kingsthorpe, Queensland, Australia ag_d <- get_power( community = "AG", lonlat = c(151.81, -27.48), pars = c("RH2M", "T2M", "PRECTOT"), dates = "1985-01-01", temporal_average = "DAILY" ) # Fetch single point climatology for air temperature ag_c_point <- get_power( community = "AG", pars = "T2M", c(151.81, -27.48), temporal_average = "CLIMATOLOGY" ) ag_c_point
#> NASA/POWER SRB/FLASHFlux/MERRA2/ 0.5 x 0.5 Degree Climatologies #> 22-year Additional Solar Parameter Monthly & Annual Climatologies (July 1983 - June 2005), 30-year Meteorological and Solar Monthly & Annual Climatologies (January 1984 - December 2013) #> Location: Latitude -27.48 Longitude 151.81 #> Elevation from MERRA-2: Average for 1/2x1/2 degree lat/lon region = 434.55 meters Site = na #> Climate zone: na (reference Briggs et al: http://www.energycodes.gov) #> Value for missing model data cannot be computed or out of model availability range: -99 #> #> Parameters: #> T2M MERRA2 1/2x1/2 Temperature at 2 Meters (C) #> #> # A tibble: 1 x 16 #> LON LAT PARAMETER JAN FEB MAR APR MAY JUN JUL AUG SEP #> <dbl> <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 152. -27.5 T2M 24.3 23.3 21.8 18.9 15.2 12.1 11.4 12.8 16.4 #> # … with 4 more variables: OCT <dbl>, NOV <dbl>, DEC <dbl>, ANN <dbl>
# Fetch global AG climatology for air temperature ag_c_global <- get_power( community = "AG", pars = "T2M", lonlat = "GLOBAL", temporal_average = "CLIMATOLOGY" ) ag_c_global
#> NASA/POWER SRB/FLASHFlux/MERRA2/GEOS 5.12.4 (FP-IT) 0.5 x 0.5 Degree Climatologies #> 22-year Additional Solar Parameter Monthly & Annual Climatologies (July 1983 - June 2005), 30-year Meteorological and Solar Monthly & Annual Climatologies (January 1984 - December 2013) #> Location: Global #> Value for missing model data cannot be computed or out of model availability range: -99 #> Parameter(s): #> T2M MERRA2 1/2x1/2 Temperature at 2 Meters (C) #> #> Parameters: #> NA; #> NA; #> T2M MERRA2 1/2x1/2 Temperature at 2 Meters (C) #> #> # A tibble: 259,200 x 16 #> LON LAT PARAMETER JAN FEB MAR APR MAY JUN JUL AUG SEP #> <dbl> <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 -180. -89.8 T2M -29.0 -40.7 -52.9 -57.8 -59.1 -59.6 -61.3 -61.8 -60.4 #> 2 -179. -89.8 T2M -29.0 -40.7 -52.9 -57.8 -59.1 -59.6 -61.3 -61.8 -60.4 #> 3 -179. -89.8 T2M -29.0 -40.7 -52.9 -57.8 -59.1 -59.6 -61.3 -61.8 -60.4 #> 4 -178. -89.8 T2M -29.0 -40.7 -52.9 -57.8 -59.1 -59.6 -61.3 -61.8 -60.4 #> 5 -178. -89.8 T2M -29.0 -40.7 -52.9 -57.8 -59.1 -59.6 -61.3 -61.8 -60.4 #> 6 -177. -89.8 T2M -28.9 -40.7 -52.9 -57.9 -59.1 -59.6 -61.3 -61.8 -60.4 #> 7 -177. -89.8 T2M -28.9 -40.7 -52.9 -57.9 -59.1 -59.6 -61.3 -61.8 -60.4 #> 8 -176. -89.8 T2M -28.9 -40.7 -53.0 -57.9 -59.1 -59.6 -61.3 -61.8 -60.4 #> 9 -176. -89.8 T2M -28.9 -40.7 -53.0 -57.9 -59.1 -59.6 -61.3 -61.8 -60.4 #> 10 -175. -89.8 T2M -28.9 -40.7 -53.0 -57.9 -59.1 -59.6 -61.3 -61.8 -60.4 #> # … with 259,190 more rows, and 4 more variables: OCT <dbl>, NOV <dbl>, #> # DEC <dbl>, ANN <dbl>
# Fetch interannual solar cooking parameters # for a given region sse_i <- get_power( community = "SSE", lonlat = c(112.5, -55.5, 115.5, -50.5), dates = c("1984", "1985"), temporal_average = "INTERANNUAL", pars = c("CLRSKY_SFC_SW_DWN", "ALLSKY_SFC_SW_DWN") ) sse_i
#> NASA/POWER SRB/FLASHFlux/MERRA2/GEOS 5.12.4 (FP-IT) 0.5 x 0.5 Degree Interannual Averages/Sums #> Dates (month/day/year): 01/01/1984 through 12/31/1985 #> Location: Regional #> Elevation from MERRA-2: Average for 1/2x1/2 degree lat/lon region = na meters Site = na #> Climate zone: na (reference Briggs et al: http://www.energycodes.gov) #> Value for missing model data cannot be computed or out of model availability range: NA #> #> Parameters: #> ALLSKY_SFC_SW_DWN SRB/FLASHFlux 1/2x1/2 All Sky Insolation Incident on a Horizontal Surface (kW-hr/m^2/day) ; #> CLRSKY_SFC_SW_DWN SRB/FLASHFlux 1/2x1/2 Clear Sky Insolation Incident on a Horizontal Surface (kW-hr/m^2/day) #> #> # A tibble: 308 x 17 #> LON LAT PARAMETER YEAR JAN FEB MAR APR MAY JUN JUL AUG #> <dbl> <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 113. -55.2 CLRSKY_S… 1984 8.5 6.84 4.64 2.52 1.19 0.69 0.94 1.96 #> 2 113. -55.2 CLRSKY_S… 1985 8.5 6.91 4.66 2.47 1.19 0.69 0.93 1.9 #> 3 113. -55.2 ALLSKY_S… 1984 4.95 4.14 2.48 1.34 0.67 0.39 0.580 1.18 #> 4 113. -55.2 ALLSKY_S… 1985 4.21 3.55 2.68 1.47 0.72 0.37 0.53 1.13 #> 5 113. -55.2 CLRSKY_S… 1984 8.5 6.84 4.64 2.52 1.19 0.69 0.94 1.96 #> 6 113. -55.2 CLRSKY_S… 1985 8.5 6.91 4.66 2.47 1.19 0.69 0.93 1.9 #> 7 113. -55.2 ALLSKY_S… 1984 4.95 4.14 2.48 1.34 0.67 0.39 0.580 1.18 #> 8 113. -55.2 ALLSKY_S… 1985 4.21 3.55 2.68 1.47 0.72 0.37 0.53 1.13 #> 9 114. -55.2 CLRSKY_S… 1984 8.5 6.84 4.64 2.52 1.19 0.69 0.94 1.96 #> 10 114. -55.2 CLRSKY_S… 1985 8.5 6.91 4.66 2.47 1.19 0.69 0.93 1.9 #> # … with 298 more rows, and 5 more variables: SEP <dbl>, OCT <dbl>, NOV <dbl>, #> # DEC <dbl>, ANN <dbl>
# }