diff --git a/DESCRIPTION b/DESCRIPTION index c9b406f6..06e1f87b 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: nasapower Type: Package Title: NASA POWER API Client -Version: 4.1.0 +Version: 4.2.0 Authors@R: c(person(given = "Adam H.", family = "Sparks", @@ -53,7 +53,19 @@ Authors@R: `file` argument of `vroom()` must use `I()` for literal data as of vroom 1.5.0.', see .")), - person(given = "Western Australia Agriculture Authority (WAAA)", + person(given = "Aleksandar", + family = "Blagotić", + role = "ctb", + email = "alex@rapporter.net", + comment = c("Author of the CRAN package 'rapportools', from which + the '.is_boolean()' was taken.")), + person(given = "Gergely", + family = "Daróczi", + role = "ctb", + email = "daroczig@rapporter.net", + comment = c("Author of the CRAN package 'rapportools', from which + the '.is_boolean()' was taken.")), + person(given = "Curtin University", role = "cph", comment = c("Supported the development of 'nasapower' through Adam H. @@ -79,11 +91,6 @@ Imports: readr, rlang, tibble (>= 3.0.2) -RoxygenNote: 7.3.0 -Encoding: UTF-8 -Language: en-US -NeedsCompilation: no -Repository: CRAN Suggests: knitr, purrr, @@ -91,6 +98,11 @@ Suggests: spelling, testthat (>= 3.0.0), vcr (>= 0.6.0) +RoxygenNote: 7.3.1 +Encoding: UTF-8 +Language: en-US +NeedsCompilation: no +Repository: CRAN VignetteBuilder: knitr X-schema.org-applicationCategory: Tools X-schema.org-keywords: NASA, meteorological-data, weather, global, weather, diff --git a/NAMESPACE b/NAMESPACE index da770845..1ac95afa 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -2,4 +2,6 @@ S3method(print,POWER.Info) export(get_power) +export(query_groupings) export(query_parameters) +export(query_surfaces) diff --git a/NEWS.md b/NEWS.md index 9e643f65..87a2090b 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,25 @@ +# nasapower 4.2.0 + +## Minor Changes + +* Two new functions are added: + * `query_surfaces()`: Query the POWER API for Detailed Information on Wind Type Surfaces + + * `query_groupings()`: Query the POWER API for Detailed Information on Available Parameter Groupings + +* `query_parameters` now allows you to retrieve rich metadata for the parameters. + +* Error, warning and other informational messages are now all formatted with {cli} for more attractive and informative messages. + +* The username passed along to the POWER API is now "nasapower4r" to support other packages built on {nasapower} that could use {vcr} in tests. +Previously the user agent string took the version of {nasapower} and appended it, _e.g._, "nasapower410" for v4.1.0. +Doing so breaks tests in packages relying on {nasapower} due to incompatibilities in cassettes, while not affecting functionality. + +## Bug fixes + +* Fixes a bug that allowed users to send requests to the API for hourly data over a region. +The API does not support this and this client now provides a user-friendly error when it is attempted. + # nasapower 4.1.0 ## Bug fixes diff --git a/R/get_power.R b/R/get_power.R index eec70795..fe0349e5 100644 --- a/R/get_power.R +++ b/R/get_power.R @@ -1,5 +1,4 @@ - #' Get NASA POWER Data From the POWER API #' #' @description Get \acronym{POWER} global meteorology and surface solar energy @@ -10,20 +9,20 @@ #' a single point or regional request. See section on \dQuote{Rate Limiting} #' for more. #' -#' @param community A character vector providing community name: \dQuote{ag}, -#' \dQuote{re} or \dQuote{sb}. See argument details for more. -#' @param pars A character vector of solar, meteorological or climatology -#' parameters to download. When requesting a single point of x, y +#' @param community A case-intensive character vector providing community name: +#' \dQuote{AG}, \dQuote{RE} or \dQuote{SB}. See argument details for more. +#' @param pars case-intensive character vector of solar, meteorological or +#' climatology parameters to download. When requesting a single point of x, y #' coordinates, a maximum of twenty (20) `pars` can be specified at one time, -#' for \dQuote{daily}, \dQuote{monthly} and \dQuote{climatology} +#' for \dQuote{DAILY}, \dQuote{MONTHLY} and \dQuote{climatology} #' `temporal_api`s. If the `temporal_api` is specified as \dQuote{hourly} #' only 15 `pars` can be specified in a single query. See `temporal_api` for #' more. These values are checked internally for validity before sending the #' query to the \acronym{POWER} \acronym{API}. -#' @param temporal_api Temporal \acronym{API} end-point for data being queried, -#' supported values are \dQuote{hourly}, \dQuote{daily}, \dQuote{monthly} or -#' \dQuote{climatology}. Defaults to \dQuote{daily}. See argument details -#' for more. +#' @param temporal_api A case-intensive character vector providing the temporal +#' \acronym{API} end-point for data being queried, supported values are +#' \dQuote{hourly}, \dQuote{DAILY}, \dQuote{MONTHLY} or \dQuote{climatology}. +#' Defaults to \dQuote{DAILY}. See argument details for more. #' @param lonlat A numeric vector of geographic coordinates for a cell or region #' entered as x, y (longitude, latitude) coordinates. See argument details #' for more. @@ -102,13 +101,13 @@ #' @section 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_api` is set to \dQuote{monthly}, use only two year values (YYYY), +#' `temporal_api` is set to \dQuote{MONTHLY}, use only two year values (YYYY), #' _e.g._ `dates = c(1983, 2010)`. This argument should not be used when #' `temporal_api` is set to \dQuote{climatology} and will be ignored if set. #' #' @section `wind_surface`: There are 17 surfaces that may be used for corrected #' wind-speed values using the following equation: -#' \deqn{ WSC_hgt = WS_10m\times(\frac{hgt}{WS_50m})^\alpha}{WSC_hgt = WS_10m*(hgt/WS_50m)^\alpha }. +#' \deqn{ WSC_hgt = WS_10m\times(\frac{hgt}{WS_50m})^\alpha}{WSC_hgt = WS_10m*(hgt/WS_50m)^\alpha } #' Valid surface types are described here. #' #' \describe{ @@ -156,21 +155,21 @@ #' #' @examplesIf interactive() #' -#' # Fetch daily "ag" community temperature, relative humidity and +#' # Fetch daily "AG" community temperature, relative humidity and #' # precipitation for January 1 1985 at Kingsthorpe, Queensland, Australia #' ag_d <- get_power( -#' community = "ag", +#' community = "AG", #' lonlat = c(151.81, -27.48), #' pars = c("RH2M", "T2M", "PRECTOTCORR"), #' dates = "1985-01-01", -#' temporal_api = "daily" +#' temporal_api = "DAILY" #' ) #' #' ag_d #' #' # Fetch single point climatology for air temperature #' ag_c_point <- get_power( -#' community = "ag", +#' community = "AG", #' pars = "T2M", #' c(151.81, -27.48), #' temporal_api = "climatology" @@ -180,10 +179,10 @@ #' #' # Fetch interannual solar cooking parameters for a given region #' sse_i <- get_power( -#' community = "re", +#' community = "RE", #' lonlat = c(112.5, -55.5, 115.5, -50.5), #' dates = c("1984", "1985"), -#' temporal_api = "monthly", +#' temporal_api = "MOHTHLY", #' pars = c("CLRSKY_SFC_SW_DWN", "ALLSKY_SFC_SW_DWN") #' ) #' @@ -212,68 +211,60 @@ get_power <- function(community = c("ag", "re", "sb"), temporal_api <- rlang::arg_match(temporal_api) time_standard <- rlang::arg_match(time_standard) - if (!is.null(wind_surface)) { - wind_surface <- tolower(wind_surface) - wind_surface <- rlang::arg_match( - wind_surface, - c( - "vegtype_1", - "vegtype_2", - "vegtype_3", - "vegtype_4", - "vegtype_5", - "vegtype_6", - "vegtype_7", - "vegtype_8", - "vegtype_9", - "vegtype_10", - "vegtype_11", - "vegtype_12", - "vegtype_20", - "seaice", - "openwater", - "airportice", - "airportgrass" - ) - ) - } + wind_surface <- .match_surface_alias(wind_surface) if (temporal_api == "climatology") { dates <- NULL } - if (any(lonlat == "global")) { + if (any(tolower(lonlat) == "global")) { # remove this if POWER enables global queries for climatology again cli::cli_abort( - "The POWER team have not enabled `global` data queries with this version of the 'API'." + c(x = "The POWER team have not enabled {.var global} data queries with + this version of the 'API'.") ) } if (!is.null(site_elevation) && !is.numeric(site_elevation)) { cli::cli_abort( - "You have entered an invalid value for `site_elevation`.\n") + c(x = "You have entered an invalid value for {.arg site_elevation}, + {.val site_elevation}.") + ) } if (length(lonlat) > 2 && !is.null(site_elevation)) { cli::cli_inform( - "You have provided `site_elevation`, {.var {site_elevation}} for a region request. The `site_elevation` value will be ignored.\n" + c( + x = "You have provided {.arg site_elevation}, {.var {site_elevation}} + for a region request. The {.arg site_elevation} value will be ignored." + ) ) site_elevation <- NULL } if (length(lonlat) > 2 && !is.null(wind_elevation)) { cli::cli_inform( - "You have provided `wind_elevation`, {.var {wind_elevation}}, for a region request. The `wind_elevation` value will be ignored.\n" + c( + "You have provided {.arg wind_elevation}, {.var {wind_elevation}}, + for a region request.", + i = "The {.arg wind_elevation} value will be ignored." + ) ) wind_elevation <- NULL } + if (is.character(wind_surface) && is.null(wind_elevation)) { cli::cli_abort( - "If you provide a correct wind surface alias, `wind_surface`, please include a surface elevation, `wind_elevation`, with the request.\n" + c( + x = "If you provide a correct wind surface alias, {.arg wind_surface}, + please include a surface elevation, {.arg wind_elevation}, with the + request." + ) ) } if (!is.null(wind_elevation)) { if (wind_elevation < 10 || wind_elevation > 300) { cli::cli_abort( - "`wind_elevation` values in metres are required to be between 10m and 300m.\n" + c(x = "{.arg wind_elevation} values in metres are required to be between + 10m and 300m.") ) } } @@ -281,15 +272,40 @@ get_power <- function(community = c("ag", "re", "sb"), lonlat <- tolower(lonlat) if (lonlat != "global") { cli::cli_abort( - "You have entered an invalid value for `lonlat`. Valid values are `global` with `climatology` or a string of lon and lat values.\n" + c( + x = "You have entered an invalid value for {.arg lonlat}.", + i = "Valid values are {.val global} with {.val climatology}", + "or a string of lon and lat values." + ) ) } } + if (temporal_api == "hourly" && length(lonlat) == 4L) { + cli::cli_abort(c(x = "{.arg temporal_api} does not support hourly values for + regional queries.")) + } + + if (length(pars) > 15 && temporal_api == "hourly") { + cli::cli_abort( + call = rlang::caller_env(), + c(x = "A maximum of 15 parameters can currently be requested in one + submission for hourly data.", + i = "You have submitted {.val {length(pars)}}") + ) + } else if (length(pars) > 20) { + cli::cli_abort( + call = rlang::caller_env(), + c(i = "A maximum of 20 parameters can currently be requested in one + submission.", + i = "You have submitted {.val {length(pars)}}") + ) + } + # see internal_functions.R for these functions prefixed with "." - pars <- .check_pars(pars, - community, - temporal_api) + pars <- .check_pars(pars = pars, + community = community, + temporal_api = temporal_api) lonlat_identifier <- .check_lonlat(lonlat, pars) dates <- .check_dates(dates, @@ -316,7 +332,6 @@ get_power <- function(community = c("ag", "re", "sb"), response <- .send_query(.query_list = query_list, - .temporal_api = temporal_api, .url = power_url) response$raise_for_status() @@ -397,21 +412,25 @@ get_power <- function(community = c("ag", "re", "sb"), #' @noRd .check_dates <- function(dates, lonlat, temporal_api) { if (is.null(dates) & temporal_api != "climatology") { - cli::cli_abort( - "You have not entered dates for the query.") + cli::cli_abort(c(i = "You have not entered dates for the query."), + call = rlang::caller_env()) } if (temporal_api == "monthly") { if (length(unique(dates)) < 2) { cli::cli_abort( - "For `temporal_api = monthly`, at least two (2) years are required to be provided." + c( + i = "For {.par temporal_api} = {.arg monthly}, at least two (2) + years are required to be provided, {.emph e.g.}, 2016 and 2017." + ), + call = rlang::caller_env() ) } if (any(nchar(dates) > 4)) { dates <- unique(substr(dates, 1, 4)) } if (dates[[2]] < dates[[1]]) { - message("Your start and end dates were reversed. ", - "They have been reordered.\n") + cli::cli_alert_info(c(i = "Your start and end dates were reversed. + They have been reordered.")) dates <- c(dates[2], dates[1]) } return(dates) @@ -423,7 +442,13 @@ get_power <- function(community = c("ag", "re", "sb"), } if (length(dates) > 2) { cli::cli_abort( - "You have supplied more than two dates for start and end.") + c( + i = "You have supplied more than two dates for start and end.", + x = "Please supply only two (2) dates for {.arg dates} as + 'YYYY-MM-DD' (ISO8601 format)." + ), + call = rlang::caller_env() + ) } # put dates in list to use lapply @@ -445,8 +470,11 @@ get_power <- function(community = c("ag", "re", "sb"), )), warning = function(c) { cli::cli_abort( - call = rlang::caller_env(n = 3), - "{.var {x}} is not a valid entry for a date value. Enter as 'YYYY-MM-DD' (ISO8601 format) or check that it is a valid date.") + call = rlang::caller_env(), + c(i = "{.var {x}} is not a valid entry for a date value.", + x = "Enter as 'YYYY-MM-DD' (ISO8601 format) and check that it + is a valid date.") + ) } ) as.Date(x) @@ -457,8 +485,8 @@ get_power <- function(community = c("ag", "re", "sb"), # if the stdate is > endate, flip order if (dates[[2]] < dates[[1]]) { - message("Your start and end dates were reversed. ", - "They have been reordered.\n") + cli::cli_alert_info(c(i = "Your start and end dates were reversed. + They have been reordered.")) dates <- c(dates[2], dates[1]) } @@ -466,15 +494,24 @@ get_power <- function(community = c("ag", "re", "sb"), if (temporal_api != "hourly" && dates[[1]] < "1981-01-01") { cli::cli_abort( - "1981-01-01 is the earliest available data from POWER.\n") + call = rlang::caller_env(), + c(i = "{.arg dates} = {.val {dates[[1]]}} is an invalid value.", + x = "1981-01-01 is the earliest available data from POWER.") + ) } else if (temporal_api == "hourly" & dates[[1]] < "2001-01-01") cli::cli_abort( - "2001-01-01 is the earliest available hourly data from POWER.\n") + call = rlang::caller_env(), + c(i = "{.arg dates} = {.val {dates[[1]]}} is an invalid value.", + x = "2001-01-01 is the earliest available hourly data from POWER.") + ) # check end date to be sure it's not _after_ if (dates[[2]] > Sys.Date()) { cli::cli_abort( - "The weather data cannot possibly extend beyond this day.\n") + call = rlang::caller_env(), + c(i = "{.arg dates} = {.val {dates[[2]]}} is invalid.", + x = "The weather data cannot possibly extend beyond this day.") + ) } dates <- lapply(dates, as.character) @@ -501,18 +538,23 @@ get_power <- function(community = c("ag", "re", "sb"), if (lonlat == "global") { identifier <- "global" } else if (is.character(lonlat)) { - cli::cli_abort( - "You have entered an invalid request for `lonlat`.\n") + cli::cli_abort(call = rlang::caller_env(), + c(i = "You have entered an invalid request for `lonlat`.")) } } else if (is.numeric(lonlat) & length(lonlat) == 2) { if (lonlat[1] < -180 | lonlat[1] > 180) { cli::cli_abort( - "Please check your longitude, {.var {lonlat[1]}}, to be sure it is valid." + call = rlang::caller_env(), + c(i = "Please check your longitude, {.var {lonlat[1]}}, + to be sure it is valid.") ) } - if (lonlat[2] < -90 | lonlat[2] > 90) { + if (lonlat[2] < -90 | + lonlat[2] > 90) { cli::cli_abort( - "Please check your latitude, {.var {lonlat[2]}}, value to be sure it is valid." + call = rlang::caller_env(), + c(i = "Please check your latitude, {.val {lonlat[2]}}, + value to be sure it is valid.") ) } identifier <- "point" @@ -521,28 +563,43 @@ get_power <- function(community = c("ag", "re", "sb"), } else if (length(lonlat) == 4 & is.numeric(lonlat)) { if ((lonlat[[3]] - lonlat[[1]]) * (lonlat[[4]] - lonlat[[2]]) * 4 > 100) { cli::cli_abort( - "Please provide correct bounding box values. The bounding box can only enclose a max of 10 x 10 region of 0.5 degree values or a 5 x 5 region of 1 degree values, (i.e., 100 points total)." + call = rlang::caller_env(), + c( + i. = "Please provide correct bounding box values. The bounding box + can only enclose a max of 10 x 10 region of 0.5 degree values or a + 5 x 5 region of 1 degree values, ({.emph i.e.}, 100 points total)." + ) ) } else if (any(lonlat[1] < -180 | lonlat[3] < -180 | lonlat[1] > 180 | lonlat[3] > 180)) { cli::cli_abort( - "Please check your longitude values, {.var {lonlat[1]}} and {.var {lonlat[3]}}, to be sure they are valid.\n" + call = rlang::caller_env(), + c(i = "Please check your longitude values, {.var {lonlat[1]}} and + {.var {lonlat[3]}}, to be sure they are valid.") ) } else if (any(lonlat[2] < -90 | lonlat[4] < -90 | lonlat[2] > 90 | lonlat[4] > 90)) { cli::cli_abort( - "Please check your latitude values, {.var {lonlat[2]}} and {.var {lonlat[4]}}, to be sure they are valid.\n" + call = rlang::caller_env(), + c(i = "Please check your latitude values, {.var {lonlat[2]}} and + {.var {lonlat[4]}}, to be sure they are valid.") ) } else if (lonlat[2] > lonlat[4]) { cli::cli_abort( - "The first `lat` value must be the minimum value.") + call = rlang::caller_env(), + c( + i = "The first {.arg lat} value must be the minimum value.") + ) } else if (lonlat[1] > lonlat[3]) { cli::cli_abort( - "The first `lon` value must be the minimum value.") + call = rlang::caller_env(), + c( + i = "The first {.arg lon} value must be the minimum value.") + ) } identifier <- "regional" bbox <- c( @@ -553,7 +610,8 @@ get_power <- function(community = c("ag", "re", "sb"), ) } else { cli::cli_abort( - "You have entered an invalid request for `lonlat`.\n") + call = rlang::caller_env(), + c(i = "You have entered an invalid request for {.arg {lonlat}}.")) } if (!is.null(bbox)) { @@ -591,12 +649,7 @@ get_power <- function(community = c("ag", "re", "sb"), wind_elevation, wind_surface, time_standard) { - user_agent <- paste0("nasapower", - gsub( - pattern = "\\.", - replacement = "", - x = getNamespaceVersion("nasapower") - )) + user_agent <- "nasapower4r" if (lonlat_identifier$identifier == "point") { query_list <- list( diff --git a/R/internal_functions.R b/R/internal_functions.R index 631a06af..5dd3bbda 100644 --- a/R/internal_functions.R +++ b/R/internal_functions.R @@ -22,51 +22,109 @@ #' @param community User entered `community` value. #' @param temporal_api User entered `temporal_api` value. #' -#' @return Validated pars for use in [.build_query()] +#' @return Validated a collapsed string of `pars` for use in [.build_query()] #' @keywords internal #' @noRd .check_pars <- function(pars, community, temporal_api) { # make sure that there are no duplicates in the query - pars <- unique(toupper(pars)) - - p <- unlist(parameters[paste(toupper(temporal_api), - toupper(community), - sep = "_")]) - - # check pars to make sure that they are valid for both the par and - # temporal_api - if (any(pars %notin% p)) { - cli::cli_abort( - "", - paste(pars[which(pars %notin% p)], collapse = ", "), - " is/are not valid in 'pars'.\n", - "Check that the 'pars', 'community' and 'temporal_api' align." - ) + pars <- unique(pars) + + # the `query_parameters()` may pass along `NULL` values, in that case we + # want to check against all possible values + if (is.null(community)) { + community <- c("AG", "SB", "RE") + } else { + community <- toupper(community) } - if (length(pars) > 15 && temporal_api == "hourly") { - cli::cli_abort( - "A maximum of 15 parameters can currently be requested ", - "in one submission for hourly data.\n" - ) - } else if (length(pars) > 20) { - cli::cli_abort( - "A maximum of 20 parameters can currently be requested ", - "in one submission.\n" - ) + if (is.null(temporal_api)) { + temporal_api <- c("HOURLY", "DAILY", "MONTHLY", "CLIMATOLOGY") + } else { + temporal_api <- toupper(temporal_api) } + community_temporal_api <- + paste( + rep(temporal_api, each = length(temporal_api)), + community, sep = "_") + + p <- unlist(parameters[community_temporal_api]) + + # check pars to make sure that they are valid for both the par and + # temporal_api + if (any(pars %notin% p)) { + nopar <- pars[which(pars %notin% p)] + + cli::cli_abort( + call = rlang::caller_env(), + c( + i = "{.arg nopar} {?is/are} not valid in {.var pars}.", + x = "Check that the {.arg pars}, {.arg community} and + {.arg temporal_api} all align." + ) + ) + } + # all good? great. now we format it for the API pars <- paste0(pars, collapse = ",") return(pars) } -#' Sends the Query to the POWER API +#' Boolean +#' +#' Checks if provided object is a Boolean i.e. a length-one logical vector. +#' @param x an object to check +#' @return a logical value indicating whether provided object is a Boolean +#' @examples +#' is_boolean(TRUE) # [1] TRUE +#' # the following will work on most systems, unless you have tweaked global Rprofile +#' is_boolean(T) # [1] TRUE +#' is_boolean(1) # [1] FALSE +#' @note Taken from +#' +#' +#' @noRd +#' @keywords Internal +.is_boolean <- function(x) { + is.logical(x) && length(x) == 1 +} + +#' Match Wind Surface Aliases for Validity +#' +#' @noRd +#' @keywords Internal +.match_surface_alias <- function(x) { + if (!is.null(x)) { + wind_surface <- tolower(x) + wind_surface <- rlang::arg_match( + wind_surface, + c( + "vegtype_1", + "vegtype_2", + "vegtype_3", + "vegtype_4", + "vegtype_5", + "vegtype_6", + "vegtype_7", + "vegtype_8", + "vegtype_9", + "vegtype_10", + "vegtype_11", + "vegtype_12", + "vegtype_20", + "seaice", + "openwater", + "airportice", + "airportgrass" + ) + ) + } +} + +#' Sends the Query to the POWER Data API to Retrieve Data #' #' @param .query_list A query list created by [.build_query()] -#' @param .temporal_api A character string of the validated `temporal_api` -#' provided by the user as `temporal_api` #' @param .url A character string of the URL to be used for the \acronym{API} #' query #' @keywords internal @@ -75,7 +133,6 @@ #' @noRd #' .send_query <- function(.query_list, - .temporal_api, .url) { client <- crul::HttpClient$new(url = .url) @@ -96,3 +153,35 @@ # parse response return(response) } + + +#' Sends the Query to the POWER Management API +#' +#' There are no parameters that these API end points accept. +#' +#' @param .url A character string of the URL to be used for the \acronym{API} +#' query +#' @keywords internal +#' @return A response from the POWER server containing either an error message +#' or the data requested. +#' @noRd +#' +.send_mgmt_query <- function(.url) { + client <- crul::HttpClient$new(url = .url) + + # nocov begin + response <- client$get(retry = 6L, + timeout = 30L) + + # check to see if request failed or succeeded + # - a custom approach this time combining status code, + # explanation of the code, and message from the server + if (response$status_code > 201) { + mssg <- jsonlite::fromJSON(response$parse("UTF-8"))$message + x <- response$status_http() + cli::cli_abort( + sprintf("HTTP (%s) - %s\n %s", x$status_code, x$explanation, mssg)) + } + # parse response + return(response) +} diff --git a/R/query_groupings.R b/R/query_groupings.R new file mode 100644 index 00000000..3bba421e --- /dev/null +++ b/R/query_groupings.R @@ -0,0 +1,54 @@ + +#' Query the POWER API for Detailed Information on Available Parameter Groupings +#' +#' Queries the \acronym{POWER} \acronym{API} returning detailed information on +#' available parameter groupings grouped by community followed by temporal +#' \acronym{API} or if `global = TRUE`, grouped by climatology, then by the +#' available types of parameters. +#' +#' @param global Boolean; should the query return global parameter groupings and +#' attribute information? Defaults to `FALSE` returning details for point +#' data. +#' +#' @examplesIf interactive() +#' +#' # fetch groupings for parameters +#' query_groupings() +#' +#' # fetch groupings for global parameters +#' query_groupings(global = TRUE) +#' +#' @author Adam H. Sparks, \email{adamhsparks@@gmail.com} +#' +#' @return A [list] object of information on parameter groupings in the +#' \acronym{POWER} \acronym{API}. +#' +#' @export + +query_groupings <- function(global = FALSE) { + if (!.is_boolean(global)) { + cli::cli_abort( + c(x = "{.arg global} should be a Boolean value.", + i = "{Please provide either {.var TRUE} or {.var FALSE}.") + ) + } + + power_url <- + "https://power.larc.nasa.gov/api/system/manager/system/groupings" + + if (isFALSE(global)) { + response <- + .send_mgmt_query(.url = power_url) + + response$raise_for_status() + return(jsonlite::fromJSON(response$parse("UTF8"))) + + } else { + power_url <- sprintf("%s/global", power_url) + response <- + .send_mgmt_query(.url = power_url) + + response$raise_for_status() + return(jsonlite::fromJSON(response$parse("UTF8"))) + } +} diff --git a/R/query_parameters.R b/R/query_parameters.R index b164c02f..28ac4a69 100644 --- a/R/query_parameters.R +++ b/R/query_parameters.R @@ -2,26 +2,20 @@ #' Query the POWER API for Detailed Information on Available Parameters #' #' Queries the \acronym{POWER} \acronym{API} returning detailed information on -#' available parameters. -#' -#' @details If `par` is not provided all possible parameters for the provided -#' community, `community` and temporal \acronym{API}, `temporal_api` will be -#' returned. If only a single parameter is supplied with no `community` or -#' `temporal_api` then the complete attribute information for that parameter -#' will be returned for all possible communities and temporal \acronym{API}s -#' combinations. If all three values are provided, only the information for -#' that specific combination of parameter, temporal \acronym{API} and community -#' will be returned. +#' available parameters. For a list of all available parameters, use +#' `parameters` #' #' @param community An optional character vector providing community name: #' \dQuote{ag}, \dQuote{sb} or \dQuote{re}. -#' @param par An optional character vector of a single solar, meteorological or -#' climatology parameter to query. If unsure, omit this argument for for a -#' full list of all the parameters available for each temporal \acronym{API} -#' and community. +#' @param pars A required character string of a single solar, meteorological or +#' climatology parameter to query. #' @param temporal_api An optional character vector indicating the temporal #' \acronym{API} end-point for data being queried, supported values are #' \dQuote{hourly}, \dQuote{daily}, \dQuote{monthly} or \dQuote{climatology}. +#' @param metadata `Boolean`; retrieve extra parameter metadata? This is only +#' applicable if you supply the `community` and `temporal_api`, if these values +#' are not provided it will be ignored. Defaults to +#' `FALSE`. #' #' @section Argument details for `temporal_api`: There are four valid values. #' \describe{ @@ -36,11 +30,11 @@ #' @examplesIf interactive() #' #' # fetch the complete set of attribute information for "T2M". -#' query_parameters(par = "T2M") +#' query_parameters(pars = "T2M") #' #' # fetch complete temporal and community specific attribute information #' # for "T2M" in the "ag" community for the "hourly" temporal API. -#' query_parameters(par = "T2M", +#' query_parameters(pars = "T2M", #' community = "ag", #' temporal_api = "hourly") #' @@ -52,40 +46,75 @@ #' @author Adam H. Sparks, \email{adamhsparks@@gmail.com} #' #' @return A [list] object of information for the requested parameter(s) (if -#' requested), community and temporal \acronym{API}. +#' requested), community(ies) and temporal \acronym{API}(s). #' #' @export query_parameters <- function(community = NULL, - par = NULL, - temporal_api = NULL) { - power_url <- "https://power.larc.nasa.gov/api/system/manager/parameters" + pars, + temporal_api = NULL, + metadata = FALSE) { + community_vals <- c("AG", "RE", "SB") + temporal_api_vals <- c("DAILY", + "MONTHLY", + "HOURLY", + "CLIMATOLOGY") + + # if the args for `community` and `temporal_api` are not empty, check and + # then reset `community_vals` and `temporal_api_vals` for use later + + if (!is.null(community)) { + community <- toupper(community) + + if (community %notin% community_vals) { + cli::cli_abort(c(x = "{.arg community} does not match any valid values for {.var community}.")) + } + community_vals <- community + } + + if (!is.null(temporal_api)) { + temporal_api <- toupper(temporal_api) + if (temporal_api %notin% temporal_api_vals) { + cli::cli_abort( + c(x = "{.arg temporal_api} does not match any valid values for {.var temporal_api}.") + ) + } + temporal_api_vals <- temporal_api + } + + pars <- toupper(pars) + pars <- + .check_pars(pars = pars, + community = community_vals, + temporal_api = temporal_api_vals) + + power_url <- + "https://power.larc.nasa.gov/api/system/manager/parameters" - # if only a `par` is provided, then create URL w/o using crul and parse w/ - # jsonlite, otherwise use {crul} to fetch from the API if (is.null(community) && is.null(temporal_api)) { - return(jsonlite::fromJSON( - sprintf("%s/%s?user=nasapowerdev", power_url, par) - )) + return(jsonlite::fromJSON(sprintf( + "%s/%s?user=nasapower4r", power_url, pars + ))) } else { - if (is.null(community) || is.null(temporal_api)) { + + if (!.is_boolean(metadata)) { cli::cli_abort( - "`commmunity` and `temporal_api` strings must be supplied.") + c(x = "{.arg metadata} should be a Boolean value.", + i = "{Please provide either {.var TRUE} or {.var FALSE}.") + ) } query_list <- list( community = community, - parameters = par, + parameters = pars, temporal = temporal_api, - user = "nasapowerdev" + metadata = metadata, + user = "nasapower4r" ) - # if a `par` isn't supplied, remove this from the query list or leave as-is query_list <- query_list[lengths(query_list) != 0] - response <- .send_query(.query_list = query_list, - .temporal_api = temporal_api, .url = power_url) return(jsonlite::fromJSON(response$parse(encoding = "UTF8"))) diff --git a/R/query_surfaces.R b/R/query_surfaces.R new file mode 100644 index 00000000..c1a37518 --- /dev/null +++ b/R/query_surfaces.R @@ -0,0 +1,46 @@ + +#' Query the POWER API for Detailed Information on Wind Type Surfaces +#' +#' Queries the \acronym{POWER} \acronym{API} returning detailed information on +#' all (or just one) wind elevation surface alias and attribute information. +#' +#' @param surface_alias An optional character vector providing a wind surface +#' alias available from the \acronym{POWER} \acronym{API}. All values are +#' returned if this value is not provided. +#' +#' @examplesIf interactive() +#' +#' # fetch all wind surface information +#' query_surfaces() +#' +#' # fetch surface information for `airportgrass` +#' query_surfaces(surface_alias = "airportgrass") +#' +#' @author Adam H. Sparks, \email{adamhsparks@@gmail.com} +#' +#' @return A [list] object of information for the requested wind surface(s). +#' +#' @export + + +query_surfaces <- function(surface_alias = NULL) { + power_url <- + "https://power.larc.nasa.gov/api/system/manager/surface" + + if (is.null(surface_alias)) { + response <- + .send_mgmt_query(.url = power_url) + + response$raise_for_status() + return(jsonlite::fromJSON(response$parse("UTF8"))) + + } else { + wind_surface <- .match_surface_alias(surface_alias) + power_url <- sprintf("%s/%s", power_url, wind_surface) + response <- + .send_mgmt_query(.url = power_url) + + response$raise_for_status() + return(jsonlite::fromJSON(response$parse("UTF8"))) + } +} diff --git a/R/sysdata.rda b/R/sysdata.rda index 56233655..e9990878 100644 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/codemeta.json b/codemeta.json index fc2e8934..341f827b 100644 --- a/codemeta.json +++ b/codemeta.json @@ -7,7 +7,7 @@ "codeRepository": "https://github.com/ropensci/nasapower", "issueTracker": "https://github.com/ropensci/nasapower/issues", "license": "https://spdx.org/licenses/MIT", - "version": "4.1.0", + "version": "4.2.0", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R", @@ -49,12 +49,24 @@ "familyName": "Alderman", "email": "phillip.alderman@okstate.edu", "@id": "https://orcid.org/0000-0003-1467-2337" + }, + { + "@type": "Person", + "givenName": "Aleksandar", + "familyName": "Blagotić", + "email": "alex@rapporter.net" + }, + { + "@type": "Person", + "givenName": "Gergely", + "familyName": "Daróczi", + "email": "daroczig@rapporter.net" } ], "copyrightHolder": [ { "@type": "Organization", - "name": "Western Australia Agriculture Authority (WAAA)" + "name": "Curtin University" } ], "maintainer": [ @@ -239,7 +251,7 @@ "applicationCategory": "Tools", "isPartOf": "https://ropensci.org", "keywords": ["NASA", "meteorological-data", "weather", "global", "weather-data", "meteorology", "NASA-POWER", "agroclimatology", "earth-science", "data-access", "climate-data", "r", "nasa-power", "nasa", "agroclimatology-data", "weather-variables", "rstats", "r-package"], - "fileSize": "374.385KB", + "fileSize": "496.928KB", "citation": [ { "@type": "SoftwareSourceCode", @@ -253,7 +265,7 @@ "name": "{nasapower}: NASA-POWER Data from R", "identifier": "10.5281/zenodo.1040727", "url": "https://CRAN.R-project.org/package=nasapower", - "description": "R package version 4.1.0", + "description": "R package version 4.2.0", "@id": "https://doi.org/10.5281/zenodo.1040727", "sameAs": "https://doi.org/10.5281/zenodo.1040727" }, diff --git a/cran-comments.md b/cran-comments.md index a51917e3..ab0ae02b 100755 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,10 +1,11 @@ -# nasapower 4.1.0 +# nasapower 4.2.0 ## R CMD check results ### Checked under -* Windows - R Under development (unstable) (2023-12-02 r85657 ucrt) +* Windows - R Under development (unstable) (2024-01-29 r85841 ucrt) via Winbuilder +* Windows - R version 4.3.2 (2023-10-31) -- "Eye Holes" aarch64-apple-darwin20 (64-bit) via Winbuilder * MacOS - R version 4.3.2 (2023-10-31) -- "Eye Holes" aarch64-apple-darwin20 (64-bit) 0 errors | 0 warnings | 1 note @@ -15,5 +16,5 @@ We checked 4 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package. - We saw 0 new problems + We saw 1 new problem, **which has been resolved** We failed to check 0 packages diff --git a/data-raw/README.md b/data-raw/README.md index 8853ec71..0e753c9e 100644 --- a/data-raw/README.md +++ b/data-raw/README.md @@ -1,7 +1,7 @@ Fetch NASA-POWER Parameters and Include Them as an Internal List ================ Adam H. Sparks -2023-12-05 +2024-01-31 # Create parameters nested list for internal checks before sending queries to POWER server @@ -121,32 +121,32 @@ sessioninfo::session_info() ## ─ Session info ─────────────────────────────────────────────────────────────── ## setting value ## version R version 4.3.2 (2023-10-31) - ## os macOS Sonoma 14.1.2 + ## os macOS Sonoma 14.3 ## system aarch64, darwin20 ## ui X11 ## language (EN) ## collate en_US.UTF-8 ## ctype en_US.UTF-8 ## tz Australia/Perth - ## date 2023-12-05 - ## pandoc 3.1.9 @ /opt/homebrew/bin/ (via rmarkdown) + ## date 2024-01-31 + ## pandoc 3.1.11.1 @ /opt/homebrew/bin/ (via rmarkdown) ## ## ─ Packages ─────────────────────────────────────────────────────────────────── ## package * version date (UTC) lib source ## askpass 1.2.0 2023-09-03 [1] CRAN (R 4.3.0) - ## cli 3.6.1 2023-03-23 [1] CRAN (R 4.3.0) - ## colorout 1.2-2 2023-09-24 [1] local + ## cli 3.6.2 2023-12-11 [1] CRAN (R 4.3.1) + ## colorout 1.3-0.1 2024-01-30 [1] local ## crayon 1.5.2 2022-09-29 [1] CRAN (R 4.3.0) ## credentials 2.0.1 2023-09-06 [1] CRAN (R 4.3.0) - ## desc 1.4.2 2022-09-08 [1] CRAN (R 4.3.0) - ## digest 0.6.33 2023-07-07 [1] CRAN (R 4.3.0) + ## desc 1.4.3 2023-12-10 [1] CRAN (R 4.3.1) + ## digest 0.6.34 2024-01-11 [1] CRAN (R 4.3.1) ## evaluate 0.23 2023-11-01 [1] CRAN (R 4.3.1) - ## fansi 1.0.5 2023-10-08 [1] CRAN (R 4.3.1) + ## fansi 1.0.6 2023-12-08 [1] CRAN (R 4.3.1) ## fastmap 1.1.1 2023-02-24 [1] CRAN (R 4.3.0) ## fs 1.6.3 2023-07-20 [1] CRAN (R 4.3.0) - ## glue 1.6.2 2022-02-24 [1] CRAN (R 4.3.0) + ## glue 1.7.0 2024-01-09 [1] CRAN (R 4.3.1) ## htmltools 0.5.7 2023-11-03 [1] CRAN (R 4.3.1) - ## jsonlite * 1.8.7 2023-06-29 [1] CRAN (R 4.3.0) + ## jsonlite * 1.8.8 2023-12-04 [1] CRAN (R 4.3.1) ## knitr 1.45 2023-10-30 [1] CRAN (R 4.3.1) ## lifecycle 1.0.4 2023-11-07 [1] CRAN (R 4.3.1) ## magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.3.0) @@ -155,7 +155,7 @@ sessioninfo::session_info() ## pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.3.0) ## purrr * 1.0.2 2023-08-10 [1] CRAN (R 4.3.0) ## R6 2.5.1 2021-08-19 [1] CRAN (R 4.3.0) - ## rlang 1.1.2 2023-11-04 [1] CRAN (R 4.3.1) + ## rlang 1.1.3 2024-01-10 [1] CRAN (R 4.3.1) ## rmarkdown 2.25 2023-09-18 [1] CRAN (R 4.3.1) ## rprojroot 2.0.4 2023-11-05 [1] CRAN (R 4.3.1) ## rstudioapi 0.15.0 2023-07-07 [1] CRAN (R 4.3.0) @@ -166,9 +166,9 @@ sessioninfo::session_info() ## utf8 1.2.4 2023-10-22 [1] CRAN (R 4.3.1) ## vctrs 0.6.5 2023-12-01 [1] CRAN (R 4.3.1) ## xfun 0.41 2023-11-01 [1] CRAN (R 4.3.1) - ## yaml 2.3.7 2023-01-23 [1] CRAN (R 4.3.0) + ## yaml 2.3.8 2023-12-11 [1] CRAN (R 4.3.1) ## - ## [1] /Users/adamsparks/Library/R/arm64/4.3/library + ## [1] /Users/283204f/Library/R/arm64/4.3/library ## [2] /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library ## ## ────────────────────────────────────────────────────────────────────────────── diff --git a/inst/WORDLIST b/inst/WORDLIST index 56958bd2..8f5911d4 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -2,6 +2,7 @@ ALLSKY APSIM Agroclimatology CRAN's +Curtin DESCRIPTION's DOI DSSAT @@ -18,7 +19,6 @@ Rdata Redoc SFC Standardise -WAAA WS YYYY acknowledgement @@ -38,6 +38,7 @@ groundcover https httr icasa +ies interannual json lon @@ -48,6 +49,7 @@ needleleaf pre rOpenSci radn +rapportools ratelimitr rda rds diff --git a/man/get_power.Rd b/man/get_power.Rd index 1844f5c1..2b1b5753 100644 --- a/man/get_power.Rd +++ b/man/get_power.Rd @@ -17,22 +17,22 @@ get_power( ) } \arguments{ -\item{community}{A character vector providing community name: \dQuote{ag}, -\dQuote{re} or \dQuote{sb}. See argument details for more.} +\item{community}{A case-intensive character vector providing community name: +\dQuote{AG}, \dQuote{RE} or \dQuote{SB}. See argument details for more.} -\item{pars}{A character vector of solar, meteorological or climatology -parameters to download. When requesting a single point of x, y +\item{pars}{case-intensive character vector of solar, meteorological or +climatology parameters to download. When requesting a single point of x, y coordinates, a maximum of twenty (20) \code{pars} can be specified at one time, -for \dQuote{daily}, \dQuote{monthly} and \dQuote{climatology} +for \dQuote{DAILY}, \dQuote{MONTHLY} and \dQuote{climatology} \code{temporal_api}s. If the \code{temporal_api} is specified as \dQuote{hourly} only 15 \code{pars} can be specified in a single query. See \code{temporal_api} for more. These values are checked internally for validity before sending the query to the \acronym{POWER} \acronym{API}.} -\item{temporal_api}{Temporal \acronym{API} end-point for data being queried, -supported values are \dQuote{hourly}, \dQuote{daily}, \dQuote{monthly} or -\dQuote{climatology}. Defaults to \dQuote{daily}. See argument details -for more.} +\item{temporal_api}{A case-intensive character vector providing the temporal +\acronym{API} end-point for data being queried, supported values are +\dQuote{hourly}, \dQuote{DAILY}, \dQuote{MONTHLY} or \dQuote{climatology}. +Defaults to \dQuote{DAILY}. See argument details for more.} \item{lonlat}{A numeric vector of geographic coordinates for a cell or region entered as x, y (longitude, latitude) coordinates. See argument details @@ -146,7 +146,7 @@ supply \dQuote{global} while also specifying \dQuote{climatology} for the 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, \emph{e.g.}, \code{dates = "1983-01-01"}. When -\code{temporal_api} is set to \dQuote{monthly}, use only two year values (YYYY), +\code{temporal_api} is set to \dQuote{MONTHLY}, use only two year values (YYYY), \emph{e.g.} \code{dates = c(1983, 2010)}. This argument should not be used when \code{temporal_api} is set to \dQuote{climatology} and will be ignored if set. } @@ -154,7 +154,7 @@ day's values will be returned, \emph{e.g.}, \code{dates = "1983-01-01"}. When \section{\code{wind_surface}}{ There are 17 surfaces that may be used for corrected wind-speed values using the following equation: -\deqn{ WSC_hgt = WS_10m\times(\frac{hgt}{WS_50m})^\alpha}{WSC_hgt = WS_10m*(hgt/WS_50m)^\alpha }. +\deqn{ WSC_hgt = WS_10m\times(\frac{hgt}{WS_50m})^\alpha}{WSC_hgt = WS_10m*(hgt/WS_50m)^\alpha } Valid surface types are described here. \describe{ @@ -193,21 +193,21 @@ change over time as the project matures. \examples{ \dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} -# Fetch daily "ag" community temperature, relative humidity and +# Fetch daily "AG" community temperature, relative humidity and # precipitation for January 1 1985 at Kingsthorpe, Queensland, Australia ag_d <- get_power( - community = "ag", + community = "AG", lonlat = c(151.81, -27.48), pars = c("RH2M", "T2M", "PRECTOTCORR"), dates = "1985-01-01", - temporal_api = "daily" + temporal_api = "DAILY" ) ag_d # Fetch single point climatology for air temperature ag_c_point <- get_power( - community = "ag", + community = "AG", pars = "T2M", c(151.81, -27.48), temporal_api = "climatology" @@ -217,10 +217,10 @@ ag_c_point # Fetch interannual solar cooking parameters for a given region sse_i <- get_power( - community = "re", + community = "RE", lonlat = c(112.5, -55.5, 115.5, -50.5), dates = c("1984", "1985"), - temporal_api = "monthly", + temporal_api = "MOHTHLY", pars = c("CLRSKY_SFC_SW_DWN", "ALLSKY_SFC_SW_DWN") ) diff --git a/man/nasapower-package.Rd b/man/nasapower-package.Rd index a8009246..4fa25832 100644 --- a/man/nasapower-package.Rd +++ b/man/nasapower-package.Rd @@ -29,7 +29,9 @@ Other contributors: \item Fernando Miguez \email{femiguez@iastate.edu} (\href{https://orcid.org/0000-0002-4627-8329}{ORCID}) (Fernando Miguez provided assistance in identifying improper missing value handling in the POWER data, see .) [contributor] \item Maëlle Salmon (\href{https://orcid.org/0000-0002-2815-0399}{ORCID}) (Maëlle Salmon contributed a patch to fix issues with using the R package, 'vcr', for testing the API queries, see .) [contributor] \item Phillip D. Alderman \email{phillip.alderman@okstate.edu} (\href{https://orcid.org/0000-0003-1467-2337}{ORCID}) (Phillip Alderman contributed a patch to fix an issue with, 'The `file` argument of `vroom()` must use `I()` for literal data as of vroom 1.5.0.', see .) [contributor] - \item Western Australia Agriculture Authority (WAAA) (Supported the development of 'nasapower' through Adam H. Sparks' time.) [copyright holder] + \item Aleksandar Blagotić \email{alex@rapporter.net} (Author of the CRAN package 'rapportools', from which the '.is_boolean()' was taken.) [contributor] + \item Gergely Daróczi \email{daroczig@rapporter.net} (Author of the CRAN package 'rapportools', from which the '.is_boolean()' was taken.) [contributor] + \item Curtin University (Supported the development of 'nasapower' through Adam H. Sparks' time.) [copyright holder] } } diff --git a/man/query_groupings.Rd b/man/query_groupings.Rd new file mode 100644 index 00000000..daaafca0 --- /dev/null +++ b/man/query_groupings.Rd @@ -0,0 +1,36 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/query_groupings.R +\name{query_groupings} +\alias{query_groupings} +\title{Query the POWER API for Detailed Information on Available Parameter Groupings} +\usage{ +query_groupings(global = FALSE) +} +\arguments{ +\item{global}{Boolean; should the query return global parameter groupings and +attribute information? Defaults to \code{FALSE} returning details for point +data.} +} +\value{ +A \link{list} object of information on parameter groupings in the +\acronym{POWER} \acronym{API}. +} +\description{ +Queries the \acronym{POWER} \acronym{API} returning detailed information on +available parameter groupings grouped by community followed by temporal +\acronym{API} or if \code{global = TRUE}, grouped by climatology, then by the +available types of parameters. +} +\examples{ +\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} + +# fetch groupings for parameters +query_groupings() + +# fetch groupings for global parameters +query_groupings(global = TRUE) +\dontshow{\}) # examplesIf} +} +\author{ +Adam H. Sparks, \email{adamhsparks@gmail.com} +} diff --git a/man/query_parameters.Rd b/man/query_parameters.Rd index 21c2d6be..d4e41cde 100644 --- a/man/query_parameters.Rd +++ b/man/query_parameters.Rd @@ -4,38 +4,32 @@ \alias{query_parameters} \title{Query the POWER API for Detailed Information on Available Parameters} \usage{ -query_parameters(community = NULL, par = NULL, temporal_api = NULL) +query_parameters(community = NULL, pars, temporal_api = NULL, metadata = FALSE) } \arguments{ \item{community}{An optional character vector providing community name: \dQuote{ag}, \dQuote{sb} or \dQuote{re}.} -\item{par}{An optional character vector of a single solar, meteorological or -climatology parameter to query. If unsure, omit this argument for for a -full list of all the parameters available for each temporal \acronym{API} -and community.} +\item{pars}{A required character string of a single solar, meteorological or +climatology parameter to query.} \item{temporal_api}{An optional character vector indicating the temporal \acronym{API} end-point for data being queried, supported values are \dQuote{hourly}, \dQuote{daily}, \dQuote{monthly} or \dQuote{climatology}.} + +\item{metadata}{\code{Boolean}; retrieve extra parameter metadata? This is only +applicable if you supply the \code{community} and \code{temporal_api}, if these values +are not provided it will be ignored. Defaults to +\code{FALSE}.} } \value{ A \link{list} object of information for the requested parameter(s) (if -requested), community and temporal \acronym{API}. +requested), community(ies) and temporal \acronym{API}(s). } \description{ Queries the \acronym{POWER} \acronym{API} returning detailed information on -available parameters. -} -\details{ -If \code{par} is not provided all possible parameters for the provided -community, \code{community} and temporal \acronym{API}, \code{temporal_api} will be -returned. If only a single parameter is supplied with no \code{community} or -\code{temporal_api} then the complete attribute information for that parameter -will be returned for all possible communities and temporal \acronym{API}s -combinations. If all three values are provided, only the information for -that specific combination of parameter, temporal \acronym{API} and community -will be returned. +available parameters. For a list of all available parameters, use +\code{parameters} } \section{Argument details for \code{temporal_api}}{ There are four valid values. @@ -53,11 +47,11 @@ monthly average, maximum, and/or minimum values.} \dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} # fetch the complete set of attribute information for "T2M". -query_parameters(par = "T2M") +query_parameters(pars = "T2M") # fetch complete temporal and community specific attribute information # for "T2M" in the "ag" community for the "hourly" temporal API. -query_parameters(par = "T2M", +query_parameters(pars = "T2M", community = "ag", temporal_api = "hourly") diff --git a/man/query_surfaces.Rd b/man/query_surfaces.Rd new file mode 100644 index 00000000..13cec7ba --- /dev/null +++ b/man/query_surfaces.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/query_surfaces.R +\name{query_surfaces} +\alias{query_surfaces} +\title{Query the POWER API for Detailed Information on Wind Type Surfaces} +\usage{ +query_surfaces(surface_alias = NULL) +} +\arguments{ +\item{surface_alias}{An optional character vector providing a wind surface +alias available from the \acronym{POWER} \acronym{API}. All values are +returned if this value is not provided.} +} +\value{ +A \link{list} object of information for the requested wind surface(s). +} +\description{ +Queries the \acronym{POWER} \acronym{API} returning detailed information on +all (or just one) wind elevation surface alias and attribute information. +} +\examples{ +\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} + +# fetch all wind surface information +query_surfaces() + +# fetch surface information for `airportgrass` +query_surfaces(surface_alias = "airportgrass") +\dontshow{\}) # examplesIf} +} +\author{ +Adam H. Sparks, \email{adamhsparks@gmail.com} +} diff --git a/revdep/README.md b/revdep/README.md index fcb15809..70397c80 100644 --- a/revdep/README.md +++ b/revdep/README.md @@ -1,35 +1,35 @@ # Platform -|field |value | -|:--------|:------------------------------------------| -|version |R version 4.3.2 (2023-10-31) | -|os |macOS Sonoma 14.1.2 | -|system |aarch64, darwin20 | -|ui |RStudio | -|language |(EN) | -|collate |en_US.UTF-8 | -|ctype |en_US.UTF-8 | -|tz |Australia/Perth | -|date |2023-12-05 | -|rstudio |2023.09.1+494 Desert Sunflower (desktop) | -|pandoc |3.1.9 @ /opt/homebrew/bin/ (via rmarkdown) | +|field |value | +|:--------|:-----------------------------------| +|version |R version 4.3.2 (2023-10-31) | +|os |macOS Sonoma 14.3 | +|system |aarch64, darwin20 | +|ui |RStudio | +|language |(EN) | +|collate |en_US.UTF-8 | +|ctype |en_US.UTF-8 | +|tz |Australia/Perth | +|date |2024-02-01 | +|rstudio |2023.12.1+402 Ocean Storm (desktop) | +|pandoc |3.1.11.1 @ /opt/homebrew/bin/pandoc | # Dependencies |package |old |new |Δ | |:-----------|:------|:------|:--| -|nasapower |4.0.12 |4.1.0 |* | +|nasapower |4.1.0 |4.2.0 |* | |bit |4.0.5 |4.0.5 | | |bit64 |4.0.5 |4.0.5 | | -|cli |3.6.1 |3.6.1 | | +|cli |3.6.2 |3.6.2 | | |clipr |0.8.0 |0.8.0 | | |cpp11 |0.4.7 |0.4.7 | | |crayon |1.5.2 |1.5.2 | | |crul |1.4.0 |1.4.0 | | -|curl |5.1.0 |5.1.0 | | -|fansi |1.0.5 |1.0.5 | | +|curl |5.2.0 |5.2.0 | | +|fansi |1.0.6 |1.0.6 | | |generics |0.1.3 |0.1.3 | | -|glue |1.6.2 |1.6.2 | | +|glue |1.7.0 |1.7.0 | | |hms |1.1.3 |1.1.3 | | |httpcode |0.3.0 |0.3.0 | | |jsonlite |1.8.8 |1.8.8 | | @@ -40,21 +40,27 @@ |pillar |1.9.0 |1.9.0 | | |pkgconfig |2.0.3 |2.0.3 | | |prettyunits |1.2.0 |1.2.0 | | -|progress |1.2.2 |1.2.2 | | +|progress |1.2.3 |1.2.3 | | |R6 |2.5.1 |2.5.1 | | -|Rcpp |1.0.11 |1.0.11 | | -|readr |2.1.4 |2.1.4 | | -|rlang |1.1.2 |1.1.2 | | +|Rcpp |1.0.12 |1.0.12 | | +|readr |2.1.5 |2.1.5 | | +|rlang |1.1.3 |1.1.3 | | |tibble |3.2.1 |3.2.1 | | |tidyselect |1.2.0 |1.2.0 | | -|timechange |0.2.0 |0.2.0 | | +|timechange |0.3.0 |0.3.0 | | |triebeard |0.4.1 |0.4.1 | | |tzdb |0.4.0 |0.4.0 | | |urltools |1.7.3 |1.7.3 | | |utf8 |1.2.4 |1.2.4 | | |vctrs |0.6.5 |0.6.5 | | -|vroom |1.6.4 |1.6.4 | | -|withr |2.5.2 |2.5.2 | | +|vroom |1.6.5 |1.6.5 | | +|withr |3.0.0 |3.0.0 | | # Revdeps +## New problems (1) + +|package |version |error |warning |note | +|:--------|:-------|:------|:-------|:----| +|[PowerSDI](problems.md#powersdi)|1.0.0 |__+1__ | | | + diff --git a/revdep/cran.md b/revdep/cran.md index ab1853ce..c52863d0 100644 --- a/revdep/cran.md +++ b/revdep/cran.md @@ -2,6 +2,14 @@ We checked 4 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package. - * We saw 0 new problems + * We saw 1 new problems * We failed to check 0 packages +Issues with CRAN packages are summarised below. + +### New problems +(This reports the first line of each new failure) + +* PowerSDI + checking tests ... + diff --git a/revdep/problems.md b/revdep/problems.md index 9a207363..2913a794 100644 --- a/revdep/problems.md +++ b/revdep/problems.md @@ -1 +1,39 @@ -*Wow, no problems at all. :)* \ No newline at end of file +# PowerSDI + +
+ +* Version: 1.0.0 +* GitHub: https://github.com/gabrielblain/PowerSDI +* Source code: https://github.com/cran/PowerSDI +* Date/Publication: 2024-01-15 11:20:02 UTC +* Number of recursive dependencies: 83 + +Run `revdepcheck::revdep_details(, "PowerSDI")` for more info + +
+ +## Newly broken + +* checking tests ... + ``` + Running ‘testthat.R’ + ERROR + Running the tests in ‘tests/testthat.R’ failed. + Last 13 lines of output: + 7. └─nasapower::get_power(...) + 8. └─nasapower:::.send_query(.query_list = query_list, .url = power_url) + 9. └─client$get(query = .query_list, retry = 6L, timeout = 30L) + 10. └─private$make_request(rr) + 11. └─adap$handle_request(opts) + 12. └─private$request_handler(req)$handle() + 13. └─eval(parse(text = req_type_fun))(self$request) + 14. └─err$run() + 15. └─self$construct_message() + + [ FAIL 9 | WARN 0 | SKIP 0 | PASS 89 ] + Deleting unused snapshots: + • PlotData/disp-plotdata-a.svg + Error: Test failures + Execution halted + ``` + diff --git a/tests/fixtures/adjusted_air_pressure.json b/tests/fixtures/adjusted_air_pressure.json index 8b81341a..dca8b2b5 100644 --- a/tests/fixtures/adjusted_air_pressure.json +++ b/tests/fixtures/adjusted_air_pressure.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/temporal/daily/point?parameters=T2M%2CT2M_MIN%2CT2M_MAX%2CRH2M%2CWS10M%2CPS&community=ag&start=19830101&end=19830101&site-elevation=0&longitude=-179.5&latitude=-89.5&format=csv&time-standard=UTC&user=nasapower410","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.1.2 r-curl/5.1.0 crul/1.4.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-disposition":"attachment; filename=POWER_Point_Daily_19830101_19830101_089d50S_0179d50W_UTC.csv","content-language":"en-US","content-length":"912","content-type":"text/csv","date":"Tue, 05 Dec 2023 12:00:46 GMT","status":"HTTP/2 200 ","via":"1.1 b26d50f4268747fbb55ffbc1b1778adc.cloudfront.net (CloudFront), 1.1 8f55f9526b9325921fbddb26c450c97a.cloudfront.net (CloudFront)","x-amz-apigw-id":"Pd-VGHAVvHcEVOQ=","x-amz-cf-id":"z-ijJRJphayyLuZOLg4SUyx_9BHIxOaStLhWKA-tcyR4LSUXIAIOqw==","x-amz-cf-pop":["MEL52-P1","MEL52-P1"],"x-amzn-remapped-content-length":"912","x-amzn-requestid":"7805534d-ea9e-4f76-81c7-1eea9db9ab1b","x-amzn-trace-id":"Root=1-656f10ed-19ec47b54e1bcb7437b95536","x-app-name":"daily","x-app-version":"v2.5.1","x-archive-time":"1.379","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.012","x-process-time":"0.2","x-service-time":"1.592"},"body":{"encoding":"","file":false,"string":"-BEGIN HEADER-\r\nNASA/POWER CERES/MERRA2 Native Resolution Daily Data \r\nDates (month/day/year): 01/01/1983 through 01/01/1983 \r\nLocation: Latitude -89.5 Longitude -179.5 \r\nElevation from MERRA-2: Average for 0.5 x 0.625 degree lat/lon region = 2885.03 meters\r\nThe value for missing source data that cannot be computed or is outside of the sources availability range: -999 \r\nParameter(s): \r\nT2M MERRA-2 Temperature at 2 Meters (C) \r\nT2M_MIN MERRA-2 Temperature at 2 Meters Minimum (C) \r\nT2M_MAX MERRA-2 Temperature at 2 Meters Maximum (C) \r\nRH2M MERRA-2 Relative Humidity at 2 Meters (%) \r\nWS10M MERRA-2 Wind Speed at 10 Meters (m/s) \r\nPS MERRA-2 Surface Pressure (kPa) \r\nPSC MERRA-2 Corrected Atmospheric Pressure (Adjusted For Site Elevation) (kPa) \r\n-END HEADER-\r\nYEAR,DOY,T2M,T2M_MIN,T2M_MAX,RH2M,WS10M,PS,PSC\n1983,1,-24.36,-25.37,-22.7,92.44,1.93,69.23,101.38\n"}},"recorded_at":"2023-12-05 12:00:47 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} +{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/temporal/daily/point?parameters=T2M%2CT2M_MIN%2CT2M_MAX%2CRH2M%2CWS10M%2CPS&community=ag&start=19830101&end=19830101&site-elevation=0&longitude=-179.5&latitude=-89.5&format=csv&time-standard=UTC&user=nasapower4r","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.4.0 r-curl/5.2.0 crul/1.4.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-disposition":"attachment; filename=POWER_Point_Daily_19830101_19830101_089d50S_0179d50W_UTC.csv","content-language":"en-US","content-length":"912","content-type":"text/csv","date":"Thu, 01 Feb 2024 03:12:11 GMT","status":"HTTP/2 200 ","via":"1.1 e62a87f5c9a3d08f66598e0db6768fd4.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"Sb7RnHqKvHcErnA=","x-amz-cf-id":"Abv9FMy-s62MfJPOcAs7Or3In8radFQp-cwmqERnZ2nt8cyVULC2vg==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"912","x-amzn-requestid":"381e68a7-86af-4a8d-8d18-0195049f91e5","x-amzn-trace-id":"Root=1-65bb0c0a-6b26273533677f5a2aba02d0","x-app-name":"daily","x-app-version":"v2.5.6","x-archive-time":"1.297","x-cache":"Miss from cloudfront","x-data-sources":"power,merra2","x-objects-time":"0.016","x-process-time":"0.16","x-service-time":"1.474"},"body":{"encoding":"","file":false,"string":"-BEGIN HEADER-\r\nNASA/POWER CERES/MERRA2 Native Resolution Daily Data \r\nDates (month/day/year): 01/01/1983 through 01/01/1983 \r\nLocation: Latitude -89.5 Longitude -179.5 \r\nElevation from MERRA-2: Average for 0.5 x 0.625 degree lat/lon region = 2885.03 meters\r\nThe value for missing source data that cannot be computed or is outside of the sources availability range: -999 \r\nParameter(s): \r\nT2M MERRA-2 Temperature at 2 Meters (C) \r\nT2M_MIN MERRA-2 Temperature at 2 Meters Minimum (C) \r\nT2M_MAX MERRA-2 Temperature at 2 Meters Maximum (C) \r\nRH2M MERRA-2 Relative Humidity at 2 Meters (%) \r\nWS10M MERRA-2 Wind Speed at 10 Meters (m/s) \r\nPS MERRA-2 Surface Pressure (kPa) \r\nPSC MERRA-2 Corrected Atmospheric Pressure (Adjusted For Site Elevation) (kPa) \r\n-END HEADER-\r\nYEAR,DOY,T2M,T2M_MIN,T2M_MAX,RH2M,WS10M,PS,PSC\n1983,1,-24.36,-25.37,-22.7,92.44,1.93,69.23,101.38\n"}},"recorded_at":"2024-02-01 03:12:11 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} diff --git a/tests/fixtures/adjusted_wind_elevation.json b/tests/fixtures/adjusted_wind_elevation.json index 24d249c9..7688a9a6 100644 --- a/tests/fixtures/adjusted_wind_elevation.json +++ b/tests/fixtures/adjusted_wind_elevation.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/temporal/daily/point?parameters=T2M%2CT2M_MIN%2CT2M_MAX%2CRH2M%2CWS10M%2CPS&community=ag&start=19830101&end=19830101&wind-elevation=300&wind-surface=vegtype_1&longitude=-179.5&latitude=-89.5&format=csv&time-standard=UTC&user=nasapower410","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.1.2 r-curl/5.1.0 crul/1.4.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-disposition":"attachment; filename=POWER_Point_Daily_19830101_19830101_089d50S_0179d50W_UTC.csv","content-language":"en-US","content-length":"1024","content-type":"text/csv","date":"Tue, 05 Dec 2023 12:00:49 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 c039aab48f1d7b49b82fa30def82ba1a.cloudfront.net (CloudFront), 1.1 8f55f9526b9325921fbddb26c450c97a.cloudfront.net (CloudFront)","x-amz-apigw-id":"Pd-VeFIXvHcEhKQ=","x-amz-cf-id":"a-n89yr-L7ll8vUDdsqRhkGx92o4UOv-SEhatiyRWrEFn0PJWOPQ8A==","x-amz-cf-pop":["MEL52-P1","MEL52-P1"],"x-amzn-remapped-content-length":"1024","x-amzn-requestid":"293fd75b-9544-4962-9be3-c999cc0c125a","x-amzn-trace-id":"Root=1-656f10ef-7d08e96e53aebc1c2ddfb814","x-app-name":"daily","x-app-version":"v2.5.1","x-archive-time":"1.753","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.024","x-process-time":"0.16","x-service-time":"1.938"},"body":{"encoding":"","file":false,"string":"-BEGIN HEADER-\r\nNASA/POWER CERES/MERRA2 Native Resolution Daily Data \r\nDates (month/day/year): 01/01/1983 through 01/01/1983 \r\nLocation: Latitude -89.5 Longitude -179.5 \r\nElevation from MERRA-2: Average for 0.5 x 0.625 degree lat/lon region = 2885.03 meters\r\nThe value for missing source data that cannot be computed or is outside of the sources availability range: -999 \r\nParameter(s): \r\nT2M MERRA-2 Temperature at 2 Meters (C) \r\nT2M_MIN MERRA-2 Temperature at 2 Meters Minimum (C) \r\nT2M_MAX MERRA-2 Temperature at 2 Meters Maximum (C) \r\nRH2M MERRA-2 Relative Humidity at 2 Meters (%) \r\nWS10M MERRA-2 Wind Speed at 10 Meters (m/s) \r\nPS MERRA-2 Surface Pressure (kPa) \r\nWSC MERRA-2 Corrected Wind Speed (Adjusted For Elevation) (m/s) \r\nMessage(s): \r\nCorrected Wind Speed has a custom surface implemented: 35-m broadleaf-evergreen trees (70% coverage) (vegtype_1) \r\n-END HEADER-\r\nYEAR,DOY,T2M,T2M_MIN,T2M_MAX,RH2M,WS10M,PS,WSC\n1983,1,-24.36,-25.37,-22.7,92.44,1.93,69.23,6.49\n"}},"recorded_at":"2023-12-05 12:00:49 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} +{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/temporal/daily/point?parameters=T2M%2CT2M_MIN%2CT2M_MAX%2CRH2M%2CWS10M%2CPS&community=ag&start=19830101&end=19830101&wind-elevation=300&wind-surface=vegtype_1&longitude=-179.5&latitude=-89.5&format=csv&time-standard=UTC&user=nasapower4r","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.4.0 r-curl/5.2.0 crul/1.4.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-disposition":"attachment; filename=POWER_Point_Daily_19830101_19830101_089d50S_0179d50W_UTC.csv","content-language":"en-US","content-length":"1024","content-type":"text/csv","date":"Thu, 01 Feb 2024 03:12:13 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 d8af458c1f500953a862b2a5e3684978.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"Sb7R5Gj-vHcEDEQ=","x-amz-cf-id":"85KdegMXKmazC5mIXPQ1moL-5wVHMzbBGBd10vlbALC2NmrYz6AvSg==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"1024","x-amzn-requestid":"890dbc12-d8c5-4992-8d88-aeff6565770e","x-amzn-trace-id":"Root=1-65bb0c0b-7bcdd356728207131e85e558","x-app-name":"daily","x-app-version":"v2.5.6","x-archive-time":"1.355","x-cache":"Miss from cloudfront","x-data-sources":"power,merra2","x-objects-time":"0.012","x-process-time":"0.17","x-service-time":"1.539"},"body":{"encoding":"","file":false,"string":"-BEGIN HEADER-\r\nNASA/POWER CERES/MERRA2 Native Resolution Daily Data \r\nDates (month/day/year): 01/01/1983 through 01/01/1983 \r\nLocation: Latitude -89.5 Longitude -179.5 \r\nElevation from MERRA-2: Average for 0.5 x 0.625 degree lat/lon region = 2885.03 meters\r\nThe value for missing source data that cannot be computed or is outside of the sources availability range: -999 \r\nParameter(s): \r\nT2M MERRA-2 Temperature at 2 Meters (C) \r\nT2M_MIN MERRA-2 Temperature at 2 Meters Minimum (C) \r\nT2M_MAX MERRA-2 Temperature at 2 Meters Maximum (C) \r\nRH2M MERRA-2 Relative Humidity at 2 Meters (%) \r\nWS10M MERRA-2 Wind Speed at 10 Meters (m/s) \r\nPS MERRA-2 Surface Pressure (kPa) \r\nWSC MERRA-2 Corrected Wind Speed (Adjusted For Elevation) (m/s) \r\nMessage(s): \r\nCorrected Wind Speed has a custom surface implemented: 35-m broadleaf-evergreen trees (70% coverage) (vegtype_1) \r\n-END HEADER-\r\nYEAR,DOY,T2M,T2M_MIN,T2M_MAX,RH2M,WS10M,PS,WSC\n1983,1,-24.36,-25.37,-22.7,92.44,1.93,69.23,6.49\n"}},"recorded_at":"2024-02-01 03:12:13 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} diff --git a/tests/fixtures/climatology_ag_point.json b/tests/fixtures/climatology_ag_point.json index b624de38..5bebcb28 100644 --- a/tests/fixtures/climatology_ag_point.json +++ b/tests/fixtures/climatology_ag_point.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/temporal/climatology/point?parameters=T2M&community=ag&longitude=-179.5&latitude=-89.5&format=csv&time-standard=LST&user=nasapower410","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.1.2 r-curl/5.1.0 crul/1.4.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-disposition":"attachment; filename=POWER_Point_Climatology_Climatology_2001_2020_089d50S_0179d50W_UTC.csv","content-language":"en-US","content-length":"663","content-type":"text/csv","date":"Tue, 05 Dec 2023 12:01:00 GMT","status":"HTTP/2 200 ","via":"1.1 705200fb622a45f111dbfe8a0df07cfa.cloudfront.net (CloudFront), 1.1 8f55f9526b9325921fbddb26c450c97a.cloudfront.net (CloudFront)","x-amz-apigw-id":"Pd-W1HNKPHcErZQ=","x-amz-cf-id":"NMGntHnWXridwsM0VH3K5YLFoOk5hPj723tFCgoz2FlQBfcJzj7nFg==","x-amz-cf-pop":["MEL52-P1","MEL52-P1"],"x-amzn-remapped-content-length":"663","x-amzn-requestid":"0f1fa1c4-89b3-41df-94bb-b1ee31b38697","x-amzn-trace-id":"Root=1-656f10f8-01e68c1170a50adc2e540987","x-app-name":"climatology","x-app-version":"v2.5.2","x-archive-time":"3.587","x-cache":"Miss from cloudfront","x-data-sources":"merra2","x-objects-time":"0.017","x-process-time":"0.2","x-service-time":"3.805"},"body":{"encoding":"","file":false,"string":"-BEGIN HEADER-\r\nNASA/POWER CERES/MERRA2 Native Resolution Climatology Climatologies \r\n20-year Meteorological and Solar Monthly & Annual Climatologies (January 2001 - December 2020) \r\nLocation: Latitude -89.5 Longitude -179.5 \r\nElevation from MERRA-2: Average for 0.5 x 0.625 degree lat/lon region = 2885.03 meters\r\nThe value for missing source data that cannot be computed or is outside of the sources availability range: -999 \r\nParameter(s): \r\nT2M MERRA-2 Temperature at 2 Meters (C) \r\n-END HEADER-\r\nPARAMETER,JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC,ANN\nT2M,-29.16,-40.68,-52.56,-57.06,-57.9,-59.46,-62.02,-61.4,-60.25,-52.29,-38.76,-28.66,-50.04\n"}},"recorded_at":"2023-12-05 12:01:01 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} +{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/temporal/climatology/point?parameters=T2M&community=ag&longitude=-179.5&latitude=-89.5&format=csv&time-standard=LST&user=nasapower4r","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.4.0 r-curl/5.2.0 crul/1.4.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-disposition":"attachment; filename=POWER_Point_Climatology_Climatology_2001_2020_089d50S_0179d50W_UTC.csv","content-language":"en-US","content-length":"663","content-type":"text/csv","date":"Thu, 01 Feb 2024 03:12:23 GMT","status":"HTTP/2 200 ","via":"1.1 73c1be06ae71c031888969ad46c601b2.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"Sb7TFHfJvHcEFeA=","x-amz-cf-id":"NU5bnOiJ8WyHEsk77kRZOM6PyY4vSitjMqsEcFp5DBqS9nIe2L1GVQ==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"663","x-amzn-requestid":"b2862d06-8eaa-4c35-8c22-220259de1d21","x-amzn-trace-id":"Root=1-65bb0c13-5138ded72351312b06f424f7","x-app-name":"climatology","x-app-version":"v2.5.8","x-archive-time":"3.468","x-cache":"Miss from cloudfront","x-data-sources":"merra2","x-objects-time":"0.013","x-process-time":"0.19","x-service-time":"3.672"},"body":{"encoding":"","file":false,"string":"-BEGIN HEADER-\r\nNASA/POWER CERES/MERRA2 Native Resolution Climatology Climatologies \r\n20-year Meteorological and Solar Monthly & Annual Climatologies (January 2001 - December 2020) \r\nLocation: Latitude -89.5 Longitude -179.5 \r\nElevation from MERRA-2: Average for 0.5 x 0.625 degree lat/lon region = 2885.03 meters\r\nThe value for missing source data that cannot be computed or is outside of the sources availability range: -999 \r\nParameter(s): \r\nT2M MERRA-2 Temperature at 2 Meters (C) \r\n-END HEADER-\r\nPARAMETER,JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC,ANN\nT2M,-29.16,-40.68,-52.56,-57.06,-57.9,-59.46,-62.02,-61.4,-60.25,-52.29,-38.76,-28.66,-50.04\n"}},"recorded_at":"2024-02-01 03:12:23 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} diff --git a/tests/fixtures/daily_ag_point.json b/tests/fixtures/daily_ag_point.json index c9f078a4..2f24af56 100644 --- a/tests/fixtures/daily_ag_point.json +++ b/tests/fixtures/daily_ag_point.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/temporal/daily/point?parameters=T2M%2CT2M_MIN%2CT2M_MAX%2CRH2M%2CWS10M%2CPS&community=ag&start=19830101&end=19830101&longitude=-179.5&latitude=-89.5&format=csv&time-standard=UTC&user=nasapower410","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.1.2 r-curl/5.1.0 crul/1.4.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-disposition":"attachment; filename=POWER_Point_Daily_19830101_19830101_089d50S_0179d50W_UTC.csv","content-language":"en-US","content-length":"812","content-type":"text/csv","date":"Tue, 05 Dec 2023 12:00:44 GMT","status":"HTTP/2 200 ","via":"1.1 6bec7f912b2b0f8f2808e647a5c2a972.cloudfront.net (CloudFront), 1.1 8f55f9526b9325921fbddb26c450c97a.cloudfront.net (CloudFront)","x-amz-apigw-id":"Pd-UuGySvHcENAQ=","x-amz-cf-id":"qGWLdALdRd_aRKwwWKe-OLQfgph1iJGhTBBF0Na6F35wN-r7piXHYg==","x-amz-cf-pop":["MEL52-P1","MEL52-P1"],"x-amzn-remapped-content-length":"812","x-amzn-requestid":"ff6172f0-b502-4520-8dc4-5ac802bc0261","x-amzn-trace-id":"Root=1-656f10ea-34d4dc53140681325c0fabdc","x-app-name":"daily","x-app-version":"v2.5.1","x-archive-time":"1.429","x-cache":"Miss from cloudfront","x-data-sources":"power,merra2","x-objects-time":"0.006","x-process-time":"0.14","x-service-time":"1.576"},"body":{"encoding":"","file":false,"string":"-BEGIN HEADER-\r\nNASA/POWER CERES/MERRA2 Native Resolution Daily Data \r\nDates (month/day/year): 01/01/1983 through 01/01/1983 \r\nLocation: Latitude -89.5 Longitude -179.5 \r\nElevation from MERRA-2: Average for 0.5 x 0.625 degree lat/lon region = 2885.03 meters\r\nThe value for missing source data that cannot be computed or is outside of the sources availability range: -999 \r\nParameter(s): \r\nT2M MERRA-2 Temperature at 2 Meters (C) \r\nT2M_MIN MERRA-2 Temperature at 2 Meters Minimum (C) \r\nT2M_MAX MERRA-2 Temperature at 2 Meters Maximum (C) \r\nRH2M MERRA-2 Relative Humidity at 2 Meters (%) \r\nWS10M MERRA-2 Wind Speed at 10 Meters (m/s) \r\nPS MERRA-2 Surface Pressure (kPa) \r\n-END HEADER-\r\nYEAR,DOY,T2M,T2M_MIN,T2M_MAX,RH2M,WS10M,PS\n1983,1,-24.36,-25.37,-22.7,92.44,1.93,69.23\n"}},"recorded_at":"2023-12-05 12:00:44 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} +{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/temporal/daily/point?parameters=T2M%2CT2M_MIN%2CT2M_MAX%2CRH2M%2CWS10M%2CPS&community=ag&start=19830101&end=19830101&longitude=-179.5&latitude=-89.5&format=csv&time-standard=UTC&user=nasapower4r","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.4.0 r-curl/5.2.0 crul/1.4.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-disposition":"attachment; filename=POWER_Point_Daily_19830101_19830101_089d50S_0179d50W_UTC.csv","content-language":"en-US","content-length":"812","content-type":"text/csv","date":"Thu, 01 Feb 2024 03:12:08 GMT","status":"HTTP/2 200 ","via":"1.1 64abc7d7e287c3bb0e0b438a7c7db776.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"Sb7QXEORvHcEQ7g=","x-amz-cf-id":"NQvXMW8PI1SmXzjWfTVGYIwNabfgF0eAn8N5kuEgqhYwxX5ZbFwjsg==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"812","x-amzn-requestid":"21638dee-de13-4c6e-bfaa-bf2ed99077d3","x-amzn-trace-id":"Root=1-65bb0c02-69110e1054aeca4b1006e62e","x-app-name":"daily","x-app-version":"v2.5.6","x-archive-time":"1.43","x-cache":"Miss from cloudfront","x-data-sources":"power,merra2","x-objects-time":"0.015","x-process-time":"0.7","x-service-time":"2.15"},"body":{"encoding":"","file":false,"string":"-BEGIN HEADER-\r\nNASA/POWER CERES/MERRA2 Native Resolution Daily Data \r\nDates (month/day/year): 01/01/1983 through 01/01/1983 \r\nLocation: Latitude -89.5 Longitude -179.5 \r\nElevation from MERRA-2: Average for 0.5 x 0.625 degree lat/lon region = 2885.03 meters\r\nThe value for missing source data that cannot be computed or is outside of the sources availability range: -999 \r\nParameter(s): \r\nT2M MERRA-2 Temperature at 2 Meters (C) \r\nT2M_MIN MERRA-2 Temperature at 2 Meters Minimum (C) \r\nT2M_MAX MERRA-2 Temperature at 2 Meters Maximum (C) \r\nRH2M MERRA-2 Relative Humidity at 2 Meters (%) \r\nWS10M MERRA-2 Wind Speed at 10 Meters (m/s) \r\nPS MERRA-2 Surface Pressure (kPa) \r\n-END HEADER-\r\nYEAR,DOY,T2M,T2M_MIN,T2M_MAX,RH2M,WS10M,PS\n1983,1,-24.36,-25.37,-22.7,92.44,1.93,69.23\n"}},"recorded_at":"2024-02-01 03:12:09 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} diff --git a/tests/fixtures/daily_sb_point_LST.json b/tests/fixtures/daily_sb_point_LST.json index fdd863dc..d13031d3 100644 --- a/tests/fixtures/daily_sb_point_LST.json +++ b/tests/fixtures/daily_sb_point_LST.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/temporal/daily/point?parameters=T2M%2CT2M_MIN%2CT2M_MAX%2CRH2M%2CWS10M&community=sb&start=19830101&end=19830101&longitude=-179.5&latitude=-89.5&format=csv&time-standard=LST&user=nasapower410","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.1.2 r-curl/5.1.0 crul/1.4.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-disposition":"attachment; filename=POWER_Point_Daily_19830101_19830101_089d50S_0179d50W_LST.csv","content-language":"en-US","content-length":"763","content-type":"text/csv","date":"Tue, 05 Dec 2023 12:00:53 GMT","status":"HTTP/2 200 ","via":"1.1 75737370d7e6451b1bd1c4dcf8c70dbe.cloudfront.net (CloudFront), 1.1 8f55f9526b9325921fbddb26c450c97a.cloudfront.net (CloudFront)","x-amz-apigw-id":"Pd-WIG8LvHcEfHQ=","x-amz-cf-id":"0a_6Lv1beWTFpEXBl4ZjpeMhVnW5IkYAYzl4q9D3r5E2cU6CbL1TyQ==","x-amz-cf-pop":["MEL52-P1","MEL52-P1"],"x-amzn-remapped-content-length":"763","x-amzn-requestid":"0c0b8bed-6f24-44f8-b7d3-e8b608c1f5c3","x-amzn-trace-id":"Root=1-656f10f3-7a9e1f027fc9b1d96b86d878","x-app-name":"daily","x-app-version":"v2.5.1","x-archive-time":"1.272","x-cache":"Miss from cloudfront","x-data-sources":"power,merra2","x-objects-time":"0.012","x-process-time":"0.15","x-service-time":"1.435"},"body":{"encoding":"","file":false,"string":"-BEGIN HEADER-\r\nNASA/POWER CERES/MERRA2 Native Resolution Daily Data \r\nDates (month/day/year): 01/01/1983 through 01/01/1983 \r\nLocation: Latitude -89.5 Longitude -179.5 \r\nElevation from MERRA-2: Average for 0.5 x 0.625 degree lat/lon region = 2885.03 meters\r\nThe value for missing source data that cannot be computed or is outside of the sources availability range: -999 \r\nParameter(s): \r\nT2M MERRA-2 Temperature at 2 Meters (C) \r\nT2M_MIN MERRA-2 Temperature at 2 Meters Minimum (C) \r\nT2M_MAX MERRA-2 Temperature at 2 Meters Maximum (C) \r\nRH2M MERRA-2 Relative Humidity at 2 Meters (%) \r\nWS10M MERRA-2 Wind Speed at 10 Meters (m/s) \r\n-END HEADER-\r\nYEAR,MO,DY,T2M,T2M_MIN,T2M_MAX,RH2M,WS10M\n1983,1,1,-25.24,-25.67,-24.88,94.25,2.32\n"}},"recorded_at":"2023-12-05 12:00:53 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} +{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/temporal/daily/point?parameters=T2M%2CT2M_MIN%2CT2M_MAX%2CRH2M%2CWS10M&community=sb&start=19830101&end=19830101&longitude=-179.5&latitude=-89.5&format=csv&time-standard=LST&user=nasapower4r","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.4.0 r-curl/5.2.0 crul/1.4.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-disposition":"attachment; filename=POWER_Point_Daily_19830101_19830101_089d50S_0179d50W_LST.csv","content-language":"en-US","content-length":"763","content-type":"text/csv","date":"Thu, 01 Feb 2024 03:12:17 GMT","status":"HTTP/2 200 ","via":"1.1 0559444022ce3d3996ad1eaef387b23e.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"Sb7SjFefPHcEY_g=","x-amz-cf-id":"H_SKKzQUPgYOOAk0qx_l2a2i8eWxdPsE9I7hGImDDGwGypKsX-Z35g==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"763","x-amzn-requestid":"9438882a-2f4a-4d0e-904e-0294c904bc66","x-amzn-trace-id":"Root=1-65bb0c10-3601259a39aae58d29702eaf","x-app-name":"daily","x-app-version":"v2.5.6","x-archive-time":"1.311","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.017","x-process-time":"0.15","x-service-time":"1.479"},"body":{"encoding":"","file":false,"string":"-BEGIN HEADER-\r\nNASA/POWER CERES/MERRA2 Native Resolution Daily Data \r\nDates (month/day/year): 01/01/1983 through 01/01/1983 \r\nLocation: Latitude -89.5 Longitude -179.5 \r\nElevation from MERRA-2: Average for 0.5 x 0.625 degree lat/lon region = 2885.03 meters\r\nThe value for missing source data that cannot be computed or is outside of the sources availability range: -999 \r\nParameter(s): \r\nT2M MERRA-2 Temperature at 2 Meters (C) \r\nT2M_MIN MERRA-2 Temperature at 2 Meters Minimum (C) \r\nT2M_MAX MERRA-2 Temperature at 2 Meters Maximum (C) \r\nRH2M MERRA-2 Relative Humidity at 2 Meters (%) \r\nWS10M MERRA-2 Wind Speed at 10 Meters (m/s) \r\n-END HEADER-\r\nYEAR,MO,DY,T2M,T2M_MIN,T2M_MAX,RH2M,WS10M\n1983,1,1,-25.24,-25.67,-24.88,94.25,2.32\n"}},"recorded_at":"2024-02-01 03:12:17 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} diff --git a/tests/fixtures/daily_sb_point_UTC.json b/tests/fixtures/daily_sb_point_UTC.json index 5ec2725a..fab829d0 100644 --- a/tests/fixtures/daily_sb_point_UTC.json +++ b/tests/fixtures/daily_sb_point_UTC.json @@ -1 +1 @@ -{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/temporal/daily/point?parameters=T2M%2CT2M_MIN%2CT2M_MAX%2CRH2M%2CWS10M&community=sb&start=19830101&end=19830101&longitude=-179.5&latitude=-89.5&format=csv&time-standard=UTC&user=nasapower410","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.1.2 r-curl/5.1.0 crul/1.4.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-disposition":"attachment; filename=POWER_Point_Daily_19830101_19830101_089d50S_0179d50W_UTC.csv","content-language":"en-US","content-length":"762","content-type":"text/csv","date":"Tue, 05 Dec 2023 12:00:51 GMT","status":"HTTP/2 200 ","via":"1.1 f5ada3a2e963ec386faa5c3dd2e81c6a.cloudfront.net (CloudFront), 1.1 8f55f9526b9325921fbddb26c450c97a.cloudfront.net (CloudFront)","x-amz-apigw-id":"Pd-V3HRuPHcEsUQ=","x-amz-cf-id":"dcnj9RFxrTAtBZn10q_KJ1uffkx6qF4OfXBMaXOXZtZ5CFUCbSTSHg==","x-amz-cf-pop":["MEL52-P1","MEL52-P1"],"x-amzn-remapped-content-length":"762","x-amzn-requestid":"a6dfbb30-10d7-475f-a9d7-f6c49f5191bc","x-amzn-trace-id":"Root=1-656f10f2-55a120ca6aec971929827faf","x-app-name":"daily","x-app-version":"v2.5.1","x-archive-time":"1.137","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.007","x-process-time":"0.17","x-service-time":"1.315"},"body":{"encoding":"","file":false,"string":"-BEGIN HEADER-\r\nNASA/POWER CERES/MERRA2 Native Resolution Daily Data \r\nDates (month/day/year): 01/01/1983 through 01/01/1983 \r\nLocation: Latitude -89.5 Longitude -179.5 \r\nElevation from MERRA-2: Average for 0.5 x 0.625 degree lat/lon region = 2885.03 meters\r\nThe value for missing source data that cannot be computed or is outside of the sources availability range: -999 \r\nParameter(s): \r\nT2M MERRA-2 Temperature at 2 Meters (C) \r\nT2M_MIN MERRA-2 Temperature at 2 Meters Minimum (C) \r\nT2M_MAX MERRA-2 Temperature at 2 Meters Maximum (C) \r\nRH2M MERRA-2 Relative Humidity at 2 Meters (%) \r\nWS10M MERRA-2 Wind Speed at 10 Meters (m/s) \r\n-END HEADER-\r\nYEAR,MO,DY,T2M,T2M_MIN,T2M_MAX,RH2M,WS10M\n1983,1,1,-24.36,-25.37,-22.7,92.44,1.93\n"}},"recorded_at":"2023-12-05 12:00:51 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} +{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/temporal/daily/point?parameters=T2M%2CT2M_MIN%2CT2M_MAX%2CRH2M%2CWS10M&community=sb&start=19830101&end=19830101&longitude=-179.5&latitude=-89.5&format=csv&time-standard=UTC&user=nasapower4r","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.4.0 r-curl/5.2.0 crul/1.4.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-disposition":"attachment; filename=POWER_Point_Daily_19830101_19830101_089d50S_0179d50W_UTC.csv","content-language":"en-US","content-length":"762","content-type":"text/csv","date":"Thu, 01 Feb 2024 03:12:15 GMT","status":"HTTP/2 200 ","via":"1.1 bcafd6d18f872a34f793854d3fb920f0.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"Sb7SPG0pvHcESKg=","x-amz-cf-id":"dF_zDqW-iUrhLI7CXxNuBDIoqT3cQn4AXXh-xGlfxJ58bebnKndYOg==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"762","x-amzn-requestid":"34a44a53-418d-4d27-b1d5-508cf84ac52a","x-amzn-trace-id":"Root=1-65bb0c0e-2588c9181be0f1d27fe1e3fc","x-app-name":"daily","x-app-version":"v2.5.6","x-archive-time":"1.188","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.025","x-process-time":"0.16","x-service-time":"1.374"},"body":{"encoding":"","file":false,"string":"-BEGIN HEADER-\r\nNASA/POWER CERES/MERRA2 Native Resolution Daily Data \r\nDates (month/day/year): 01/01/1983 through 01/01/1983 \r\nLocation: Latitude -89.5 Longitude -179.5 \r\nElevation from MERRA-2: Average for 0.5 x 0.625 degree lat/lon region = 2885.03 meters\r\nThe value for missing source data that cannot be computed or is outside of the sources availability range: -999 \r\nParameter(s): \r\nT2M MERRA-2 Temperature at 2 Meters (C) \r\nT2M_MIN MERRA-2 Temperature at 2 Meters Minimum (C) \r\nT2M_MAX MERRA-2 Temperature at 2 Meters Maximum (C) \r\nRH2M MERRA-2 Relative Humidity at 2 Meters (%) \r\nWS10M MERRA-2 Wind Speed at 10 Meters (m/s) \r\n-END HEADER-\r\nYEAR,MO,DY,T2M,T2M_MIN,T2M_MAX,RH2M,WS10M\n1983,1,1,-24.36,-25.37,-22.7,92.44,1.93\n"}},"recorded_at":"2024-02-01 03:12:15 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} diff --git a/tests/fixtures/query_groupings.json b/tests/fixtures/query_groupings.json new file mode 100644 index 00000000..7f6c99a3 --- /dev/null +++ b/tests/fixtures/query_groupings.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/system/manager/system/groupings","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.4.0 r-curl/5.2.0 crul/1.4.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-language":"en-US","content-length":"111516","content-type":"application/json","date":"Thu, 01 Feb 2024 03:12:01 GMT","etag":"329c994ab0bc6c16aef9e44f75e5dcf2","last-modified":"Thu, 11 Jan 2024 19:47:31 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 8b783853f686a4f741f19858147f3e7e.cloudfront.net (CloudFront), 1.1 fe7beb8e82046ee5f0273386ba166142.cloudfront.net (CloudFront)","x-amz-apigw-id":"Sb7QTGOyPHcEnMA=","x-amz-cf-id":"3UdoJ0SP9raVOAgFtindn4cp05sx2kZGQHZWyrcy5qMqH0A_KtDVbA==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"111516","x-amzn-requestid":"e3b91cd9-c62c-4148-b5a7-3eddc25440d4","x-amzn-trace-id":"Root=1-65bb0c01-7f218c754c0ecc7156514821","x-app-name":"manager","x-app-version":"v2.5.2","x-cache":"Miss from cloudfront","x-service-time":"0.001"},"body":{"encoding":"","file":false,"string":"{\r\n \"groups\": {\r\n \"AG\": {\r\n \"Hourly\": {\r\n \"Solar Fluxes and Related\": [\r\n [\r\n \"All Sky Surface Shortwave Downward Irradiance\",\r\n \"ALLSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Shortwave Downward Irradiance\",\r\n \"CLRSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Top-Of-Atmosphere Shortwave Downward Irradiance\",\r\n \"TOA_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"ALLSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"CLRSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVA Irradiance\",\r\n \"ALLSKY_SFC_UVA\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVB Irradiance\",\r\n \"ALLSKY_SFC_UVB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UV Index\",\r\n \"ALLSKY_SFC_UV_INDEX\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Temperatures\": [\r\n [\r\n \"Temperature at 2 Meters\",\r\n \"T2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Dew/Frost Point at 2 Meters\",\r\n \"T2MDEW\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wet Bulb Temperature at 2 Meters\",\r\n \"T2MWET\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Humidity/Precipitation\": [\r\n [\r\n \"Specific Humidity at 2 Meters\",\r\n \"QV2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Relative Humidity at 2 Meters\",\r\n \"RH2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Precipitation\",\r\n \"PRECTOTCORR\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Wind/Pressure\": [\r\n [\r\n \"Surface Pressure\",\r\n \"PS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 2 Meters\",\r\n \"WS2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 2 Meters\",\r\n \"WD2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters\",\r\n \"WS10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 10 Meters\",\r\n \"WD10M\",\r\n [],\r\n []\r\n ]\r\n ]\r\n },\r\n \"Daily\": {\r\n \"Solar Fluxes and Related\": [\r\n [\r\n \"All Sky Surface Shortwave Downward Irradiance\",\r\n \"ALLSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Shortwave Downward Irradiance\",\r\n \"CLRSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Top-Of-Atmosphere Shortwave Downward Irradiance\",\r\n \"TOA_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"ALLSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"CLRSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVA Irradiance\",\r\n \"ALLSKY_SFC_UVA\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVB Irradiance\",\r\n \"ALLSKY_SFC_UVB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UV Index\",\r\n \"ALLSKY_SFC_UV_INDEX\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Temperatures/Thermal IR Flux\": [\r\n [\r\n \"Temperature at 2 Meters\",\r\n \"T2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Dew/Frost Point at 2 Meters\",\r\n \"T2MDEW\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wet Bulb Temperature at 2 Meters\",\r\n \"T2MWET\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Earth Skin Temperature\",\r\n \"TS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Range\",\r\n \"T2M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Maximum\",\r\n \"T2M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Minimum\",\r\n \"T2M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Longwave Downward Irradiance\",\r\n \"ALLSKY_SFC_LW_DWN\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Humidity/Precipitation\": [\r\n [\r\n \"Specific Humidity at 2 Meters\",\r\n \"QV2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Relative Humidity at 2 Meters\",\r\n \"RH2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Precipitation\",\r\n \"PRECTOTCORR\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Wind/Pressure\": [\r\n [\r\n \"Surface Pressure\",\r\n \"PS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 2 Meters\",\r\n \"WS2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 2 Meters Maximum\",\r\n \"WS2M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 2 Meters Minimum\",\r\n \"WS2M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 2 Meters Range\",\r\n \"WS2M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 2 Meters\",\r\n \"WD2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters\",\r\n \"WS10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Maximum\",\r\n \"WS10M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Minimum\",\r\n \"WS10M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Range\",\r\n \"WS10M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 10 Meters\",\r\n \"WD10M\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Soil Properties\": [\r\n [\r\n \"Surface Soil Wetness (surface to 5 cm below)\",\r\n \"GWETTOP\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Root Zone Soil Wetness (surface to 100 cm below)\",\r\n \"GWETROOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Profile Soil Moisture (surface to bedrock)\",\r\n \"GWETPROF\",\r\n [],\r\n []\r\n ]\r\n ]\r\n },\r\n \"Monthly\": {\r\n \"Solar Fluxes and Related\": [\r\n [\r\n \"All Sky Surface Shortwave Downward Irradiance\",\r\n \"ALLSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Shortwave Downward Irradiance\",\r\n \"CLRSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Downward Direct Normal Irradiance\",\r\n \"ALLSKY_SFC_SW_DNI\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Diffuse Irradiance\",\r\n \"ALLSKY_SFC_SW_DIFF\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Albedo\",\r\n \"ALLSKY_SRF_ALB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Top-Of-Atmosphere Shortwave Downward Irradiance\",\r\n \"TOA_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Cloud Amount\",\r\n \"CLOUD_AMT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"ALLSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"CLRSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVA Irradiance\",\r\n \"ALLSKY_SFC_UVA\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVB Irradiance\",\r\n \"ALLSKY_SFC_UVB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UV Index\",\r\n \"ALLSKY_SFC_UV_INDEX\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Temperatures/Thermal IR Flux\": [\r\n [\r\n \"Temperature at 2 Meters\",\r\n \"T2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Dew/Frost Point at 2 Meters\",\r\n \"T2MDEW\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wet Bulb Temperature at 2 Meters\",\r\n \"T2MWET\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Earth Skin Temperature\",\r\n \"TS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Range\",\r\n \"T2M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Maximum\",\r\n \"T2M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Minimum\",\r\n \"T2M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Longwave Downward Irradiance\",\r\n \"ALLSKY_SFC_LW_DWN\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Humidity/Precipitation\": [\r\n [\r\n \"Specific Humidity at 2 Meters\",\r\n \"QV2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Relative Humidity at 2 Meters\",\r\n \"RH2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Precipitation Average\",\r\n \"PRECTOTCORR\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Precipitation Sum Average\",\r\n \"PRECTOTCORR_SUM\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Wind/Pressure\": [\r\n [\r\n \"Surface Pressure\",\r\n \"PS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 2 Meters\",\r\n \"WS2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 2 Meters Maximum\",\r\n \"WS2M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 2 Meters Minimum\",\r\n \"WS2M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 2 Meters Range\",\r\n \"WS2M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 2 Meters\",\r\n \"WD2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters\",\r\n \"WS10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Maximum\",\r\n \"WS10M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Minimum\",\r\n \"WS10M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Range\",\r\n \"WS10M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 10 Meters\",\r\n \"WD10M\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Soil Properties\": [\r\n [\r\n \"Surface Soil Wetness (surface to 5 cm below)\",\r\n \"GWETTOP\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Root Zone Soil Wetness (surface to 100 cm below)\",\r\n \"GWETROOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Profile Soil Moisture (surface to bedrock)\",\r\n \"GWETPROF\",\r\n [],\r\n []\r\n ]\r\n ]\r\n },\r\n \"Climatology\": {\r\n \"Solar Fluxes and Related\": [\r\n [\r\n \"All Sky Surface Shortwave Downward Irradiance\",\r\n \"ALLSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Shortwave Downward Irradiance\",\r\n \"CLRSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Downward Direct Normal Irradiance\",\r\n \"ALLSKY_SFC_SW_DNI\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Diffuse Irradiance\",\r\n \"ALLSKY_SFC_SW_DIFF\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Albedo\",\r\n \"ALLSKY_SRF_ALB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Top-Of-Atmosphere Shortwave Downward Irradiance\",\r\n \"TOA_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Cloud Amount\",\r\n \"CLOUD_AMT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"ALLSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"CLRSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVA Irradiance\",\r\n \"ALLSKY_SFC_UVA\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVB Irradiance\",\r\n \"ALLSKY_SFC_UVB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UV Index\",\r\n \"ALLSKY_SFC_UV_INDEX\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Temperatures/Thermal IR Flux\": [\r\n [\r\n \"Temperature at 2 Meters\",\r\n \"T2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Dew/Frost Point at 2 Meters\",\r\n \"T2MDEW\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wet Bulb Temperature at 2 Meters\",\r\n \"T2MWET\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Earth Skin Temperature\",\r\n \"TS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Range\",\r\n \"T2M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Maximum\",\r\n \"T2M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Minimum\",\r\n \"T2M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Earth Skin Temperature Maximum\",\r\n \"TS_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Earth Skin Temperature Minimum\",\r\n \"TS_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Frost Days\",\r\n \"FROST_DAYS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Longwave Downward Irradiance\",\r\n \"ALLSKY_SFC_LW_DWN\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Humidity/Precipitation\": [\r\n [\r\n \"Specific Humidity at 2 Meters\",\r\n \"QV2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Relative Humidity at 2 Meters\",\r\n \"RH2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Precipitation Average\",\r\n \"PRECTOTCORR\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Precipitation Sum Average\",\r\n \"PRECTOTCORR_SUM\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Wind/Pressure\": [\r\n [\r\n \"Surface Pressure\",\r\n \"PS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 2 Meters\",\r\n \"WS2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 2 Meters Maximum\",\r\n \"WS2M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 2 Meters Minimum\",\r\n \"WS2M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 2 Meters Range\",\r\n \"WS2M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 2 Meters\",\r\n \"WD2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters\",\r\n \"WS10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Maximum\",\r\n \"WS10M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Minimum\",\r\n \"WS10M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Range\",\r\n \"WS10M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 10 Meters\",\r\n \"WD10M\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Soil Properties\": [\r\n [\r\n \"Surface Soil Wetness (surface to 5 cm below)\",\r\n \"GWETTOP\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Root Zone Soil Wetness (surface to 100 cm below)\",\r\n \"GWETROOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Profile Soil Moisture (surface to bedrock)\",\r\n \"GWETPROF\",\r\n [],\r\n []\r\n ]\r\n ]\r\n }\r\n },\r\n \"SB\": {\r\n \"Hourly\": {\r\n \"Solar Fluxes and Related\": [\r\n [\r\n \"All Sky Surface Shortwave Downward Irradiance\",\r\n \"ALLSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Shortwave Downward Irradiance\",\r\n \"CLRSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Top-Of-Atmosphere Shortwave Downward Irradiance\",\r\n \"TOA_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Albedo\",\r\n \"ALLSKY_SRF_ALB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Integrated Solar Zenith Angle\",\r\n \"SZA\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"ALLSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"CLRSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVA Irradiance\",\r\n \"ALLSKY_SFC_UVA\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVB Irradiance\",\r\n \"ALLSKY_SFC_UVB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UV Index\",\r\n \"ALLSKY_SFC_UV_INDEX\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Temperature/Thermal IR Flux\": [\r\n [\r\n \"Temperature at 2 Meters\",\r\n \"T2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Dew/Frost Point at 2 Meters\",\r\n \"T2MDEW\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wet Bulb Temperature at 2 Meters\",\r\n \"T2MWET\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Longwave Downward Irradiance\",\r\n \"ALLSKY_SFC_LW_DWN\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Humidity/Precipitation\": [\r\n [\r\n \"Specific Humidity at 2 Meters\",\r\n \"QV2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Relative Humidity at 2 Meters\",\r\n \"RH2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Precipitation\",\r\n \"PRECTOTCORR\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Wind/Pressure\": [\r\n [\r\n \"Surface Pressure\",\r\n \"PS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters\",\r\n \"WS10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 10 Meters\",\r\n \"WD10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters\",\r\n \"WS50M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 50 Meters\",\r\n \"WD50M\",\r\n [],\r\n []\r\n ]\r\n ]\r\n },\r\n \"Daily\": {\r\n \"Solar Fluxes and Related\": [\r\n [\r\n \"All Sky Surface Shortwave Downward Irradiance\",\r\n \"ALLSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Shortwave Downward Irradiance\",\r\n \"CLRSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Top-Of-Atmosphere Shortwave Downward Irradiance\",\r\n \"TOA_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Albedo\",\r\n \"ALLSKY_SRF_ALB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"ALLSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"CLRSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVA Irradiance\",\r\n \"ALLSKY_SFC_UVA\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVB Irradiance\",\r\n \"ALLSKY_SFC_UVB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UV Index\",\r\n \"ALLSKY_SFC_UV_INDEX\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Temperature/Thermal IR Flux\": [\r\n [\r\n \"Temperature at 2 Meters\",\r\n \"T2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Dew/Frost Point at 2 Meters\",\r\n \"T2MDEW\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wet Bulb Temperature at 2 Meters\",\r\n \"T2MWET\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Earth Skin Temperature\",\r\n \"TS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Range\",\r\n \"T2M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Maximum\",\r\n \"T2M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Minimum\",\r\n \"T2M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Longwave Downward Irradiance\",\r\n \"ALLSKY_SFC_LW_DWN\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"DOE/ASHRAE Climate Building\": [\r\n [\r\n \"Cooling Degree Days Above 0 C\",\r\n \"CDD0\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Cooling Degree Days Above 10 C\",\r\n \"CDD10\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Cooling Degree Days Above 18.3 C\",\r\n \"CDD18_3\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Heating Degree Days Below 0 C\",\r\n \"HDD0\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Heating Degree Days Below 10 C\",\r\n \"HDD10\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Heating Degree Days Below 18.3 C\",\r\n \"HDD18_3\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Humidity/Precipitation\": [\r\n [\r\n \"Specific Humidity at 2 Meters\",\r\n \"QV2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Relative Humidity at 2 Meters\",\r\n \"RH2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Precipitation\",\r\n \"PRECTOTCORR\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Wind/Pressure\": [\r\n [\r\n \"Surface Pressure\",\r\n \"PS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters\",\r\n \"WS10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Maximum\",\r\n \"WS10M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Minimum\",\r\n \"WS10M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Range\",\r\n \"WS10M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 10 Meters\",\r\n \"WD10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters\",\r\n \"WS50M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters Maximum\",\r\n \"WS50M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters Minimum\",\r\n \"WS50M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters Range\",\r\n \"WS50M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 50 Meters\",\r\n \"WD50M\",\r\n [],\r\n []\r\n ]\r\n ]\r\n },\r\n \"Monthly\": {\r\n \"Solar Fluxes and Related\": [\r\n [\r\n \"All Sky Surface Shortwave Downward Irradiance\",\r\n \"ALLSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Shortwave Downward Irradiance\",\r\n \"CLRSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Top-Of-Atmosphere Shortwave Downward Irradiance\",\r\n \"TOA_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Albedo\",\r\n \"ALLSKY_SRF_ALB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"ALLSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"CLRSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVA Irradiance\",\r\n \"ALLSKY_SFC_UVA\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVB Irradiance\",\r\n \"ALLSKY_SFC_UVB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UV Index\",\r\n \"ALLSKY_SFC_UV_INDEX\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Temperature/Thermal IR Flux\": [\r\n [\r\n \"Temperature at 2 Meters\",\r\n \"T2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Dew/Frost Point at 2 Meters\",\r\n \"T2MDEW\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wet Bulb Temperature at 2 Meters\",\r\n \"T2MWET\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Earth Skin Temperature\",\r\n \"TS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Range\",\r\n \"T2M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Maximum\",\r\n \"T2M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Minimum\",\r\n \"T2M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Longwave Downward Irradiance\",\r\n \"ALLSKY_SFC_LW_DWN\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"DOE/ASHRAE Climate Building\": [\r\n [\r\n \"Cooling Degree Days Above 0 C\",\r\n \"CDD0\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Cooling Degree Days Above 10 C\",\r\n \"CDD10\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Cooling Degree Days Above 18.3 C\",\r\n \"CDD18_3\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Heating Degree Days Below 0 C\",\r\n \"HDD0\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Heating Degree Days Below 10 C\",\r\n \"HDD10\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Heating Degree Days Below 18.3 C\",\r\n \"HDD18_3\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Humidity/Precipitation\": [\r\n [\r\n \"Specific Humidity at 2 Meters\",\r\n \"QV2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Relative Humidity at 2 Meters\",\r\n \"RH2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Precipitation Average\",\r\n \"PRECTOTCORR\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Precipitation Sum Average\",\r\n \"PRECTOTCORR_SUM\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Wind/Pressure\": [\r\n [\r\n \"Surface Pressure\",\r\n \"PS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters\",\r\n \"WS10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Maximum\",\r\n \"WS10M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Minimum\",\r\n \"WS10M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Range\",\r\n \"WS10M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 10 Meters\",\r\n \"WD10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters\",\r\n \"WS50M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters Maximum\",\r\n \"WS50M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters Minimum\",\r\n \"WS50M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters Range\",\r\n \"WS50M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 50 Meters\",\r\n \"WD50M\",\r\n [],\r\n []\r\n ]\r\n ]\r\n },\r\n \"Climatology\": {\r\n \"Solar Fluxes and Related\": [\r\n [\r\n \"All Sky Surface Shortwave Downward Irradiance\",\r\n \"ALLSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Downward Irradiance at GMT Times\",\r\n \"ALLSKY_SFC_SW_DWN_HR\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Shortwave Downward Irradiance\",\r\n \"CLRSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Downward Direct Normal Irradiance\",\r\n \"ALLSKY_SFC_SW_DNI\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Downward Direct Normal Irradiance Maximum\",\r\n \"ALLSKY_SFC_SW_DNI_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Downward Direct Normal Irradiance Minimum\",\r\n \"ALLSKY_SFC_SW_DNI_Min\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Diffuse Irradiance\",\r\n \"ALLSKY_SFC_SW_DIFF\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Diffuse Irradiance Maximum\",\r\n \"ALLSKY_SFC_SW_DIFF_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Diffuse Irradiance Minimum\",\r\n \"ALLSKY_SFC_SW_DIFF_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Insolation Clearness Index\",\r\n \"ALLSKY_KT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Insolation Clearness Index\",\r\n \"CLRSKY_KT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Albedo\",\r\n \"ALLSKY_SRF_ALB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Top-Of-Atmosphere Shortwave Downward Irradiance\",\r\n \"TOA_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Average Solar Noon Time for Climatological Month\",\r\n \"SG_NOON\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Average Daylight Hours for Climatological Month\",\r\n \"SG_DAY_HOURS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"ALLSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"CLRSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVA Irradiance\",\r\n \"ALLSKY_SFC_UVA\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVB Irradiance\",\r\n \"ALLSKY_SFC_UVB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UV Index\",\r\n \"ALLSKY_SFC_UV_INDEX\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Temperature/Thermal IR Flux\": [\r\n [\r\n \"Temperature at 2 Meters\",\r\n \"T2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Dew/Frost Point at 2 Meters\",\r\n \"T2MDEW\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wet Bulb Temperature at 2 Meters\",\r\n \"T2MWET\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Earth Skin Temperature\",\r\n \"TS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Range\",\r\n \"T2M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Maximum\",\r\n \"T2M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Minimum\",\r\n \"T2M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Earth Skin Temperature Maximum\",\r\n \"TS_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Earth Skin Temperature Minimum\",\r\n \"TS_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Frost Days\",\r\n \"FROST_DAYS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Longwave Downward Irradiance\",\r\n \"ALLSKY_SFC_LW_DWN\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"DOE/ASHRAE Climate Building\": [\r\n [\r\n \"Cooling Degree Days Above 0 C\",\r\n \"CDD0\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Cooling Degree Days Above 10 C\",\r\n \"CDD10\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Cooling Degree Days Above 18.3 C\",\r\n \"CDD18_3\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Heating Degree Days Below 0 C\",\r\n \"HDD0\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Heating Degree Days Below 10 C\",\r\n \"HDD10\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Heating Degree Days Below 18.3 C\",\r\n \"HDD18_3\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Humidity/Precipitation\": [\r\n [\r\n \"Specific Humidity at 2 Meters\",\r\n \"QV2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Relative Humidity at 2 Meters\",\r\n \"RH2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Precipitation Average\",\r\n \"PRECTOTCORR\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Precipitation Sum Average\",\r\n \"PRECTOTCORR_SUM\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Wind/Pressure\": [\r\n [\r\n \"Surface Pressure\",\r\n \"PS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters\",\r\n \"WS10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Maximum\",\r\n \"WS10M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Minimum\",\r\n \"WS10M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Range\",\r\n \"WS10M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 10 Meters\",\r\n \"WD10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters\",\r\n \"WS50M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters Maximum\",\r\n \"WS50M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters Minimum\",\r\n \"WS50M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters Range\",\r\n \"WS50M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 50 Meters\",\r\n \"WD50M\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Diurnal Cloud Amounts\": [\r\n [\r\n \"Cloud Amount\",\r\n \"CLOUD_AMT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Cloud Amount at GMT Times\",\r\n \"CLOUD_AMT_HR\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Energy-Storage System Sizing\": [\r\n [\r\n \"Equivalent No-Sun Days Over A Consecutive 1-day Period\",\r\n \"EQUIV_NO_SUN_CONSEC_01\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Equivalent No-Sun Days Over A Consecutive 3-day Period\",\r\n \"EQUIV_NO_SUN_CONSEC_03\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Equivalent No-Sun Days Over A Consecutive 7-day Period\",\r\n \"EQUIV_NO_SUN_CONSEC_07\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Equivalent No-Sun Days Over A Consecutive 14-day Period\",\r\n \"EQUIV_NO_SUN_CONSEC_14\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Equivalent No-Sun Days Over A Consecutive 21-day Period\",\r\n \"EQUIV_NO_SUN_CONSEC_21\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Equivalent No-Sun Days Over A Consecutive Month Period\",\r\n \"EQUIV_NO_SUN_CONSEC_MONTH\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Insolation Over A Consecutive 1-day Period\",\r\n \"INSOL_CONSEC_01\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Insolation Over A Consecutive 3-day Period\",\r\n \"INSOL_CONSEC_03\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Insolation Over A Consecutive 7-day Period\",\r\n \"INSOL_CONSEC_07\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Insolation Over A Consecutive 14-day Period\",\r\n \"INSOL_CONSEC_14\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Insolation Over A Consecutive 21-day Period\",\r\n \"INSOL_CONSEC_21\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Insolation Over A Consecutive Month Period\",\r\n \"INSOL_CONSEC_MONTH\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Minimum Insolation Over A Consecutive 1-day Period\",\r\n \"INSOL_CONSEC_01_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Minimum Insolation Over A Consecutive 3-day Period\",\r\n \"INSOL_CONSEC_03_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Minimum Insolation Over A Consecutive 7-day Period\",\r\n \"INSOL_CONSEC_07_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Minimum Insolation Over A Consecutive 14-day Period\",\r\n \"INSOL_CONSEC_14_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Minimum Insolation Over A Consecutive 21-day Period\",\r\n \"INSOL_CONSEC_21_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Minimum Insolation Over A Consecutive Month Period\",\r\n \"INSOL_CONSEC_MONTH_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Solar Irradiance Deficit Over A Consecutive 1-day Period\",\r\n \"SOLAR_DEFICITS_CONSEC_01\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Solar Irradiance Deficit Over A Consecutive 3-day Period\",\r\n \"SOLAR_DEFICITS_CONSEC_03\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Solar Irradiance Deficit Over A Consecutive 7-day Period\",\r\n \"SOLAR_DEFICITS_CONSEC_07\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Solar Irradiance Deficit Over A Consecutive 14-day Period\",\r\n \"SOLAR_DEFICITS_CONSEC_14\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Solar Irradiance Deficit Over A Consecutive 21-day Period\",\r\n \"SOLAR_DEFICITS_CONSEC_21\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Solar Irradiance Deficit Over A Consecutive Month Period\",\r\n \"SOLAR_DEFICITS_CONSEC_MONTH\",\r\n [],\r\n []\r\n ]\r\n ]\r\n }\r\n },\r\n \"RE\": {\r\n \"Hourly\": {\r\n \"Solar Fluxes and Related\": [\r\n [\r\n \"All Sky Surface Shortwave Downward Irradiance\",\r\n \"ALLSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Shortwave Downward Irradiance\",\r\n \"CLRSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Insolation Clearness Index\",\r\n \"ALLSKY_KT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Albedo\",\r\n \"ALLSKY_SRF_ALB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Integrated Solar Zenith Angle\",\r\n \"SZA\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"ALLSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"CLRSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVA Irradiance\",\r\n \"ALLSKY_SFC_UVA\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVB Irradiance\",\r\n \"ALLSKY_SFC_UVB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UV Index\",\r\n \"ALLSKY_SFC_UV_INDEX\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Temperatures\": [\r\n [\r\n \"Temperature at 2 Meters\",\r\n \"T2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Dew/Frost Point at 2 Meters\",\r\n \"T2MDEW\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wet Bulb Temperature at 2 Meters\",\r\n \"T2MWET\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Humidity/Precipitation\": [\r\n [\r\n \"Specific Humidity at 2 Meters\",\r\n \"QV2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Relative Humidity at 2 Meters\",\r\n \"RH2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Precipitation\",\r\n \"PRECTOTCORR\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Wind/Pressure\": [\r\n [\r\n \"Surface Pressure\",\r\n \"PS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters\",\r\n \"WS10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 10 Meters\",\r\n \"WD10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters\",\r\n \"WS50M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 50 Meters\",\r\n \"WD50M\",\r\n [],\r\n []\r\n ]\r\n ]\r\n },\r\n \"Daily\": {\r\n \"Solar Fluxes and Related\": [\r\n [\r\n \"All Sky Surface Shortwave Downward Irradiance\",\r\n \"ALLSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Shortwave Downward Irradiance\",\r\n \"CLRSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Insolation Clearness Index\",\r\n \"ALLSKY_KT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Longwave Downward Irradiance (thermal infrared)\",\r\n \"ALLSKY_SFC_LW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"ALLSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"CLRSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVA Irradiance\",\r\n \"ALLSKY_SFC_UVA\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVB Irradiance\",\r\n \"ALLSKY_SFC_UVB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UV Index\",\r\n \"ALLSKY_SFC_UV_INDEX\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Parameters for Solar Cooking\": [\r\n [\r\n \"All Sky Surface Shortwave Downward Irradiance\",\r\n \"ALLSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Shortwave Downward Irradiance\",\r\n \"CLRSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 2 Meters\",\r\n \"WS2M\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Temperatures\": [\r\n [\r\n \"Temperature at 2 Meters\",\r\n \"T2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Dew/Frost Point at 2 Meters\",\r\n \"T2MDEW\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wet Bulb Temperature at 2 Meters\",\r\n \"T2MWET\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Earth Skin Temperature\",\r\n \"TS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Range\",\r\n \"T2M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Maximum\",\r\n \"T2M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Minimum\",\r\n \"T2M_MIN\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Humidity/Precipitation\": [\r\n [\r\n \"Specific Humidity at 2 Meters\",\r\n \"QV2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Relative Humidity at 2 Meters\",\r\n \"RH2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Precipitation\",\r\n \"PRECTOTCORR\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Wind/Pressure\": [\r\n [\r\n \"Surface Pressure\",\r\n \"PS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters\",\r\n \"WS10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Maximum\",\r\n \"WS10M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Minimum\",\r\n \"WS10M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Range\",\r\n \"WS10M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 10 Meters\",\r\n \"WD10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters\",\r\n \"WS50M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters Maximum\",\r\n \"WS50M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters Minimum\",\r\n \"WS50M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters Range\",\r\n \"WS50M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 50 Meters\",\r\n \"WD50M\",\r\n [],\r\n []\r\n ]\r\n ]\r\n },\r\n \"Monthly\": {\r\n \"Solar Fluxes and Related\": [\r\n [\r\n \"All Sky Surface Shortwave Downward Irradiance\",\r\n \"ALLSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Shortwave Downward Irradiance\",\r\n \"CLRSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Downward Direct Normal Irradiance\",\r\n \"ALLSKY_SFC_SW_DNI\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Diffuse Irradiance\",\r\n \"ALLSKY_SFC_SW_DIFF\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Insolation Clearness Index\",\r\n \"ALLSKY_KT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Insolation Clearness Index\",\r\n \"CLRSKY_KT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Albedo\",\r\n \"ALLSKY_SRF_ALB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Top-Of-Atmosphere Shortwave Downward Irradiance\",\r\n \"TOA_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Cloud Amount\",\r\n \"CLOUD_AMT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"ALLSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"CLRSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVA Irradiance\",\r\n \"ALLSKY_SFC_UVA\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVB Irradiance\",\r\n \"ALLSKY_SFC_UVB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UV Index\",\r\n \"ALLSKY_SFC_UV_INDEX\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Parameters for Tilted PV Panels\": [\r\n [\r\n \"All Sky Surface Shortwave Downward Irradiance\",\r\n \"ALLSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Shortwave Downward Irradiance\",\r\n \"CLRSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Albedo\",\r\n \"ALLSKY_SRF_ALB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Insolation Clearness Index\",\r\n \"ALLSKY_KT\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Parameters for Solar Cooking\": [\r\n [\r\n \"All Sky Surface Shortwave Downward Irradiance\",\r\n \"ALLSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Shortwave Downward Irradiance\",\r\n \"CLRSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 2 Meters\",\r\n \"WS2M\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Temperature/Thermal IR Flux\": [\r\n [\r\n \"Temperature at 2 Meters\",\r\n \"T2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Dew/Frost Point at 2 Meters\",\r\n \"T2MDEW\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wet Bulb Temperature at 2 Meters\",\r\n \"T2MWET\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Earth Skin Temperature\",\r\n \"TS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Range\",\r\n \"T2M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Maximum\",\r\n \"T2M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Minimum\",\r\n \"T2M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Longwave Downward Irradiance\",\r\n \"ALLSKY_SFC_LW_DWN\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Humidity/Precipitation\": [\r\n [\r\n \"Specific Humidity at 2 Meters\",\r\n \"QV2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Relative Humidity at 2 Meters\",\r\n \"RH2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Precipitation Average\",\r\n \"PRECTOTCORR\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Precipitation Sum Average\",\r\n \"PRECTOTCORR_SUM\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Wind/Pressure\": [\r\n [\r\n \"Surface Pressure\",\r\n \"PS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters\",\r\n \"WS10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Maximum\",\r\n \"WS10M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Minimum\",\r\n \"WS10M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Range\",\r\n \"WS10M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 10 Meters\",\r\n \"WD10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters\",\r\n \"WS50M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters Maximum\",\r\n \"WS50M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters Minimum\",\r\n \"WS50M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters Range\",\r\n \"WS50M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 50 Meters\",\r\n \"WD50M\",\r\n [],\r\n []\r\n ]\r\n ]\r\n },\r\n \"Climatology\": {\r\n \"Solar Fluxes and Related\": [\r\n [\r\n \"All Sky Surface Shortwave Downward Irradiance\",\r\n \"ALLSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Downward Irradiance at GMT Times\",\r\n \"ALLSKY_SFC_SW_DWN_HR\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Shortwave Downward Irradiance\",\r\n \"CLRSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Downward Direct Normal Irradiance\",\r\n \"ALLSKY_SFC_SW_DNI\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Diffuse Irradiance\",\r\n \"ALLSKY_SFC_SW_DIFF\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Insolation Clearness Index\",\r\n \"ALLSKY_KT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Insolation Clearness Index\",\r\n \"CLRSKY_KT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Albedo\",\r\n \"ALLSKY_SRF_ALB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Top-Of-Atmosphere Shortwave Downward Irradiance\",\r\n \"TOA_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Cloud Amount\",\r\n \"CLOUD_AMT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"ALLSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Photosynthetically Active Radiation (PAR) Total\",\r\n \"CLRSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVA Irradiance\",\r\n \"ALLSKY_SFC_UVA\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UVB Irradiance\",\r\n \"ALLSKY_SFC_UVB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface UV Index\",\r\n \"ALLSKY_SFC_UV_INDEX\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Parameters for Tilted PV Panels\": [\r\n [\r\n \"All Sky Surface Shortwave Downward Irradiance\",\r\n \"ALLSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Shortwave Downward Irradiance\",\r\n \"CLRSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Downward Direct Normal Irradiance\",\r\n \"ALLSKY_SFC_SW_DNI\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Direct Normal Irradiance Maximum\",\r\n \"ALLSKY_SFC_SW_DNI_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Direct Normal Irradiance Minimum\",\r\n \"ALLSKY_SFC_SW_DNI_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Diffuse Irradiance\",\r\n \"ALLSKY_SFC_SW_DIFF\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Diffuse Irradiance Maximum\",\r\n \"ALLSKY_SFC_SW_DIFF_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Diffuse Irradiance Minimum\",\r\n \"ALLSKY_SFC_SW_DIFF_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Insolation Clearness Index\",\r\n \"ALLSKY_KT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Insolation Clearness Index\",\r\n \"CLRSKY_KT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Solar Irradiance for Equator Facing Tilted Surfaces (Set of Surfaces)\",\r\n \"SI_EF_TILTED_SURFACE\",\r\n [\r\n \"Line\",\r\n \"Histogram\"\r\n ],\r\n [\r\n \"Regional\",\r\n \"Global\"\r\n ]\r\n ],\r\n [\r\n \"All Sky Surface Albedo\",\r\n \"ALLSKY_SRF_ALB\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Parameters for Solar Cooking\": [\r\n [\r\n \"All Sky Surface Shortwave Downward Irradiance\",\r\n \"ALLSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Shortwave Downward Irradiance\",\r\n \"CLRSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Midday Insolation Incident\",\r\n \"MIDDAY_INSOL\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 2 Meters\",\r\n \"WS2M\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Solar Geometry\": [\r\n [\r\n \"Average Solar Noon Time for Climatological Month\",\r\n \"SG_NOON\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Average Sunset Hour Angle for Climatological Month\",\r\n \"SG_HR_SET_ANG\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Average Cosine Solar Zenith Angle At Mid-Time Between Sunrise And Solar Noon for Climatological Month\",\r\n \"SG_MID_COZ_ZEN_ANG\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Daylight Average Of Hourly Cosine Solar Zenith Angles for Climatological Month\",\r\n \"SG_DAY_COZ_ZEN_AVG\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Average Hourly Solar Angles Relative To The Horizon for Climatological Month\",\r\n \"SG_HRZ_HR\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Maximum Solar Angle Relative To The Horizon for Climatological Month\",\r\n \"SG_HRZ_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Average Daylight Hours\",\r\n \"SG_DAY_HOURS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Average Declination for Climatological Month\",\r\n \"SG_DEC\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Temperature/Thermal IR Flux\": [\r\n [\r\n \"Temperature at 2 Meters\",\r\n \"T2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Dew/Frost Point at 2 Meters\",\r\n \"T2MDEW\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wet Bulb Temperature at 2 Meters\",\r\n \"T2MWET\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Earth Skin Temperature\",\r\n \"TS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Range\",\r\n \"T2M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Maximum\",\r\n \"T2M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Minimum\",\r\n \"T2M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Earth Skin Temperature Maximum\",\r\n \"TS_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Earth Skin Temperature Minimum\",\r\n \"TS_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Frost Days\",\r\n \"FROST_DAYS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Longwave Downward Irradiance\",\r\n \"ALLSKY_SFC_LW_DWN\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Humidity/Precipitation\": [\r\n [\r\n \"Specific Humidity at 2 Meters\",\r\n \"QV2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Relative Humidity at 2 Meters\",\r\n \"RH2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Precipitation Average\",\r\n \"PRECTOTCORR\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Precipitation Sum Average\",\r\n \"PRECTOTCORR_SUM\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Wind/Pressure\": [\r\n [\r\n \"Surface Pressure\",\r\n \"PS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters\",\r\n \"WS10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Maximum\",\r\n \"WS10M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Minimum\",\r\n \"WS10M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Range\",\r\n \"WS10M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters\",\r\n \"WS50M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 10 Meters\",\r\n \"WD10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters Maximum\",\r\n \"WS50M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters Minimum\",\r\n \"WS50M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 50 Meters Range\",\r\n \"WS50M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Direction at 50 Meters\",\r\n \"WD50M\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Diurnal Cloud Amounts\": [\r\n [\r\n \"Cloud Amount\",\r\n \"CLOUD_AMT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Cloud Amount at GMT Times\",\r\n \"CLOUD_AMT_HR\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Energy-Storage System Sizing\": [\r\n [\r\n \"Equivalent No-Sun Days Over A Consecutive 1-day Period\",\r\n \"EQUIV_NO_SUN_CONSEC_01\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Equivalent No-Sun Days Over A Consecutive 3-day Period\",\r\n \"EQUIV_NO_SUN_CONSEC_03\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Equivalent No-Sun Days Over A Consecutive 7-day Period\",\r\n \"EQUIV_NO_SUN_CONSEC_07\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Equivalent No-Sun Days Over A Consecutive 14-day Period\",\r\n \"EQUIV_NO_SUN_CONSEC_14\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Equivalent No-Sun Days Over A Consecutive 21-day Period\",\r\n \"EQUIV_NO_SUN_CONSEC_21\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Equivalent No-Sun Days Over A Consecutive Month Period\",\r\n \"EQUIV_NO_SUN_CONSEC_MONTH\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Minimum Insolation Percentage Over A Consecutive 1-day Period\",\r\n \"INSOL_CONSEC_01_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Minimum Insolation Percentage Over A Consecutive 3-day Period\",\r\n \"INSOL_CONSEC_03_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Minimum Insolation Percentage Over A Consecutive 7-day Period\",\r\n \"INSOL_CONSEC_07_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Minimum Insolation Percentage Over A Consecutive 14-day Period\",\r\n \"INSOL_CONSEC_14_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Minimum Insolation Percentage Over A Consecutive 21-day Period\",\r\n \"INSOL_CONSEC_21_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Minimum Insolation Percentage Over A Consecutive Month Period\",\r\n \"INSOL_CONSEC_MONTH\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Minimum Available Insolation Over A Consecutive 1-day Period\",\r\n \"MIN_AVAIL_INSOL_CONSEC_01\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Minimum Available Insolation Over A Consecutive 3-day Period\",\r\n \"MIN_AVAIL_INSOL_CONSEC_03\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Minimum Available Insolation Over A Consecutive 7-day Period\",\r\n \"MIN_AVAIL_INSOL_CONSEC_07\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Minimum Available Insolation Over A Consecutive 14-day Period\",\r\n \"MIN_AVAIL_INSOL_CONSEC_14\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Minimum Available Insolation Over A Consecutive 21-day Period\",\r\n \"MIN_AVAIL_INSOL_CONSEC_21\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Minimum Available Insolation Over A Consecutive Month Period\",\r\n \"MIN_AVAIL_INSOL_CONSEC_MONTH\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Solar Irradiance Deficit Over A Consecutive 1-day Period\",\r\n \"SOLAR_DEFICITS_CONSEC_01\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Solar Irradiance Deficit Over A Consecutive 3-day Period\",\r\n \"SOLAR_DEFICITS_CONSEC_03\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Solar Irradiance Deficit Over A Consecutive 7-day Period\",\r\n \"SOLAR_DEFICITS_CONSEC_07\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Solar Irradiance Deficit Over A Consecutive 14-day Period\",\r\n \"SOLAR_DEFICITS_CONSEC_14\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Solar Irradiance Deficit Over A Consecutive 21-day Period\",\r\n \"SOLAR_DEFICITS_CONSEC_21\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Solar Irradiance Deficit Over A Consecutive Month Period\",\r\n \"SOLAR_DEFICITS_CONSEC_MONTH\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Maximum Avialable Insolation Over A Consecutive 1-day Period\",\r\n \"MAX_AVAIL_INSOL_CONSEC_01\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Maximum Avialable Insolation Over A Consecutive 3-day Period\",\r\n \"MAX_AVAIL_INSOL_CONSEC_03\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Maximum Avialable Insolation Over A Consecutive 7-day Period\",\r\n \"MAX_AVAIL_INSOL_CONSEC_07\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Maximum Avialable Insolation Over A Consecutive 14-day Period\",\r\n \"MAX_AVAIL_INSOL_CONSEC_14\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Maximum Avialable Insolation Over A Consecutive 21-day Period\",\r\n \"MAX_AVAIL_INSOL_CONSEC_21\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Maximum Avialable Insolation Over A Consecutive Month Period\",\r\n \"MAX_AVAIL_INSOL_CONSEC_MONTH\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Surplus Insolation Over A Consecutive 1-day Period\",\r\n \"SURPLUS_INSOL_CONSEC_01\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Surplus Insolation Over A Consecutive 3-day Period\",\r\n \"SURPLUS_INSOL_CONSEC_03\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Surplus Insolation Over A Consecutive 7-day Period\",\r\n \"SURPLUS_INSOL_CONSEC_07\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Surplus Insolation Over A Consecutive 14-day Period\",\r\n \"SURPLUS_INSOL_CONSEC_14\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Surplus Insolation Over A Consecutive 21-day Period\",\r\n \"SURPLUS_INSOL_CONSEC_21\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Surplus Insolation Over A Consecutive Month Period\",\r\n \"SURPLUS_INSOL_CONSEC_MONTH\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Maximum Solar Deficit\",\r\n \"MAX_SOLAR_DEFICIT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Maximum Equivalent No Sun Days\",\r\n \"MAX_EQUIV_NO_SUN_DAYS\",\r\n [],\r\n []\r\n ]\r\n ]\r\n }\r\n }\r\n }\r\n}"}},"recorded_at":"2024-02-01 03:12:02 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} diff --git a/tests/fixtures/query_groupings_global.json b/tests/fixtures/query_groupings_global.json new file mode 100644 index 00000000..dec8e3a7 --- /dev/null +++ b/tests/fixtures/query_groupings_global.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/system/manager/system/groupings/global","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.4.0 r-curl/5.2.0 crul/1.4.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-language":"en-US","content-length":"4528","content-type":"application/json","date":"Thu, 01 Feb 2024 03:12:03 GMT","etag":"073e8192fa468882ba1aad2afa33f66a","last-modified":"Wed, 08 Mar 2023 16:20:49 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 bcafd6d18f872a34f793854d3fb920f0.cloudfront.net (CloudFront), 1.1 fe7beb8e82046ee5f0273386ba166142.cloudfront.net (CloudFront)","x-amz-apigw-id":"Sb7QgFohPHcEecw=","x-amz-cf-id":"u29TOi2eADUQO5AJVbgPToR25r0GPairV5XK4pF1uqgREkUpfQTnVA==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"4528","x-amzn-requestid":"a585203c-56c0-47da-821f-7cfdcc568915","x-amzn-trace-id":"Root=1-65bb0c02-2374cd1b1c58a0f27b3f03f3","x-app-name":"manager","x-app-version":"v2.5.2","x-cache":"Miss from cloudfront","x-service-time":"0.001"},"body":{"encoding":"","file":false,"string":"{\r\n \"Climatology\": {\r\n \"Solar Fluxes and Related\": [\r\n [\r\n \"All Sky Surface Shortwave Downward Irradiance\",\r\n \"ALLSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface Shortwave Downward Irradiance\",\r\n \"CLRSKY_SFC_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Downward Direct Normal Irradiance\",\r\n \"ALLSKY_SFC_SW_DNI\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Shortwave Diffuse Irradiance\",\r\n \"ALLSKY_SFC_SW_DIFF\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Clear Sky Surface PAR Total\",\r\n \"ALLSKY_SFC_PAR_TOT\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Albedo\",\r\n \"ALLSKY_SRF_ALB\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Top-Of-Atmosphere Shortwave Downward Irradiance\",\r\n \"TOA_SW_DWN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Cloud Amount\",\r\n \"CLOUD_AMT\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Temperatures/Thermal IR Flux\": [\r\n [\r\n \"Temperature at 2 Meters\",\r\n \"T2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Dew/Frost Point at 2 Meters\",\r\n \"T2MDEW\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wet Bulb Temperature at 2 Meters\",\r\n \"T2MWET\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Earth Skin Temperature\",\r\n \"TS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Range\",\r\n \"T2M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Maximum\",\r\n \"T2M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Temperature at 2 Meters Minimum\",\r\n \"T2M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"All Sky Surface Longwave Downward Irradiance\",\r\n \"ALLSKY_SFC_LW_DWN\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Humidity/Precipitation\": [\r\n [\r\n \"Specific Humidity at 2 Meters\",\r\n \"QV2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Relative Humidity at 2 Meters\",\r\n \"RH2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Precipitation\",\r\n \"PRECTOTCORR\",\r\n [],\r\n []\r\n ]\r\n ],\r\n \"Wind/Pressure\": [\r\n [\r\n \"Surface Pressure\",\r\n \"PS\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 2 Meters\",\r\n \"WS2M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 2 Meters Maximum\",\r\n \"WS2M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 2 Meters Minimum\",\r\n \"WS2M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 2 Meters Range\",\r\n \"WS2M_RANGE\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters\",\r\n \"WS10M\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Maximum\",\r\n \"WS10M_MAX\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Minimum\",\r\n \"WS10M_MIN\",\r\n [],\r\n []\r\n ],\r\n [\r\n \"Wind Speed at 10 Meters Range\",\r\n \"WS10M_RANGE\",\r\n [],\r\n []\r\n ]\r\n ]\r\n }\r\n}"}},"recorded_at":"2024-02-01 03:12:03 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} diff --git a/tests/fixtures/query_parameters_comm&temporal_api.json b/tests/fixtures/query_parameters_comm&temporal_api.json new file mode 100644 index 00000000..cb28c28a --- /dev/null +++ b/tests/fixtures/query_parameters_comm&temporal_api.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/system/manager/parameters?community=AG¶meters=T2M&temporal=DAILY&metadata=FALSE&user=nasapower4r","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.4.0 r-curl/5.2.0 crul/1.4.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-language":"en-US","content-length":"260","content-type":"application/json","date":"Thu, 01 Feb 2024 03:12:02 GMT","status":"HTTP/2 200 ","via":"1.1 222acbab2f5fec85beb4280b07b935a4.cloudfront.net (CloudFront), 1.1 36bebb77fa82eae977b303c38c8716ec.cloudfront.net (CloudFront)","x-amz-apigw-id":"Sb7QXEx9PHcEgDA=","x-amz-cf-id":"2P1s39dBWCIBzvh-Yewk4jrMu0bX0VdZDIBbqeIN_w6uvwz51o1ccg==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"260","x-amzn-requestid":"d8f7d14f-2bc6-421c-aa87-b8955322daf0","x-amzn-trace-id":"Root=1-65bb0c02-15fdec940414f5c060694bd1","x-app-name":"manager","x-app-version":"v2.5.2","x-cache":"Miss from cloudfront","x-service-time":"0.015"},"body":{"encoding":"","file":false,"string":"{\"T2M\":{\"type\":\"METEOROLOGY\",\"temporal\":\"DAILY\",\"source\":\"MERRA2\",\"community\":\"AG\",\"calculated\":false,\"inputs\":null,\"units\":\"C\",\"name\":\"Temperature at 2 Meters\",\"definition\":\"The average air (dry bulb) temperature at 2 meters above the surface of the earth.\"}}"}},"recorded_at":"2024-02-01 03:12:02 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} diff --git a/tests/fixtures/query_surfaces_all.json b/tests/fixtures/query_surfaces_all.json new file mode 100644 index 00000000..62942418 --- /dev/null +++ b/tests/fixtures/query_surfaces_all.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/system/manager/surface","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.4.0 r-curl/5.2.0 crul/1.4.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-language":"en-US","content-length":"5001","content-type":"application/json","date":"Thu, 01 Feb 2024 03:12:02 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 0559444022ce3d3996ad1eaef387b23e.cloudfront.net (CloudFront), 1.1 ce36c7514210741cf5dbd7dc8f5fd2fc.cloudfront.net (CloudFront)","x-amz-apigw-id":"Sb7QaFatPHcEHTg=","x-amz-cf-id":"7oxFkHMvQd_VMkCVmAFSVdvnS9pIdY41SwUKpbtCywoc9nWQhaw1fg==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"5001","x-amzn-requestid":"ec0408be-5653-4dc9-bd91-6f75657fc47b","x-amzn-trace-id":"Root=1-65bb0c02-210a8ab63edeb78e342fd171","x-app-name":"manager","x-app-version":"v2.5.2","x-cache":"Miss from cloudfront","x-service-time":"0.001"},"body":{"encoding":"","file":false,"string":"{\"vegtype_1\":{\"Long_Name\":\"35-m broadleaf-evergreen trees (70% coverage)\",\"IGBP_Type\":\"2,13\",\"Veg_Type\":\"1\",\"Roughness\":{\"January\":0.47,\"February\":0.47,\"March\":0.47,\"April\":0.47,\"May\":0.47,\"June\":0.47,\"July\":0.47,\"August\":0.47,\"September\":0.47,\"October\":0.47,\"November\":0.47,\"December\":0.47,\"Annual\":0.47}},\"vegtype_2\":{\"Long_Name\":\"20-m broadleaf-deciduous trees (75% coverage)\",\"IGBP_Type\":\"\",\"Veg_Type\":\"2\",\"Roughness\":{\"January\":0.34,\"February\":0.35,\"March\":0.36,\"April\":0.37,\"May\":0.39,\"June\":0.42,\"July\":0.44,\"August\":0.42,\"September\":0.39,\"October\":0.37,\"November\":0.36,\"December\":0.35,\"Annual\":0.38}},\"vegtype_3\":{\"Long_Name\":\"20-m broadleaf and needleleaf trees (75% coverage)\",\"IGBP_Type\":\"\",\"Veg_Type\":\"3\",\"Roughness\":{\"January\":0.51,\"February\":0.47,\"March\":0.43,\"April\":0.41,\"May\":0.39,\"June\":0.38,\"July\":0.38,\"August\":0.41,\"September\":0.43,\"October\":0.46,\"November\":0.48,\"December\":0.5,\"Annual\":0.44}},\"vegtype_4\":{\"Long_Name\":\"17-m needleleaf-evergreen trees (75% coverage)\",\"IGBP_Type\":\"1,5\",\"Veg_Type\":\"4\",\"Roughness\":{\"January\":0.43,\"February\":0.39,\"March\":0.36,\"April\":0.34,\"May\":0.35,\"June\":0.36,\"July\":0.37,\"August\":0.37,\"September\":0.37,\"October\":0.38,\"November\":0.39,\"December\":0.41,\"Annual\":0.38}},\"vegtype_5\":{\"Long_Name\":\"14-m needleleaf-deciduous trees (50% coverage)\",\"IGBP_Type\":\"3\",\"Veg_Type\":\"5\",\"Roughness\":{\"January\":0.41,\"February\":0.39,\"March\":0.37,\"April\":0.35,\"May\":0.35,\"June\":0.34,\"July\":0.34,\"August\":0.38,\"September\":0.42,\"October\":0.44,\"November\":0.44,\"December\":0.43,\"Annual\":0.39}},\"vegtype_6\":{\"Long_Name\":\"Savanna:18-m broadleaf trees (30%) & groundcover\",\"IGBP_Type\":\"4,8,9,11\",\"Veg_Type\":\"6\",\"Roughness\":{\"January\":0.41,\"February\":0.41,\"March\":0.41,\"April\":0.41,\"May\":0.41,\"June\":0.41,\"July\":0.41,\"August\":0.41,\"September\":0.41,\"October\":0.41,\"November\":0.41,\"December\":0.41,\"Annual\":0.41}},\"vegtype_7\":{\"Long_Name\":\"0.6-m perennial groundcover (100%)\",\"IGBP_Type\":\"6,7,10,12,16,18 \",\"Veg_Type\":\"7\",\"Roughness\":{\"January\":0.27,\"February\":0.27,\"March\":0.27,\"April\":0.27,\"May\":0.27,\"June\":0.27,\"July\":0.27,\"August\":0.27,\"September\":0.27,\"October\":0.27,\"November\":0.27,\"December\":0.27,\"Annual\":0.27}},\"vegtype_8\":{\"Long_Name\":\"0.5-m broadleaf shrubs (variable %) & groundcover\",\"IGBP_Type\":\"\",\"Veg_Type\":\"8\",\"Roughness\":{\"January\":0.27,\"February\":0.27,\"March\":0.27,\"April\":0.27,\"May\":0.27,\"June\":0.27,\"July\":0.27,\"August\":0.27,\"September\":0.27,\"October\":0.27,\"November\":0.27,\"December\":0.27,\"Annual\":0.27}},\"vegtype_9\":{\"Long_Name\":\"0.5-m broadleaf shrubs (10%) with bare soil\",\"IGBP_Type\":\"\",\"Veg_Type\":\"9\",\"Roughness\":{\"January\":0.27,\"February\":0.27,\"March\":0.27,\"April\":0.27,\"May\":0.27,\"June\":0.27,\"July\":0.27,\"August\":0.27,\"September\":0.27,\"October\":0.27,\"November\":0.27,\"December\":0.27,\"Annual\":0.27}},\"vegtype_10\":{\"Long_Name\":\"Tundra: 0.6-m trees/shrubs (variable %) & groundcover\",\"IGBP_Type\":\"\",\"Veg_Type\":\"10\",\"Roughness\":{\"January\":0.27,\"February\":0.27,\"March\":0.27,\"April\":0.27,\"May\":0.27,\"June\":0.27,\"July\":0.27,\"August\":0.27,\"September\":0.27,\"October\":0.27,\"November\":0.27,\"December\":0.27,\"Annual\":0.27}},\"vegtype_11\":{\"Long_Name\":\"Rough bare soil\",\"IGBP_Type\":\"\",\"Veg_Type\":\"11\",\"Roughness\":{\"January\":0.22,\"February\":0.22,\"March\":0.22,\"April\":0.22,\"May\":0.22,\"June\":0.22,\"July\":0.22,\"August\":0.22,\"September\":0.22,\"October\":0.22,\"November\":0.22,\"December\":0.22,\"Annual\":0.22}},\"vegtype_12\":{\"Long_Name\":\"Crop: 20-m broadleaf-deciduous trees (10%) & wheat\",\"IGBP_Type\":\"14\",\"Veg_Type\":\"12\",\"Roughness\":{\"January\":0.28,\"February\":0.3,\"March\":0.23,\"April\":0.35,\"May\":0.35,\"June\":0.35,\"July\":0.35,\"August\":0.35,\"September\":0.35,\"October\":0.33,\"November\":0.31,\"December\":0.29,\"Annual\":0.32}},\"vegtype_20\":{\"Long_Name\":\"Rough glacial snow/ice\",\"IGBP_Type\":\"15\",\"Veg_Type\":\"20\",\"Roughness\":{\"January\":0.35,\"February\":0.33,\"March\":0.3,\"April\":0.28,\"May\":0.28,\"June\":0.28,\"July\":0.28,\"August\":0.28,\"September\":0.3,\"October\":0.33,\"November\":0.34,\"December\":0.35,\"Annual\":0.31}},\"seaice\":{\"Long_Name\":\"Smooth sea ice\",\"IGBP_Type\":\"\",\"Veg_Type\":\"\",\"Roughness\":{\"January\":0.18,\"February\":0.15,\"March\":0.12,\"April\":0.09,\"May\":0.09,\"June\":0.09,\"July\":0.09,\"August\":0.12,\"September\":0.15,\"October\":0.19,\"November\":0.19,\"December\":0.19,\"Annual\":0.14}},\"openwater\":{\"Long_Name\":\"Open water\",\"IGBP_Type\":\"17\",\"Veg_Type\":\"0\",\"Roughness\":{\"January\":0.1,\"February\":0.1,\"March\":0.1,\"April\":0.1,\"May\":0.1,\"June\":0.1,\"July\":0.1,\"August\":0.1,\"September\":0.1,\"October\":0.1,\"November\":0.1,\"December\":0.1,\"Annual\":0.1}},\"airportice\":{\"Long_Name\":\"Airport: flat ice/snow\",\"IGBP_Type\":\"\",\"Veg_Type\":\"\",\"Roughness\":{\"January\":0.1,\"February\":0.1,\"March\":0.1,\"April\":0.1,\"May\":0.1,\"June\":0.1,\"July\":0.1,\"August\":0.1,\"September\":0.1,\"October\":0.1,\"November\":0.1,\"December\":0.1,\"Annual\":0.1}},\"airportgrass\":{\"Long_Name\":\"Airport: flat rough grass\",\"IGBP_Type\":\"\",\"Veg_Type\":\"\",\"Roughness\":{\"January\":0.15,\"February\":0.15,\"March\":0.15,\"April\":0.15,\"May\":0.15,\"June\":0.15,\"July\":0.15,\"August\":0.15,\"September\":0.15,\"October\":0.15,\"November\":0.15,\"December\":0.15,\"Annual\":0.15}}}"}},"recorded_at":"2024-02-01 03:12:02 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} diff --git a/tests/fixtures/query_surfaces_seaice.json b/tests/fixtures/query_surfaces_seaice.json new file mode 100644 index 00000000..2aa3f113 --- /dev/null +++ b/tests/fixtures/query_surfaces_seaice.json @@ -0,0 +1 @@ +{"http_interactions":[{"request":{"method":"get","uri":"https://power.larc.nasa.gov/api/system/manager/surface/seaice","body":{"encoding":"","string":""},"headers":{"User-Agent":"libcurl/8.4.0 r-curl/5.2.0 crul/1.4.0","Accept-Encoding":"gzip, deflate","Accept":"application/json, text/xml, application/xml, */*"}},"response":{"status":{"status_code":"200","message":"OK","explanation":"Request fulfilled, document follows"},"headers":{"content-language":"en-US","content-length":"257","content-type":"application/json","date":"Thu, 01 Feb 2024 03:12:02 GMT","status":"HTTP/2 200 ","via":"1.1 64abc7d7e287c3bb0e0b438a7c7db776.cloudfront.net (CloudFront), 1.1 ce36c7514210741cf5dbd7dc8f5fd2fc.cloudfront.net (CloudFront)","x-amz-apigw-id":"Sb7QgGALvHcEkIQ=","x-amz-cf-id":"EjBS1m53VWdXuD_tl0BOU89Ybb0wXkNWf3uOPZoJvnlf1aQmpE8Tuw==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"257","x-amzn-requestid":"7b55cf28-4aa0-4024-8f01-c8dcbefafde2","x-amzn-trace-id":"Root=1-65bb0c02-5d6f30b677c6e23e3c772b6d","x-app-name":"manager","x-app-version":"v2.5.2","x-cache":"Miss from cloudfront","x-service-time":"0.001"},"body":{"encoding":"","file":false,"string":"{\"Long_Name\":\"Smooth sea ice\",\"IGBP_Type\":\"\",\"Veg_Type\":\"\",\"Roughness\":{\"January\":0.18,\"February\":0.15,\"March\":0.12,\"April\":0.09,\"May\":0.09,\"June\":0.09,\"July\":0.09,\"August\":0.12,\"September\":0.15,\"October\":0.19,\"November\":0.19,\"December\":0.19,\"Annual\":0.14}}"}},"recorded_at":"2024-02-01 03:12:02 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} diff --git a/tests/testthat.R b/tests/testthat.R index 2a58c7ca..820b403b 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -9,4 +9,10 @@ library(testthat) library(nasapower) -test_check("nasapower") +if (Sys.getenv("NOT_CRAN") == "true") { + # like global skip_on_cran + # https://github.com/r-lib/testthat/issues/144#issuecomment-396902791 + # according to https://github.com/hadley/testthat/issues/144 + Sys.setenv("R_TESTS" = "") + test_check("nasapower") +} diff --git a/tests/testthat/test-get_power.R b/tests/testthat/test-get_power.R index 19ca2447..e59df25d 100644 --- a/tests/testthat/test-get_power.R +++ b/tests/testthat/test-get_power.R @@ -312,6 +312,8 @@ test_that("get_power() returns point ag data for climatology", { ) }) +## non-vcr tests --------------------------------------------------------------- + test_that("get_power() stops if hourly data are requested < 2001-01-01", { skip_if_offline() expect_error( @@ -442,7 +444,7 @@ test_that("get_power() stops if temporal_api is hourly and pars > 15", { "PW", "DIRECT_ILLUMINANCE" ), - dates = "1983-01-01", + dates = "2001-01-01", temporal_api = "hourly" ), regexp = "A maximum of 15 parameters can currently be requested*" @@ -490,3 +492,46 @@ test_that("get_power() stops if lonlat = is invalid for climatology", { regexp = "The POWER team have not enabled `global`*" ) }) + +test_that("Only 20 pars are allowed when `temporal_api` != climatology", { + pars <- c( + "Z0M", + "CLRSKY_SFC_SW_DNI", + "CDD0", + "CDD10", + "CDD18_3", + "FROST_DAYS", + "HDD0", + "HDD10", + "HDD18_3", + "AIRMASS", + "WSC", + "PRECTOTCORR", + "PS", + "QV2M", + "RH2M", + "T10M", + "T10M_MAX", + "T10M_MIN", + "T10M_RANGE", + "T2M_RANGE", + "T2M_MIN", + "T2M_MAX" + ) + temporal_api <- "daily" + lonlat <- c(-179.5, -89.5) + expect_error(get_power(pars, community = "ag", lonlat = lonlat, temporal_api)) +}) + +test_that("get_power() stops if lonlat = regional for hourly", { + skip_if_offline() + expect_error( + power_query <- get_power( + community = "ag", + lonlat = c(112.5, -55.5, 115.5, -50.5), + pars = "T2M", + dates = c("1983-01-01"), + temporal_api = "hourly" + ) + ) +}) \ No newline at end of file diff --git a/tests/testthat/test-internal_functions.R b/tests/testthat/test-internal_functions.R index 611f5fb2..a4447ab6 100644 --- a/tests/testthat/test-internal_functions.R +++ b/tests/testthat/test-internal_functions.R @@ -115,8 +115,7 @@ test_that("If temporal_api == monthly and <2 dates provided, error", { dates <- c("1983-01-01") lonlat <- c(-179.5, -89.5) site_elevation <- NULL - expect_error(.check_dates(dates, lonlat, temporal_api), - regexp = "*For `temporal_api = monthly`, *") + expect_error(.check_dates(dates, lonlat, temporal_api)) }) @@ -188,9 +187,7 @@ test_that(".check_lonlat() handles single point properly", { test_that(".check_lonlat() checks validity of single lon values", { temporal_api <- "daily" - expect_error(.check_lonlat(lonlat = c(179.5, 91), - pars), - regexp = "Please check your latitude, `91`,*") + expect_error(.check_lonlat(lonlat = c(179.5, 91), pars)) }) test_that(".check_lonlat() checks validity of single lat values", { @@ -318,39 +315,6 @@ test_that("pars are returned as a comma separated string with no spaces", { expect_equal(pars, "RH2M,T2M") }) -test_that("Only 20 pars are allowed when `temporal_api` != climatology", { - pars <- c( - "Z0M", - "CLRSKY_SFC_SW_DNI", - "CDD0", - "CDD10", - "CDD18_3", - "FROST_DAYS", - "HDD0", - "HDD10", - "HDD18_3", - "AIRMASS", - "WSC", - "PRECTOTCORR", - "PS", - "QV2M", - "RH2M", - "T10M", - "T10M_MAX", - "T10M_MIN", - "T10M_RANGE", - "T2M_RANGE", - "T2M_MIN", - "T2M_MAX" - ) - temporal_api <- "daily" - lonlat <- c(-179.5, -89.5) - expect_error( - pars <- .check_pars(pars, community = "ag", temporal_api), - regexp <- "A maximum of 20 parameters can currently be requested*" - ) - }) - test_that("Only unique `pars` are queried", { pars <- c("RH2M", "RH2M", @@ -367,7 +331,6 @@ test_that("If an invalid temporal average is given for `pars`, pars <- "ALLSKY_SFC_SW_DWN_00_GMT" temporal_api <- "daily" community <- "ag" - expect_error(.check_pars(pars, community, temporal_api)) }) @@ -558,3 +521,10 @@ test_that(".build_query assembles a proper query for regional and NULL dates", { ) ) }) + + +# Boolean checks --------------------------------------------------------------- +test_that(".is_boolean works properly", { + expect_false(.is_boolean(x = "orange")) + expect_true(.is_boolean(x = TRUE)) +}) diff --git a/tests/testthat/test-query_groupings.R b/tests/testthat/test-query_groupings.R new file mode 100644 index 00000000..62e050cb --- /dev/null +++ b/tests/testthat/test-query_groupings.R @@ -0,0 +1,27 @@ + +test_that("query_groupings() returns proper list of info", { + skip_if_offline() + vcr::use_cassette("query_groupings", { + grouping_query <- query_groupings() + + expect_type(grouping_query, "list") + expect_length(grouping_query, 1) + expect_named(grouping_query, "groups" + ) + }) +}) + +test_that("query_groupings(global) returns list of grouping information", { + skip_if_offline() + vcr::use_cassette("query_groupings_global", { + grouping_query <- query_groupings(global = TRUE) + expect_type(grouping_query, "list") + expect_length(grouping_query, 1) + expect_named(grouping_query, "Climatology") + }) +}) + +test_that("query_groupings() stops if global is not Boolean", { + skip_if_offline() + expect_error(query_groupings(global = "orange")) +}) diff --git a/tests/testthat/test-query_parameters.R b/tests/testthat/test-query_parameters.R index 44186474..f1e5278e 100644 --- a/tests/testthat/test-query_parameters.R +++ b/tests/testthat/test-query_parameters.R @@ -1,31 +1,70 @@ test_that("query_parameters() returns proper list of info", { - skip_on_cran() - par_query <- query_parameters(community = "ag", - par = c("T2M"), - temporal_api = "Daily") + skip_if_offline() + vcr::use_cassette("query_parameters_comm&temporal_api", { + par_query <- query_parameters(community = "ag", + pars = "T2M", + temporal_api = "Daily") + expect_type(par_query, "list") + expect_length(par_query, 1) + expect_named(par_query, "T2M") + }) +}) + +test_that("query_parameters() returns list of parameter information", + { + skip_if_offline() + par_query <- query_parameters(pars = "T2M") expect_type(par_query, "list") expect_length(par_query, 1) expect_named(par_query, "T2M") }) -test_that("query_parameters() returns list of parameter information", { - skip_on_cran() - par_query <- query_parameters(par = "T2M") - expect_type(par_query, "list") - expect_length(par_query, 1) - expect_named(par_query, "T2M") -}) - test_that("query_parameters() stops if par and community only supplied", { - skip_on_cran() - expect_error(query_parameters(par = "T2M", + skip_if_offline() + expect_error(query_parameters(pars = "T2M", community = "AG")) }) test_that("query_parameters() stops if par and community only supplied", { - skip_on_cran() - expect_error(query_parameters(par = "T2M", + skip_if_offline() + expect_error(query_parameters(pars = "T2M", temporal_api = "daily")) }) + +test_that("query_parameters() stops if metadata is not Boolean", { + skip_if_offline() + expect_error( + query_parameters( + pars = "T2M", + community = "ag", + temporal_api = "daily", + metadata = "orange" + ) + ) +}) + +test_that("query_parameters() stops if community is invalid", { + skip_if_offline() + expect_error( + query_parameters( + pars = "T2M", + community = "res", + temporal_api = "daily", + metadata = TRUE + ) + ) +}) + +test_that("query_parameters() stops if temporal_api is invalid", { + skip_if_offline() + expect_error( + query_parameters( + pars = "T2M", + community = "ag", + temporal_api = "ag", + metadata = TRUE + ) + ) +}) diff --git a/tests/testthat/test-query_surfaces.R b/tests/testthat/test-query_surfaces.R new file mode 100644 index 00000000..e7fb2399 --- /dev/null +++ b/tests/testthat/test-query_surfaces.R @@ -0,0 +1,43 @@ + +test_that("query_surfaces() returns proper list of info", { + skip_if_offline() + vcr::use_cassette("query_surfaces_all", { + surface_query <- query_surfaces() + + expect_type(surface_query, "list") + expect_length(surface_query, 17) + expect_named( + surface_query, + c( + "vegtype_1", + "vegtype_2", + "vegtype_3", + "vegtype_4", + "vegtype_5", + "vegtype_6", + "vegtype_7", + "vegtype_8", + "vegtype_9", + "vegtype_10", + "vegtype_11", + "vegtype_12", + "vegtype_20", + "seaice", + "openwater", + "airportice", + "airportgrass" + ) + ) + }) +}) + +test_that("query_surfaces() returns list of surface information", { + skip_if_offline() + vcr::use_cassette("query_surfaces_seaice", { + surface_query <- query_surfaces(surface_alias = "seaice") + expect_type(surface_query, "list") + expect_length(surface_query, 4) + expect_named(surface_query, + c("Long_Name", "IGBP_Type", "Veg_Type", "Roughness")) + }) +}) diff --git a/vignettes/nasapower.Rmd b/vignettes/nasapower.Rmd index 6e2057ad..60440c63 100644 --- a/vignettes/nasapower.Rmd +++ b/vignettes/nasapower.Rmd @@ -135,20 +135,19 @@ interannual_re #> CLRSKY_SFC_SW_DWN CERES SYN1deg Clear Sky Surface Shortwave Downward Irradiance (kW-hr/m^2/day) #> #> # A tibble: 144 × 17 -#> PARAMETER YEAR LAT LON JAN FEB MAR APR MAY JUN JUL AUG SEP OCT -#> -#> 1 ALLSKY_SFC… 1984 -25.8 151. 6.01 6.49 5.79 4.67 4.12 3.77 2.46 4.87 6.11 5.5 -#> 2 ALLSKY_SFC… 1984 -25.8 151. 5.92 5.97 5.64 4.37 4.01 3.61 2.6 4.8 5.84 5.24 -#> 3 ALLSKY_SFC… 1984 -25.8 152. 5.92 5.97 5.64 4.37 4.01 3.61 2.6 4.8 5.84 5.24 -#> 4 ALLSKY_SFC… 1984 -25.8 152. 5.96 5.85 5.56 4.26 3.92 3.52 2.66 4.59 5.58 4.94 -#> 5 ALLSKY_SFC… 1984 -25.8 153. 5.96 5.85 5.56 4.26 3.92 3.52 2.66 4.59 5.58 4.94 -#> 6 ALLSKY_SFC… 1984 -25.8 153. 6.23 6.05 5.88 4.26 3.81 3.3 2.96 4.73 5.66 5.25 -#> 7 ALLSKY_SFC… 1984 -26.2 151. 5.97 6.65 6 4.66 4.02 3.72 2.28 4.86 6.08 5.74 -#> 8 ALLSKY_SFC… 1984 -26.2 151. 6 6.38 5.71 4.38 4.01 3.66 2.17 4.88 6.01 5.43 -#> 9 ALLSKY_SFC… 1984 -26.2 152. 6 6.38 5.71 4.38 4.01 3.66 2.17 4.88 6.01 5.43 -#> 10 ALLSKY_SFC… 1984 -26.2 152. 5.75 5.96 5.37 4.13 3.8 3.44 2.38 4.81 5.75 4.99 +#> PARAMETER YEAR LAT LON JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC ANN +#> +#> 1 ALLSKY_SFC_SW_DWN 1984 -25.8 151. 6.01 6.49 5.79 4.67 4.12 3.77 2.46 4.87 6.11 5.5 7.97 7.03 5.39 +#> 2 ALLSKY_SFC_SW_DWN 1984 -25.8 151. 5.92 5.97 5.64 4.37 4.01 3.61 2.6 4.8 5.84 5.24 7.6 6.76 5.19 +#> 3 ALLSKY_SFC_SW_DWN 1984 -25.8 152. 5.92 5.97 5.64 4.37 4.01 3.61 2.6 4.8 5.84 5.24 7.6 6.76 5.19 +#> 4 ALLSKY_SFC_SW_DWN 1984 -25.8 152. 5.96 5.85 5.56 4.26 3.92 3.52 2.66 4.59 5.58 4.94 7.23 6.68 5.06 +#> 5 ALLSKY_SFC_SW_DWN 1984 -25.8 153. 5.96 5.85 5.56 4.26 3.92 3.52 2.66 4.59 5.58 4.94 7.23 6.68 5.06 +#> 6 ALLSKY_SFC_SW_DWN 1984 -25.8 153. 6.23 6.05 5.88 4.26 3.81 3.3 2.96 4.73 5.66 5.25 7.6 7.06 5.23 +#> 7 ALLSKY_SFC_SW_DWN 1984 -26.2 151. 5.97 6.65 6 4.66 4.02 3.72 2.28 4.86 6.08 5.74 7.74 6.97 5.38 +#> 8 ALLSKY_SFC_SW_DWN 1984 -26.2 151. 6 6.38 5.71 4.38 4.01 3.66 2.17 4.88 6.01 5.43 7.46 6.89 5.24 +#> 9 ALLSKY_SFC_SW_DWN 1984 -26.2 152. 6 6.38 5.71 4.38 4.01 3.66 2.17 4.88 6.01 5.43 7.46 6.89 5.24 +#> 10 ALLSKY_SFC_SW_DWN 1984 -26.2 152. 5.75 5.96 5.37 4.13 3.8 3.44 2.38 4.81 5.75 4.99 6.94 6.56 4.98 #> # ℹ 134 more rows -#> # ℹ 3 more variables: NOV , DEC , ANN ``` ### Example fetching climatology data @@ -180,11 +179,10 @@ climatology_ag #> RH2M MERRA-2 Relative Humidity at 2 Meters (%) #> #> # A tibble: 2 × 16 -#> LON LAT PARAMETER JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV -#> -#> 1 152. -27.5 T2M 24.7 23.7 22.0 19.0 15.1 12.6 11.6 13.1 16.9 20 22.3 -#> 2 152. -27.5 RH2M 64.7 69.6 71.1 70.5 69.1 75.1 70.4 63.1 59.8 59.4 60.3 -#> # ℹ 2 more variables: DEC , ANN +#> LON LAT PARAMETER JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC ANN +#> +#> 1 152. -27.5 T2M 24.7 23.7 22.0 19.0 15.1 12.6 11.6 13.1 16.9 20 22.3 23.7 18.7 +#> 2 152. -27.5 RH2M 64.7 69.6 71.1 70.5 69.1 75.1 70.4 63.1 59.8 59.4 60.3 63.4 66.4 ``` _Note_ the associated metadata in the data frame header are not saved if the data are exported to a file format other than an R data format, _e.g._, .Rdata, .rda or .rds. @@ -198,7 +196,7 @@ Fetch the complete available information for the temperature at 2 metres above t ```r -query_parameters(par = "T2M") +query_parameters(pars = "T2M") #> $T2M #> $T2M$temporal #> $T2M$temporal$HOURLY @@ -266,7 +264,7 @@ Fetch complete temporal and community specific attribute information for "T2M" i ```r -query_parameters(par = "T2M", +query_parameters(pars = "T2M", community = "ag", temporal_api = "hourly") #> $T2M @@ -298,1636 +296,6 @@ query_parameters(par = "T2M", #> [1] "The average air (dry bulb) temperature at 2 meters above the surface of the earth." ``` -Fetch complete temporal and community specific attribute information for all parameters in the "ag" community for the "hourly" temporal API. - - -```r -query_parameters(community = "ag", - temporal_api = "hourly") -#> $PRECSNOLAND -#> $PRECSNOLAND$type -#> [1] "METEOROLOGY" -#> -#> $PRECSNOLAND$temporal -#> [1] "HOURLY" -#> -#> $PRECSNOLAND$source -#> [1] "MERRA2" -#> -#> $PRECSNOLAND$community -#> [1] "AG" -#> -#> $PRECSNOLAND$calculated -#> [1] FALSE -#> -#> $PRECSNOLAND$inputs -#> NULL -#> -#> $PRECSNOLAND$units -#> [1] "mm/hour" -#> -#> $PRECSNOLAND$name -#> [1] "Snow Precipitation Land" -#> -#> $PRECSNOLAND$definition -#> [1] "The snow precipitation only over land at the surface of the earth." -#> -#> -#> $PRECTOTCORR -#> $PRECTOTCORR$type -#> [1] "METEOROLOGY" -#> -#> $PRECTOTCORR$temporal -#> [1] "HOURLY" -#> -#> $PRECTOTCORR$source -#> [1] "MERRA2" -#> -#> $PRECTOTCORR$community -#> [1] "AG" -#> -#> $PRECTOTCORR$calculated -#> [1] FALSE -#> -#> $PRECTOTCORR$inputs -#> NULL -#> -#> $PRECTOTCORR$units -#> [1] "mm/hour" -#> -#> $PRECTOTCORR$name -#> [1] "Precipitation Corrected" -#> -#> $PRECTOTCORR$definition -#> [1] "The bias corrected average of total precipitation at the surface of the earth in water mass (includes water content in snow)." -#> -#> -#> $PS -#> $PS$type -#> [1] "METEOROLOGY" -#> -#> $PS$temporal -#> [1] "HOURLY" -#> -#> $PS$source -#> [1] "MERRA2" -#> -#> $PS$community -#> [1] "AG" -#> -#> $PS$calculated -#> [1] FALSE -#> -#> $PS$inputs -#> NULL -#> -#> $PS$units -#> [1] "kPa" -#> -#> $PS$name -#> [1] "Surface Pressure" -#> -#> $PS$definition -#> [1] "The average of surface pressure at the surface of the earth." -#> -#> -#> $QV10M -#> $QV10M$type -#> [1] "METEOROLOGY" -#> -#> $QV10M$temporal -#> [1] "HOURLY" -#> -#> $QV10M$source -#> [1] "MERRA2" -#> -#> $QV10M$community -#> [1] "AG" -#> -#> $QV10M$calculated -#> [1] FALSE -#> -#> $QV10M$inputs -#> NULL -#> -#> $QV10M$units -#> [1] "g/kg" -#> -#> $QV10M$name -#> [1] "Specific Humidity at 10 Meters" -#> -#> $QV10M$definition -#> [1] "The ratio of the mass of water vapor to the total mass of air at 10 meters (kg water/kg total air)." -#> -#> -#> $QV2M -#> $QV2M$type -#> [1] "METEOROLOGY" -#> -#> $QV2M$temporal -#> [1] "HOURLY" -#> -#> $QV2M$source -#> [1] "MERRA2" -#> -#> $QV2M$community -#> [1] "AG" -#> -#> $QV2M$calculated -#> [1] FALSE -#> -#> $QV2M$inputs -#> NULL -#> -#> $QV2M$units -#> [1] "g/kg" -#> -#> $QV2M$name -#> [1] "Specific Humidity at 2 Meters" -#> -#> $QV2M$definition -#> [1] "The ratio of the mass of water vapor to the total mass of air at 2 meters (kg water/kg total air)." -#> -#> -#> $RH2M -#> $RH2M$type -#> [1] "METEOROLOGY" -#> -#> $RH2M$temporal -#> [1] "HOURLY" -#> -#> $RH2M$source -#> [1] "MERRA2" -#> -#> $RH2M$community -#> [1] "AG" -#> -#> $RH2M$calculated -#> [1] FALSE -#> -#> $RH2M$inputs -#> [1] "T2M" "PS" "QV2M" -#> -#> $RH2M$units -#> [1] "%" -#> -#> $RH2M$name -#> [1] "Relative Humidity at 2 Meters" -#> -#> $RH2M$definition -#> [1] "The ratio of actual partial pressure of water vapor to the partial pressure at saturation, expressed in percent." -#> -#> -#> $SNODP -#> $SNODP$type -#> [1] "METEOROLOGY" -#> -#> $SNODP$temporal -#> [1] "HOURLY" -#> -#> $SNODP$source -#> [1] "MERRA2" -#> -#> $SNODP$community -#> [1] "AG" -#> -#> $SNODP$calculated -#> [1] FALSE -#> -#> $SNODP$inputs -#> NULL -#> -#> $SNODP$units -#> [1] "cm" -#> -#> $SNODP$name -#> [1] "Snow Depth" -#> -#> $SNODP$definition -#> [1] "The snow depth on land at surface of the earth." -#> -#> -#> $T2M -#> $T2M$type -#> [1] "METEOROLOGY" -#> -#> $T2M$temporal -#> [1] "HOURLY" -#> -#> $T2M$source -#> [1] "MERRA2" -#> -#> $T2M$community -#> [1] "AG" -#> -#> $T2M$calculated -#> [1] FALSE -#> -#> $T2M$inputs -#> NULL -#> -#> $T2M$units -#> [1] "C" -#> -#> $T2M$name -#> [1] "Temperature at 2 Meters" -#> -#> $T2M$definition -#> [1] "The average air (dry bulb) temperature at 2 meters above the surface of the earth." -#> -#> -#> $TS -#> $TS$type -#> [1] "METEOROLOGY" -#> -#> $TS$temporal -#> [1] "HOURLY" -#> -#> $TS$source -#> [1] "MERRA2" -#> -#> $TS$community -#> [1] "AG" -#> -#> $TS$calculated -#> [1] FALSE -#> -#> $TS$inputs -#> NULL -#> -#> $TS$units -#> [1] "C" -#> -#> $TS$name -#> [1] "Earth Skin Temperature" -#> -#> $TS$definition -#> [1] "The average temperature at the earth's surface." -#> -#> -#> $U10M -#> $U10M$type -#> [1] "METEOROLOGY" -#> -#> $U10M$temporal -#> [1] "HOURLY" -#> -#> $U10M$source -#> [1] "MERRA2" -#> -#> $U10M$community -#> [1] "AG" -#> -#> $U10M$calculated -#> [1] FALSE -#> -#> $U10M$inputs -#> NULL -#> -#> $U10M$units -#> [1] "m/s" -#> -#> $U10M$name -#> [1] "Eastward Wind at 10 Meters" -#> -#> $U10M$definition -#> [1] "The estimate of the eastward wind average speed for winds blowing 10 meters above the surface of the earth." -#> -#> -#> $U2M -#> $U2M$type -#> [1] "METEOROLOGY" -#> -#> $U2M$temporal -#> [1] "HOURLY" -#> -#> $U2M$source -#> [1] "MERRA2" -#> -#> $U2M$community -#> [1] "AG" -#> -#> $U2M$calculated -#> [1] FALSE -#> -#> $U2M$inputs -#> NULL -#> -#> $U2M$units -#> [1] "m/s" -#> -#> $U2M$name -#> [1] "Eastward Wind at 2 Meters" -#> -#> $U2M$definition -#> [1] "The estimate of the eastward wind average speed for winds blowing 2 meters above the surface of the earth." -#> -#> -#> $U50M -#> $U50M$type -#> [1] "METEOROLOGY" -#> -#> $U50M$temporal -#> [1] "HOURLY" -#> -#> $U50M$source -#> [1] "MERRA2" -#> -#> $U50M$community -#> [1] "AG" -#> -#> $U50M$calculated -#> [1] FALSE -#> -#> $U50M$inputs -#> NULL -#> -#> $U50M$units -#> [1] "m/s" -#> -#> $U50M$name -#> [1] "Eastward Wind at 50 Meters" -#> -#> $U50M$definition -#> [1] "The estimate of the eastward wind average speed for winds blowing 50 meters above the surface of the earth." -#> -#> -#> $V10M -#> $V10M$type -#> [1] "METEOROLOGY" -#> -#> $V10M$temporal -#> [1] "HOURLY" -#> -#> $V10M$source -#> [1] "MERRA2" -#> -#> $V10M$community -#> [1] "AG" -#> -#> $V10M$calculated -#> [1] FALSE -#> -#> $V10M$inputs -#> NULL -#> -#> $V10M$units -#> [1] "m/s" -#> -#> $V10M$name -#> [1] "Northward Wind at 10 Meters" -#> -#> $V10M$definition -#> [1] "The estimate of the northward wind average speed for winds blowing 10 meters above the surface of the earth." -#> -#> -#> $V2M -#> $V2M$type -#> [1] "METEOROLOGY" -#> -#> $V2M$temporal -#> [1] "HOURLY" -#> -#> $V2M$source -#> [1] "MERRA2" -#> -#> $V2M$community -#> [1] "AG" -#> -#> $V2M$calculated -#> [1] FALSE -#> -#> $V2M$inputs -#> NULL -#> -#> $V2M$units -#> [1] "m/s" -#> -#> $V2M$name -#> [1] "Northward Wind at 2 Meters" -#> -#> $V2M$definition -#> [1] "The estimate of the northward wind average speed for winds blowing 2 meters above the surface of the earth." -#> -#> -#> $V50M -#> $V50M$type -#> [1] "METEOROLOGY" -#> -#> $V50M$temporal -#> [1] "HOURLY" -#> -#> $V50M$source -#> [1] "MERRA2" -#> -#> $V50M$community -#> [1] "AG" -#> -#> $V50M$calculated -#> [1] FALSE -#> -#> $V50M$inputs -#> NULL -#> -#> $V50M$units -#> [1] "m/s" -#> -#> $V50M$name -#> [1] "Northward Wind at 50 Meters" -#> -#> $V50M$definition -#> [1] "The estimate of the northward wind average speed for winds blowing 50 meters above the surface of the earth." -#> -#> -#> $PSC -#> $PSC$type -#> [1] "METEOROLOGY" -#> -#> $PSC$temporal -#> [1] "HOURLY" -#> -#> $PSC$source -#> [1] "POWER" -#> -#> $PSC$community -#> [1] "AG" -#> -#> $PSC$calculated -#> [1] TRUE -#> -#> $PSC$inputs -#> [1] "PS" "T2M" -#> -#> $PSC$units -#> [1] "kPa" -#> -#> $PSC$name -#> [1] "Corrected Atmospheric Pressure (Adjusted For Site Elevation)" -#> -#> $PSC$definition -#> [1] "Atmospheric pressure associated with the MERRA-2 grid has been adjusted based upon the difference between the elevation of an underlying surface site and the average elevation of the MERRA-2 grid cell." -#> -#> -#> $T2MDEW -#> $T2MDEW$type -#> [1] "METEOROLOGY" -#> -#> $T2MDEW$temporal -#> [1] "HOURLY" -#> -#> $T2MDEW$source -#> [1] "POWER" -#> -#> $T2MDEW$community -#> [1] "AG" -#> -#> $T2MDEW$calculated -#> [1] FALSE -#> -#> $T2MDEW$inputs -#> [1] "T2M" "RH2M" -#> -#> $T2MDEW$units -#> [1] "C" -#> -#> $T2MDEW$name -#> [1] "Dew/Frost Point at 2 Meters" -#> -#> $T2MDEW$definition -#> [1] "The dew/frost point temperature at 2 meters above the surface of the earth." -#> -#> -#> $T2MWET -#> $T2MWET$type -#> [1] "METEOROLOGY" -#> -#> $T2MWET$temporal -#> [1] "HOURLY" -#> -#> $T2MWET$source -#> [1] "POWER" -#> -#> $T2MWET$community -#> [1] "AG" -#> -#> $T2MWET$calculated -#> [1] FALSE -#> -#> $T2MWET$inputs -#> [1] "PS" "T2M" "T2MDEW" -#> -#> $T2MWET$units -#> [1] "C" -#> -#> $T2MWET$name -#> [1] "Wet Bulb Temperature at 2 Meters" -#> -#> $T2MWET$definition -#> [1] "The adiabatic saturation temperature which can be measured by a thermometer covered in a water-soaked cloth over which air is passed at 2 meters above the surface of the earth." -#> -#> -#> $WD10M -#> $WD10M$type -#> [1] "METEOROLOGY" -#> -#> $WD10M$temporal -#> [1] "HOURLY" -#> -#> $WD10M$source -#> [1] "POWER" -#> -#> $WD10M$community -#> [1] "AG" -#> -#> $WD10M$calculated -#> [1] TRUE -#> -#> $WD10M$inputs -#> [1] "U10M" "V10M" -#> -#> $WD10M$units -#> [1] "Degrees" -#> -#> $WD10M$name -#> [1] "Wind Direction at 10 Meters" -#> -#> $WD10M$definition -#> [1] "The average of the wind direction at 10 meters above the surface of the earth." -#> -#> -#> $WD2M -#> $WD2M$type -#> [1] "METEOROLOGY" -#> -#> $WD2M$temporal -#> [1] "HOURLY" -#> -#> $WD2M$source -#> [1] "POWER" -#> -#> $WD2M$community -#> [1] "AG" -#> -#> $WD2M$calculated -#> [1] TRUE -#> -#> $WD2M$inputs -#> [1] "U2M" "V2M" -#> -#> $WD2M$units -#> [1] "Degrees" -#> -#> $WD2M$name -#> [1] "Wind Direction at 2 Meters" -#> -#> $WD2M$definition -#> [1] "The average of the wind direction at 2 meters above the surface of the earth." -#> -#> -#> $WD50M -#> $WD50M$type -#> [1] "METEOROLOGY" -#> -#> $WD50M$temporal -#> [1] "HOURLY" -#> -#> $WD50M$source -#> [1] "POWER" -#> -#> $WD50M$community -#> [1] "AG" -#> -#> $WD50M$calculated -#> [1] TRUE -#> -#> $WD50M$inputs -#> [1] "U50M" "V50M" -#> -#> $WD50M$units -#> [1] "Degrees" -#> -#> $WD50M$name -#> [1] "Wind Direction at 50 Meters" -#> -#> $WD50M$definition -#> [1] "The average of the wind direction at 50 meters above the surface of the earth." -#> -#> -#> $WS10M -#> $WS10M$type -#> [1] "METEOROLOGY" -#> -#> $WS10M$temporal -#> [1] "HOURLY" -#> -#> $WS10M$source -#> [1] "POWER" -#> -#> $WS10M$community -#> [1] "AG" -#> -#> $WS10M$calculated -#> [1] TRUE -#> -#> $WS10M$inputs -#> [1] "U10M" "V10M" -#> -#> $WS10M$units -#> [1] "m/s" -#> -#> $WS10M$name -#> [1] "Wind Speed at 10 Meters" -#> -#> $WS10M$definition -#> [1] "The average of wind speed at 10 meters above the surface of the earth." -#> -#> -#> $WS2M -#> $WS2M$type -#> [1] "METEOROLOGY" -#> -#> $WS2M$temporal -#> [1] "HOURLY" -#> -#> $WS2M$source -#> [1] "POWER" -#> -#> $WS2M$community -#> [1] "AG" -#> -#> $WS2M$calculated -#> [1] TRUE -#> -#> $WS2M$inputs -#> [1] "U2M" "V2M" -#> -#> $WS2M$units -#> [1] "m/s" -#> -#> $WS2M$name -#> [1] "Wind Speed at 2 Meters" -#> -#> $WS2M$definition -#> [1] "The average of wind speed at 2 meters above the surface of the earth." -#> -#> -#> $WS50M -#> $WS50M$type -#> [1] "METEOROLOGY" -#> -#> $WS50M$temporal -#> [1] "HOURLY" -#> -#> $WS50M$source -#> [1] "POWER" -#> -#> $WS50M$community -#> [1] "AG" -#> -#> $WS50M$calculated -#> [1] TRUE -#> -#> $WS50M$inputs -#> [1] "U50M" "V50M" -#> -#> $WS50M$units -#> [1] "m/s" -#> -#> $WS50M$name -#> [1] "Wind Speed at 50 Meters" -#> -#> $WS50M$definition -#> [1] "The average of wind speed at 50 meters above the surface of the earth." -#> -#> -#> $WSC -#> $WSC$type -#> [1] "METEOROLOGY" -#> -#> $WSC$temporal -#> [1] "HOURLY" -#> -#> $WSC$source -#> [1] "POWER" -#> -#> $WSC$community -#> [1] "AG" -#> -#> $WSC$calculated -#> [1] TRUE -#> -#> $WSC$inputs -#> [1] "WS50M" -#> -#> $WSC$units -#> [1] "m/s" -#> -#> $WSC$name -#> [1] "Corrected Wind Speed (Adjusted For Elevation)" -#> -#> $WSC$definition -#> [1] "Wind speed associated with the MERRA-2 grid adjusted using the Gipe Power Law and the elevation difference between the average elevation of the grid cell and the elevation of the underlying surface." -#> -#> -#> $ALLSKY_SFC_LW_DWN -#> $ALLSKY_SFC_LW_DWN$type -#> [1] "RADIATION" -#> -#> $ALLSKY_SFC_LW_DWN$temporal -#> [1] "HOURLY" -#> -#> $ALLSKY_SFC_LW_DWN$source -#> [1] "CERES" -#> -#> $ALLSKY_SFC_LW_DWN$community -#> [1] "AG" -#> -#> $ALLSKY_SFC_LW_DWN$calculated -#> [1] FALSE -#> -#> $ALLSKY_SFC_LW_DWN$inputs -#> NULL -#> -#> $ALLSKY_SFC_LW_DWN$units -#> [1] "W/m^2" -#> -#> $ALLSKY_SFC_LW_DWN$name -#> [1] "All Sky Surface Longwave Downward Irradiance" -#> -#> $ALLSKY_SFC_LW_DWN$definition -#> [1] "The downward thermal infrared irradiance under all sky conditions reaching a horizontal plane the surface of the earth. Also known as Horizontal Infrared Radiation Intensity from Sky." -#> -#> -#> $ALLSKY_SFC_SW_DIFF -#> $ALLSKY_SFC_SW_DIFF$type -#> [1] "RADIATION" -#> -#> $ALLSKY_SFC_SW_DIFF$temporal -#> [1] "HOURLY" -#> -#> $ALLSKY_SFC_SW_DIFF$source -#> [1] "CERES" -#> -#> $ALLSKY_SFC_SW_DIFF$community -#> [1] "AG" -#> -#> $ALLSKY_SFC_SW_DIFF$calculated -#> [1] FALSE -#> -#> $ALLSKY_SFC_SW_DIFF$inputs -#> NULL -#> -#> $ALLSKY_SFC_SW_DIFF$units -#> [1] "MJ/hr" -#> -#> $ALLSKY_SFC_SW_DIFF$name -#> [1] "All Sky Surface Shortwave Diffuse Irradiance" -#> -#> $ALLSKY_SFC_SW_DIFF$definition -#> [1] "The diffuse (light energy scattered out of the direction of the sun) solar irradiance incident on a horizontal plane at the surface of the earth under all sky conditions." -#> -#> -#> $ALLSKY_SFC_SW_DWN -#> $ALLSKY_SFC_SW_DWN$type -#> [1] "RADIATION" -#> -#> $ALLSKY_SFC_SW_DWN$temporal -#> [1] "HOURLY" -#> -#> $ALLSKY_SFC_SW_DWN$source -#> [1] "CERES" -#> -#> $ALLSKY_SFC_SW_DWN$community -#> [1] "AG" -#> -#> $ALLSKY_SFC_SW_DWN$calculated -#> [1] FALSE -#> -#> $ALLSKY_SFC_SW_DWN$inputs -#> NULL -#> -#> $ALLSKY_SFC_SW_DWN$units -#> [1] "MJ/hr" -#> -#> $ALLSKY_SFC_SW_DWN$name -#> [1] "All Sky Surface Shortwave Downward Irradiance" -#> -#> $ALLSKY_SFC_SW_DWN$definition -#> [1] "The total solar irradiance incident (direct plus diffuse) on a horizontal plane at the surface of the earth under all sky conditions. An alternative term for the total solar irradiance is the \"Global Horizontal Irradiance\" or GHI." -#> -#> -#> $ALLSKY_SFC_UV_INDEX -#> $ALLSKY_SFC_UV_INDEX$type -#> [1] "RADIATION" -#> -#> $ALLSKY_SFC_UV_INDEX$temporal -#> [1] "HOURLY" -#> -#> $ALLSKY_SFC_UV_INDEX$source -#> [1] "CERES" -#> -#> $ALLSKY_SFC_UV_INDEX$community -#> [1] "AG" -#> -#> $ALLSKY_SFC_UV_INDEX$calculated -#> [1] FALSE -#> -#> $ALLSKY_SFC_UV_INDEX$inputs -#> NULL -#> -#> $ALLSKY_SFC_UV_INDEX$units -#> [1] "dimensionless" -#> -#> $ALLSKY_SFC_UV_INDEX$name -#> [1] "All Sky Surface UV Index" -#> -#> $ALLSKY_SFC_UV_INDEX$definition -#> [1] "The ultraviolet radiation exposure index." -#> -#> -#> $ALLSKY_SFC_UVA -#> $ALLSKY_SFC_UVA$type -#> [1] "RADIATION" -#> -#> $ALLSKY_SFC_UVA$temporal -#> [1] "HOURLY" -#> -#> $ALLSKY_SFC_UVA$source -#> [1] "CERES" -#> -#> $ALLSKY_SFC_UVA$community -#> [1] "AG" -#> -#> $ALLSKY_SFC_UVA$calculated -#> [1] FALSE -#> -#> $ALLSKY_SFC_UVA$inputs -#> NULL -#> -#> $ALLSKY_SFC_UVA$units -#> [1] "W/m^2" -#> -#> $ALLSKY_SFC_UVA$name -#> [1] "All Sky Surface UVA Irradiance" -#> -#> $ALLSKY_SFC_UVA$definition -#> [1] "The ultraviolet A (UVA 315nm-400nm) irradiance under all sky conditions." -#> -#> -#> $ALLSKY_SFC_UVB -#> $ALLSKY_SFC_UVB$type -#> [1] "RADIATION" -#> -#> $ALLSKY_SFC_UVB$temporal -#> [1] "HOURLY" -#> -#> $ALLSKY_SFC_UVB$source -#> [1] "CERES" -#> -#> $ALLSKY_SFC_UVB$community -#> [1] "AG" -#> -#> $ALLSKY_SFC_UVB$calculated -#> [1] FALSE -#> -#> $ALLSKY_SFC_UVB$inputs -#> NULL -#> -#> $ALLSKY_SFC_UVB$units -#> [1] "W/m^2" -#> -#> $ALLSKY_SFC_UVB$name -#> [1] "All Sky Surface UVB Irradiance" -#> -#> $ALLSKY_SFC_UVB$definition -#> [1] "The ultraviolet B (UVB 280nm-315nm) irradiance under all sky conditions." -#> -#> -#> $AOD_55 -#> $AOD_55$type -#> [1] "RADIATION" -#> -#> $AOD_55$temporal -#> [1] "HOURLY" -#> -#> $AOD_55$source -#> [1] "CERES" -#> -#> $AOD_55$community -#> [1] "AG" -#> -#> $AOD_55$calculated -#> [1] FALSE -#> -#> $AOD_55$inputs -#> NULL -#> -#> $AOD_55$units -#> [1] "dimensionless" -#> -#> $AOD_55$name -#> [1] "Aerosol Optical Depth 55" -#> -#> $AOD_55$definition -#> [1] "The optical thickness at 0.55 um measured vertically; the component of the atmosphere to quantify the removal of radiant energy from an incident beam." -#> -#> -#> $AOD_84 -#> $AOD_84$type -#> [1] "RADIATION" -#> -#> $AOD_84$temporal -#> [1] "HOURLY" -#> -#> $AOD_84$source -#> [1] "CERES" -#> -#> $AOD_84$community -#> [1] "AG" -#> -#> $AOD_84$calculated -#> [1] FALSE -#> -#> $AOD_84$inputs -#> NULL -#> -#> $AOD_84$units -#> [1] "dimensionless" -#> -#> $AOD_84$name -#> [1] "Aerosol Optical Depth 84" -#> -#> $AOD_84$definition -#> [1] "The optical thickness at 0.84 um measured vertically; the component of the atmosphere to quantify the removal of radiant energy from an incident beam." -#> -#> -#> $CLOUD_AMT -#> $CLOUD_AMT$type -#> [1] "RADIATION" -#> -#> $CLOUD_AMT$temporal -#> [1] "HOURLY" -#> -#> $CLOUD_AMT$source -#> [1] "CERES" -#> -#> $CLOUD_AMT$community -#> [1] "AG" -#> -#> $CLOUD_AMT$calculated -#> [1] FALSE -#> -#> $CLOUD_AMT$inputs -#> NULL -#> -#> $CLOUD_AMT$units -#> [1] "%" -#> -#> $CLOUD_AMT$name -#> [1] "Cloud Amount" -#> -#> $CLOUD_AMT$definition -#> [1] "The average percent of cloud amount during the temporal period." -#> -#> -#> $CLOUD_OD -#> $CLOUD_OD$type -#> [1] "RADIATION" -#> -#> $CLOUD_OD$temporal -#> [1] "HOURLY" -#> -#> $CLOUD_OD$source -#> [1] "CERES" -#> -#> $CLOUD_OD$community -#> [1] "AG" -#> -#> $CLOUD_OD$calculated -#> [1] FALSE -#> -#> $CLOUD_OD$inputs -#> NULL -#> -#> $CLOUD_OD$units -#> [1] "dimensionless" -#> -#> $CLOUD_OD$name -#> [1] "Cloud Optical Visible Depth" -#> -#> $CLOUD_OD$definition -#> [1] "The vertical optical thickness between the top and bottom of a cloud." -#> -#> -#> $CLRSKY_SFC_LW_DWN -#> $CLRSKY_SFC_LW_DWN$type -#> [1] "RADIATION" -#> -#> $CLRSKY_SFC_LW_DWN$temporal -#> [1] "HOURLY" -#> -#> $CLRSKY_SFC_LW_DWN$source -#> [1] "CERES" -#> -#> $CLRSKY_SFC_LW_DWN$community -#> [1] "AG" -#> -#> $CLRSKY_SFC_LW_DWN$calculated -#> [1] FALSE -#> -#> $CLRSKY_SFC_LW_DWN$inputs -#> NULL -#> -#> $CLRSKY_SFC_LW_DWN$units -#> [1] "W/m^2" -#> -#> $CLRSKY_SFC_LW_DWN$name -#> [1] "Clear Sky Surface Longwave Downward Irradiance" -#> -#> $CLRSKY_SFC_LW_DWN$definition -#> [1] "The downward thermal infrared irradiance under clear sky conditions reaching a horizontal plane the surface of the earth. Also known as Horizontal Infrared Radiation Intensity from Sky." -#> -#> -#> $CLRSKY_SFC_SW_DIFF -#> $CLRSKY_SFC_SW_DIFF$type -#> [1] "RADIATION" -#> -#> $CLRSKY_SFC_SW_DIFF$temporal -#> [1] "HOURLY" -#> -#> $CLRSKY_SFC_SW_DIFF$source -#> [1] "CERES" -#> -#> $CLRSKY_SFC_SW_DIFF$community -#> [1] "AG" -#> -#> $CLRSKY_SFC_SW_DIFF$calculated -#> [1] FALSE -#> -#> $CLRSKY_SFC_SW_DIFF$inputs -#> NULL -#> -#> $CLRSKY_SFC_SW_DIFF$units -#> [1] "MJ/hr" -#> -#> $CLRSKY_SFC_SW_DIFF$name -#> [1] "Clear Sky Surface Shortwave Downward Diffuse Horizontal Irradiance" -#> -#> $CLRSKY_SFC_SW_DIFF$definition -#> [1] "The diffuse (light energy scattered out of the direction of the sun) solar irradiance incident on a horizontal plane at the surface of the earth under clear sky conditions." -#> -#> -#> $CLRSKY_SFC_SW_DWN -#> $CLRSKY_SFC_SW_DWN$type -#> [1] "RADIATION" -#> -#> $CLRSKY_SFC_SW_DWN$temporal -#> [1] "HOURLY" -#> -#> $CLRSKY_SFC_SW_DWN$source -#> [1] "CERES" -#> -#> $CLRSKY_SFC_SW_DWN$community -#> [1] "AG" -#> -#> $CLRSKY_SFC_SW_DWN$calculated -#> [1] FALSE -#> -#> $CLRSKY_SFC_SW_DWN$inputs -#> NULL -#> -#> $CLRSKY_SFC_SW_DWN$units -#> [1] "MJ/hr" -#> -#> $CLRSKY_SFC_SW_DWN$name -#> [1] "Clear Sky Surface Shortwave Downward Irradiance" -#> -#> $CLRSKY_SFC_SW_DWN$definition -#> [1] "The total solar irradiance incident (direct plus diffuse) on a horizontal plane at the surface of the earth under clear sky conditions. An alternative term for the total solar irradiance is the \"Global Horizontal Irradiance\" or GHI." -#> -#> -#> $PW -#> $PW$type -#> [1] "RADIATION" -#> -#> $PW$temporal -#> [1] "HOURLY" -#> -#> $PW$source -#> [1] "CERES" -#> -#> $PW$community -#> [1] "AG" -#> -#> $PW$calculated -#> [1] FALSE -#> -#> $PW$inputs -#> NULL -#> -#> $PW$units -#> [1] "cm" -#> -#> $PW$name -#> [1] "Precipitable Water" -#> -#> $PW$definition -#> [1] "The total atmospheric water vapor contained in a vertical column of the atmosphere." -#> -#> -#> $SZA -#> $SZA$type -#> [1] "RADIATION" -#> -#> $SZA$temporal -#> [1] "HOURLY" -#> -#> $SZA$source -#> [1] "CERES" -#> -#> $SZA$community -#> [1] "AG" -#> -#> $SZA$calculated -#> [1] FALSE -#> -#> $SZA$inputs -#> NULL -#> -#> $SZA$units -#> [1] "Degrees" -#> -#> $SZA$name -#> [1] "Solar Zenith Angle" -#> -#> $SZA$definition -#> [1] "The angle between the geodetic zenith vector and a vector from the earth point to the sun integrated over the period." -#> -#> -#> $TOA_SW_DWN -#> $TOA_SW_DWN$type -#> [1] "RADIATION" -#> -#> $TOA_SW_DWN$temporal -#> [1] "HOURLY" -#> -#> $TOA_SW_DWN$source -#> [1] "CERES" -#> -#> $TOA_SW_DWN$community -#> [1] "AG" -#> -#> $TOA_SW_DWN$calculated -#> [1] FALSE -#> -#> $TOA_SW_DWN$inputs -#> NULL -#> -#> $TOA_SW_DWN$units -#> [1] "MJ/hr" -#> -#> $TOA_SW_DWN$name -#> [1] "Top-Of-Atmosphere Shortwave Downward Irradiance" -#> -#> $TOA_SW_DWN$definition -#> [1] "The total solar irradiance incident (direct plus diffuse) on a horizontal plane at the top of the atmosphere (extraterrestrial radiation)." -#> -#> -#> $ALLSKY_KT -#> $ALLSKY_KT$type -#> [1] "RADIATION" -#> -#> $ALLSKY_KT$temporal -#> [1] "HOURLY" -#> -#> $ALLSKY_KT$source -#> [1] "POWER" -#> -#> $ALLSKY_KT$community -#> [1] "AG" -#> -#> $ALLSKY_KT$calculated -#> [1] FALSE -#> -#> $ALLSKY_KT$inputs -#> NULL -#> -#> $ALLSKY_KT$units -#> [1] "dimensionless" -#> -#> $ALLSKY_KT$name -#> [1] "All Sky Insolation Clearness Index" -#> -#> $ALLSKY_KT$definition -#> [1] "A fraction representing clearness of the atmosphere; the all sky insolation that is transmitted through the atmosphere to strike the surface of the earth divided by the average of top of the atmosphere total solar irradiance incident." -#> -#> -#> $ALLSKY_NKT -#> $ALLSKY_NKT$type -#> [1] "RADIATION" -#> -#> $ALLSKY_NKT$temporal -#> [1] "HOURLY" -#> -#> $ALLSKY_NKT$source -#> [1] "POWER" -#> -#> $ALLSKY_NKT$community -#> [1] "AG" -#> -#> $ALLSKY_NKT$calculated -#> [1] FALSE -#> -#> $ALLSKY_NKT$inputs -#> NULL -#> -#> $ALLSKY_NKT$units -#> [1] "dimensionless" -#> -#> $ALLSKY_NKT$name -#> [1] "All Sky Normalized Insolation Clearness Index" -#> -#> $ALLSKY_NKT$definition -#> [1] "The average zenith angle-independent expression of the all sky insolation clearness index." -#> -#> -#> $ALLSKY_SFC_PAR_TOT -#> $ALLSKY_SFC_PAR_TOT$type -#> [1] "RADIATION" -#> -#> $ALLSKY_SFC_PAR_TOT$temporal -#> [1] "HOURLY" -#> -#> $ALLSKY_SFC_PAR_TOT$source -#> [1] "POWER" -#> -#> $ALLSKY_SFC_PAR_TOT$community -#> [1] "AG" -#> -#> $ALLSKY_SFC_PAR_TOT$calculated -#> [1] FALSE -#> -#> $ALLSKY_SFC_PAR_TOT$inputs -#> NULL -#> -#> $ALLSKY_SFC_PAR_TOT$units -#> [1] "W/m^2" -#> -#> $ALLSKY_SFC_PAR_TOT$name -#> [1] "All Sky Surface PAR Total" -#> -#> $ALLSKY_SFC_PAR_TOT$definition -#> [1] "The total Photosynthetically Active Radiation (PAR) incident on a horizontal plane at the surface of the earth under all sky conditions." -#> -#> -#> $ALLSKY_SFC_SW_DNI -#> $ALLSKY_SFC_SW_DNI$type -#> [1] "RADIATION" -#> -#> $ALLSKY_SFC_SW_DNI$temporal -#> [1] "HOURLY" -#> -#> $ALLSKY_SFC_SW_DNI$source -#> [1] "POWER" -#> -#> $ALLSKY_SFC_SW_DNI$community -#> [1] "AG" -#> -#> $ALLSKY_SFC_SW_DNI$calculated -#> [1] FALSE -#> -#> $ALLSKY_SFC_SW_DNI$inputs -#> NULL -#> -#> $ALLSKY_SFC_SW_DNI$units -#> [1] "MJ/hr" -#> -#> $ALLSKY_SFC_SW_DNI$name -#> [1] "All Sky Surface Shortwave Downward Direct Normal Irradiance" -#> -#> $ALLSKY_SFC_SW_DNI$definition -#> [1] "The direct solar irradiance incident to a horizontal plane normal (perpendicular) to the direction of the sun's position under all sky conditions." -#> -#> -#> $ALLSKY_SRF_ALB -#> $ALLSKY_SRF_ALB$type -#> [1] "RADIATION" -#> -#> $ALLSKY_SRF_ALB$temporal -#> [1] "HOURLY" -#> -#> $ALLSKY_SRF_ALB$source -#> [1] "POWER" -#> -#> $ALLSKY_SRF_ALB$community -#> [1] "AG" -#> -#> $ALLSKY_SRF_ALB$calculated -#> [1] FALSE -#> -#> $ALLSKY_SRF_ALB$inputs -#> NULL -#> -#> $ALLSKY_SRF_ALB$units -#> [1] "dimensionless" -#> -#> $ALLSKY_SRF_ALB$name -#> [1] "All Sky Surface Albedo" -#> -#> $ALLSKY_SRF_ALB$definition -#> [1] "The all sky rate of reflectivity of the earth's surface; the ratio of the solar energy reflected by the surface of the earth compared to the total solar energy incident reaching the surface of the earth." -#> -#> -#> $CLRSKY_KT -#> $CLRSKY_KT$type -#> [1] "RADIATION" -#> -#> $CLRSKY_KT$temporal -#> [1] "HOURLY" -#> -#> $CLRSKY_KT$source -#> [1] "POWER" -#> -#> $CLRSKY_KT$community -#> [1] "AG" -#> -#> $CLRSKY_KT$calculated -#> [1] FALSE -#> -#> $CLRSKY_KT$inputs -#> NULL -#> -#> $CLRSKY_KT$units -#> [1] "dimensionless" -#> -#> $CLRSKY_KT$name -#> [1] "Clear Sky Insolation Clearness Index" -#> -#> $CLRSKY_KT$definition -#> [1] "A fraction representing clearness of the atmosphere; the clear sky insolation that is transmitted through the atmosphere to strike the surface of the earth divided by the average of top of the atmosphere total solar irradiance incident." -#> -#> -#> $CLRSKY_NKT -#> $CLRSKY_NKT$type -#> [1] "RADIATION" -#> -#> $CLRSKY_NKT$temporal -#> [1] "HOURLY" -#> -#> $CLRSKY_NKT$source -#> [1] "POWER" -#> -#> $CLRSKY_NKT$community -#> [1] "AG" -#> -#> $CLRSKY_NKT$calculated -#> [1] FALSE -#> -#> $CLRSKY_NKT$inputs -#> NULL -#> -#> $CLRSKY_NKT$units -#> [1] "dimensionless" -#> -#> $CLRSKY_NKT$name -#> [1] "Clear Sky Normalized Insolation Clearness Index" -#> -#> $CLRSKY_NKT$definition -#> [1] "The average zenith angle-independent expression of the clear sky insolation clearness index." -#> -#> -#> $CLRSKY_SFC_PAR_TOT -#> $CLRSKY_SFC_PAR_TOT$type -#> [1] "RADIATION" -#> -#> $CLRSKY_SFC_PAR_TOT$temporal -#> [1] "HOURLY" -#> -#> $CLRSKY_SFC_PAR_TOT$source -#> [1] "POWER" -#> -#> $CLRSKY_SFC_PAR_TOT$community -#> [1] "AG" -#> -#> $CLRSKY_SFC_PAR_TOT$calculated -#> [1] FALSE -#> -#> $CLRSKY_SFC_PAR_TOT$inputs -#> NULL -#> -#> $CLRSKY_SFC_PAR_TOT$units -#> [1] "W/m^2" -#> -#> $CLRSKY_SFC_PAR_TOT$name -#> [1] "Clear Sky Surface PAR Total" -#> -#> $CLRSKY_SFC_PAR_TOT$definition -#> [1] "The total Photosynthetically Active Radiation (PAR) incident on a horizontal plane at the surface of the earth under clear sky conditions." -#> -#> -#> $CLRSKY_SFC_SW_DNI -#> $CLRSKY_SFC_SW_DNI$type -#> [1] "RADIATION" -#> -#> $CLRSKY_SFC_SW_DNI$temporal -#> [1] "HOURLY" -#> -#> $CLRSKY_SFC_SW_DNI$source -#> [1] "POWER" -#> -#> $CLRSKY_SFC_SW_DNI$community -#> [1] "AG" -#> -#> $CLRSKY_SFC_SW_DNI$calculated -#> [1] FALSE -#> -#> $CLRSKY_SFC_SW_DNI$inputs -#> NULL -#> -#> $CLRSKY_SFC_SW_DNI$units -#> [1] "MJ/hr" -#> -#> $CLRSKY_SFC_SW_DNI$name -#> [1] "Clear Sky Surface Shortwave Downward Direct Normal Irradiance" -#> -#> $CLRSKY_SFC_SW_DNI$definition -#> [1] "The direct solar irradiance incident to a horizontal plane normal (perpendicular) to the direction of the sun's position under clear sky conditions." -#> -#> -#> $CLRSKY_SRF_ALB -#> $CLRSKY_SRF_ALB$type -#> [1] "RADIATION" -#> -#> $CLRSKY_SRF_ALB$temporal -#> [1] "HOURLY" -#> -#> $CLRSKY_SRF_ALB$source -#> [1] "POWER" -#> -#> $CLRSKY_SRF_ALB$community -#> [1] "AG" -#> -#> $CLRSKY_SRF_ALB$calculated -#> [1] FALSE -#> -#> $CLRSKY_SRF_ALB$inputs -#> NULL -#> -#> $CLRSKY_SRF_ALB$units -#> [1] "dimensionless" -#> -#> $CLRSKY_SRF_ALB$name -#> [1] "Clear Sky Surface Albedo" -#> -#> $CLRSKY_SRF_ALB$definition -#> [1] "The clear sky rate of reflectivity of the earth's surface; the ratio of the solar energy reflected by the surface of the earth compared to the total solar energy incident reaching the surface of the earth." -#> -#> -#> $DIFFUSE_ILLUMINANCE -#> $DIFFUSE_ILLUMINANCE$type -#> [1] "RADIATION" -#> -#> $DIFFUSE_ILLUMINANCE$temporal -#> [1] "HOURLY" -#> -#> $DIFFUSE_ILLUMINANCE$source -#> [1] "POWER" -#> -#> $DIFFUSE_ILLUMINANCE$community -#> [1] "AG" -#> -#> $DIFFUSE_ILLUMINANCE$calculated -#> [1] FALSE -#> -#> $DIFFUSE_ILLUMINANCE$inputs -#> NULL -#> -#> $DIFFUSE_ILLUMINANCE$units -#> [1] "lux" -#> -#> $DIFFUSE_ILLUMINANCE$name -#> [1] "Diffuse Illuminance" -#> -#> $DIFFUSE_ILLUMINANCE$definition -#> [1] "The average amount of illuminance received directly from the solar disk on a surface perpendicular to the suns rays." -#> -#> -#> $DIRECT_ILLUMINANCE -#> $DIRECT_ILLUMINANCE$type -#> [1] "RADIATION" -#> -#> $DIRECT_ILLUMINANCE$temporal -#> [1] "HOURLY" -#> -#> $DIRECT_ILLUMINANCE$source -#> [1] "POWER" -#> -#> $DIRECT_ILLUMINANCE$community -#> [1] "AG" -#> -#> $DIRECT_ILLUMINANCE$calculated -#> [1] FALSE -#> -#> $DIRECT_ILLUMINANCE$inputs -#> NULL -#> -#> $DIRECT_ILLUMINANCE$units -#> [1] "lux" -#> -#> $DIRECT_ILLUMINANCE$name -#> [1] "Direct Illuminance" -#> -#> $DIRECT_ILLUMINANCE$definition -#> [1] "The average amount of illuminance received from the sky (excluding the solar disk) on a horizontal plane." -#> -#> -#> $GLOBAL_ILLUMINANCE -#> $GLOBAL_ILLUMINANCE$type -#> [1] "RADIATION" -#> -#> $GLOBAL_ILLUMINANCE$temporal -#> [1] "HOURLY" -#> -#> $GLOBAL_ILLUMINANCE$source -#> [1] "POWER" -#> -#> $GLOBAL_ILLUMINANCE$community -#> [1] "AG" -#> -#> $GLOBAL_ILLUMINANCE$calculated -#> [1] FALSE -#> -#> $GLOBAL_ILLUMINANCE$inputs -#> NULL -#> -#> $GLOBAL_ILLUMINANCE$units -#> [1] "lux" -#> -#> $GLOBAL_ILLUMINANCE$name -#> [1] "Global Illuminance" -#> -#> $GLOBAL_ILLUMINANCE$definition -#> [1] "The average total amount of direct and diffuse illuminance on a horizontal plane." -#> -#> -#> $TOA_SW_DNI -#> $TOA_SW_DNI$type -#> [1] "RADIATION" -#> -#> $TOA_SW_DNI$temporal -#> [1] "HOURLY" -#> -#> $TOA_SW_DNI$source -#> [1] "POWER" -#> -#> $TOA_SW_DNI$community -#> [1] "AG" -#> -#> $TOA_SW_DNI$calculated -#> [1] FALSE -#> -#> $TOA_SW_DNI$inputs -#> NULL -#> -#> $TOA_SW_DNI$units -#> [1] "MJ/hr" -#> -#> $TOA_SW_DNI$name -#> [1] "Top-Of-Atmosphere Shortwave Direct Normal Radiation" -#> -#> $TOA_SW_DNI$definition -#> [1] "The total solar irradiance incident (direct plus diffuse) on a horizontal plane where oriented to the sun's position at the top of the atmosphere (extraterrestrial radiation)." -#> -#> -#> $ZENITH_LUMINANCE -#> $ZENITH_LUMINANCE$type -#> [1] "RADIATION" -#> -#> $ZENITH_LUMINANCE$temporal -#> [1] "HOURLY" -#> -#> $ZENITH_LUMINANCE$source -#> [1] "POWER" -#> -#> $ZENITH_LUMINANCE$community -#> [1] "AG" -#> -#> $ZENITH_LUMINANCE$calculated -#> [1] FALSE -#> -#> $ZENITH_LUMINANCE$inputs -#> NULL -#> -#> $ZENITH_LUMINANCE$units -#> [1] "cd/m^2" -#> -#> $ZENITH_LUMINANCE$name -#> [1] "Zenith luminance" -#> -#> $ZENITH_LUMINANCE$definition -#> [1] "The average amount of luminance at the skys zenith." -``` - ## A Note on API Throttling The POWER API endpoints limit queries to prevent overloads due to repetitive and rapid requests. diff --git a/vignettes/nasapower.Rmd.orig b/vignettes/nasapower.Rmd.orig index d303aee9..730a58c8 100644 --- a/vignettes/nasapower.Rmd.orig +++ b/vignettes/nasapower.Rmd.orig @@ -106,24 +106,17 @@ This can be used to find available parameter names and definitions for each comm Fetch the complete available information for the temperature at 2 metres above the Earth's surface, T2M. ```{r t2m-information} -query_parameters(par = "T2M") +query_parameters(pars = "T2M") ``` Fetch complete temporal and community specific attribute information for "T2M" in the "ag" community for the "hourly" temporal API. ```{r t2m-ag-hourly} -query_parameters(par = "T2M", +query_parameters(pars = "T2M", community = "ag", temporal_api = "hourly") ``` -Fetch complete temporal and community specific attribute information for all parameters in the "ag" community for the "hourly" temporal API. - -```{r complete-ag-hourly} -query_parameters(community = "ag", - temporal_api = "hourly") -``` - ## A Note on API Throttling The POWER API endpoints limit queries to prevent overloads due to repetitive and rapid requests.