Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWS2M not accessible through AG community #32
Comments
|
Hi Daniel, Did you check the availability as provided by NASA? See > library(nasapower)
> parameters$WS2M
$AG_Units
[1] "m/s"
$ICASA
[1] "WIND"
$POWER
[1] "WS2M"
$SB_Units
[1] "m/s"
$SSE_Units
[1] "m/s"
$ascii_format
[1] "%8s" "%8.2f"
$calculated
[1] FALSE
$climatology_definition
[1] "The monthly average of wind speed at 2 meters above the surface of the earth for a given month, averaged for that month over the 30-year period (Jan. 1984 - Dec. 2013)."
$community
[1] "SB" "SSE"
$daily_definition
[1] "The daily average of wind speed at 2 meters above the surface of the earth."
$include
[1] "CLIMATOLOGY" "INTERANNUAL" "DAILY"
$inputs
list()
$interannual_definition
[1] "The monthly average of the wind speed at 2 meters above the surface of the earth."
$json_format
[1] "%.2f"
$longname
[1] "Wind Speed at 2 Meters"
$source
temporal type url xchart
1 daily opendap https://opendap.larc.nasa.gov/opendap/POWER/daily/power_801_daily_ws2m_lst.nc NULL
2 interannual opendap https://opendap.larc.nasa.gov/opendap/POWER/monthly/power_801_monthly_lst.nc NULL
3 climatology opendap https://opendap.larc.nasa.gov/opendap/POWER/climatology/power_801_climatology_1984-2013_lst.nc NULL
xidentifier
1 NULL
2 NULL
3 NULL
$standard_name
[1] "Wind Speed at 2 Meters"
$type
[1] "meteorology"Unfortunately right now I don't think you'll get any response with the shutdown. But once NASA corrects it I can remove the wontfix and update the list. |
|
You could put this at the top of your script. library(nasapower)
parameters$W2SM$community <- c("AG", "SB", "SSE")That should overwrite the in-package list that says it's not available since they do offer AG and ICASA units, that should be OK until NASA fixes it. |
|
Thanks Adam! |
|
Thanks for your understanding, @danielreispereira I'll also contact them since I wrote the package that uses their JSON file. Soon as NASA is back and they fix the issue (assuming they fix it) I can update it and push to CRAN. |
|
Hi Adam, update:
|
|
Sorry, what? The bug is with the application? Meaning is Disagree, see line 5590 here: "AG" does not appear in this JSON file. I use that file to validate their data. This came directly from them. Obviously the API works if my suggestion, |
|
I'm communicating with the POWER team about this. Apparently they didn't intend for this file to actually be used externally. I'm trying to find out from them what the preferred method for validation before sending a request is if not using this file. |
|
I've released v1.0.5 with a "fix" for this. The POWER team apparently do not intend for this JSON file to be used externally. However, upon asking there is no clear guidance from the POWER team about how to validate queries before sending them. So I've implemented the "fix", Hopefully the POWER team can get back to me with a more desirable way of validation if this is not the best way. Until then, this should work. |
|
Thanks for the fix, Adam! |
The code below works, but if I change WS10M for WS2M, it returns an error: