Semantic Scholar Open Access 2018 291 sitasi

nasapower: A NASA POWER Global Meteorology, Surface Solar Energy and Climatology Data Client for R

A. Sparks

Abstrak

nasapower is an R (R Core Team, 2018) package providing functionality to interface with the NASA POWER API (Stackhouse et al., 2018) for reproducible data retrieval using R. Three functions, get_power(), create_met() and create_icasa() are provided. The get_power() function provides complete access to all functionality that the POWER API provides, which includes three user communities, AG (agroclimatology), SSE (Surface meteorology and Solar Energy) and SB (Sustainable Buildings); three temporal averages, Daily, Interannual and Climatology; three geographic options, single point, regional and global for the appropriate parameters offered. nasapower uses lubridate (Grolemund & Wickham, 2011) internally to format and parse dates which are passed along to the the query constructed using crul (Chamberlain, 2018) to interface with the POWER API. The query returns a json response, which is parsed by jsonlite (Ooms, 2014) to obtain the url of the .csv file that has been requested. The .csv file is downloaded to local disk using curl (Ooms, 2018) and read into R using readr (Wickham, Hester, & Francois, 2017). Data are returned in a tidy data frame (Wickham, 2014) as a tibble (Müller & Wickham, 2018) with a custom header, which provides POWER metadata. Two other functions provide functionality to generate weather input files for agricultural crop modelling. The create_met() function is a wrapper for the get_power() function coupled with the prepareMet() and writeMet() functions from APSIM (Fainges, 2017) to simplify the process of querying the data and creating text files in the .met format for use in Agricultural Production Systems sIMulator (APSIM). While the create_icasa() function wraps the get_power() into a function that generates and locally saves a text file in the International Consortium for Agricultural Systems Applications (ICASA) format for use in the Decision Support System for Agrotechnology Transfer (DSSAT) framework (G. Hoogenboom et al., 2017; J. W. Jones et al., 2003). Extended documentation is provided with examples of converting it to spatial objects using raster (Hijmans, 2017).

Penulis (1)

A

A. Sparks

Format Sitasi

Sparks, A. (2018). nasapower: A NASA POWER Global Meteorology, Surface Solar Energy and Climatology Data Client for R. https://doi.org/10.21105/JOSS.01035

Akses Cepat

Lihat di Sumber doi.org/10.21105/JOSS.01035
Informasi Jurnal
Tahun Terbit
2018
Bahasa
en
Total Sitasi
291×
Sumber Database
Semantic Scholar
DOI
10.21105/JOSS.01035
Akses
Open Access ✓