From f0329d848d8b82388fc8babaabd1e0c87ecce283 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Thu, 25 Jan 2024 16:28:38 +0800 Subject: [PATCH 01/43] check pars in query_parameters() and better error msgs --- DESCRIPTION | 17 ++++++---- NEWS.md | 13 +++++++ R/get_power.R | 7 +--- R/internal_functions.R | 73 ++++++++++++++++++++++++++++------------ R/query_parameters.R | 26 ++++++++------ man/nasapower-package.Rd | 1 + 6 files changed, 93 insertions(+), 44 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index c9b406f6..0ec4d5b2 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: nasapower Type: Package Title: NASA POWER API Client -Version: 4.1.0 +Version: 4.1.1 Authors@R: c(person(given = "Adam H.", family = "Sparks", @@ -54,6 +54,11 @@ Authors@R: of vroom 1.5.0.', see .")), person(given = "Western Australia Agriculture Authority (WAAA)", + role = "cph", + comment = + c("Supported the development of 'nasapower' through Adam H. + Sparks' time.")), + person(given = "Curtin University", role = "cph", comment = c("Supported the development of 'nasapower' through Adam H. @@ -79,11 +84,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 +91,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/NEWS.md b/NEWS.md index 9e643f65..86a4b15c 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,16 @@ +# nasapower 4.1.1 + +## Bug fixes + +* Fixes bug in user agent string that may have incorrectly reported the version number to the POWER team at NASA. + +* 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. + +## Minor changes + +* Better implementation of {cli} for error messages to end users. + # nasapower 4.1.0 ## Bug fixes diff --git a/R/get_power.R b/R/get_power.R index eec70795..718664f3 100644 --- a/R/get_power.R +++ b/R/get_power.R @@ -591,12 +591,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 <- .create_ua_string() if (lonlat_identifier$identifier == "point") { query_list <- list( diff --git a/R/internal_functions.R b/R/internal_functions.R index 631a06af..466d3e40 100644 --- a/R/internal_functions.R +++ b/R/internal_functions.R @@ -30,32 +30,40 @@ # make sure that there are no duplicates in the query pars <- unique(toupper(pars)) - p <- unlist(parameters[paste(toupper(temporal_api), - toupper(community), - sep = "_")]) + # 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") + } - # 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." - ) + if (is.null(temporal_api)) { + temporal_api <- c("HOURLY", "DAILY", "MONTHLY", "CLIMATOLOGY") } - if (length(pars) > 15 && temporal_api == "hourly") { + 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)) { 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" - ) - } + c( + i = "{.arg {pars[which(pars %notin% p)]}} {?is/are} not valid in {.var pars}.", + x = "Check that the {.arg pars}, {.arg community} and {.arg temporal_api} all align." + ) + ) + } + if (length(pars) > 15 && temporal_api == "hourly") { + cli::cli_abort( + c(i = "A maximum of 15 parameters can currently be requested in one submission for hourly data.") + ) + } else if (length(pars) > 20) { + cli::cli_abort(c(i = "A maximum of 20 parameters can currently be requested in one submission.")) + } # all good? great. now we format it for the API pars <- paste0(pars, collapse = ",") @@ -96,3 +104,24 @@ # parse response return(response) } + +#' Create User Agent String +#' +#' Creates a user agent string to pass along to the API +#' +#' @example +#' .create_ua_string() +#' +#' @return a string with a value of \dQuote{nasapower} and the package version +#' number with no \dQuote{.} in it. +#' @keywords Internal +#' @noRd + +.create_ua_string <- function() { + sprintf("nasapower%s", + gsub( + pattern = "\\.", + replacement = "", + x = getNamespaceVersion("nasapower") + )) +} diff --git a/R/query_parameters.R b/R/query_parameters.R index b164c02f..1b687cd1 100644 --- a/R/query_parameters.R +++ b/R/query_parameters.R @@ -57,20 +57,26 @@ #' @export query_parameters <- function(community = NULL, - par = NULL, - temporal_api = NULL) { - power_url <- "https://power.larc.nasa.gov/api/system/manager/parameters" + par = NULL, + temporal_api = NULL) { - # 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 + .check_pars(pars = par, community = community, temporal_api = temporal_api) + + power_url <- + "https://power.larc.nasa.gov/api/system/manager/parameters" + user_agent <- .create_ua_string() + + # 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=%s", power_url, par, user_agent + ))) } else { if (is.null(community) || is.null(temporal_api)) { cli::cli_abort( - "`commmunity` and `temporal_api` strings must be supplied.") + "`commmunity` and `temporal_api` strings must be supplied." + ) } query_list <- @@ -78,7 +84,7 @@ query_parameters <- function(community = NULL, community = community, parameters = par, temporal = temporal_api, - user = "nasapowerdev" + user = user_agent ) # if a `par` isn't supplied, remove this from the query list or leave as-is diff --git a/man/nasapower-package.Rd b/man/nasapower-package.Rd index a8009246..48c21188 100644 --- a/man/nasapower-package.Rd +++ b/man/nasapower-package.Rd @@ -30,6 +30,7 @@ Other contributors: \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 Curtin University (Supported the development of 'nasapower' through Adam H. Sparks' time.) [copyright holder] } } From e5c74cd94736f9acc1e73768df96e54484cdcc2a Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Thu, 25 Jan 2024 19:14:38 +0800 Subject: [PATCH 02/43] Update {cli} responses to end-users --- R/get_power.R | 75 ++++++++++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/R/get_power.R b/R/get_power.R index 718664f3..6865e81e 100644 --- a/R/get_power.R +++ b/R/get_power.R @@ -245,35 +245,44 @@ get_power <- function(community = c("ag", "re", "sb"), if (any(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(i = "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") + cli::cli_abort("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" + "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( + i = "You have provided {.arg wind_elevation}, {.var {wind_elevation}}, + for a region request. 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( + i = "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(i = "{.arg wind_elevation} values in metres are required to be between + 10m and 300m.") ) } } @@ -281,11 +290,19 @@ 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.")) + } + # see internal_functions.R for these functions prefixed with "." pars <- .check_pars(pars, community, @@ -397,14 +414,11 @@ 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("You have not entered dates for the query.") } 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." - ) + cli::cli_abort("For `temporal_api = monthly`, at least two (2) years are required to be provided.") } if (any(nchar(dates) > 4)) { dates <- unique(substr(dates, 1, 4)) @@ -422,8 +436,7 @@ get_power <- function(community = c("ag", "re", "sb"), dates <- c(dates, dates) } if (length(dates) > 2) { - cli::cli_abort( - "You have supplied more than two dates for start and end.") + cli::cli_abort("You have supplied more than two dates for start and end.") } # put dates in list to use lapply @@ -446,7 +459,8 @@ 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.") + "{.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." + ) } ) as.Date(x) @@ -465,16 +479,13 @@ get_power <- function(community = c("ag", "re", "sb"), # check date to be sure it's not before POWER data start if (temporal_api != "hourly" && dates[[1]] < "1981-01-01") { - cli::cli_abort( - "1981-01-01 is the earliest available data from POWER.\n") + cli::cli_abort("1981-01-01 is the earliest available data from POWER.\n") } 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") + cli::cli_abort("2001-01-01 is the earliest available hourly data from POWER.\n") # 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") + cli::cli_abort("The weather data cannot possibly extend beyond this day.\n") } dates <- lapply(dates, as.character) @@ -501,19 +512,14 @@ 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("You have entered an invalid request for `lonlat`.\n") } } 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." - ) + cli::cli_abort("Please check your longitude, {.var {lonlat[1]}}, to be sure it is valid.") } if (lonlat[2] < -90 | lonlat[2] > 90) { - cli::cli_abort( - "Please check your latitude, {.var {lonlat[2]}}, value to be sure it is valid." - ) + cli::cli_abort("Please check your latitude, {.var {lonlat[2]}}, value to be sure it is valid.") } identifier <- "point" longitude <- lonlat[1] @@ -538,11 +544,9 @@ get_power <- function(community = c("ag", "re", "sb"), "Please check your latitude values, {.var {lonlat[2]}} and {.var {lonlat[4]}}, to be sure they are valid.\n" ) } else if (lonlat[2] > lonlat[4]) { - cli::cli_abort( - "The first `lat` value must be the minimum value.") + cli::cli_abort("The first `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.") + cli::cli_abort("The first `lon` value must be the minimum value.") } identifier <- "regional" bbox <- c( @@ -552,8 +556,7 @@ get_power <- function(community = c("ag", "re", "sb"), "ymax" = lonlat[4] ) } else { - cli::cli_abort( - "You have entered an invalid request for `lonlat`.\n") + cli::cli_abort("You have entered an invalid request for `lonlat`.\n") } if (!is.null(bbox)) { From 04c4f2087d7e102b882a09ab5eb7c7f6d4bd3696 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Sun, 28 Jan 2024 18:38:49 +0800 Subject: [PATCH 03/43] Update cli messages and work on tests --- R/get_power.R | 248 ++++++++++++++----------- R/internal_functions.R | 15 +- R/query_parameters.R | 30 ++- man/get_power.Rd | 80 ++++---- man/query_parameters.Rd | 13 +- tests/testthat/test-get_power.R | 2 +- tests/testthat/test-query_parameters.R | 8 +- 7 files changed, 221 insertions(+), 175 deletions(-) diff --git a/R/get_power.R b/R/get_power.R index 6865e81e..88a642a4 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,31 +9,31 @@ #' 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} -#' `temporal_api`s. If the `temporal_api` is specified as \dQuote{hourly} +#' 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. #' @param dates A character vector of start and end dates in that order,\cr #' _e.g._, `dates = c("1983-01-01", "2017-12-31")`. -#' Not used when\cr `temporal_api` is set to \dQuote{climatology}. +#' Not used when\cr `temporal_api` is set to \dQuote{CLIMATOLOGY}. #' See argument details for more. #' @param site_elevation A user-supplied value for elevation at a single point #' in metres. If provided this will return a corrected atmospheric pressure #' value adjusted to the elevation provided. Only used with `lonlat` as a -#' single point of x, y coordinates, not for use with \dQuote{global} or with +#' single point of x, y coordinates, not for use with \dQuote{GLOBAL} or with #' a regional request. #' @param wind_elevation A user-supplied value for elevation at a single point #' in metres. Wind Elevation values in Meters are required to be between 10m @@ -94,37 +93,37 @@ #' Australia: `lonlat = c(112.5, -55.5, 115.5, -50.5)`. *Maximum area #' processed is 4.5 x 4.5 degrees (100 points).} #' -#' \item{For global coverage}{To get global coverage for \dQuote{climatology}, -#' supply \dQuote{global} while also specifying \dQuote{climatology} for the +#' \item{For global coverage}{To get global coverage for \dQuote{CLIMATOLOGY}, +#' supply \dQuote{global} while also specifying \dQuote{CLIMATOLOGY} for the #' `temporal_api`.} #' } #' #' @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. +#' `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{ -#' \item{vegtype_1}{35-m broadleaf-evergreen trees (70% coverage)} -#' \item{vegtype_2}{20-m broadleaf-deciduous trees (75% coverage)} -#' \item{vegtype_3}{20-m broadleaf and needleleaf trees (75% coverage)} -#' \item{vegtype_4}{17-m needleleaf-evergreen trees (75% coverage)} -#' \item{vegtype_5}{14-m needleleaf-deciduous trees (50% coverage)} -#' \item{vegtype_6}{Savanna:18-m broadleaf trees (30%) & groundcover} -#' \item{vegtype_7}{0.6-m perennial groundcover (100%)} -#' \item{vegtype_8}{0.5-m broadleaf shrubs (variable %) & groundcover} -#' \item{vegtype_9}{0.5-m broadleaf shrubs (10%) with bare soil} -#' \item{vegtype_10}{Tundra: 0.6-m trees/shrubs (variable %) & groundcover} -#' \item{vegtype_11}{Rough bare soil} -#' \item{vegtype_12}{Crop: 20-m broadleaf-deciduous trees (10%) & wheat} -#' \item{vegtype_20}{Rough glacial snow/ice} +#' \item{VEGTYPE_1}{35-m broadleaf-evergreen trees (70% coverage)} +#' \item{VEGTYPE_2}{20-m broadleaf-deciduous trees (75% coverage)} +#' \item{VEGTYPE_3}{20-m broadleaf and needleleaf trees (75% coverage)} +#' \item{VEGTYPE_4}{17-m needleleaf-evergreen trees (75% coverage)} +#' \item{VEGTYPE_5}{14-m needleleaf-deciduous trees (50% coverage)} +#' \item{VEGTYPE_6}{Savanna:18-m broadleaf trees (30%) & groundcover} +#' \item{VEGTYPE_7}{0.6-m perennial groundcover (100%)} +#' \item{VEGTYPE_8}{0.5-m broadleaf shrubs (variable %) & groundcover} +#' \item{VEGTYPE_9}{0.5-m broadleaf shrubs (10%) with bare soil} +#' \item{VEGTYPE_10}{Tundra: 0.6-m trees/shrubs (variable %) & groundcover} +#' \item{VEGTYPE_11}{Rough bare soil} +#' \item{VEGTYPE_12}{Crop: 20-m broadleaf-deciduous trees (10%) & wheat} +#' \item{VEGTYPE_20}{Rough glacial snow/ice} #' \item{seaice}{Smooth sea ice} #' \item{openwater}{Open water} #' \item{airportice}{Airport: flat ice/snow} @@ -147,7 +146,7 @@ #' #' @return A data frame as a `POWER.Info` class, an extension of the #' [tibble::tibble], object of \acronym{POWER} data including location, dates -#' (not including \dQuote{climatology}) and requested parameters. A decorative +#' (not including \dQuote{CLIMATOLOGY}) and requested parameters. A decorative #' header of metadata is included in this object. #' #' @references @@ -156,34 +155,34 @@ #' #' @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" +#' temporal_api = "CLIMATOLOGY" #' ) #' #' 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") #' ) #' @@ -192,20 +191,20 @@ #' @author Adam H. Sparks \email{adamhsparks@@gmail.com} #' #' @export -get_power <- function(community = c("ag", "re", "sb"), +get_power <- function(community = c("AG", "RE", "SB"), pars, - temporal_api = c("daily", - "monthly", - "hourly", - "climatology"), + temporal_api = c("DAILY", + "MONTHLY", + "HOURLY", + "CLIMATOLOGY"), lonlat, dates = NULL, site_elevation = NULL, wind_elevation = NULL, wind_surface = NULL, time_standard = c("LST", "UTC")) { - community <- tolower(community) - temporal_api <- tolower(temporal_api) + community <- toupper(community) + temporal_api <- toupper(temporal_api) time_standard <- toupper(time_standard) community <- rlang::arg_match(community) @@ -213,36 +212,36 @@ get_power <- function(community = c("ag", "re", "sb"), time_standard <- rlang::arg_match(time_standard) if (!is.null(wind_surface)) { - wind_surface <- tolower(wind_surface) + wind_surface <- toupper(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" + "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" ) ) } - if (temporal_api == "climatology") { + if (temporal_api == "CLIMATOLOGY") { dates <- NULL } - if (any(lonlat == "global")) { + if (any(lonlat == "GLOBAL")) { # remove this if POWER enables global queries for climatology again cli::cli_abort( c(i = "The POWER team have not enabled {.var global} data queries with @@ -250,13 +249,17 @@ get_power <- function(community = c("ag", "re", "sb"), ) } if (!is.null(site_elevation) && !is.numeric(site_elevation)) { - cli::cli_abort("You have entered an invalid value for {.arg site_elevation}, - {.val site_elevation.") + cli::cli_abort( + c(i = "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 {.arg site_elevation}, {.var {site_elevation}} for a + c( + i = "You have provided {.arg site_elevation}, {.var {site_elevation}} for a region request. The {.arg site_elevation} value will be ignored." + ) ) site_elevation <- NULL } @@ -299,14 +302,26 @@ get_power <- function(community = c("ag", "re", "sb"), } } - if (temporal_api == "hourly" && length(lonlat) == 4L) { + 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(i = "A maximum of 15 parameters can currently be requested in one submission for hourly data.") + ) + } 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.") + ) + } + # 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, @@ -414,18 +429,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(n = 3)) } 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.") + cli::cli_abort( + 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(n = 3) + ) } 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) @@ -436,7 +458,11 @@ get_power <- function(community = c("ag", "re", "sb"), dates <- c(dates, dates) } if (length(dates) > 2) { - cli::cli_abort("You have supplied more than two dates for start and end.") + cli::cli_abort( + 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(n = 3) + ) } # put dates in list to use lapply @@ -459,7 +485,8 @@ 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." + 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.") ) } ) @@ -471,21 +498,32 @@ 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]) } # check date to be sure it's not before POWER data start if (temporal_api != "hourly" && dates[[1]] < "1981-01-01") { - cli::cli_abort("1981-01-01 is the earliest available data from POWER.\n") + cli::cli_abort( + call = rlang::caller_env(n = 3), + c(i = "{.arg dates} = {min(dates)} 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") + cli::cli_abort( + call = rlang::caller_env(n = 3), + c(i = "{.var dates} = {.arg min(dates)} 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") + cli::cli_abort( + call = rlang::caller_env(n = 3), + c(i = "{.var dates} = {.arg max(dates)} is invalid.", + x = "The weather data cannot possibly extend beyond this day.") + ) } dates <- lapply(dates, as.character) @@ -512,14 +550,14 @@ 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(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.") + cli::cli_abort(c(i = "Please check your longitude, {.var {lonlat[1]}}, to be sure it is valid.")) } if (lonlat[2] < -90 | lonlat[2] > 90) { - cli::cli_abort("Please check your latitude, {.var {lonlat[2]}}, value to be sure it is valid.") + cli::cli_abort(c(i = "Please check your latitude, {.var {lonlat[2]}}, value to be sure it is valid.")) } identifier <- "point" longitude <- lonlat[1] @@ -527,27 +565,27 @@ 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)." + 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, (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" - ) - } 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" + c(i = "Please check your longitude values, {.var {lonlat[1]}} and {.var {lonlat[3]}}, to be sure they are valid.") ) - } else if (lonlat[2] > lonlat[4]) { - cli::cli_abort("The first `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.") - } + } else if (any(lonlat[2] < -90 | + lonlat[4] < -90 | + lonlat[2] > 90 | + lonlat[4] > 90)) { + cli::cli_abort( + 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(c = (i = "The first {.arg lat} value must be the minimum value.")) + } else if (lonlat[1] > lonlat[3]) { + cli::cli_abort(c = (i = "The first {.arg lon} value must be the minimum value.")) + } identifier <- "regional" bbox <- c( "xmin" = lonlat[1], @@ -555,9 +593,9 @@ get_power <- function(community = c("ag", "re", "sb"), "xmax" = lonlat[3], "ymax" = lonlat[4] ) - } else { - cli::cli_abort("You have entered an invalid request for `lonlat`.\n") - } + } else { + cli::cli_abort(c(i = "You have entered an invalid request for `lonlat`.")) + } if (!is.null(bbox)) { lonlat_identifier <- list(bbox, identifier) @@ -571,7 +609,7 @@ get_power <- function(community = c("ag", "re", "sb"), c("longitude", "latitude", "identifier") } return(lonlat_identifier) - } + } #' Construct a list of options to pass to the POWER API #' diff --git a/R/internal_functions.R b/R/internal_functions.R index 466d3e40..3d0ee221 100644 --- a/R/internal_functions.R +++ b/R/internal_functions.R @@ -22,13 +22,13 @@ #' @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)) + pars <- unique(pars) # the `query_parameters()` may pass along `NULL` values, in that case we # want to check against all possible values @@ -50,20 +50,15 @@ # 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( c( - i = "{.arg {pars[which(pars %notin% p)]}} {?is/are} not valid in {.var pars}.", + i = "{.arg nopar} {?is/are} not valid in {.var pars}.", x = "Check that the {.arg pars}, {.arg community} and {.arg temporal_api} all align." ) ) } - if (length(pars) > 15 && temporal_api == "hourly") { - cli::cli_abort( - c(i = "A maximum of 15 parameters can currently be requested in one submission for hourly data.") - ) - } else if (length(pars) > 20) { - cli::cli_abort(c(i = "A maximum of 20 parameters can currently be requested in one submission.")) - } # all good? great. now we format it for the API pars <- paste0(pars, collapse = ",") diff --git a/R/query_parameters.R b/R/query_parameters.R index 1b687cd1..eff572ac 100644 --- a/R/query_parameters.R +++ b/R/query_parameters.R @@ -4,18 +4,19 @@ #' Queries the \acronym{POWER} \acronym{API} returning detailed information on #' available parameters. #' -#' @details If `par` is not provided all possible parameters for the provided +#' @details If `pars` 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. +#' will be returned. If none of the three are provided, all combinations are +#' returned. #' #' @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 +#' @param pars 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. @@ -36,11 +37,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") #' @@ -57,10 +58,21 @@ #' @export query_parameters <- function(community = NULL, - par = NULL, + pars = NULL, temporal_api = NULL) { - .check_pars(pars = par, community = community, temporal_api = temporal_api) + if (!is.null(community)) { + community <- toupper(community) + } + if (!is.null(pars)) { + pars <- toupper(pars) + } + if (!is.null(temporal_api)) { + temporal_api <- toupper(temporal_api) + } + + pars <- + .check_pars(pars = pars, community = community, temporal_api = temporal_api) power_url <- "https://power.larc.nasa.gov/api/system/manager/parameters" @@ -68,9 +80,9 @@ query_parameters <- function(community = NULL, # 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)) { + if (is.null(community) || is.null(temporal_api) || is.null(pars)) { return(jsonlite::fromJSON(sprintf( - "%s/%s?user=%s", power_url, par, user_agent + "%s/%s?user=%s", power_url, pars, user_agent ))) } else { if (is.null(community) || is.null(temporal_api)) { diff --git a/man/get_power.Rd b/man/get_power.Rd index 1844f5c1..c236f11e 100644 --- a/man/get_power.Rd +++ b/man/get_power.Rd @@ -5,9 +5,9 @@ \title{Get NASA POWER Data From the POWER API} \usage{ get_power( - community = c("ag", "re", "sb"), + community = c("AG", "RE", "SB"), pars, - temporal_api = c("daily", "monthly", "hourly", "climatology"), + temporal_api = c("DAILY", "MONTHLY", "HOURLY", "CLIMATOLOGY"), lonlat, dates = NULL, site_elevation = NULL, @@ -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} -\code{temporal_api}s. If the \code{temporal_api} is specified as \dQuote{hourly} +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 @@ -40,13 +40,13 @@ for more.} \item{dates}{A character vector of start and end dates in that order,\cr \emph{e.g.}, \code{dates = c("1983-01-01", "2017-12-31")}. -Not used when\cr \code{temporal_api} is set to \dQuote{climatology}. +Not used when\cr \code{temporal_api} is set to \dQuote{CLIMATOLOGY}. See argument details for more.} \item{site_elevation}{A user-supplied value for elevation at a single point in metres. If provided this will return a corrected atmospheric pressure value adjusted to the elevation provided. Only used with \code{lonlat} as a -single point of x, y coordinates, not for use with \dQuote{global} or with +single point of x, y coordinates, not for use with \dQuote{GLOBAL} or with a regional request.} \item{wind_elevation}{A user-supplied value for elevation at a single point @@ -72,7 +72,7 @@ Defaults to \code{LST}. \value{ A data frame as a \code{POWER.Info} class, an extension of the \link[tibble:tibble]{tibble::tibble}, object of \acronym{POWER} data including location, dates -(not including \dQuote{climatology}) and requested parameters. A decorative +(not including \dQuote{CLIMATOLOGY}) and requested parameters. A decorative header of metadata is included in this object. } \description{ @@ -136,8 +136,8 @@ given region, \emph{e.g.}, a bounding box for the south western corner of Australia: \code{lonlat = c(112.5, -55.5, 115.5, -50.5)}. *Maximum area processed is 4.5 x 4.5 degrees (100 points).} -\item{For global coverage}{To get global coverage for \dQuote{climatology}, -supply \dQuote{global} while also specifying \dQuote{climatology} for the +\item{For global coverage}{To get global coverage for \dQuote{CLIMATOLOGY}, +supply \dQuote{global} while also specifying \dQuote{CLIMATOLOGY} for the \code{temporal_api}.} } } @@ -146,31 +146,31 @@ 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. +\code{temporal_api} is set to \dQuote{CLIMATOLOGY} and will be ignored if set. } \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{ -\item{vegtype_1}{35-m broadleaf-evergreen trees (70\% coverage)} -\item{vegtype_2}{20-m broadleaf-deciduous trees (75\% coverage)} -\item{vegtype_3}{20-m broadleaf and needleleaf trees (75\% coverage)} -\item{vegtype_4}{17-m needleleaf-evergreen trees (75\% coverage)} -\item{vegtype_5}{14-m needleleaf-deciduous trees (50\% coverage)} -\item{vegtype_6}{Savanna:18-m broadleaf trees (30\%) & groundcover} -\item{vegtype_7}{0.6-m perennial groundcover (100\%)} -\item{vegtype_8}{0.5-m broadleaf shrubs (variable \%) & groundcover} -\item{vegtype_9}{0.5-m broadleaf shrubs (10\%) with bare soil} -\item{vegtype_10}{Tundra: 0.6-m trees/shrubs (variable \%) & groundcover} -\item{vegtype_11}{Rough bare soil} -\item{vegtype_12}{Crop: 20-m broadleaf-deciduous trees (10\%) & wheat} -\item{vegtype_20}{Rough glacial snow/ice} +\item{VEGTYPE_1}{35-m broadleaf-evergreen trees (70\% coverage)} +\item{VEGTYPE_2}{20-m broadleaf-deciduous trees (75\% coverage)} +\item{VEGTYPE_3}{20-m broadleaf and needleleaf trees (75\% coverage)} +\item{VEGTYPE_4}{17-m needleleaf-evergreen trees (75\% coverage)} +\item{VEGTYPE_5}{14-m needleleaf-deciduous trees (50\% coverage)} +\item{VEGTYPE_6}{Savanna:18-m broadleaf trees (30\%) & groundcover} +\item{VEGTYPE_7}{0.6-m perennial groundcover (100\%)} +\item{VEGTYPE_8}{0.5-m broadleaf shrubs (variable \%) & groundcover} +\item{VEGTYPE_9}{0.5-m broadleaf shrubs (10\%) with bare soil} +\item{VEGTYPE_10}{Tundra: 0.6-m trees/shrubs (variable \%) & groundcover} +\item{VEGTYPE_11}{Rough bare soil} +\item{VEGTYPE_12}{Crop: 20-m broadleaf-deciduous trees (10\%) & wheat} +\item{VEGTYPE_20}{Rough glacial snow/ice} \item{seaice}{Smooth sea ice} \item{openwater}{Open water} \item{airportice}{Airport: flat ice/snow} @@ -193,34 +193,34 @@ 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" + temporal_api = "CLIMATOLOGY" ) 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/query_parameters.Rd b/man/query_parameters.Rd index 21c2d6be..4293ae80 100644 --- a/man/query_parameters.Rd +++ b/man/query_parameters.Rd @@ -4,13 +4,13 @@ \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 = NULL, temporal_api = NULL) } \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 +\item{pars}{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.} @@ -28,14 +28,15 @@ 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 +If \code{pars} 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. +will be returned. If none of the three are provided, all combinations are +returned. } \section{Argument details for \code{temporal_api}}{ There are four valid values. @@ -53,11 +54,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/tests/testthat/test-get_power.R b/tests/testthat/test-get_power.R index 19ca2447..63a3dea5 100644 --- a/tests/testthat/test-get_power.R +++ b/tests/testthat/test-get_power.R @@ -442,7 +442,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*" diff --git a/tests/testthat/test-query_parameters.R b/tests/testthat/test-query_parameters.R index 44186474..92a7e47e 100644 --- a/tests/testthat/test-query_parameters.R +++ b/tests/testthat/test-query_parameters.R @@ -2,7 +2,7 @@ test_that("query_parameters() returns proper list of info", { skip_on_cran() par_query <- query_parameters(community = "ag", - par = c("T2M"), + pars = "T2M", temporal_api = "Daily") expect_type(par_query, "list") @@ -12,7 +12,7 @@ test_that("query_parameters() returns proper list of info", { test_that("query_parameters() returns list of parameter information", { skip_on_cran() - par_query <- query_parameters(par = "T2M") + par_query <- query_parameters(pars = "T2M") expect_type(par_query, "list") expect_length(par_query, 1) expect_named(par_query, "T2M") @@ -20,12 +20,12 @@ test_that("query_parameters() returns list of parameter information", { test_that("query_parameters() stops if par and community only supplied", { skip_on_cran() - expect_error(query_parameters(par = "T2M", + 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", + expect_error(query_parameters(pars = "T2M", temporal_api = "daily")) }) From e07999259628d03ddbc9313cc76fa70056b795fa Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Sun, 28 Jan 2024 18:38:49 +0800 Subject: [PATCH 04/43] Update cli messages and work on tests --- R/query_parameters.R | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/R/query_parameters.R b/R/query_parameters.R index eff572ac..717e858c 100644 --- a/R/query_parameters.R +++ b/R/query_parameters.R @@ -66,21 +66,22 @@ query_parameters <- function(community = NULL, } if (!is.null(pars)) { pars <- toupper(pars) + pars <- + .check_pars(pars = pars, + community = community, + temporal_api = temporal_api) } if (!is.null(temporal_api)) { temporal_api <- toupper(temporal_api) } - pars <- - .check_pars(pars = pars, community = community, temporal_api = temporal_api) - power_url <- "https://power.larc.nasa.gov/api/system/manager/parameters" user_agent <- .create_ua_string() # 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) || is.null(pars)) { + if (is.null(community) || is.null(temporal_api) && !is.null(pars)) { return(jsonlite::fromJSON(sprintf( "%s/%s?user=%s", power_url, pars, user_agent ))) From 8277c8b05d63f4369124673bc79fdd760cad5b5f Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Mon, 29 Jan 2024 16:25:40 +0800 Subject: [PATCH 05/43] wrangle query_parameters() a bit more to be done --- DESCRIPTION | 5 -- R/get_power.R | 50 ++++++++++++------ R/internal_functions.R | 3 +- R/query_parameters.R | 111 +++++++++++++++++++++------------------- man/query_parameters.Rd | 20 ++++---- 5 files changed, 101 insertions(+), 88 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 0ec4d5b2..5f1ee74b 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -53,11 +53,6 @@ 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)", - role = "cph", - comment = - c("Supported the development of 'nasapower' through Adam H. - Sparks' time.")), person(given = "Curtin University", role = "cph", comment = diff --git a/R/get_power.R b/R/get_power.R index 88a642a4..4a30996a 100644 --- a/R/get_power.R +++ b/R/get_power.R @@ -257,8 +257,8 @@ get_power <- function(community = c("AG", "RE", "SB"), if (length(lonlat) > 2 && !is.null(site_elevation)) { cli::cli_inform( c( - i = "You have provided {.arg site_elevation}, {.var {site_elevation}} for a - region request. The {.arg site_elevation} value will be ignored." + i = "You have provided {.arg site_elevation}, {.var {site_elevation}} + for a region request. The {.arg site_elevation} value will be ignored." ) ) site_elevation <- NULL @@ -277,7 +277,8 @@ get_power <- function(community = c("AG", "RE", "SB"), cli::cli_abort( c( i = "If you provide a correct wind surface alias, {.arg wind_surface}, - please include a surface elevation, {.arg wind_elevation}, with the request." + please include a surface elevation, {.arg wind_elevation}, with the + request." ) ) } @@ -303,18 +304,21 @@ get_power <- function(community = c("AG", "RE", "SB"), } if (temporal_api == "HOURLY" && length(lonlat) == 4L) { - cli::cli_abort(c(x = "{.arg temporal_api} does not support hourly values for regional queries.")) + 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(i = "A maximum of 15 parameters can currently be requested in one submission for hourly data.") + c(i = "A maximum of 15 parameters can currently be requested in one + submission for hourly data.") ) } 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.") + c(i = "A maximum of 20 parameters can currently be requested in one + submission.") ) } @@ -460,7 +464,8 @@ get_power <- function(community = c("AG", "RE", "SB"), if (length(dates) > 2) { cli::cli_abort( 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)."), + x = "Please supply only two (2) dates for {.arg dates} as + 'YYYY-MM-DD' (ISO8601 format)."), call = rlang::caller_env(n = 3) ) } @@ -486,7 +491,8 @@ get_power <- function(community = c("AG", "RE", "SB"), cli::cli_abort( call = rlang::caller_env(n = 3), 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.") + x = "Enter as 'YYYY-MM-DD' (ISO8601 format) and check that it + is a valid date.") ) } ) @@ -498,7 +504,8 @@ get_power <- function(community = c("AG", "RE", "SB"), # if the stdate is > endate, flip order if (dates[[2]] < dates[[1]]) { - cli::cli_alert_info(c(i = "Your start and end dates were reversed. They have been reordered.")) + cli::cli_alert_info(c(i = "Your start and end dates were reversed. + They have been reordered.")) dates <- c(dates[2], dates[1]) } @@ -554,10 +561,12 @@ get_power <- function(community = c("AG", "RE", "SB"), } } else if (is.numeric(lonlat) & length(lonlat) == 2) { if (lonlat[1] < -180 | lonlat[1] > 180) { - cli::cli_abort(c(i = "Please check your longitude, {.var {lonlat[1]}}, to be sure it is valid.")) + cli::cli_abort(c(i = "Please check your longitude, {.var {lonlat[1]}}, + to be sure it is valid.")) } if (lonlat[2] < -90 | lonlat[2] > 90) { - cli::cli_abort(c(i = "Please check your latitude, {.var {lonlat[2]}}, value to be sure it is valid.")) + cli::cli_abort(c(i = "Please check your latitude, {.var {lonlat[2]}}, + value to be sure it is valid.")) } identifier <- "point" longitude <- lonlat[1] @@ -565,26 +574,32 @@ 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( - 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, (i.e., 100 points total).") + 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( - c(i = "Please check your longitude values, {.var {lonlat[1]}} and {.var {lonlat[3]}}, to be sure they are valid.") + 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( - c(i = "Please check your latitude values, {.var {lonlat[2]}} and {.var {lonlat[4]}}, to be sure they are valid.") + 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(c = (i = "The first {.arg lat} value must be the minimum value.")) + cli::cli_abort(c = (i = "The first {.arg lat} value must be the + minimum value.")) } else if (lonlat[1] > lonlat[3]) { - cli::cli_abort(c = (i = "The first {.arg lon} value must be the minimum value.")) + cli::cli_abort(c = (i = "The first {.arg lon} value must be the + minimum value.")) } identifier <- "regional" bbox <- c( @@ -594,7 +609,8 @@ get_power <- function(community = c("AG", "RE", "SB"), "ymax" = lonlat[4] ) } else { - cli::cli_abort(c(i = "You have entered an invalid request for `lonlat`.")) + cli::cli_abort(c(i = "You have entered an invalid request + for {.arg {lonlat}}.")) } if (!is.null(bbox)) { diff --git a/R/internal_functions.R b/R/internal_functions.R index 3d0ee221..61a9975e 100644 --- a/R/internal_functions.R +++ b/R/internal_functions.R @@ -55,7 +55,8 @@ cli::cli_abort( 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." + x = "Check that the {.arg pars}, {.arg community} and + {.arg temporal_api} all align." ) ) } diff --git a/R/query_parameters.R b/R/query_parameters.R index 717e858c..ae5fe8bb 100644 --- a/R/query_parameters.R +++ b/R/query_parameters.R @@ -2,27 +2,18 @@ #' Query the POWER API for Detailed Information on Available Parameters #' #' Queries the \acronym{POWER} \acronym{API} returning detailed information on -#' available parameters. -#' -#' @details If `pars` 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. If none of the three are provided, all combinations are -#' 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 pars 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? Defaults to +#' `FALSE`. #' #' @section Argument details for `temporal_api`: There are four valid values. #' \describe{ @@ -53,60 +44,72 @@ #' @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, - pars = NULL, - temporal_api = NULL) { + pars, + temporal_api = NULL, + metadata = FALSE) { + + community <- toupper(community) + temporal_api <- toupper(temporal_api) + + community_vals <- c("AG", "RE", "SB") + temporal_api_vals <- c("DAILY", + "MONTHLY", + "HOURLY", + "CLIMATOLOGY") if (!is.null(community)) { - community <- toupper(community) - } - if (!is.null(pars)) { - pars <- toupper(pars) - pars <- - .check_pars(pars = pars, - community = community, - temporal_api = temporal_api) + 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 } + community <- rlang::arg_match(community) + temporal_api <- rlang::arg_match(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" - user_agent <- .create_ua_string() - # 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) && !is.null(pars)) { - return(jsonlite::fromJSON(sprintf( - "%s/%s?user=%s", power_url, pars, user_agent - ))) - } else { - if (is.null(community) || is.null(temporal_api)) { - cli::cli_abort( - "`commmunity` and `temporal_api` strings must be supplied." - ) - } + # if only `pars` are provided, we can short-circuit and use a special URL + if (is.null(community) && is.null(temporal_api)) { + return(jsonlite::fromJSON( + sprintf("%s/%s?user=%s", power_url, pars, .create_ua_string()) + )) + } - query_list <- - list( - community = community, - parameters = par, - temporal = temporal_api, - user = user_agent - ) + # otherwise we will use {crul} to query the API - # if a `par` isn't supplied, remove this from the query list or leave as-is - query_list <- query_list[lengths(query_list) != 0] + query_list <- + list(community = community, + parameters = pars, + user = .create_ua_string()) - response <- .send_query(.query_list = query_list, - .temporal_api = temporal_api, - .url = power_url) + 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"))) - } + return(jsonlite::fromJSON(response$parse(encoding = "UTF8"))) } diff --git a/man/query_parameters.Rd b/man/query_parameters.Rd index 4293ae80..29eaf7d8 100644 --- a/man/query_parameters.Rd +++ b/man/query_parameters.Rd @@ -25,17 +25,15 @@ requested), community and temporal \acronym{API}. } \description{ Queries the \acronym{POWER} \acronym{API} returning detailed information on -available parameters. -} -\details{ -If \code{pars} 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. If none of the three are provided, all combinations are +available parameters. If none of the three arguments are provided, all +combinations are returned.If \code{pars} is not provided, but \code{community} and +\code{temporal_api} are, 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. } \section{Argument details for \code{temporal_api}}{ From c5fa9591cd9095e5ae43907b5bd6d081009bb691 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Tue, 30 Jan 2024 16:27:09 +0800 Subject: [PATCH 06/43] more improvements to error messages and bug fixes --- R/get_power.R | 101 ++++++++++++++--------- R/internal_functions.R | 23 +++++- R/query_parameters.R | 41 ++++----- tests/testthat/test-internal_functions.R | 12 +-- 4 files changed, 102 insertions(+), 75 deletions(-) diff --git a/R/get_power.R b/R/get_power.R index 4a30996a..0c7758fd 100644 --- a/R/get_power.R +++ b/R/get_power.R @@ -352,7 +352,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() @@ -434,7 +433,7 @@ get_power <- function(community = c("AG", "RE", "SB"), .check_dates <- function(dates, lonlat, temporal_api) { if (is.null(dates) & temporal_api != "climatology") { cli::cli_abort(c(i = "You have not entered dates for the query."), - call = rlang::caller_env(n = 3)) + call = rlang::caller_env()) } if (temporal_api == "monthly") { if (length(unique(dates)) < 2) { @@ -443,7 +442,7 @@ get_power <- function(community = c("AG", "RE", "SB"), 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(n = 3) + call = rlang::caller_env() ) } if (any(nchar(dates) > 4)) { @@ -463,10 +462,12 @@ get_power <- function(community = c("AG", "RE", "SB"), } if (length(dates) > 2) { cli::cli_abort( - c(i = "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(n = 3) + 'YYYY-MM-DD' (ISO8601 format)." + ), + call = rlang::caller_env() ) } @@ -489,7 +490,7 @@ get_power <- function(community = c("AG", "RE", "SB"), )), warning = function(c) { cli::cli_abort( - call = rlang::caller_env(n = 3), + 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.") @@ -513,22 +514,22 @@ get_power <- function(community = c("AG", "RE", "SB"), if (temporal_api != "hourly" && dates[[1]] < "1981-01-01") { cli::cli_abort( - call = rlang::caller_env(n = 3), - c(i = "{.arg dates} = {min(dates)} is an invalid value.", + 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( - call = rlang::caller_env(n = 3), - c(i = "{.var dates} = {.arg min(dates)} is an invalid value.", + 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( - call = rlang::caller_env(n = 3), - c(i = "{.var dates} = {.arg max(dates)} is invalid.", + call = rlang::caller_env(), + c(i = "{.arg dates} = {.val {dates[[2]]}} is invalid.", x = "The weather data cannot possibly extend beyond this day.") ) } @@ -557,16 +558,24 @@ get_power <- function(community = c("AG", "RE", "SB"), if (lonlat == "global") { identifier <- "global" } else if (is.character(lonlat)) { - cli::cli_abort(c(i = "You have entered an invalid request for `lonlat`.")) + 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(c(i = "Please check your longitude, {.var {lonlat[1]}}, - to be sure it is valid.")) + cli::cli_abort( + 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) { - cli::cli_abort(c(i = "Please check your latitude, {.var {lonlat[2]}}, - value to be sure it is valid.")) + if (lonlat[2] < -90 | + lonlat[2] > 90) { + cli::cli_abort( + call = rlang::caller_env(), + c(i = "Please check your latitude, {.val {lonlat[2]}}, + value to be sure it is valid.") + ) } identifier <- "point" longitude <- lonlat[1] @@ -574,33 +583,44 @@ 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( - c(i. = "Please provide correct bounding box values. The bounding box + 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).") + 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( + 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( - c(i = "Please check your latitude values, {.var {lonlat[2]}} and + } else if (any(lonlat[2] < -90 | + lonlat[4] < -90 | + lonlat[2] > 90 | + lonlat[4] > 90)) { + cli::cli_abort( + 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(c = (i = "The first {.arg lat} value must be the - minimum value.")) - } else if (lonlat[1] > lonlat[3]) { - cli::cli_abort(c = (i = "The first {.arg lon} value must be the - minimum value.")) - } + ) + } else if (lonlat[2] > lonlat[4]) { + cli::cli_abort( + 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( + call = rlang::caller_env(), + c( + i = "The first {.arg lon} value must be the minimum value.") + ) + } identifier <- "regional" bbox <- c( "xmin" = lonlat[1], @@ -608,10 +628,11 @@ get_power <- function(community = c("AG", "RE", "SB"), "xmax" = lonlat[3], "ymax" = lonlat[4] ) - } else { - cli::cli_abort(c(i = "You have entered an invalid request - for {.arg {lonlat}}.")) - } + } else { + cli::cli_abort( + call = rlang::caller_env(), + c(i = "You have entered an invalid request for {.arg {lonlat}}.")) + } if (!is.null(bbox)) { lonlat_identifier <- list(bbox, identifier) @@ -625,7 +646,7 @@ get_power <- function(community = c("AG", "RE", "SB"), c("longitude", "latitude", "identifier") } return(lonlat_identifier) - } + } #' Construct a list of options to pass to the POWER API #' diff --git a/R/internal_functions.R b/R/internal_functions.R index 61a9975e..976403a7 100644 --- a/R/internal_functions.R +++ b/R/internal_functions.R @@ -34,10 +34,14 @@ # want to check against all possible values if (is.null(community)) { community <- c("AG", "SB", "RE") + } else { + community <- toupper(community) } if (is.null(temporal_api)) { temporal_api <- c("HOURLY", "DAILY", "MONTHLY", "CLIMATOLOGY") + } else { + temporal_api <- toupper(temporal_api) } community_temporal_api <- @@ -53,6 +57,7 @@ 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 @@ -61,6 +66,21 @@ ) } + if (length(pars) > 20 && temporal_api != "HOURLY") { + cli::cli_abort( + call = rlang::caller_env(), + c( + i = "A maximum of 20 parameters may be passed along to the API." + ) + ) + } else if (length(pars) > 15 && temporal_api == "HOURLY") { + cli::cli_abort( + call = rlang::caller_env(), + c( + i = "A maximum of 15 parameters may be passed along to the hourly API." + ) + ) + } # all good? great. now we format it for the API pars <- paste0(pars, collapse = ",") return(pars) @@ -69,8 +89,6 @@ #' Sends the Query to the POWER API #' #' @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 @@ -79,7 +97,6 @@ #' @noRd #' .send_query <- function(.query_list, - .temporal_api, .url) { client <- crul::HttpClient$new(url = .url) diff --git a/R/query_parameters.R b/R/query_parameters.R index ae5fe8bb..bd7ee4df 100644 --- a/R/query_parameters.R +++ b/R/query_parameters.R @@ -52,26 +52,26 @@ query_parameters <- function(community = NULL, pars, temporal_api = NULL, metadata = FALSE) { - - community <- toupper(community) - temporal_api <- toupper(temporal_api) - 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}.") - ) + 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}.") @@ -80,9 +80,6 @@ query_parameters <- function(community = NULL, temporal_api_vals <- temporal_api } - community <- rlang::arg_match(community) - temporal_api <- rlang::arg_match(temporal_api) - pars <- toupper(pars) pars <- .check_pars(pars = pars, @@ -97,19 +94,17 @@ query_parameters <- function(community = NULL, return(jsonlite::fromJSON( sprintf("%s/%s?user=%s", power_url, pars, .create_ua_string()) )) - } - - # otherwise we will use {crul} to query the API + } else { + query_list <- + list(community = community, + parameters = pars, + temporal = temporal_api, + user = .create_ua_string()) - query_list <- - list(community = community, - parameters = pars, - user = .create_ua_string()) + query_list <- query_list[lengths(query_list) != 0] + response <- .send_query(.query_list = query_list, + .url = power_url) - 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"))) + return(jsonlite::fromJSON(response$parse(encoding = "UTF8"))) + } } diff --git a/tests/testthat/test-internal_functions.R b/tests/testthat/test-internal_functions.R index 611f5fb2..fe2168fd 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", { @@ -345,10 +342,7 @@ test_that("Only 20 pars are allowed when `temporal_api` != climatology", { ) 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*" - ) + expect_error(.check_pars(pars, community = "ag", temporal_api)) }) test_that("Only unique `pars` are queried", { From c8211284fcdd8ff207f6b5de405800435a5f31ea Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Tue, 30 Jan 2024 21:13:22 +0800 Subject: [PATCH 07/43] move tests to proper function tests --- tests/testthat/test-get_power.R | 31 ++++++++++++++++++++++++ tests/testthat/test-internal_functions.R | 31 ------------------------ 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/tests/testthat/test-get_power.R b/tests/testthat/test-get_power.R index 63a3dea5..06fe357f 100644 --- a/tests/testthat/test-get_power.R +++ b/tests/testthat/test-get_power.R @@ -490,3 +490,34 @@ 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", temporal_api)) +}) diff --git a/tests/testthat/test-internal_functions.R b/tests/testthat/test-internal_functions.R index fe2168fd..e67c9dd8 100644 --- a/tests/testthat/test-internal_functions.R +++ b/tests/testthat/test-internal_functions.R @@ -315,36 +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(.check_pars(pars, community = "ag", temporal_api)) - }) - test_that("Only unique `pars` are queried", { pars <- c("RH2M", "RH2M", @@ -361,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)) }) From 0927a7a63a4a4e15434ada0a1fd9a26727be7dc7 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Tue, 30 Jan 2024 21:13:59 +0800 Subject: [PATCH 08/43] Use lowercase, move check from shared fn to just be in get_power() --- R/get_power.R | 130 +++++++++++++++++++++-------------------- R/internal_functions.R | 15 ----- 2 files changed, 67 insertions(+), 78 deletions(-) diff --git a/R/get_power.R b/R/get_power.R index 0c7758fd..0786cde8 100644 --- a/R/get_power.R +++ b/R/get_power.R @@ -14,26 +14,26 @@ #' @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} -#' `temporal_api`s. If the `temporal_api` is specified as \dQuote{HOURLY} +#' 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 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}. +#' \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. #' @param dates A character vector of start and end dates in that order,\cr #' _e.g._, `dates = c("1983-01-01", "2017-12-31")`. -#' Not used when\cr `temporal_api` is set to \dQuote{CLIMATOLOGY}. +#' Not used when\cr `temporal_api` is set to \dQuote{climatology}. #' See argument details for more. #' @param site_elevation A user-supplied value for elevation at a single point #' in metres. If provided this will return a corrected atmospheric pressure #' value adjusted to the elevation provided. Only used with `lonlat` as a -#' single point of x, y coordinates, not for use with \dQuote{GLOBAL} or with +#' single point of x, y coordinates, not for use with \dQuote{global} or with #' a regional request. #' @param wind_elevation A user-supplied value for elevation at a single point #' in metres. Wind Elevation values in Meters are required to be between 10m @@ -93,8 +93,8 @@ #' Australia: `lonlat = c(112.5, -55.5, 115.5, -50.5)`. *Maximum area #' processed is 4.5 x 4.5 degrees (100 points).} #' -#' \item{For global coverage}{To get global coverage for \dQuote{CLIMATOLOGY}, -#' supply \dQuote{global} while also specifying \dQuote{CLIMATOLOGY} for the +#' \item{For global coverage}{To get global coverage for \dQuote{climatology}, +#' supply \dQuote{global} while also specifying \dQuote{climatology} for the #' `temporal_api`.} #' } #' @@ -103,7 +103,7 @@ #' 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), #' _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. +#' `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: @@ -111,19 +111,19 @@ #' Valid surface types are described here. #' #' \describe{ -#' \item{VEGTYPE_1}{35-m broadleaf-evergreen trees (70% coverage)} -#' \item{VEGTYPE_2}{20-m broadleaf-deciduous trees (75% coverage)} -#' \item{VEGTYPE_3}{20-m broadleaf and needleleaf trees (75% coverage)} -#' \item{VEGTYPE_4}{17-m needleleaf-evergreen trees (75% coverage)} -#' \item{VEGTYPE_5}{14-m needleleaf-deciduous trees (50% coverage)} -#' \item{VEGTYPE_6}{Savanna:18-m broadleaf trees (30%) & groundcover} -#' \item{VEGTYPE_7}{0.6-m perennial groundcover (100%)} -#' \item{VEGTYPE_8}{0.5-m broadleaf shrubs (variable %) & groundcover} -#' \item{VEGTYPE_9}{0.5-m broadleaf shrubs (10%) with bare soil} -#' \item{VEGTYPE_10}{Tundra: 0.6-m trees/shrubs (variable %) & groundcover} -#' \item{VEGTYPE_11}{Rough bare soil} -#' \item{VEGTYPE_12}{Crop: 20-m broadleaf-deciduous trees (10%) & wheat} -#' \item{VEGTYPE_20}{Rough glacial snow/ice} +#' \item{vegtype_1}{35-m broadleaf-evergreen trees (70% coverage)} +#' \item{vegtype_2}{20-m broadleaf-deciduous trees (75% coverage)} +#' \item{vegtype_3}{20-m broadleaf and needleleaf trees (75% coverage)} +#' \item{vegtype_4}{17-m needleleaf-evergreen trees (75% coverage)} +#' \item{vegtype_5}{14-m needleleaf-deciduous trees (50% coverage)} +#' \item{vegtype_6}{Savanna:18-m broadleaf trees (30%) & groundcover} +#' \item{vegtype_7}{0.6-m perennial groundcover (100%)} +#' \item{vegtype_8}{0.5-m broadleaf shrubs (variable %) & groundcover} +#' \item{vegtype_9}{0.5-m broadleaf shrubs (10%) with bare soil} +#' \item{vegtype_10}{Tundra: 0.6-m trees/shrubs (variable %) & groundcover} +#' \item{vegtype_11}{Rough bare soil} +#' \item{vegtype_12}{Crop: 20-m broadleaf-deciduous trees (10%) & wheat} +#' \item{vegtype_20}{Rough glacial snow/ice} #' \item{seaice}{Smooth sea ice} #' \item{openwater}{Open water} #' \item{airportice}{Airport: flat ice/snow} @@ -146,7 +146,7 @@ #' #' @return A data frame as a `POWER.Info` class, an extension of the #' [tibble::tibble], object of \acronym{POWER} data including location, dates -#' (not including \dQuote{CLIMATOLOGY}) and requested parameters. A decorative +#' (not including \dQuote{climatology}) and requested parameters. A decorative #' header of metadata is included in this object. #' #' @references @@ -172,7 +172,7 @@ #' community = "AG", #' pars = "T2M", #' c(151.81, -27.48), -#' temporal_api = "CLIMATOLOGY" +#' temporal_api = "climatology" #' ) #' #' ag_c_point @@ -191,73 +191,73 @@ #' @author Adam H. Sparks \email{adamhsparks@@gmail.com} #' #' @export -get_power <- function(community = c("AG", "RE", "SB"), +get_power <- function(community = c("ag", "r", "sb"), pars, - temporal_api = c("DAILY", - "MONTHLY", - "HOURLY", - "CLIMATOLOGY"), + temporal_api = c("daily", + "monthly", + "hourly", + "climatology"), lonlat, dates = NULL, site_elevation = NULL, wind_elevation = NULL, wind_surface = NULL, time_standard = c("LST", "UTC")) { - community <- toupper(community) - temporal_api <- toupper(temporal_api) - time_standard <- toupper(time_standard) + community <- tolower(community) + temporal_api <- tolower(temporal_api) + time_standard <- tolower(time_standard) community <- rlang::arg_match(community) temporal_api <- rlang::arg_match(temporal_api) time_standard <- rlang::arg_match(time_standard) if (!is.null(wind_surface)) { - wind_surface <- toupper(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" + "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" ) ) } - if (temporal_api == "CLIMATOLOGY") { + 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( - c(i = "The POWER team have not enabled {.var global} data queries with + 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( - c(i = "You have entered an invalid value for {.arg site_elevation}, + 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( c( - i = "You have provided {.arg site_elevation}, {.var {site_elevation}} + x = "You have provided {.arg site_elevation}, {.var {site_elevation}} for a region request. The {.arg site_elevation} value will be ignored." ) ) @@ -267,16 +267,18 @@ get_power <- function(community = c("AG", "RE", "SB"), if (length(lonlat) > 2 && !is.null(wind_elevation)) { cli::cli_inform( c( - i = "You have provided {.arg wind_elevation}, {.var {wind_elevation}}, - for a region request. The {.arg wind_elevation} value will be ignored." + x = "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( c( - i = "If you provide a correct wind surface alias, {.arg wind_surface}, + x = "If you provide a correct wind surface alias, {.arg wind_surface}, please include a surface elevation, {.arg wind_elevation}, with the request." ) @@ -285,7 +287,7 @@ get_power <- function(community = c("AG", "RE", "SB"), if (!is.null(wind_elevation)) { if (wind_elevation < 10 || wind_elevation > 300) { cli::cli_abort( - c(i = "{.arg wind_elevation} values in metres are required to be between + c(x = "{.arg wind_elevation} values in metres are required to be between 10m and 300m.") ) } @@ -303,22 +305,24 @@ get_power <- function(community = c("AG", "RE", "SB"), } } - if (temporal_api == "HOURLY" && length(lonlat) == 4L) { + 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") { + if (length(pars) > 15 && temporal_api == "hourly") { cli::cli_abort( call = rlang::caller_env(), - c(i = "A maximum of 15 parameters can currently be requested in one - submission for hourly data.") + 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.") + submission.", + i = "You have submitted {.val {length(pars)}}") ) } diff --git a/R/internal_functions.R b/R/internal_functions.R index 976403a7..34c6ea61 100644 --- a/R/internal_functions.R +++ b/R/internal_functions.R @@ -66,21 +66,6 @@ ) } - if (length(pars) > 20 && temporal_api != "HOURLY") { - cli::cli_abort( - call = rlang::caller_env(), - c( - i = "A maximum of 20 parameters may be passed along to the API." - ) - ) - } else if (length(pars) > 15 && temporal_api == "HOURLY") { - cli::cli_abort( - call = rlang::caller_env(), - c( - i = "A maximum of 15 parameters may be passed along to the hourly API." - ) - ) - } # all good? great. now we format it for the API pars <- paste0(pars, collapse = ",") return(pars) From 1fa7ec40064ed260e8aadc3f964ea63f7077f35b Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Wed, 31 Jan 2024 06:45:58 +0800 Subject: [PATCH 09/43] Passing all tests now --- R/get_power.R | 2 +- tests/fixtures/adjusted_air_pressure.json | 2 +- tests/fixtures/adjusted_wind_elevation.json | 2 +- tests/fixtures/climatology_ag_point.json | 2 +- tests/fixtures/daily_ag_point.json | 2 +- tests/fixtures/daily_sb_point_LST.json | 2 +- tests/fixtures/daily_sb_point_UTC.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/R/get_power.R b/R/get_power.R index 0786cde8..f6bda255 100644 --- a/R/get_power.R +++ b/R/get_power.R @@ -205,7 +205,7 @@ get_power <- function(community = c("ag", "r", "sb"), time_standard = c("LST", "UTC")) { community <- tolower(community) temporal_api <- tolower(temporal_api) - time_standard <- tolower(time_standard) + time_standard <- toupper(time_standard) community <- rlang::arg_match(community) temporal_api <- rlang::arg_match(temporal_api) diff --git a/tests/fixtures/adjusted_air_pressure.json b/tests/fixtures/adjusted_air_pressure.json index 8b81341a..d0b4047a 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=nasapower411","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":"Tue, 30 Jan 2024 22:45:14 GMT","status":"HTTP/2 200 ","via":"1.1 8c4035e1b80d143966381b14fdc6a658.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"SYBO8HJkvHcEv1A=","x-amz-cf-id":"1DppcUICV55AzhhDA95fxFZuVH8u-RMD_9uJ48hdcNlEin-7Jvytig==","x-amz-cf-pop":["CGK51-P2","PER50-C1"],"x-amzn-remapped-content-length":"912","x-amzn-requestid":"d12c74ed-0c80-49bd-b337-eba3fa717139","x-amzn-trace-id":"Root=1-65b97bf8-1afbca7801feef7f5e879e70","x-app-name":"daily","x-app-version":"v2.5.5","x-archive-time":"1.396","x-cache":"Miss from cloudfront","x-data-sources":"power,merra2","x-objects-time":"0.013","x-process-time":"0.18","x-service-time":"1.59"},"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-01-30 22:45:14 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..a6087843 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=nasapower411","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":"Tue, 30 Jan 2024 22:45:17 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 f5b8577eaab42e0620805ea605167190.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"SYBPYFcLvHcEA-A=","x-amz-cf-id":"_m7Uc4Mh3AH36Ae9Nt7cIQqNIrR546c-Aiduw8b20rZiTvbY3kv3Ag==","x-amz-cf-pop":["CGK51-P2","PER50-C1"],"x-amzn-remapped-content-length":"1024","x-amzn-requestid":"a9f91e50-b2dc-48ac-befb-3ababeccf1c1","x-amzn-trace-id":"Root=1-65b97bfb-5eff10c23a8bcc514d12f735","x-app-name":"daily","x-app-version":"v2.5.5","x-archive-time":"1.574","x-cache":"Miss from cloudfront","x-data-sources":"power,merra2","x-objects-time":"0.024","x-process-time":"0.17","x-service-time":"1.769"},"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-01-30 22:45:17 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..08a763db 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=nasapower411","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":"Tue, 30 Jan 2024 22:45:30 GMT","status":"HTTP/2 200 ","via":"1.1 df5212943939325a48cc9dca33f4ad32.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"SYBREHkmvHcEHfg=","x-amz-cf-id":"fZgDijkZg1wR7ShCbQvcwiy32hCw117QE8fHDxppb7YAAAwdjpkEKA==","x-amz-cf-pop":["CGK51-P2","PER50-C1"],"x-amzn-remapped-content-length":"663","x-amzn-requestid":"e7a8ee9d-da94-4cb0-83a1-6e4778ecc949","x-amzn-trace-id":"Root=1-65b97c06-77e4fe6143d4ed0e79825192","x-app-name":"climatology","x-app-version":"v2.5.7","x-archive-time":"3.419","x-cache":"Miss from cloudfront","x-data-sources":"merra2","x-objects-time":"0.013","x-process-time":"0.19","x-service-time":"3.623"},"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-01-30 22:45:30 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..6b80bbb8 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=nasapower411","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":"Tue, 30 Jan 2024 22:45:11 GMT","status":"HTTP/2 200 ","via":"1.1 19ef5ddc8709826d603b00905bfe868e.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"SYBOaEuoPHcEPlg=","x-amz-cf-id":"wdVLRSq13-5OTkLRbOq9pqAThFq5Vo24mXnZpCtyH15Gk3TCMrZeUA==","x-amz-cf-pop":["CGK51-P2","PER50-C1"],"x-amzn-remapped-content-length":"812","x-amzn-requestid":"9c73023c-bdf9-46cd-a8ff-50ef88387486","x-amzn-trace-id":"Root=1-65b97bf5-28982d5b4655a11d22566690","x-app-name":"daily","x-app-version":"v2.5.5","x-archive-time":"1.591","x-cache":"Miss from cloudfront","x-data-sources":"power,merra2","x-objects-time":"0.003","x-process-time":"0.16","x-service-time":"1.756"},"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-01-30 22:45:11 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..93e128ee 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=nasapower411","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":"Tue, 30 Jan 2024 22:45:22 GMT","status":"HTTP/2 200 ","via":"1.1 1a43057a7a5d47a18ee13c32549ded1c.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"SYBQMHAhPHcEGfQ=","x-amz-cf-id":"yaaFwPZkOYEKPhs62Nr4G2BYHdqyE8FEKwT5jvyC94BjodCunfz-fA==","x-amz-cf-pop":["CGK51-P2","PER50-C1"],"x-amzn-remapped-content-length":"763","x-amzn-requestid":"686a865e-9ded-43c7-ad11-611449231497","x-amzn-trace-id":"Root=1-65b97c00-5ddf501b54b6fcec6e5bfe99","x-app-name":"daily","x-app-version":"v2.5.5","x-archive-time":"1.363","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.006","x-process-time":"0.17","x-service-time":"1.54"},"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-01-30 22:45:22 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..bbfd6e69 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=nasapower411","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":"Tue, 30 Jan 2024 22:45:19 GMT","status":"HTTP/2 200 ","via":"1.1 19ef5ddc8709826d603b00905bfe868e.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"SYBPyFVbPHcEJrA=","x-amz-cf-id":"T2hbsc3RpSoOu_1095r5Fg-3G8R3AioE7Wy5hsVlHVILuI1u8i4s3A==","x-amz-cf-pop":["CGK51-P2","PER50-C1"],"x-amzn-remapped-content-length":"762","x-amzn-requestid":"88bbbf88-f2da-4520-acb1-8db386f7ff3a","x-amzn-trace-id":"Root=1-65b97bfe-26505bce33772920163e0e7e","x-app-name":"daily","x-app-version":"v2.5.5","x-archive-time":"1.174","x-cache":"Miss from cloudfront","x-data-sources":"power,merra2","x-objects-time":"0.013","x-process-time":"0.16","x-service-time":"1.348"},"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-01-30 22:45:19 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} From 560785f7fbb3eb7960bfba4b90b937c180f1fe98 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Wed, 31 Jan 2024 10:54:06 +0800 Subject: [PATCH 10/43] add metadata retrieval and check for Boolean values --- DESCRIPTION | 12 +++++++ R/query_parameters.R | 45 +++++++++++++++++++++----- tests/testthat/test-query_parameters.R | 8 +++++ 3 files changed, 57 insertions(+), 8 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 5f1ee74b..cefce10f 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -53,6 +53,18 @@ Authors@R: `file` argument of `vroom()` must use `I()` for literal data as of vroom 1.5.0.', see .")), + 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 = diff --git a/R/query_parameters.R b/R/query_parameters.R index bd7ee4df..5501812e 100644 --- a/R/query_parameters.R +++ b/R/query_parameters.R @@ -1,4 +1,5 @@ + #' Query the POWER API for Detailed Information on Available Parameters #' #' Queries the \acronym{POWER} \acronym{API} returning detailed information on @@ -86,20 +87,29 @@ query_parameters <- function(community = NULL, community = community_vals, temporal_api = temporal_api_vals) + if (!.is_boolean(metadata)) { + cli::cli_abort( + c(x = "{.arg metadata} should be a Boolean value only.", + i = "{Please provide either {.var TRUE} or {.var FALSE}.") + ) + } + power_url <- "https://power.larc.nasa.gov/api/system/manager/parameters" - # if only `pars` are provided, we can short-circuit and use a special URL if (is.null(community) && is.null(temporal_api)) { - return(jsonlite::fromJSON( - sprintf("%s/%s?user=%s", power_url, pars, .create_ua_string()) - )) + return(jsonlite::fromJSON(sprintf( + "%s/%s?user=%s", power_url, pars, .create_ua_string() + ))) } else { query_list <- - list(community = community, - parameters = pars, - temporal = temporal_api, - user = .create_ua_string()) + list( + community = community, + parameters = pars, + temporal = temporal_api, + metadata = metadata, + user = .create_ua_string() + ) query_list <- query_list[lengths(query_list) != 0] response <- .send_query(.query_list = query_list, @@ -108,3 +118,22 @@ query_parameters <- function(community = NULL, return(jsonlite::fromJSON(response$parse(encoding = "UTF8"))) } } + +#' 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 +} diff --git a/tests/testthat/test-query_parameters.R b/tests/testthat/test-query_parameters.R index 92a7e47e..2638cb20 100644 --- a/tests/testthat/test-query_parameters.R +++ b/tests/testthat/test-query_parameters.R @@ -29,3 +29,11 @@ test_that("query_parameters() stops if par and community only supplied", { expect_error(query_parameters(pars = "T2M", temporal_api = "daily")) }) + +test_that("query_parameters() stops if metadata is not Boolean", { + skip_on_cran() + expect_error(query_parameters(pars = "T2M", + community = "ag", + temporal_api = "daily", + metadata = "orange")) +}) From e3a3625ba54f1f3d8095039ab1a9ba4534ac4b90 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Wed, 31 Jan 2024 13:42:06 +0800 Subject: [PATCH 11/43] Update documentation and correct DESCRIPTION file format --- DESCRIPTION | 4 ++-- R/query_parameters.R | 20 ++++++++-------- man/get_power.Rd | 50 ++++++++++++++++++++-------------------- man/nasapower-package.Rd | 3 ++- man/query_parameters.Rd | 27 +++++++++------------- 5 files changed, 51 insertions(+), 53 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index cefce10f..af39edd5 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -58,13 +58,13 @@ Authors@R: role = "ctb", email = "alex@rapporter.net", comment = c("Author of the CRAN package 'rapportools', from which - the '.is_boolean()' was taken."), + 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."), + the '.is_boolean()' was taken.")), person(given = "Curtin University", role = "cph", comment = diff --git a/R/query_parameters.R b/R/query_parameters.R index 5501812e..21e03d21 100644 --- a/R/query_parameters.R +++ b/R/query_parameters.R @@ -1,5 +1,4 @@ - #' Query the POWER API for Detailed Information on Available Parameters #' #' Queries the \acronym{POWER} \acronym{API} returning detailed information on @@ -13,7 +12,9 @@ #' @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? Defaults to +#' @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. @@ -87,13 +88,6 @@ query_parameters <- function(community = NULL, community = community_vals, temporal_api = temporal_api_vals) - if (!.is_boolean(metadata)) { - cli::cli_abort( - c(x = "{.arg metadata} should be a Boolean value only.", - i = "{Please provide either {.var TRUE} or {.var FALSE}.") - ) - } - power_url <- "https://power.larc.nasa.gov/api/system/manager/parameters" @@ -102,6 +96,14 @@ query_parameters <- function(community = NULL, "%s/%s?user=%s", power_url, pars, .create_ua_string() ))) } else { + + if (!.is_boolean(metadata)) { + cli::cli_abort( + c(x = "{.arg metadata} should be a Boolean value only.", + i = "{Please provide either {.var TRUE} or {.var FALSE}.") + ) + } + query_list <- list( community = community, diff --git a/man/get_power.Rd b/man/get_power.Rd index c236f11e..5266fc12 100644 --- a/man/get_power.Rd +++ b/man/get_power.Rd @@ -5,9 +5,9 @@ \title{Get NASA POWER Data From the POWER API} \usage{ get_power( - community = c("AG", "RE", "SB"), + community = c("ag", "r", "sb"), pars, - temporal_api = c("DAILY", "MONTHLY", "HOURLY", "CLIMATOLOGY"), + temporal_api = c("daily", "monthly", "hourly", "climatology"), lonlat, dates = NULL, site_elevation = NULL, @@ -23,15 +23,15 @@ get_power( \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} -\code{temporal_api}s. If the \code{temporal_api} is specified as \dQuote{HOURLY} +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}{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}. +\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 @@ -40,13 +40,13 @@ for more.} \item{dates}{A character vector of start and end dates in that order,\cr \emph{e.g.}, \code{dates = c("1983-01-01", "2017-12-31")}. -Not used when\cr \code{temporal_api} is set to \dQuote{CLIMATOLOGY}. +Not used when\cr \code{temporal_api} is set to \dQuote{climatology}. See argument details for more.} \item{site_elevation}{A user-supplied value for elevation at a single point in metres. If provided this will return a corrected atmospheric pressure value adjusted to the elevation provided. Only used with \code{lonlat} as a -single point of x, y coordinates, not for use with \dQuote{GLOBAL} or with +single point of x, y coordinates, not for use with \dQuote{global} or with a regional request.} \item{wind_elevation}{A user-supplied value for elevation at a single point @@ -72,7 +72,7 @@ Defaults to \code{LST}. \value{ A data frame as a \code{POWER.Info} class, an extension of the \link[tibble:tibble]{tibble::tibble}, object of \acronym{POWER} data including location, dates -(not including \dQuote{CLIMATOLOGY}) and requested parameters. A decorative +(not including \dQuote{climatology}) and requested parameters. A decorative header of metadata is included in this object. } \description{ @@ -136,8 +136,8 @@ given region, \emph{e.g.}, a bounding box for the south western corner of Australia: \code{lonlat = c(112.5, -55.5, 115.5, -50.5)}. *Maximum area processed is 4.5 x 4.5 degrees (100 points).} -\item{For global coverage}{To get global coverage for \dQuote{CLIMATOLOGY}, -supply \dQuote{global} while also specifying \dQuote{CLIMATOLOGY} for the +\item{For global coverage}{To get global coverage for \dQuote{climatology}, +supply \dQuote{global} while also specifying \dQuote{climatology} for the \code{temporal_api}.} } } @@ -148,7 +148,7 @@ 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), \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. +\code{temporal_api} is set to \dQuote{climatology} and will be ignored if set. } \section{\code{wind_surface}}{ @@ -158,19 +158,19 @@ wind-speed values using the following equation: Valid surface types are described here. \describe{ -\item{VEGTYPE_1}{35-m broadleaf-evergreen trees (70\% coverage)} -\item{VEGTYPE_2}{20-m broadleaf-deciduous trees (75\% coverage)} -\item{VEGTYPE_3}{20-m broadleaf and needleleaf trees (75\% coverage)} -\item{VEGTYPE_4}{17-m needleleaf-evergreen trees (75\% coverage)} -\item{VEGTYPE_5}{14-m needleleaf-deciduous trees (50\% coverage)} -\item{VEGTYPE_6}{Savanna:18-m broadleaf trees (30\%) & groundcover} -\item{VEGTYPE_7}{0.6-m perennial groundcover (100\%)} -\item{VEGTYPE_8}{0.5-m broadleaf shrubs (variable \%) & groundcover} -\item{VEGTYPE_9}{0.5-m broadleaf shrubs (10\%) with bare soil} -\item{VEGTYPE_10}{Tundra: 0.6-m trees/shrubs (variable \%) & groundcover} -\item{VEGTYPE_11}{Rough bare soil} -\item{VEGTYPE_12}{Crop: 20-m broadleaf-deciduous trees (10\%) & wheat} -\item{VEGTYPE_20}{Rough glacial snow/ice} +\item{vegtype_1}{35-m broadleaf-evergreen trees (70\% coverage)} +\item{vegtype_2}{20-m broadleaf-deciduous trees (75\% coverage)} +\item{vegtype_3}{20-m broadleaf and needleleaf trees (75\% coverage)} +\item{vegtype_4}{17-m needleleaf-evergreen trees (75\% coverage)} +\item{vegtype_5}{14-m needleleaf-deciduous trees (50\% coverage)} +\item{vegtype_6}{Savanna:18-m broadleaf trees (30\%) & groundcover} +\item{vegtype_7}{0.6-m perennial groundcover (100\%)} +\item{vegtype_8}{0.5-m broadleaf shrubs (variable \%) & groundcover} +\item{vegtype_9}{0.5-m broadleaf shrubs (10\%) with bare soil} +\item{vegtype_10}{Tundra: 0.6-m trees/shrubs (variable \%) & groundcover} +\item{vegtype_11}{Rough bare soil} +\item{vegtype_12}{Crop: 20-m broadleaf-deciduous trees (10\%) & wheat} +\item{vegtype_20}{Rough glacial snow/ice} \item{seaice}{Smooth sea ice} \item{openwater}{Open water} \item{airportice}{Airport: flat ice/snow} @@ -210,7 +210,7 @@ ag_c_point <- get_power( community = "AG", pars = "T2M", c(151.81, -27.48), - temporal_api = "CLIMATOLOGY" + temporal_api = "climatology" ) ag_c_point diff --git a/man/nasapower-package.Rd b/man/nasapower-package.Rd index 48c21188..4fa25832 100644 --- a/man/nasapower-package.Rd +++ b/man/nasapower-package.Rd @@ -29,7 +29,8 @@ 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_parameters.Rd b/man/query_parameters.Rd index 29eaf7d8..d4e41cde 100644 --- a/man/query_parameters.Rd +++ b/man/query_parameters.Rd @@ -4,37 +4,32 @@ \alias{query_parameters} \title{Query the POWER API for Detailed Information on Available Parameters} \usage{ -query_parameters(community = NULL, pars = 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{pars}{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. If none of the three arguments are provided, all -combinations are returned.If \code{pars} is not provided, but \code{community} and -\code{temporal_api} are, 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. From cf33460cfe4cfe4ca1c6803d1de2aa499560e615 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Wed, 31 Jan 2024 14:33:23 +0800 Subject: [PATCH 12/43] Add query_groupings() --- NAMESPACE | 1 + R/query_groupings.R | 45 +++++++++++++++++++++++++++++++++++++++++ man/query_groupings.Rd | 36 +++++++++++++++++++++++++++++++++ man/query_parameters.Rd | 37 ++++++++++++++++++++++++++++++++- 4 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 R/query_groupings.R create mode 100644 man/query_groupings.Rd diff --git a/NAMESPACE b/NAMESPACE index da770845..38519f44 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -2,4 +2,5 @@ S3method(print,POWER.Info) export(get_power) +export(query_groupings) export(query_parameters) diff --git a/R/query_groupings.R b/R/query_groupings.R new file mode 100644 index 00000000..0536647e --- /dev/null +++ b/R/query_groupings.R @@ -0,0 +1,45 @@ + +#' 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)) { + return(jsonlite::fromJSON(txt = power_url)) + } else { + return(jsonlite::fromJSON( + txt = sprintf("%s/global", power_url))) + } +} 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 d4e41cde..5700b33d 100644 --- a/man/query_parameters.Rd +++ b/man/query_parameters.Rd @@ -1,9 +1,11 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/query_parameters.R +% Please edit documentation in R/query_parameters.R, R/query_surfaces.R \name{query_parameters} \alias{query_parameters} \title{Query the POWER API for Detailed Information on Available Parameters} \usage{ +query_parameters(community = NULL, pars, temporal_api = NULL, metadata = FALSE) + query_parameters(community = NULL, pars, temporal_api = NULL, metadata = FALSE) } \arguments{ @@ -23,10 +25,17 @@ 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(ies) and temporal \acronym{API}(s). + A \link{list} object of information for the requested parameter(s) (if requested), community(ies) and temporal \acronym{API}(s). } \description{ +Queries the \acronym{POWER} \acronym{API} returning detailed information on +available parameters. For a list of all available parameters, use +\code{parameters} + Queries the \acronym{POWER} \acronym{API} returning detailed information on available parameters. For a list of all available parameters, use \code{parameters} @@ -40,6 +49,16 @@ available parameters. For a list of all available parameters, use \item{climatology}{Provide parameters as 22-year climatologies (solar) and 30-year climatologies (meteorology); the period climatology and monthly average, maximum, and/or minimum values.} +} + + There are four valid values. +\describe{ +\item{hourly}{The hourly average of \code{pars} by hour, day, month and year.} +\item{daily}{The daily average of \code{pars} by day, month and year.} +\item{monthly}{The monthly average of \code{pars} by month and year.} +\item{climatology}{Provide parameters as 22-year climatologies (solar) +and 30-year climatologies (meteorology); the period climatology and +monthly average, maximum, and/or minimum values.} } } @@ -49,6 +68,22 @@ monthly average, maximum, and/or minimum values.} # fetch the complete set of attribute information for "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(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. +query_parameters(community = "ag", + temporal_api = "hourly") +\dontshow{\}) # examplesIf} +\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} + +# fetch the complete set of attribute information for "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(pars = "T2M", From b53989ead448d795f7d9b6246b9880878ac385fd Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Wed, 31 Jan 2024 14:34:11 +0800 Subject: [PATCH 13/43] move .is_boolean() to internal functions since it is now shared --- R/internal_functions.R | 19 +++++++++++++++++++ R/query_parameters.R | 23 ++--------------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/R/internal_functions.R b/R/internal_functions.R index 34c6ea61..83227718 100644 --- a/R/internal_functions.R +++ b/R/internal_functions.R @@ -71,6 +71,25 @@ return(pars) } +#' 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 +} + #' Sends the Query to the POWER API #' #' @param .query_list A query list created by [.build_query()] diff --git a/R/query_parameters.R b/R/query_parameters.R index 21e03d21..835293e6 100644 --- a/R/query_parameters.R +++ b/R/query_parameters.R @@ -94,12 +94,12 @@ query_parameters <- function(community = NULL, if (is.null(community) && is.null(temporal_api)) { return(jsonlite::fromJSON(sprintf( "%s/%s?user=%s", power_url, pars, .create_ua_string() - ))) + ), encoding = "UTF8")) } else { if (!.is_boolean(metadata)) { cli::cli_abort( - c(x = "{.arg metadata} should be a Boolean value only.", + c(x = "{.arg metadata} should be a Boolean value", i = "{Please provide either {.var TRUE} or {.var FALSE}.") ) } @@ -120,22 +120,3 @@ query_parameters <- function(community = NULL, return(jsonlite::fromJSON(response$parse(encoding = "UTF8"))) } } - -#' 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 -} From 2e58fe743394518c6090739bfb4759f42ba00ce8 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Wed, 31 Jan 2024 14:46:20 +0800 Subject: [PATCH 14/43] remove encoding string val and add missing "." --- R/query_parameters.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/query_parameters.R b/R/query_parameters.R index 835293e6..eb3e88e7 100644 --- a/R/query_parameters.R +++ b/R/query_parameters.R @@ -94,12 +94,12 @@ query_parameters <- function(community = NULL, if (is.null(community) && is.null(temporal_api)) { return(jsonlite::fromJSON(sprintf( "%s/%s?user=%s", power_url, pars, .create_ua_string() - ), encoding = "UTF8")) + ))) } else { if (!.is_boolean(metadata)) { cli::cli_abort( - c(x = "{.arg metadata} should be a Boolean value", + c(x = "{.arg metadata} should be a Boolean value.", i = "{Please provide either {.var TRUE} or {.var FALSE}.") ) } From 9d1ca8fee69eab13c43d6152511a61e49119cdea Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Wed, 31 Jan 2024 14:56:02 +0800 Subject: [PATCH 15/43] move surface matching to internal function since now shared --- R/get_power.R | 26 +------------------------- R/internal_functions.R | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 25 deletions(-) diff --git a/R/get_power.R b/R/get_power.R index f6bda255..e0ffa5a4 100644 --- a/R/get_power.R +++ b/R/get_power.R @@ -211,31 +211,7 @@ get_power <- function(community = c("ag", "r", "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 diff --git a/R/internal_functions.R b/R/internal_functions.R index 83227718..2da8cabc 100644 --- a/R/internal_functions.R +++ b/R/internal_functions.R @@ -90,6 +90,38 @@ 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 API #' #' @param .query_list A query list created by [.build_query()] From 9f8aecd9a405a1537d936eabd8f8a178f09bc9c6 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Wed, 31 Jan 2024 14:56:31 +0800 Subject: [PATCH 16/43] add query_surfaces() --- NAMESPACE | 1 + R/query_surfaces.R | 38 ++++++++++++++++++++++++++++++++++++++ man/query_surfaces.Rd | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 R/query_surfaces.R create mode 100644 man/query_surfaces.Rd diff --git a/NAMESPACE b/NAMESPACE index 38519f44..1ac95afa 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -4,3 +4,4 @@ S3method(print,POWER.Info) export(get_power) export(query_groupings) export(query_parameters) +export(query_surfaces) diff --git a/R/query_surfaces.R b/R/query_surfaces.R new file mode 100644 index 00000000..71a6eb81 --- /dev/null +++ b/R/query_surfaces.R @@ -0,0 +1,38 @@ + +#' 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)) { + return(jsonlite::fromJSON(txt = power_url)) + } else { + wind_surface <- .match_surface_alias(surface_alias) + return(jsonlite::fromJSON( + txt = sprintf("%s/%s", power_url, wind_surface))) + } +} 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} +} From 3d1a8c2058081ac937e3b1d76053788c1a0738f3 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Wed, 31 Jan 2024 14:56:48 +0800 Subject: [PATCH 17/43] Update documentation --- man/query_parameters.Rd | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/man/query_parameters.Rd b/man/query_parameters.Rd index 5700b33d..d4e41cde 100644 --- a/man/query_parameters.Rd +++ b/man/query_parameters.Rd @@ -1,11 +1,9 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/query_parameters.R, R/query_surfaces.R +% Please edit documentation in R/query_parameters.R \name{query_parameters} \alias{query_parameters} \title{Query the POWER API for Detailed Information on Available Parameters} \usage{ -query_parameters(community = NULL, pars, temporal_api = NULL, metadata = FALSE) - query_parameters(community = NULL, pars, temporal_api = NULL, metadata = FALSE) } \arguments{ @@ -25,17 +23,10 @@ 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(ies) and temporal \acronym{API}(s). - A \link{list} object of information for the requested parameter(s) (if requested), community(ies) and temporal \acronym{API}(s). } \description{ -Queries the \acronym{POWER} \acronym{API} returning detailed information on -available parameters. For a list of all available parameters, use -\code{parameters} - Queries the \acronym{POWER} \acronym{API} returning detailed information on available parameters. For a list of all available parameters, use \code{parameters} @@ -49,16 +40,6 @@ available parameters. For a list of all available parameters, use \item{climatology}{Provide parameters as 22-year climatologies (solar) and 30-year climatologies (meteorology); the period climatology and monthly average, maximum, and/or minimum values.} -} - - There are four valid values. -\describe{ -\item{hourly}{The hourly average of \code{pars} by hour, day, month and year.} -\item{daily}{The daily average of \code{pars} by day, month and year.} -\item{monthly}{The monthly average of \code{pars} by month and year.} -\item{climatology}{Provide parameters as 22-year climatologies (solar) -and 30-year climatologies (meteorology); the period climatology and -monthly average, maximum, and/or minimum values.} } } @@ -68,22 +49,6 @@ monthly average, maximum, and/or minimum values.} # fetch the complete set of attribute information for "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(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. -query_parameters(community = "ag", - temporal_api = "hourly") -\dontshow{\}) # examplesIf} -\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} - -# fetch the complete set of attribute information for "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(pars = "T2M", From db1dc95aa820f4e07182bee81235072d8833e7bb Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Wed, 31 Jan 2024 15:01:42 +0800 Subject: [PATCH 18/43] Update internal list of parameters available --- R/sysdata.rda | Bin 2737 -> 2792 bytes data-raw/README.md | 28 ++++++++++++++-------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/R/sysdata.rda b/R/sysdata.rda index 562336553398ace4f8e974ad3536b547c55c305c..e99908785d76a82b044f826236892ad658bb03b3 100644 GIT binary patch literal 2792 zcmZve3p~^7AIDXWH426wKN&oQmvg=?oqiWU&fkjfMj~=5w(YpHWlZYQSnIE%o2SR;x?O!% zJ6C$0<@)xkg{o_ET4V9|Y<9hpikrH|?(9Uy%%TPzpv$$-|7m`J8;+XI>Xgf<^e4P6 z=__{Yc4Nd$MVV#w7C0DLCJQfm0p z>G@5^Zo&I_a#wSHu=#lYV)ngpIBIiTM>f?o`wjzL$Cv2?hH{}7M9w|jxaNGdA9$8OI3D$USKeMgxL|* zY4RrKBKJ@GzMk(}dAksWJlaDf5?QS5=JN&jmRLb+>OAho07uyxJ>X*$(vzh z%(k3fYjpkT5&OED>*eBmKRAlxKM1u*`f|p@@smjv-c6?Ey$;`n{7iAbIa6B7VXJ^Z z%XF0#6@3}N1sMR~g1;{r5a!WO$Y=c}cbLB^Kd8=XJ)wYf1&;Sm(MOm4T?CxN8QSLg zJ9e~3z63`mTgY?53NQ`_|;i$Iecl!SF7%n74NxvPoo#l6p-0fY*Me1-OQNnzLs9Bhz$ z&zHRal&=C%Lcuse$J)^4WPgFvT>S9khvq3GKknHVyExQz;o_0vSkkYbnj1ei3~#?l znr^*buuk~!Sjn~D$h23dN0{`~Spae?qJmY{8sFB%1%YR*y2>%Bix53R=-KyPx-JXy zpS8Na!t_zK52RZI4CZshC5hb_G`-I@(YjxA?onj!8@IVJufBd>x{*UKv2RL`5Ri@&Oq`o^5vzBt*d7%)NW3qDW;bSPTb8bQn~G@*S2H8Cm9F5(gSNMU>D>} z`Dr7a%iqwQEQk*H>G<{JQPe8t-I0YSBiBG<>ds-wulL#O7XP*)pQ+t=W=VFAIivv{ z+1D1$2A7v|X!%OLhsT9qqV(W>MZU*u9R0emPCcgcl_`^gvkA*+kFeB1_0jkM?pYFv zZ4))>kG>mmn#&{f+d3jlh=#l_uc3GhV-ci|v<{`7UtPZf6G$jJ7_ zP-I6*C$igk?_wd2r(SWM)E<2X%diGYp5i?rQ%2^3l_V^D$!Fro0Qc>sGtW!}*3z1B zaby`hfP+AzOUrPIV2+w@1L_HVaS1F}?wyFp8>f$fm-XF}>p|BZrg+^Yg4`&aRJxCA zM3Zu~eDcrwvNH%XBlE%YKzZ_4<3Np;AQW$sc_KXjzS}SUUR%on1NGR zGi=<;UJ~J+2C~yhTUT;r7m}c@aE5-&?lqO(w8*v4RP#7M!p#^sMWm>x zrWo7W<`qO!b9|$6-L$^E|J^%?gEX<%G)B|tS8S-N!x#|JYlEeg!iDWA~iS2 zrGC_Tb9v_l@L0kdA8zVN$5k=;qQJnw8~VlSCo&ziH#u1E)=nLzM6M_!BO`#v<84Bw-3UMN z8$ALz1q<_ObIH#I$>Q$O-j_)7&W>!L?tWG8UcT=yE1w`w_YtcD_FHb!eBveU&Q{J!ZD#4`WZ z&flYRs?29vUp)F?711+rTsbhwzOY4*2*sH|1TAl$@ZE;Oik|W$KOU7{_7C5dW56nc zLIG7(zB@$A(OurAJ5qQjORlPIn*tkFTF*CZJ!Gw?kPdT;G&9FYa?*bo-RvK0lbPpg m?A9i}ecO2VA!NlK2x7Lkzy)2UdcR0Nk{HqLAnhTT@toR<1IhhDC~`#O54d+ z)wssJ;wi@U*Oe(g?yJWC6E^!rg$gsfEVs-u&!QTL5psCExkif$AI#pqytMYF_{m1* zJJaHFKj->`HV628ItE2aygNXZHZx|p?Pgzib+5B8Brw0e zYECtvK=cFqre*G`7AAx_hoFigsPo#xuS&M@t-~?FGHC;CfjPMz7&V!7?ba4duuM}} z-XaF$XPG;&U{;Q0uCSIdq>yY(!(OXyRWxMRH4(aGS6*skRv1+9%iC4m>s6ci_2WP8 z&(AL`LZ{SX(#y-Up`k-DBLnO`*0ob@->e8%97LnR`H1i;2Vi&*T(cE%vFkcm>WwRe zey8^XkYXl_KD^hF<3$a|2)N!caV6@}V*mOADYyPon+}mvkesMUY8vCVd?a--$XG(- z%>AvaEyl8e7;P~8wv%9n70S^5YFCYr^fY~oO z`Ie1{7TfXi&_w1V@LRzLku{@gY9k^$ch-4(^qM1}F7x7V@UaVD(3^^@hJ_3!_Q`3G zBd9mQXz&Ke-qDpm;j7`0qfMeA?Q!h+;pWV9F})KO1=pOd6|MIf*^+T#a79M!vl`F! zrX(y`1Z`|EDz#P|CA230DVUD%YV}YAy?-a>01GKl&zuf=9FxL9k^HD3?n+r04MwDL zZfBgN4&f{3t08C1h&|&lLEHwnbl5hjbl5g@pd&{-8(Ki1-NF&C0Fn~_3uig>qLH#n z=ap{TZjs-5q}br-=%x}WI>`RCVQoDA6ExsY>HnIn>uq5ve?oZbAv9c|X0PK0MV z{C#>MKKxaWPX#fGm(FV|DoSZhgMYmx_oLMxOPRF_Gz& zXnUe?gGJsa-&m#;YB55E#!e5)*Ytlr{6aYJ?9HAq<9Ug)4f6S38_+)14$UtYWIRpS z=<%qA*`d|-mnespP>!KEb0wh!iv6aY`y1ymXi?4uhoUw;(AiF*Hq32REmV$Kx@|zx zRuB1PE}XXW_M~RQmq*=t<2gWOmV9%iMXSzv-O$UyGwo#^DJhjr?2MEy9k*?Iv^2X$ zmPNI(!=JV)oM!f!l&@4DdyhG})^leZ73kkACj;r>^+|V_(<@t4{B1$ZFw}qVhW&UW zgB%CJ8fZqZ#J}g};ZaagQBkeOR;8CGEMgMq7We)b_*9$6zd|YNvTiGDJJg@~tbe5( zBfl#O)Ky$O#Kpty%(vF<3ItDdi9UWqElVCEB_JT6qITBctO3t)5ZuapR*Hs|--MB3 z4i{D{Et}9Lp;sL}v6ZkaSW=-X+qgD~m{6Bl@+ehTh=}Wb?T~m#JDsqcG?99tqNlaa za9)FBuGbr59CF{*4vXp8vNg81J?!iF&`Ie0aPHDC?X8v2^yZ`8i=!g;VGnmI*?lQ5 zwCu^U8(sWs%2%KDPD5upR`Y=Qk`dhH!@8d4P-u|lF)xo;bW!h~?1xxIxWybz|v zSVwKj&(`Y{+%7{~`6m6^e1g<$7%tO`@lo5kUUQz7r=;zKQ6BnpHtN1vXDJHY=^RJO zMv$^qU7iaJ4GpP07Xa*^=5O+&e-0$_?$BM;V<-C!cwjIP99vsUBkrKa8zm1hbYNYp zmHQ6ob+=laMdl?qlk(yh8c?q!IJ1)Oo0Jj1CY;8gjglepX+v#0Y?-o2iR|y)pfFp( z4Nj~bILV2{QR1w1lE9>|a7cekEJBL#vkJ%k< zY3hJuyXt1r=AgZ|mlVN0l_59fGtc={)?nCwv=9D{4+HO6{Aq5~%chsR5kAwtY**{a zbB1iptYd;hrkW9U8sucwohfr+4%7rxhMphS)E1#bp-@pkKs_LMKr=l6CH+nUyI6d-)6Y&8fM5H-^cKpOJocs_rVeki{|NsMV;crK!3p zlF=|~wYajZATqE`@pcZ8{hXq$lr=A&sn5dk*Dc?j(jgAnKMC+b$LUQ)Er`zox{s4f z+s;>O*vkLBcz_yUN9Rhqn+^}znB=R?sk*IyUXqcyIRor{fc0TP)n(NNe7M`Q9ZXnr zy6o==Ct+J^h*X)o?C|jLfY8uzU#H+<=(KM$uhDu`NoKY|=Im|&AK2`tSDmC3LgT4z|z*i;KYEwn}fjYfw6OAc&?71Nrm-fZYv^rAaYh`F0& zsk#iL4Un>o-MXnqOww_A5`w^o_aE!alZ`=QEV!k(WDo5llH-^L0xiYKf+;K`-mUO+ Nmc*kcnj5Om{2xMeI7k2h 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 ## ## ────────────────────────────────────────────────────────────────────────────── From ebacde34d5c327d4462a38091cd009f1150c68e7 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Wed, 31 Jan 2024 15:01:59 +0800 Subject: [PATCH 19/43] Use v4.2.0 and update NEWS.md --- DESCRIPTION | 2 +- NEWS.md | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index af39edd5..06e1f87b 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: nasapower Type: Package Title: NASA POWER API Client -Version: 4.1.1 +Version: 4.2.0 Authors@R: c(person(given = "Adam H.", family = "Sparks", diff --git a/NEWS.md b/NEWS.md index 86a4b15c..23ce2d30 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,14 @@ -# nasapower 4.1.1 +# nasapower 4.2.0 + +## Minor Changes + +* New functions: + * `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 {r-lib/cli} for more attractive and informative messages. ## Bug fixes @@ -7,10 +17,6 @@ * 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. -## Minor changes - -* Better implementation of {cli} for error messages to end users. - # nasapower 4.1.0 ## Bug fixes From 2ea711232dc5e3fd5369d10584c5c799b5c1d9e4 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Wed, 31 Jan 2024 15:03:43 +0800 Subject: [PATCH 20/43] Update {vcr} fixtures --- tests/fixtures/adjusted_air_pressure.json | 2 +- tests/fixtures/adjusted_wind_elevation.json | 2 +- tests/fixtures/climatology_ag_point.json | 2 +- tests/fixtures/daily_ag_point.json | 2 +- tests/fixtures/daily_sb_point_LST.json | 2 +- tests/fixtures/daily_sb_point_UTC.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/fixtures/adjusted_air_pressure.json b/tests/fixtures/adjusted_air_pressure.json index d0b4047a..7f5b8430 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=nasapower411","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":"Tue, 30 Jan 2024 22:45:14 GMT","status":"HTTP/2 200 ","via":"1.1 8c4035e1b80d143966381b14fdc6a658.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"SYBO8HJkvHcEv1A=","x-amz-cf-id":"1DppcUICV55AzhhDA95fxFZuVH8u-RMD_9uJ48hdcNlEin-7Jvytig==","x-amz-cf-pop":["CGK51-P2","PER50-C1"],"x-amzn-remapped-content-length":"912","x-amzn-requestid":"d12c74ed-0c80-49bd-b337-eba3fa717139","x-amzn-trace-id":"Root=1-65b97bf8-1afbca7801feef7f5e879e70","x-app-name":"daily","x-app-version":"v2.5.5","x-archive-time":"1.396","x-cache":"Miss from cloudfront","x-data-sources":"power,merra2","x-objects-time":"0.013","x-process-time":"0.18","x-service-time":"1.59"},"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-01-30 22:45:14 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=nasapower420","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":"Wed, 31 Jan 2024 07:03:07 GMT","status":"HTTP/2 200 ","via":"1.1 9b141936c5413c42ce4e422b27bda208.cloudfront.net (CloudFront), 1.1 bcafd6d18f872a34f793854d3fb920f0.cloudfront.net (CloudFront)","x-amz-apigw-id":"SZKKfF7oPHcEh-w=","x-amz-cf-id":"REIcWfgTLG7XlvIaPfinyBGHw8VwLSbnaMB983AgzI9n2vAEIgyTTw==","x-amz-cf-pop":["MEL50-C2","PER50-C1"],"x-amzn-remapped-content-length":"912","x-amzn-requestid":"ba24da0c-b6f3-47b4-b8dc-754f738265bd","x-amzn-trace-id":"Root=1-65b9f0a9-5e73661c3ecf62bc42a2c402","x-app-name":"daily","x-app-version":"v2.5.5","x-archive-time":"1.745","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.022","x-process-time":"0.19","x-service-time":"1.958"},"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-01-31 07:03:07 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 a6087843..4e5dc0c2 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=nasapower411","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":"Tue, 30 Jan 2024 22:45:17 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 f5b8577eaab42e0620805ea605167190.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"SYBPYFcLvHcEA-A=","x-amz-cf-id":"_m7Uc4Mh3AH36Ae9Nt7cIQqNIrR546c-Aiduw8b20rZiTvbY3kv3Ag==","x-amz-cf-pop":["CGK51-P2","PER50-C1"],"x-amzn-remapped-content-length":"1024","x-amzn-requestid":"a9f91e50-b2dc-48ac-befb-3ababeccf1c1","x-amzn-trace-id":"Root=1-65b97bfb-5eff10c23a8bcc514d12f735","x-app-name":"daily","x-app-version":"v2.5.5","x-archive-time":"1.574","x-cache":"Miss from cloudfront","x-data-sources":"power,merra2","x-objects-time":"0.024","x-process-time":"0.17","x-service-time":"1.769"},"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-01-30 22:45:17 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=nasapower420","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":"Wed, 31 Jan 2024 07:03:09 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 6cdd0ede3d096630fd0a0c4374848918.cloudfront.net (CloudFront), 1.1 bcafd6d18f872a34f793854d3fb920f0.cloudfront.net (CloudFront)","x-amz-apigw-id":"SZKK6Hq5PHcEIdQ=","x-amz-cf-id":"Hhl5VMGPrSrhNITNoIfFvzngZrvPlg7BMiTPOSTPSUglN75UDRDgVw==","x-amz-cf-pop":["MEL50-C2","PER50-C1"],"x-amzn-remapped-content-length":"1024","x-amzn-requestid":"a4e5ce09-e949-40d2-a43b-a5fb78c38619","x-amzn-trace-id":"Root=1-65b9f0ab-392dcdc4013b30af153a4a72","x-app-name":"daily","x-app-version":"v2.5.5","x-archive-time":"1.806","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.017","x-process-time":"0.16","x-service-time":"1.984"},"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-01-31 07:03:10 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 08a763db..2990edbe 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=nasapower411","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":"Tue, 30 Jan 2024 22:45:30 GMT","status":"HTTP/2 200 ","via":"1.1 df5212943939325a48cc9dca33f4ad32.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"SYBREHkmvHcEHfg=","x-amz-cf-id":"fZgDijkZg1wR7ShCbQvcwiy32hCw117QE8fHDxppb7YAAAwdjpkEKA==","x-amz-cf-pop":["CGK51-P2","PER50-C1"],"x-amzn-remapped-content-length":"663","x-amzn-requestid":"e7a8ee9d-da94-4cb0-83a1-6e4778ecc949","x-amzn-trace-id":"Root=1-65b97c06-77e4fe6143d4ed0e79825192","x-app-name":"climatology","x-app-version":"v2.5.7","x-archive-time":"3.419","x-cache":"Miss from cloudfront","x-data-sources":"merra2","x-objects-time":"0.013","x-process-time":"0.19","x-service-time":"3.623"},"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-01-30 22:45:30 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=nasapower420","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":"Wed, 31 Jan 2024 07:03:19 GMT","status":"HTTP/2 200 ","via":"1.1 404908a44b28b9941efc528aa5e2c114.cloudfront.net (CloudFront), 1.1 bcafd6d18f872a34f793854d3fb920f0.cloudfront.net (CloudFront)","x-amz-apigw-id":"SZKMPF4pvHcEg5A=","x-amz-cf-id":"5SUef5j0yjnVNPHkujdcCXH8LMPbqp3LS3Jz0wwHTf9L_V1QuMcVEA==","x-amz-cf-pop":["MEL50-C2","PER50-C1"],"x-amzn-remapped-content-length":"663","x-amzn-requestid":"3977a537-ca6d-4821-8a75-ed7cad82f3a6","x-amzn-trace-id":"Root=1-65b9f0b4-56524efe45d668bb44e8ae47","x-app-name":"climatology","x-app-version":"v2.5.7","x-archive-time":"3.276","x-cache":"Miss from cloudfront","x-data-sources":"merra2","x-objects-time":"0.008","x-process-time":"0.26","x-service-time":"3.545"},"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-01-31 07:03:20 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 6b80bbb8..410933a0 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=nasapower411","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":"Tue, 30 Jan 2024 22:45:11 GMT","status":"HTTP/2 200 ","via":"1.1 19ef5ddc8709826d603b00905bfe868e.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"SYBOaEuoPHcEPlg=","x-amz-cf-id":"wdVLRSq13-5OTkLRbOq9pqAThFq5Vo24mXnZpCtyH15Gk3TCMrZeUA==","x-amz-cf-pop":["CGK51-P2","PER50-C1"],"x-amzn-remapped-content-length":"812","x-amzn-requestid":"9c73023c-bdf9-46cd-a8ff-50ef88387486","x-amzn-trace-id":"Root=1-65b97bf5-28982d5b4655a11d22566690","x-app-name":"daily","x-app-version":"v2.5.5","x-archive-time":"1.591","x-cache":"Miss from cloudfront","x-data-sources":"power,merra2","x-objects-time":"0.003","x-process-time":"0.16","x-service-time":"1.756"},"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-01-30 22:45:11 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=nasapower420","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":"Wed, 31 Jan 2024 07:03:04 GMT","status":"HTTP/2 200 ","via":"1.1 0d9967d47f7c7fae8db89ba489f42356.cloudfront.net (CloudFront), 1.1 bcafd6d18f872a34f793854d3fb920f0.cloudfront.net (CloudFront)","x-amz-apigw-id":"SZKKHFDjPHcEEmQ=","x-amz-cf-id":"ZHvP9ZrT1Dq6ulsD8jNN95di5IpTnuLIIuqGtjhzze0nlvnl2oMOMg==","x-amz-cf-pop":["MEL50-C2","PER50-C1"],"x-amzn-remapped-content-length":"812","x-amzn-requestid":"5dc12a19-09ed-4976-847f-38788be6959c","x-amzn-trace-id":"Root=1-65b9f0a6-5248102a30079c277afae040","x-app-name":"daily","x-app-version":"v2.5.5","x-archive-time":"1.495","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.006","x-process-time":"0.17","x-service-time":"1.672"},"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-01-31 07:03:04 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 93e128ee..3879e79b 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=nasapower411","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":"Tue, 30 Jan 2024 22:45:22 GMT","status":"HTTP/2 200 ","via":"1.1 1a43057a7a5d47a18ee13c32549ded1c.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"SYBQMHAhPHcEGfQ=","x-amz-cf-id":"yaaFwPZkOYEKPhs62Nr4G2BYHdqyE8FEKwT5jvyC94BjodCunfz-fA==","x-amz-cf-pop":["CGK51-P2","PER50-C1"],"x-amzn-remapped-content-length":"763","x-amzn-requestid":"686a865e-9ded-43c7-ad11-611449231497","x-amzn-trace-id":"Root=1-65b97c00-5ddf501b54b6fcec6e5bfe99","x-app-name":"daily","x-app-version":"v2.5.5","x-archive-time":"1.363","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.006","x-process-time":"0.17","x-service-time":"1.54"},"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-01-30 22:45:22 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=nasapower420","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":"Wed, 31 Jan 2024 07:03:14 GMT","status":"HTTP/2 200 ","via":"1.1 e303aca6dac0332bf61b6c735c629988.cloudfront.net (CloudFront), 1.1 bcafd6d18f872a34f793854d3fb920f0.cloudfront.net (CloudFront)","x-amz-apigw-id":"SZKLrFZMPHcEQ7g=","x-amz-cf-id":"ZCN-LRxPUWA_X9gBL832JToZvAMkXRDiU0u-dhZ_K8YWhRBQ8U0rpA==","x-amz-cf-pop":["MEL50-C2","PER50-C1"],"x-amzn-remapped-content-length":"763","x-amzn-requestid":"ccde7493-a67c-4634-bb26-9e191ef8e06e","x-amzn-trace-id":"Root=1-65b9f0b0-67df646e34e518fd48dbb32a","x-app-name":"daily","x-app-version":"v2.5.5","x-archive-time":"1.392","x-cache":"Miss from cloudfront","x-data-sources":"power,merra2","x-objects-time":"0.007","x-process-time":"0.16","x-service-time":"1.56"},"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-01-31 07:03:14 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 bbfd6e69..6e892fb7 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=nasapower411","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":"Tue, 30 Jan 2024 22:45:19 GMT","status":"HTTP/2 200 ","via":"1.1 19ef5ddc8709826d603b00905bfe868e.cloudfront.net (CloudFront), 1.1 d65f0ada2f9649266b32f91b10382a3e.cloudfront.net (CloudFront)","x-amz-apigw-id":"SYBPyFVbPHcEJrA=","x-amz-cf-id":"T2hbsc3RpSoOu_1095r5Fg-3G8R3AioE7Wy5hsVlHVILuI1u8i4s3A==","x-amz-cf-pop":["CGK51-P2","PER50-C1"],"x-amzn-remapped-content-length":"762","x-amzn-requestid":"88bbbf88-f2da-4520-acb1-8db386f7ff3a","x-amzn-trace-id":"Root=1-65b97bfe-26505bce33772920163e0e7e","x-app-name":"daily","x-app-version":"v2.5.5","x-archive-time":"1.174","x-cache":"Miss from cloudfront","x-data-sources":"power,merra2","x-objects-time":"0.013","x-process-time":"0.16","x-service-time":"1.348"},"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-01-30 22:45:19 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=nasapower420","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":"Wed, 31 Jan 2024 07:03:12 GMT","status":"HTTP/2 200 ","via":"1.1 1b96d3353bf60eaa42f8e25813c6c660.cloudfront.net (CloudFront), 1.1 bcafd6d18f872a34f793854d3fb920f0.cloudfront.net (CloudFront)","x-amz-apigw-id":"SZKLVHgOvHcECaA=","x-amz-cf-id":"lI4_h5oXdyJST78bgxi6_y6hvIcPPpR5HC_wDxP_iBd_eZEYoHOoCA==","x-amz-cf-pop":["MEL50-C2","PER50-C1"],"x-amzn-remapped-content-length":"762","x-amzn-requestid":"7c3a33a7-de5c-4e2e-87d0-7674e357dfb8","x-amzn-trace-id":"Root=1-65b9f0ae-67d3115e1cc4bdaf4abfa026","x-app-name":"daily","x-app-version":"v2.5.5","x-archive-time":"1.184","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.008","x-process-time":"0.22","x-service-time":"1.413"},"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-01-31 07:03:12 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} From e8a9192e3ae32bda7bceee03ef465fdf24bd190b Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Wed, 31 Jan 2024 16:24:35 +0800 Subject: [PATCH 21/43] Use --- R/internal_functions.R | 34 +++++++++++++++++++++++++++- R/query_surfaces.R | 16 +++++++++---- tests/testthat/test-query_surfaces.R | 17 ++++++++++++++ 3 files changed, 62 insertions(+), 5 deletions(-) create mode 100644 tests/testthat/test-query_surfaces.R diff --git a/R/internal_functions.R b/R/internal_functions.R index 2da8cabc..a6112bc3 100644 --- a/R/internal_functions.R +++ b/R/internal_functions.R @@ -122,7 +122,7 @@ } } -#' Sends the Query to the POWER API +#' Sends the Query to the POWER Data API to Retrieve Data #' #' @param .query_list A query list created by [.build_query()] #' @param .url A character string of the URL to be used for the \acronym{API} @@ -154,6 +154,38 @@ 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) +} + #' Create User Agent String #' #' Creates a user agent string to pass along to the API diff --git a/R/query_surfaces.R b/R/query_surfaces.R index 71a6eb81..c1a37518 100644 --- a/R/query_surfaces.R +++ b/R/query_surfaces.R @@ -24,15 +24,23 @@ query_surfaces <- function(surface_alias = NULL) { - power_url <- "https://power.larc.nasa.gov/api/system/manager/surface" if (is.null(surface_alias)) { - return(jsonlite::fromJSON(txt = power_url)) + 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) - return(jsonlite::fromJSON( - txt = sprintf("%s/%s", power_url, wind_surface))) + 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/tests/testthat/test-query_surfaces.R b/tests/testthat/test-query_surfaces.R new file mode 100644 index 00000000..c06b40bf --- /dev/null +++ b/tests/testthat/test-query_surfaces.R @@ -0,0 +1,17 @@ + +test_that("query_surfaces() returns proper list of info", { + skip_on_cran() + surface_query <- query_surfaces() + + expect_type(par_query, "list") + expect_length(par_query, 1) + expect_named(par_query, "T2M") + }) + +test_that("query_surfaces() returns list of parameter information", { + skip_on_cran() + surface_query <- query_surfaces(pars = "T2M") + expect_type(par_query, "list") + expect_length(par_query, 1) + expect_named(par_query, "T2M") +}) From 1ef854ec7c98bf70eec532f65a6aaef6a0b51ba5 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Wed, 31 Jan 2024 16:25:23 +0800 Subject: [PATCH 22/43] Remove unused function --- R/internal_functions.R | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/R/internal_functions.R b/R/internal_functions.R index a6112bc3..57f4aa1f 100644 --- a/R/internal_functions.R +++ b/R/internal_functions.R @@ -154,38 +154,6 @@ 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) -} - #' Create User Agent String #' #' Creates a user agent string to pass along to the API From 1f63f8905ca9b7d28d1a54a78e317768cbdd6ece Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Wed, 31 Jan 2024 16:27:17 +0800 Subject: [PATCH 23/43] Revert "Remove unused function" This reverts commit 1ef854ec7c98bf70eec532f65a6aaef6a0b51ba5. --- R/internal_functions.R | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/R/internal_functions.R b/R/internal_functions.R index 57f4aa1f..a6112bc3 100644 --- a/R/internal_functions.R +++ b/R/internal_functions.R @@ -154,6 +154,38 @@ 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) +} + #' Create User Agent String #' #' Creates a user agent string to pass along to the API From a6af67e4b159463e0200ee43abd5f401030e2cf1 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Wed, 31 Jan 2024 16:29:39 +0800 Subject: [PATCH 24/43] Use {vcr} for groupings end-point --- R/query_groupings.R | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/R/query_groupings.R b/R/query_groupings.R index 0536647e..3bba421e 100644 --- a/R/query_groupings.R +++ b/R/query_groupings.R @@ -37,9 +37,18 @@ query_groupings <- function(global = FALSE) { "https://power.larc.nasa.gov/api/system/manager/system/groupings" if (isFALSE(global)) { - return(jsonlite::fromJSON(txt = power_url)) + response <- + .send_mgmt_query(.url = power_url) + + response$raise_for_status() + return(jsonlite::fromJSON(response$parse("UTF8"))) + } else { - return(jsonlite::fromJSON( - txt = sprintf("%s/global", power_url))) + power_url <- sprintf("%s/global", power_url) + response <- + .send_mgmt_query(.url = power_url) + + response$raise_for_status() + return(jsonlite::fromJSON(response$parse("UTF8"))) } } From e404b72cc93086d0e71688ae296197dd3159262c Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Wed, 31 Jan 2024 20:00:14 +0800 Subject: [PATCH 25/43] tidy up tests and add for query_surfaces() --- tests/fixtures/query_surfaces_all.json | 1 + tests/fixtures/query_surfaces_seaice.json | 1 + tests/testthat/test-query_parameters.R | 53 +++++++++++++---------- tests/testthat/test-query_surfaces.R | 48 +++++++++++++++----- 4 files changed, 70 insertions(+), 33 deletions(-) create mode 100644 tests/fixtures/query_surfaces_all.json create mode 100644 tests/fixtures/query_surfaces_seaice.json diff --git a/tests/fixtures/query_surfaces_all.json b/tests/fixtures/query_surfaces_all.json new file mode 100644 index 00000000..364be7f9 --- /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":"Wed, 31 Jan 2024 11:59:46 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 428e2a08293137149f3e5137ec4cd472.cloudfront.net (CloudFront), 1.1 53c50678e40ac01e17221f5619420630.cloudfront.net (CloudFront)","x-amz-apigw-id":"SZ1oAGIZvHcEv1A=","x-amz-cf-id":"pJIKjvmHvVGF3DnzsDQoQX0Ax5yFF_SRu7aQKdr7H95VwMeUpdADIA==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"5001","x-amzn-requestid":"0fd5d202-1b38-4dcb-b7b9-03c8c367fa91","x-amzn-trace-id":"Root=1-65ba3632-5b5a10cd07ba410e4f4a77d1","x-app-name":"manager","x-app-version":"v2.5.1","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-01-31 11:59:47 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..b070db90 --- /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":"Wed, 31 Jan 2024 12:00:02 GMT","status":"HTTP/2 200 ","via":"1.1 428e2a08293137149f3e5137ec4cd472.cloudfront.net (CloudFront), 1.1 1cfb7ce7b17aec05ed3d7cd725b078c2.cloudfront.net (CloudFront)","x-amz-apigw-id":"SZ1qeElNPHcEHZg=","x-amz-cf-id":"LaV-bysigK2KxfOw2y5na4vU0rgXe3_CyVq33DhB5gcl3WyDCzWwXQ==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"257","x-amzn-requestid":"e1753500-9432-4401-91b5-313855669875","x-amzn-trace-id":"Root=1-65ba3642-6c3fcd360dee06d14229d281","x-app-name":"manager","x-app-version":"v2.5.1","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-01-31 12:00:02 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} diff --git a/tests/testthat/test-query_parameters.R b/tests/testthat/test-query_parameters.R index 2638cb20..557aada8 100644 --- a/tests/testthat/test-query_parameters.R +++ b/tests/testthat/test-query_parameters.R @@ -1,39 +1,48 @@ test_that("query_parameters() returns proper list of info", { - skip_on_cran() - par_query <- query_parameters(community = "ag", - pars = "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_on_cran() - par_query <- query_parameters(pars = "T2M") - expect_type(par_query, "list") - expect_length(par_query, 1) - expect_named(par_query, "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_if_offline() + vcr::use_cassette("query_parameters_all", { + 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() stops if par and community only supplied", { - skip_on_cran() + 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() + skip_if_offline() expect_error(query_parameters(pars = "T2M", temporal_api = "daily")) }) test_that("query_parameters() stops if metadata is not Boolean", { - skip_on_cran() - expect_error(query_parameters(pars = "T2M", - community = "ag", - temporal_api = "daily", - metadata = "orange")) + skip_if_offline() + expect_error( + query_parameters( + pars = "T2M", + community = "ag", + temporal_api = "daily", + metadata = "orange" + ) + ) }) diff --git a/tests/testthat/test-query_surfaces.R b/tests/testthat/test-query_surfaces.R index c06b40bf..47b3e758 100644 --- a/tests/testthat/test-query_surfaces.R +++ b/tests/testthat/test-query_surfaces.R @@ -1,17 +1,43 @@ test_that("query_surfaces() returns proper list of info", { - skip_on_cran() - surface_query <- query_surfaces() + skip_if_offline() + vcr::use_cassette("query_surfaces_all", { + surface_query <- query_surfaces() - expect_type(par_query, "list") - expect_length(par_query, 1) - expect_named(par_query, "T2M") - }) + 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 parameter information", { - skip_on_cran() - surface_query <- query_surfaces(pars = "T2M") - expect_type(par_query, "list") - expect_length(par_query, 1) - expect_named(par_query, "T2M") + 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")) + }) }) From aab3b3103bb4b55c6b5e07c9074ef5ccb4da0347 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Thu, 1 Feb 2024 06:42:32 +0800 Subject: [PATCH 26/43] Better tests for >97% coverage now --- tests/fixtures/adjusted_air_pressure.json | 2 +- tests/fixtures/adjusted_wind_elevation.json | 2 +- tests/fixtures/climatology_ag_point.json | 2 +- tests/fixtures/daily_ag_point.json | 2 +- tests/fixtures/daily_sb_point_LST.json | 2 +- tests/fixtures/daily_sb_point_UTC.json | 2 +- tests/fixtures/query_groupings.json | 1 + tests/fixtures/query_groupings_global.json | 1 + .../query_parameters_comm&temporal_api.json | 1 + tests/fixtures/query_surfaces_all.json | 2 +- tests/fixtures/query_surfaces_seaice.json | 2 +- tests/testthat/test-get_power.R | 18 ++++++++-- tests/testthat/test-internal_functions.R | 7 ++++ tests/testthat/test-query_groupings.R | 27 +++++++++++++++ tests/testthat/test-query_parameters.R | 34 +++++++++++++++---- tests/testthat/test-query_surfaces.R | 2 +- 16 files changed, 90 insertions(+), 17 deletions(-) create mode 100644 tests/fixtures/query_groupings.json create mode 100644 tests/fixtures/query_groupings_global.json create mode 100644 tests/fixtures/query_parameters_comm&temporal_api.json create mode 100644 tests/testthat/test-query_groupings.R diff --git a/tests/fixtures/adjusted_air_pressure.json b/tests/fixtures/adjusted_air_pressure.json index 7f5b8430..4d28c991 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=nasapower420","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":"Wed, 31 Jan 2024 07:03:07 GMT","status":"HTTP/2 200 ","via":"1.1 9b141936c5413c42ce4e422b27bda208.cloudfront.net (CloudFront), 1.1 bcafd6d18f872a34f793854d3fb920f0.cloudfront.net (CloudFront)","x-amz-apigw-id":"SZKKfF7oPHcEh-w=","x-amz-cf-id":"REIcWfgTLG7XlvIaPfinyBGHw8VwLSbnaMB983AgzI9n2vAEIgyTTw==","x-amz-cf-pop":["MEL50-C2","PER50-C1"],"x-amzn-remapped-content-length":"912","x-amzn-requestid":"ba24da0c-b6f3-47b4-b8dc-754f738265bd","x-amzn-trace-id":"Root=1-65b9f0a9-5e73661c3ecf62bc42a2c402","x-app-name":"daily","x-app-version":"v2.5.5","x-archive-time":"1.745","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.022","x-process-time":"0.19","x-service-time":"1.958"},"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-01-31 07:03:07 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=nasapower420","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":"Wed, 31 Jan 2024 22:18:33 GMT","status":"HTTP/2 200 ","via":"1.1 14e3bcb62e3b58982c2bf9870a7cdc98.cloudfront.net (CloudFront), 1.1 7a63b6d9f3bdd00d23ee90227348af86.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQQvHzjvHcEiAQ=","x-amz-cf-id":"CI0wuA_f0BTNRgqCJVusp9Y49yT57jloiD75qUmmDjomxY6ynykTpg==","x-amz-cf-pop":["CGK51-P3","PER50-C1"],"x-amzn-remapped-content-length":"912","x-amzn-requestid":"ada5122c-48e8-455d-b81c-3f61906e7ac4","x-amzn-trace-id":"Root=1-65bac737-70f33bc80175a2d30d8203e2","x-app-name":"daily","x-app-version":"v2.5.6","x-archive-time":"1.226","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.003","x-process-time":"0.17","x-service-time":"1.4"},"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-01-31 22:18:33 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 4e5dc0c2..5cd2c868 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=nasapower420","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":"Wed, 31 Jan 2024 07:03:09 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 6cdd0ede3d096630fd0a0c4374848918.cloudfront.net (CloudFront), 1.1 bcafd6d18f872a34f793854d3fb920f0.cloudfront.net (CloudFront)","x-amz-apigw-id":"SZKK6Hq5PHcEIdQ=","x-amz-cf-id":"Hhl5VMGPrSrhNITNoIfFvzngZrvPlg7BMiTPOSTPSUglN75UDRDgVw==","x-amz-cf-pop":["MEL50-C2","PER50-C1"],"x-amzn-remapped-content-length":"1024","x-amzn-requestid":"a4e5ce09-e949-40d2-a43b-a5fb78c38619","x-amzn-trace-id":"Root=1-65b9f0ab-392dcdc4013b30af153a4a72","x-app-name":"daily","x-app-version":"v2.5.5","x-archive-time":"1.806","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.017","x-process-time":"0.16","x-service-time":"1.984"},"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-01-31 07:03:10 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=nasapower420","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":"Wed, 31 Jan 2024 22:18:36 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 c58f23d83eba9cb7f0fa30f4d356a58a.cloudfront.net (CloudFront), 1.1 7a63b6d9f3bdd00d23ee90227348af86.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQRLFCcPHcEkGQ=","x-amz-cf-id":"tydIFImKq_Bu3J60iA3zV3qMuJE2avcmu8SODhtsiI_WJ4iFW0fWJw==","x-amz-cf-pop":["CGK51-P3","PER50-C1"],"x-amzn-remapped-content-length":"1024","x-amzn-requestid":"5ac467a8-b3f4-4ce1-94b4-13cb84ca02ae","x-amzn-trace-id":"Root=1-65bac73a-61d199467ff72bfc660233d0","x-app-name":"daily","x-app-version":"v2.5.6","x-archive-time":"1.516","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.027","x-process-time":"0.19","x-service-time":"1.734"},"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-01-31 22:18:37 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 2990edbe..f05e630f 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=nasapower420","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":"Wed, 31 Jan 2024 07:03:19 GMT","status":"HTTP/2 200 ","via":"1.1 404908a44b28b9941efc528aa5e2c114.cloudfront.net (CloudFront), 1.1 bcafd6d18f872a34f793854d3fb920f0.cloudfront.net (CloudFront)","x-amz-apigw-id":"SZKMPF4pvHcEg5A=","x-amz-cf-id":"5SUef5j0yjnVNPHkujdcCXH8LMPbqp3LS3Jz0wwHTf9L_V1QuMcVEA==","x-amz-cf-pop":["MEL50-C2","PER50-C1"],"x-amzn-remapped-content-length":"663","x-amzn-requestid":"3977a537-ca6d-4821-8a75-ed7cad82f3a6","x-amzn-trace-id":"Root=1-65b9f0b4-56524efe45d668bb44e8ae47","x-app-name":"climatology","x-app-version":"v2.5.7","x-archive-time":"3.276","x-cache":"Miss from cloudfront","x-data-sources":"merra2","x-objects-time":"0.008","x-process-time":"0.26","x-service-time":"3.545"},"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-01-31 07:03:20 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=nasapower420","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":"Wed, 31 Jan 2024 22:18:56 GMT","status":"HTTP/2 200 ","via":"1.1 b7c5a00d3611645b9093c7e6a46c76fe.cloudfront.net (CloudFront), 1.1 7a63b6d9f3bdd00d23ee90227348af86.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQUEGIAvHcEhqg=","x-amz-cf-id":"D_grF_IrgVlh6AEvBNSiLPofPDMfSuZsnlQVBPNPScukU__J0xYVGQ==","x-amz-cf-pop":["CGK51-P3","PER50-C1"],"x-amzn-remapped-content-length":"663","x-amzn-requestid":"dd1820ad-e958-4585-8a65-b4cd121ca37a","x-amzn-trace-id":"Root=1-65bac74c-3fea2b99261daa2b7a817c07","x-app-name":"climatology","x-app-version":"v2.5.8","x-archive-time":"3.519","x-cache":"Miss from cloudfront","x-data-sources":"merra2","x-objects-time":"0.013","x-process-time":"0.19","x-service-time":"3.723"},"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-01-31 22:18:57 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 410933a0..85ff8ac1 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=nasapower420","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":"Wed, 31 Jan 2024 07:03:04 GMT","status":"HTTP/2 200 ","via":"1.1 0d9967d47f7c7fae8db89ba489f42356.cloudfront.net (CloudFront), 1.1 bcafd6d18f872a34f793854d3fb920f0.cloudfront.net (CloudFront)","x-amz-apigw-id":"SZKKHFDjPHcEEmQ=","x-amz-cf-id":"ZHvP9ZrT1Dq6ulsD8jNN95di5IpTnuLIIuqGtjhzze0nlvnl2oMOMg==","x-amz-cf-pop":["MEL50-C2","PER50-C1"],"x-amzn-remapped-content-length":"812","x-amzn-requestid":"5dc12a19-09ed-4976-847f-38788be6959c","x-amzn-trace-id":"Root=1-65b9f0a6-5248102a30079c277afae040","x-app-name":"daily","x-app-version":"v2.5.5","x-archive-time":"1.495","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.006","x-process-time":"0.17","x-service-time":"1.672"},"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-01-31 07:03:04 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=nasapower420","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":"Wed, 31 Jan 2024 22:18:30 GMT","status":"HTTP/2 200 ","via":"1.1 501c140df6d0c432555774cc24a4e778.cloudfront.net (CloudFront), 1.1 7a63b6d9f3bdd00d23ee90227348af86.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQQSFs2PHcEUFA=","x-amz-cf-id":"zqUN50YEY9hxoU0kmU2_CnjIvmNJyVEpxWTQF5pQPZ8CHcePpPIcrQ==","x-amz-cf-pop":["CGK51-P3","PER50-C1"],"x-amzn-remapped-content-length":"812","x-amzn-requestid":"9372f01d-5693-4b8c-b433-787fc2cab2d9","x-amzn-trace-id":"Root=1-65bac734-7c1e23b529848d8063942d6c","x-app-name":"daily","x-app-version":"v2.5.6","x-archive-time":"1.506","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.006","x-process-time":"0.16","x-service-time":"1.674"},"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-01-31 22:18:30 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 3879e79b..99289072 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=nasapower420","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":"Wed, 31 Jan 2024 07:03:14 GMT","status":"HTTP/2 200 ","via":"1.1 e303aca6dac0332bf61b6c735c629988.cloudfront.net (CloudFront), 1.1 bcafd6d18f872a34f793854d3fb920f0.cloudfront.net (CloudFront)","x-amz-apigw-id":"SZKLrFZMPHcEQ7g=","x-amz-cf-id":"ZCN-LRxPUWA_X9gBL832JToZvAMkXRDiU0u-dhZ_K8YWhRBQ8U0rpA==","x-amz-cf-pop":["MEL50-C2","PER50-C1"],"x-amzn-remapped-content-length":"763","x-amzn-requestid":"ccde7493-a67c-4634-bb26-9e191ef8e06e","x-amzn-trace-id":"Root=1-65b9f0b0-67df646e34e518fd48dbb32a","x-app-name":"daily","x-app-version":"v2.5.5","x-archive-time":"1.392","x-cache":"Miss from cloudfront","x-data-sources":"power,merra2","x-objects-time":"0.007","x-process-time":"0.16","x-service-time":"1.56"},"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-01-31 07:03:14 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=nasapower420","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":"Wed, 31 Jan 2024 22:18:44 GMT","status":"HTTP/2 200 ","via":"1.1 9b976d0fbed47be47913c4020b845832.cloudfront.net (CloudFront), 1.1 7a63b6d9f3bdd00d23ee90227348af86.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQSlHxWPHcEFMg=","x-amz-cf-id":"3tsKy3P8HyeHUFdPrV6cvsNkNEo29urE_o399L6p9qTNFOzIqFkHig==","x-amz-cf-pop":["CGK51-P3","PER50-C1"],"x-amzn-remapped-content-length":"763","x-amzn-requestid":"b166224a-eba8-4335-837c-2d3b54acc455","x-amzn-trace-id":"Root=1-65bac743-032652ec596842c815ad9f6f","x-app-name":"daily","x-app-version":"v2.5.6","x-archive-time":"1.301","x-cache":"Miss from cloudfront","x-data-sources":"power,merra2","x-objects-time":"0.021","x-process-time":"0.14","x-service-time":"1.463"},"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-01-31 22:18:49 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 6e892fb7..b079b4c7 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=nasapower420","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":"Wed, 31 Jan 2024 07:03:12 GMT","status":"HTTP/2 200 ","via":"1.1 1b96d3353bf60eaa42f8e25813c6c660.cloudfront.net (CloudFront), 1.1 bcafd6d18f872a34f793854d3fb920f0.cloudfront.net (CloudFront)","x-amz-apigw-id":"SZKLVHgOvHcECaA=","x-amz-cf-id":"lI4_h5oXdyJST78bgxi6_y6hvIcPPpR5HC_wDxP_iBd_eZEYoHOoCA==","x-amz-cf-pop":["MEL50-C2","PER50-C1"],"x-amzn-remapped-content-length":"762","x-amzn-requestid":"7c3a33a7-de5c-4e2e-87d0-7674e357dfb8","x-amzn-trace-id":"Root=1-65b9f0ae-67d3115e1cc4bdaf4abfa026","x-app-name":"daily","x-app-version":"v2.5.5","x-archive-time":"1.184","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.008","x-process-time":"0.22","x-service-time":"1.413"},"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-01-31 07:03:12 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=nasapower420","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":"Wed, 31 Jan 2024 22:18:40 GMT","status":"HTTP/2 200 ","via":"1.1 d9a5d98870d6ba90045546d99834b7f0.cloudfront.net (CloudFront), 1.1 7a63b6d9f3bdd00d23ee90227348af86.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQR0HPSvHcEBLw=","x-amz-cf-id":"vvZEC8AmqEryshcM_3rPav_RMFaUAd1igLwpUTA2JWsknzrT6JS16A==","x-amz-cf-pop":["CGK51-P3","PER50-C1"],"x-amzn-remapped-content-length":"762","x-amzn-requestid":"7ab7a814-e321-4785-9d4c-713c8a4320a0","x-amzn-trace-id":"Root=1-65bac73e-3d1cca6c4348a85d54a68edd","x-app-name":"daily","x-app-version":"v2.5.6","x-archive-time":"1.543","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.024","x-process-time":"0.14","x-service-time":"1.708"},"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-01-31 22:18:42 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..b12aa948 --- /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":"Wed, 31 Jan 2024 22:18:28 GMT","etag":"329c994ab0bc6c16aef9e44f75e5dcf2","last-modified":"Thu, 11 Jan 2024 19:47:31 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 428e2a08293137149f3e5137ec4cd472.cloudfront.net (CloudFront), 1.1 428e2a08293137149f3e5137ec4cd472.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQQQGifvHcEvtA=","x-amz-cf-id":"RmyLKQwYT5AaFBwBEMF55IcvAP_0-GfKTqg_l3XinyX734vCoIIQ_g==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"111516","x-amzn-requestid":"ce110296-a9f4-4ad1-9a9a-26587d75d474","x-amzn-trace-id":"Root=1-65bac734-79b4c71e0154fcab17b485d5","x-app-name":"manager","x-app-version":"v2.5.2","x-cache":"Miss from cloudfront","x-service-time":"0.014"},"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-01-31 22:18:29 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..f5beaeaa --- /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":"Wed, 31 Jan 2024 22:18:29 GMT","etag":"073e8192fa468882ba1aad2afa33f66a","last-modified":"Wed, 08 Mar 2023 16:20:49 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 f89d4b53f2f24a3703da95e533ae2486.cloudfront.net (CloudFront), 1.1 428e2a08293137149f3e5137ec4cd472.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQQaHR9PHcEfNg=","x-amz-cf-id":"f0bKjpMeCjCvnPJHwwsmcOxK_Gh-U0vhhf2_POM7vqNgsJJx9UmHuw==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"4528","x-amzn-requestid":"09bfb76a-d346-4195-9e22-70be82b00357","x-amzn-trace-id":"Root=1-65bac735-053429f921edf2d4555d2414","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-01-31 22:18:29 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..3b6a11d8 --- /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=nasapower420","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":"Wed, 31 Jan 2024 22:18:28 GMT","status":"HTTP/2 200 ","via":"1.1 083fb2b4f77e5dcc3d691069587a1b24.cloudfront.net (CloudFront), 1.1 31b035e6d265fbd1b644fdf9d0b7993c.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQQQF5kvHcEasQ=","x-amz-cf-id":"ZwoM8aWTxhFTDoju-opzPRx_jN2M5-hK3aCzo6VndqkAfhrDVVolwQ==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"260","x-amzn-requestid":"11d4b125-c020-4d1f-bd87-c634743b641b","x-amzn-trace-id":"Root=1-65bac734-6e8db1800269d84b7397581b","x-app-name":"manager","x-app-version":"v2.5.2","x-cache":"Miss from cloudfront","x-service-time":"0.037"},"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-01-31 22:18:28 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 index 364be7f9..31a5ff96 100644 --- a/tests/fixtures/query_surfaces_all.json +++ b/tests/fixtures/query_surfaces_all.json @@ -1 +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":"Wed, 31 Jan 2024 11:59:46 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 428e2a08293137149f3e5137ec4cd472.cloudfront.net (CloudFront), 1.1 53c50678e40ac01e17221f5619420630.cloudfront.net (CloudFront)","x-amz-apigw-id":"SZ1oAGIZvHcEv1A=","x-amz-cf-id":"pJIKjvmHvVGF3DnzsDQoQX0Ax5yFF_SRu7aQKdr7H95VwMeUpdADIA==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"5001","x-amzn-requestid":"0fd5d202-1b38-4dcb-b7b9-03c8c367fa91","x-amzn-trace-id":"Root=1-65ba3632-5b5a10cd07ba410e4f4a77d1","x-app-name":"manager","x-app-version":"v2.5.1","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-01-31 11:59:47 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} +{"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":"Wed, 31 Jan 2024 22:18:28 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 31b035e6d265fbd1b644fdf9d0b7993c.cloudfront.net (CloudFront), 1.1 53c50678e40ac01e17221f5619420630.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQQQHBbPHcEBlA=","x-amz-cf-id":"fEoqsB682KAC-k9mWtHWGmfEQCJ-xtG06QX3SpSh_34x_v4lL_eBBQ==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"5001","x-amzn-requestid":"d446f0bf-2629-4137-8031-e7c4929841c1","x-amzn-trace-id":"Root=1-65bac734-3e5dc74952966d790b29cdae","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-01-31 22:18:28 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 index b070db90..e8c38074 100644 --- a/tests/fixtures/query_surfaces_seaice.json +++ b/tests/fixtures/query_surfaces_seaice.json @@ -1 +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":"Wed, 31 Jan 2024 12:00:02 GMT","status":"HTTP/2 200 ","via":"1.1 428e2a08293137149f3e5137ec4cd472.cloudfront.net (CloudFront), 1.1 1cfb7ce7b17aec05ed3d7cd725b078c2.cloudfront.net (CloudFront)","x-amz-apigw-id":"SZ1qeElNPHcEHZg=","x-amz-cf-id":"LaV-bysigK2KxfOw2y5na4vU0rgXe3_CyVq33DhB5gcl3WyDCzWwXQ==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"257","x-amzn-requestid":"e1753500-9432-4401-91b5-313855669875","x-amzn-trace-id":"Root=1-65ba3642-6c3fcd360dee06d14229d281","x-app-name":"manager","x-app-version":"v2.5.1","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-01-31 12:00:02 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} +{"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":"Wed, 31 Jan 2024 22:18:29 GMT","status":"HTTP/2 200 ","via":"1.1 bcafd6d18f872a34f793854d3fb920f0.cloudfront.net (CloudFront), 1.1 53c50678e40ac01e17221f5619420630.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQQXFJcPHcEctA=","x-amz-cf-id":"MhKLQe8SJBpExXs0gVp83RdjpLZiLDsW3YShcXCAtSwKyESfys65GA==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"257","x-amzn-requestid":"1c9d5a3d-7d33-429b-934e-c8e23fb2bef2","x-amzn-trace-id":"Root=1-65bac735-72cbe623707258e235ca8f94","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-01-31 22:18:29 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} diff --git a/tests/testthat/test-get_power.R b/tests/testthat/test-get_power.R index 06fe357f..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( @@ -491,7 +493,6 @@ test_that("get_power() stops if lonlat = is invalid for climatology", { ) }) - test_that("Only 20 pars are allowed when `temporal_api` != climatology", { pars <- c( "Z0M", @@ -519,5 +520,18 @@ test_that("Only 20 pars are allowed when `temporal_api` != climatology", { ) temporal_api <- "daily" lonlat <- c(-179.5, -89.5) - expect_error(get_power(pars, community = "ag", temporal_api)) + 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 e67c9dd8..a4447ab6 100644 --- a/tests/testthat/test-internal_functions.R +++ b/tests/testthat/test-internal_functions.R @@ -521,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 557aada8..f1e5278e 100644 --- a/tests/testthat/test-query_parameters.R +++ b/tests/testthat/test-query_parameters.R @@ -15,12 +15,10 @@ test_that("query_parameters() returns proper list of info", { test_that("query_parameters() returns list of parameter information", { skip_if_offline() - vcr::use_cassette("query_parameters_all", { - par_query <- query_parameters(pars = "T2M") - expect_type(par_query, "list") - expect_length(par_query, 1) - expect_named(par_query, "T2M") - }) + 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() stops if par and community only supplied", { @@ -46,3 +44,27 @@ test_that("query_parameters() stops if metadata is not Boolean", { ) ) }) + +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 index 47b3e758..e7fb2399 100644 --- a/tests/testthat/test-query_surfaces.R +++ b/tests/testthat/test-query_surfaces.R @@ -31,7 +31,7 @@ test_that("query_surfaces() returns proper list of info", { }) }) -test_that("query_surfaces() returns list of parameter information", { +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") From c069b9d59e84a4fcb8a732467939ac8bebf023e3 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Thu, 1 Feb 2024 11:51:50 +0800 Subject: [PATCH 27/43] skip tests on CRAN --- tests/testthat.R | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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") +} From 7c9d98dbcb2870ab3d25eba0cec401aeb6e654d9 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Thu, 1 Feb 2024 11:52:45 +0800 Subject: [PATCH 28/43] Update user agent string for POWER API to 'nasapower4r' --- R/get_power.R | 2 +- R/internal_functions.R | 21 ------------------- R/query_parameters.R | 4 ++-- tests/fixtures/adjusted_air_pressure.json | 2 +- tests/fixtures/adjusted_wind_elevation.json | 2 +- tests/fixtures/climatology_ag_point.json | 2 +- tests/fixtures/daily_ag_point.json | 2 +- tests/fixtures/daily_sb_point_LST.json | 2 +- tests/fixtures/daily_sb_point_UTC.json | 2 +- tests/fixtures/query_groupings.json | 2 +- tests/fixtures/query_groupings_global.json | 2 +- .../query_parameters_comm&temporal_api.json | 2 +- tests/fixtures/query_surfaces_all.json | 2 +- tests/fixtures/query_surfaces_seaice.json | 2 +- 14 files changed, 14 insertions(+), 35 deletions(-) diff --git a/R/get_power.R b/R/get_power.R index e0ffa5a4..9d621149 100644 --- a/R/get_power.R +++ b/R/get_power.R @@ -649,7 +649,7 @@ get_power <- function(community = c("ag", "r", "sb"), wind_elevation, wind_surface, time_standard) { - user_agent <- .create_ua_string() + user_agent <- "nasapower4r" if (lonlat_identifier$identifier == "point") { query_list <- list( diff --git a/R/internal_functions.R b/R/internal_functions.R index a6112bc3..5dd3bbda 100644 --- a/R/internal_functions.R +++ b/R/internal_functions.R @@ -185,24 +185,3 @@ # parse response return(response) } - -#' Create User Agent String -#' -#' Creates a user agent string to pass along to the API -#' -#' @example -#' .create_ua_string() -#' -#' @return a string with a value of \dQuote{nasapower} and the package version -#' number with no \dQuote{.} in it. -#' @keywords Internal -#' @noRd - -.create_ua_string <- function() { - sprintf("nasapower%s", - gsub( - pattern = "\\.", - replacement = "", - x = getNamespaceVersion("nasapower") - )) -} diff --git a/R/query_parameters.R b/R/query_parameters.R index eb3e88e7..28ac4a69 100644 --- a/R/query_parameters.R +++ b/R/query_parameters.R @@ -93,7 +93,7 @@ query_parameters <- function(community = NULL, if (is.null(community) && is.null(temporal_api)) { return(jsonlite::fromJSON(sprintf( - "%s/%s?user=%s", power_url, pars, .create_ua_string() + "%s/%s?user=nasapower4r", power_url, pars ))) } else { @@ -110,7 +110,7 @@ query_parameters <- function(community = NULL, parameters = pars, temporal = temporal_api, metadata = metadata, - user = .create_ua_string() + user = "nasapower4r" ) query_list <- query_list[lengths(query_list) != 0] diff --git a/tests/fixtures/adjusted_air_pressure.json b/tests/fixtures/adjusted_air_pressure.json index 4d28c991..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=nasapower420","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":"Wed, 31 Jan 2024 22:18:33 GMT","status":"HTTP/2 200 ","via":"1.1 14e3bcb62e3b58982c2bf9870a7cdc98.cloudfront.net (CloudFront), 1.1 7a63b6d9f3bdd00d23ee90227348af86.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQQvHzjvHcEiAQ=","x-amz-cf-id":"CI0wuA_f0BTNRgqCJVusp9Y49yT57jloiD75qUmmDjomxY6ynykTpg==","x-amz-cf-pop":["CGK51-P3","PER50-C1"],"x-amzn-remapped-content-length":"912","x-amzn-requestid":"ada5122c-48e8-455d-b81c-3f61906e7ac4","x-amzn-trace-id":"Root=1-65bac737-70f33bc80175a2d30d8203e2","x-app-name":"daily","x-app-version":"v2.5.6","x-archive-time":"1.226","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.003","x-process-time":"0.17","x-service-time":"1.4"},"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-01-31 22:18:33 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 5cd2c868..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=nasapower420","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":"Wed, 31 Jan 2024 22:18:36 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 c58f23d83eba9cb7f0fa30f4d356a58a.cloudfront.net (CloudFront), 1.1 7a63b6d9f3bdd00d23ee90227348af86.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQRLFCcPHcEkGQ=","x-amz-cf-id":"tydIFImKq_Bu3J60iA3zV3qMuJE2avcmu8SODhtsiI_WJ4iFW0fWJw==","x-amz-cf-pop":["CGK51-P3","PER50-C1"],"x-amzn-remapped-content-length":"1024","x-amzn-requestid":"5ac467a8-b3f4-4ce1-94b4-13cb84ca02ae","x-amzn-trace-id":"Root=1-65bac73a-61d199467ff72bfc660233d0","x-app-name":"daily","x-app-version":"v2.5.6","x-archive-time":"1.516","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.027","x-process-time":"0.19","x-service-time":"1.734"},"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-01-31 22:18:37 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 f05e630f..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=nasapower420","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":"Wed, 31 Jan 2024 22:18:56 GMT","status":"HTTP/2 200 ","via":"1.1 b7c5a00d3611645b9093c7e6a46c76fe.cloudfront.net (CloudFront), 1.1 7a63b6d9f3bdd00d23ee90227348af86.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQUEGIAvHcEhqg=","x-amz-cf-id":"D_grF_IrgVlh6AEvBNSiLPofPDMfSuZsnlQVBPNPScukU__J0xYVGQ==","x-amz-cf-pop":["CGK51-P3","PER50-C1"],"x-amzn-remapped-content-length":"663","x-amzn-requestid":"dd1820ad-e958-4585-8a65-b4cd121ca37a","x-amzn-trace-id":"Root=1-65bac74c-3fea2b99261daa2b7a817c07","x-app-name":"climatology","x-app-version":"v2.5.8","x-archive-time":"3.519","x-cache":"Miss from cloudfront","x-data-sources":"merra2","x-objects-time":"0.013","x-process-time":"0.19","x-service-time":"3.723"},"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-01-31 22:18:57 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 85ff8ac1..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=nasapower420","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":"Wed, 31 Jan 2024 22:18:30 GMT","status":"HTTP/2 200 ","via":"1.1 501c140df6d0c432555774cc24a4e778.cloudfront.net (CloudFront), 1.1 7a63b6d9f3bdd00d23ee90227348af86.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQQSFs2PHcEUFA=","x-amz-cf-id":"zqUN50YEY9hxoU0kmU2_CnjIvmNJyVEpxWTQF5pQPZ8CHcePpPIcrQ==","x-amz-cf-pop":["CGK51-P3","PER50-C1"],"x-amzn-remapped-content-length":"812","x-amzn-requestid":"9372f01d-5693-4b8c-b433-787fc2cab2d9","x-amzn-trace-id":"Root=1-65bac734-7c1e23b529848d8063942d6c","x-app-name":"daily","x-app-version":"v2.5.6","x-archive-time":"1.506","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.006","x-process-time":"0.16","x-service-time":"1.674"},"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-01-31 22:18:30 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 99289072..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=nasapower420","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":"Wed, 31 Jan 2024 22:18:44 GMT","status":"HTTP/2 200 ","via":"1.1 9b976d0fbed47be47913c4020b845832.cloudfront.net (CloudFront), 1.1 7a63b6d9f3bdd00d23ee90227348af86.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQSlHxWPHcEFMg=","x-amz-cf-id":"3tsKy3P8HyeHUFdPrV6cvsNkNEo29urE_o399L6p9qTNFOzIqFkHig==","x-amz-cf-pop":["CGK51-P3","PER50-C1"],"x-amzn-remapped-content-length":"763","x-amzn-requestid":"b166224a-eba8-4335-837c-2d3b54acc455","x-amzn-trace-id":"Root=1-65bac743-032652ec596842c815ad9f6f","x-app-name":"daily","x-app-version":"v2.5.6","x-archive-time":"1.301","x-cache":"Miss from cloudfront","x-data-sources":"power,merra2","x-objects-time":"0.021","x-process-time":"0.14","x-service-time":"1.463"},"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-01-31 22:18: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&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 b079b4c7..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=nasapower420","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":"Wed, 31 Jan 2024 22:18:40 GMT","status":"HTTP/2 200 ","via":"1.1 d9a5d98870d6ba90045546d99834b7f0.cloudfront.net (CloudFront), 1.1 7a63b6d9f3bdd00d23ee90227348af86.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQR0HPSvHcEBLw=","x-amz-cf-id":"vvZEC8AmqEryshcM_3rPav_RMFaUAd1igLwpUTA2JWsknzrT6JS16A==","x-amz-cf-pop":["CGK51-P3","PER50-C1"],"x-amzn-remapped-content-length":"762","x-amzn-requestid":"7ab7a814-e321-4785-9d4c-713c8a4320a0","x-amzn-trace-id":"Root=1-65bac73e-3d1cca6c4348a85d54a68edd","x-app-name":"daily","x-app-version":"v2.5.6","x-archive-time":"1.543","x-cache":"Miss from cloudfront","x-data-sources":"merra2,power","x-objects-time":"0.024","x-process-time":"0.14","x-service-time":"1.708"},"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-01-31 22:18:42 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 index b12aa948..7f6c99a3 100644 --- a/tests/fixtures/query_groupings.json +++ b/tests/fixtures/query_groupings.json @@ -1 +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":"Wed, 31 Jan 2024 22:18:28 GMT","etag":"329c994ab0bc6c16aef9e44f75e5dcf2","last-modified":"Thu, 11 Jan 2024 19:47:31 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 428e2a08293137149f3e5137ec4cd472.cloudfront.net (CloudFront), 1.1 428e2a08293137149f3e5137ec4cd472.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQQQGifvHcEvtA=","x-amz-cf-id":"RmyLKQwYT5AaFBwBEMF55IcvAP_0-GfKTqg_l3XinyX734vCoIIQ_g==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"111516","x-amzn-requestid":"ce110296-a9f4-4ad1-9a9a-26587d75d474","x-amzn-trace-id":"Root=1-65bac734-79b4c71e0154fcab17b485d5","x-app-name":"manager","x-app-version":"v2.5.2","x-cache":"Miss from cloudfront","x-service-time":"0.014"},"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-01-31 22:18:29 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} +{"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 index f5beaeaa..dec8e3a7 100644 --- a/tests/fixtures/query_groupings_global.json +++ b/tests/fixtures/query_groupings_global.json @@ -1 +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":"Wed, 31 Jan 2024 22:18:29 GMT","etag":"073e8192fa468882ba1aad2afa33f66a","last-modified":"Wed, 08 Mar 2023 16:20:49 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 f89d4b53f2f24a3703da95e533ae2486.cloudfront.net (CloudFront), 1.1 428e2a08293137149f3e5137ec4cd472.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQQaHR9PHcEfNg=","x-amz-cf-id":"f0bKjpMeCjCvnPJHwwsmcOxK_Gh-U0vhhf2_POM7vqNgsJJx9UmHuw==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"4528","x-amzn-requestid":"09bfb76a-d346-4195-9e22-70be82b00357","x-amzn-trace-id":"Root=1-65bac735-053429f921edf2d4555d2414","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-01-31 22:18:29 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} +{"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 index 3b6a11d8..cb28c28a 100644 --- a/tests/fixtures/query_parameters_comm&temporal_api.json +++ b/tests/fixtures/query_parameters_comm&temporal_api.json @@ -1 +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=nasapower420","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":"Wed, 31 Jan 2024 22:18:28 GMT","status":"HTTP/2 200 ","via":"1.1 083fb2b4f77e5dcc3d691069587a1b24.cloudfront.net (CloudFront), 1.1 31b035e6d265fbd1b644fdf9d0b7993c.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQQQF5kvHcEasQ=","x-amz-cf-id":"ZwoM8aWTxhFTDoju-opzPRx_jN2M5-hK3aCzo6VndqkAfhrDVVolwQ==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"260","x-amzn-requestid":"11d4b125-c020-4d1f-bd87-c634743b641b","x-amzn-trace-id":"Root=1-65bac734-6e8db1800269d84b7397581b","x-app-name":"manager","x-app-version":"v2.5.2","x-cache":"Miss from cloudfront","x-service-time":"0.037"},"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-01-31 22:18:28 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} +{"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 index 31a5ff96..62942418 100644 --- a/tests/fixtures/query_surfaces_all.json +++ b/tests/fixtures/query_surfaces_all.json @@ -1 +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":"Wed, 31 Jan 2024 22:18:28 GMT","status":"HTTP/2 200 ","vary":"Accept-Encoding","via":"1.1 31b035e6d265fbd1b644fdf9d0b7993c.cloudfront.net (CloudFront), 1.1 53c50678e40ac01e17221f5619420630.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQQQHBbPHcEBlA=","x-amz-cf-id":"fEoqsB682KAC-k9mWtHWGmfEQCJ-xtG06QX3SpSh_34x_v4lL_eBBQ==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"5001","x-amzn-requestid":"d446f0bf-2629-4137-8031-e7c4929841c1","x-amzn-trace-id":"Root=1-65bac734-3e5dc74952966d790b29cdae","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-01-31 22:18:28 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} +{"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 index e8c38074..2aa3f113 100644 --- a/tests/fixtures/query_surfaces_seaice.json +++ b/tests/fixtures/query_surfaces_seaice.json @@ -1 +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":"Wed, 31 Jan 2024 22:18:29 GMT","status":"HTTP/2 200 ","via":"1.1 bcafd6d18f872a34f793854d3fb920f0.cloudfront.net (CloudFront), 1.1 53c50678e40ac01e17221f5619420630.cloudfront.net (CloudFront)","x-amz-apigw-id":"SbQQXFJcPHcEctA=","x-amz-cf-id":"MhKLQe8SJBpExXs0gVp83RdjpLZiLDsW3YShcXCAtSwKyESfys65GA==","x-amz-cf-pop":["PER50-C1","PER50-C1"],"x-amzn-remapped-content-length":"257","x-amzn-requestid":"1c9d5a3d-7d33-429b-934e-c8e23fb2bef2","x-amzn-trace-id":"Root=1-65bac735-72cbe623707258e235ca8f94","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-01-31 22:18:29 GMT","recorded_with":"vcr/1.2.2, webmockr/0.9.0"}]} +{"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"}]} From 939a289b4f60df62c0ef5cd6090242214686ce35 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Thu, 1 Feb 2024 11:53:15 +0800 Subject: [PATCH 29/43] Update NEWS.md to reflect changes in user agent string --- NEWS.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 23ce2d30..00bbe7c2 100755 --- a/NEWS.md +++ b/NEWS.md @@ -8,7 +8,11 @@ * `query_parameters` now allows you to retrieve rich metadata for the parameters. -* Error, warning and other informational messages are now all formatted with {r-lib/cli} for more attractive and informative messages. +* 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 From a8b0ffb853dc017b07fa95e84305cb55bce4b01a Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Thu, 1 Feb 2024 12:05:05 +0800 Subject: [PATCH 30/43] Update NEWS.md with changes for new release --- NEWS.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index 00bbe7c2..43169e33 100755 --- a/NEWS.md +++ b/NEWS.md @@ -2,8 +2,9 @@ ## Minor Changes -* New functions: +* 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. @@ -16,8 +17,6 @@ Doing so breaks tests in packages relying on {nasapower} due to incompatibilitie ## Bug fixes -* Fixes bug in user agent string that may have incorrectly reported the version number to the POWER team at NASA. - * 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. From c345e6bb7c46416f6d396adb921ecba7289b274b Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Thu, 1 Feb 2024 12:06:16 +0800 Subject: [PATCH 31/43] Update codemeta.json --- codemeta.json | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/codemeta.json b/codemeta.json index fc2e8934..75ca410b 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": "526.785KB", "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" }, From b83c2d550c00d2bd6ded66f35b0e02cc174c2474 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Thu, 1 Feb 2024 12:06:27 +0800 Subject: [PATCH 32/43] Update revdep checks --- revdep/README.md | 56 +++++++++++++++++++++++++--------------------- revdep/cran.md | 10 ++++++++- revdep/problems.md | 40 ++++++++++++++++++++++++++++++++- 3 files changed, 79 insertions(+), 27 deletions(-) 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 + ``` + From 79f9e71afdbe41b43b52382b72c65f2f3c9d4f6b Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Thu, 1 Feb 2024 13:20:23 +0800 Subject: [PATCH 33/43] update cran-comments --- cran-comments.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cran-comments.md b/cran-comments.md index a51917e3..e5e914a6 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 From f1d6d5b7a535aa5c7d4b86a18549134621ed7c12 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Thu, 1 Feb 2024 15:20:23 +0800 Subject: [PATCH 34/43] Add missing "," --- NEWS.md | 2 +- codemeta.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 43169e33..87a2090b 100755 --- a/NEWS.md +++ b/NEWS.md @@ -12,7 +12,7 @@ * 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. +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 diff --git a/codemeta.json b/codemeta.json index 75ca410b..c47407e0 100644 --- a/codemeta.json +++ b/codemeta.json @@ -251,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": "526.785KB", + "fileSize": "526.786KB", "citation": [ { "@type": "SoftwareSourceCode", From c413110b2cae4f6ebe2ae1afd3e0ba42fe892e18 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Thu, 1 Feb 2024 15:52:18 +0800 Subject: [PATCH 35/43] Redocument to use proper "re" for community --- R/get_power.R | 2 +- man/get_power.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/get_power.R b/R/get_power.R index 9d621149..502c087a 100644 --- a/R/get_power.R +++ b/R/get_power.R @@ -191,7 +191,7 @@ #' @author Adam H. Sparks \email{adamhsparks@@gmail.com} #' #' @export -get_power <- function(community = c("ag", "r", "sb"), +get_power <- function(community = c("ag", "re", "sb"), pars, temporal_api = c("daily", "monthly", diff --git a/man/get_power.Rd b/man/get_power.Rd index 5266fc12..2b1b5753 100644 --- a/man/get_power.Rd +++ b/man/get_power.Rd @@ -5,7 +5,7 @@ \title{Get NASA POWER Data From the POWER API} \usage{ get_power( - community = c("ag", "r", "sb"), + community = c("ag", "re", "sb"), pars, temporal_api = c("daily", "monthly", "hourly", "climatology"), lonlat, From eea8e47f65f8c74057660cb81cf2ec46447854c5 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Thu, 1 Feb 2024 15:54:46 +0800 Subject: [PATCH 36/43] Update vignette to match current functionality --- vignettes/nasapower.Rmd | 1668 +--------------------------------- vignettes/nasapower.Rmd.orig | 11 +- 2 files changed, 20 insertions(+), 1659 deletions(-) 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. From d0c04c4a632b69038d4455cf7a80603b4f1ed8d0 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Thu, 1 Feb 2024 15:56:45 +0800 Subject: [PATCH 37/43] Update WORDLIST --- inst/WORDLIST | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 From 81447a684c0cfaf3d31fa1d0e93487b35429deb9 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Thu, 1 Feb 2024 15:57:17 +0800 Subject: [PATCH 38/43] Update codemeta.json --- codemeta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codemeta.json b/codemeta.json index c47407e0..e8e6cbe5 100644 --- a/codemeta.json +++ b/codemeta.json @@ -251,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": "526.786KB", + "fileSize": "496.934KB", "citation": [ { "@type": "SoftwareSourceCode", From c15402b39988251f06f9744dedbb076a2e5296f3 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Thu, 1 Feb 2024 15:58:18 +0800 Subject: [PATCH 39/43] Remove "x" from informational message, not a stop --- R/get_power.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/get_power.R b/R/get_power.R index 502c087a..fe0349e5 100644 --- a/R/get_power.R +++ b/R/get_power.R @@ -243,7 +243,7 @@ get_power <- function(community = c("ag", "re", "sb"), if (length(lonlat) > 2 && !is.null(wind_elevation)) { cli::cli_inform( c( - x = "You have provided {.arg wind_elevation}, {.var {wind_elevation}}, + "You have provided {.arg wind_elevation}, {.var {wind_elevation}}, for a region request.", i = "The {.arg wind_elevation} value will be ignored." ) From 360c8813565a0f10cba3499cb934da2a71b1b516 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Thu, 1 Feb 2024 15:58:48 +0800 Subject: [PATCH 40/43] update codemeta.json --- codemeta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codemeta.json b/codemeta.json index e8e6cbe5..341f827b 100644 --- a/codemeta.json +++ b/codemeta.json @@ -251,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": "496.934KB", + "fileSize": "496.928KB", "citation": [ { "@type": "SoftwareSourceCode", From ef4440453ed41527b34048966646df2e8efb31e1 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Thu, 1 Feb 2024 22:12:02 +0800 Subject: [PATCH 41/43] update cran-comments.md --- cran-comments.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cran-comments.md b/cran-comments.md index e5e914a6..ab0ae02b 100755 --- a/cran-comments.md +++ b/cran-comments.md @@ -16,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 From 83d44e6b6588d391902cbfcb43a80e0d03de4e28 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Fri, 2 Feb 2024 10:58:30 +0800 Subject: [PATCH 42/43] add CRAN-SUBMISSION --- CRAN-SUBMISSION | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 CRAN-SUBMISSION diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION new file mode 100644 index 00000000..b29e61a6 --- /dev/null +++ b/CRAN-SUBMISSION @@ -0,0 +1,3 @@ +Version: 4.2.0 +Date: 2024-02-02 02:55:25 UTC +SHA: ef4440453ed41527b34048966646df2e8efb31e1 From 543e2bb50a98513c5ca84e88e7db266a9e959279 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Fri, 2 Feb 2024 14:45:51 +0800 Subject: [PATCH 43/43] Delete CRAN-SUBMISSION --- CRAN-SUBMISSION | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 CRAN-SUBMISSION diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION deleted file mode 100644 index b29e61a6..00000000 --- a/CRAN-SUBMISSION +++ /dev/null @@ -1,3 +0,0 @@ -Version: 4.2.0 -Date: 2024-02-02 02:55:25 UTC -SHA: ef4440453ed41527b34048966646df2e8efb31e1