Closed jhammondusgs closed 1 year ago
Same also appears to be true for "palmer" parameter with Terraclimate data
Hi John,
This seems to be caused by a few issues I still need to write error catches around, but I can explain:
1) The issue with the palmer index from gridMET is on the University of Idaho's end. When we look at their prcp catoloug, it shows that they have 14,770 days archived:
But for the Palmder Index, there are only 1,455 days archived:
These kind of issues will be a little harder to write an error catch for, and I will reach out to them about this.
The issues with the Palmer Index/TerraClim is that they only archive data up to 2017. If you change the endDate to "2017-12-31", it should run fine.
A catch for this was added in the most recent update.
Thanks!
Mike
Thank you so much for getting to this so quickly Mike,
Really enjoying your package!
Best,
John
On Wed, Jun 12, 2019 at 4:04 AM Mike Johnson notifications@github.com wrote:
Hi John,
This seems to be caused by a few issues I still need to write error catches around, but I can explain:
- The issue with the palmer index from gridMET is on the University of Idaho's end. When we look at their prcp catoloug, it shows that they have 14,770 days archived:
[image: image] https://user-images.githubusercontent.com/30052272/59332239-0ed20880-8cf6-11e9-80d7-59349e21dc63.png
But for the Palmder Index, there are only 1,455 days archived:
[image: image] https://user-images.githubusercontent.com/30052272/59332341-4476f180-8cf6-11e9-96fa-39190475a1cb.png
These kind of issues will be a little harder to write an error catch for, and I will reach out to them about this.
The issues with the Palmer Index/TerraClim is that they only archive data up to the current 2017. If you change the endDate to "2017-12-31", it should run fine.
A catch for this was added in the most recent update.
Thanks!
Mike
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mikejohnson51/climateR/issues/7?email_source=notifications&email_token=ALTYA6PES7HVWYHHFDL5X6LP2CUWXA5CNFSM4HXDWRP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXPSYNA#issuecomment-501165108, or mute the thread https://github.com/notifications/unsubscribe-auth/ALTYA6MGHBBWEXNBUZNO7SLP2CUWXANCNFSM4HXDWRPQ .
-- John C. Hammond, PhD Surface water hydrologist U.S. Geological Survey MD-DE-DC Water Science Center 5522 Research Park Drive Baltimore, MD, 21228 443-498-5568
Great! I am glad it's proving useful, please let me know if anything else comes up.
Mike
Hi Mike,
Thanks for your hard work!
I know this one is closed, but I seem to have a similar issue to the one above.
Getting precipitation data for Maryland works just fine:
g = getAOI(state = "md") %>% getGridMET(param = 'pcp', startDate = "2017-06-29")
But trying to get palmer indices from GridMet doesn't seem to work:
g = getAOI(state = "md") %>% getGridMET(param = 'palmer', startDate = "2017-06-29")
Error in { : task 1 failed - "NetCDF: Access failure"
Is it still an issue on University of Idaho's end?
Thanks,
Phillip
Hi Phillip,
For the Palmer Index, this is still a Idaho Server issue. The palmer index has about 1/10th the data stored as the other variables (like prcp). I am not even certain where in the timeline that data fits either. I had forgotten about this issue but will follow up. For now I am re-opening
Hi @jhammondusgs and @pjgoodling,
Sorry for the loooonnnnngggggg wait on this! With the rewrite of this package the following works for both your examples:
library(AOI); library(sf); library(climateR);library(terra)
#> Linking to GEOS 3.11.1, GDAL 3.6.0, PROJ 9.1.1; sf_use_s2() is TRUE
#> Using GDAL version 3.6.0 which was retracted because it cannot write large GPKG files
#> terra 1.7.8
# 10 random points
pts = aoi_get(state = 'CO') %>%
st_sample(10) %>%
st_as_sf()
test <- getGridMET(AOI = pts[1,],
varname = c('pr'),
startDate = "1980-01-01", endDate = "2018-12-31")
plot(test$pr, type = "l")
# Working with PDSI
test <- getGridMET(AOI = pts[1,],
varname = c('pdsi'),
startDate = "1980-01-01", endDate = "2018-12-31")
plot(test$pdsi.y)
g = aoi_get(state = "md") %>%
getGridMET(varname = 'pdsi', startDate = "2017-06-29")
plot(g$category)
plot(g$daily_mean_palmer_drought_severity_index)
Created on 2023-02-15 by the reprex package (v2.0.1)
I hope this rewrite proves useful and that the extra datasets and greater stability prove useful if you are still pursuing these types of data questions!
Mike
Thanks so much!!!! Great work!
On Thu, Feb 16, 2023, 7:26 AM MikeJohnson-NOAA @.***> wrote:
Hi @jhammondusgs https://github.com/jhammondusgs and @pjgoodling https://github.com/pjgoodling,
Sorry for the loooonnnnngggggg wait on this! With the rewrite of this package the following works for both your examples:
library(AOI); library(sf); library(climateR);library(terra)#> Linking to GEOS 3.11.1, GDAL 3.6.0, PROJ 9.1.1; sf_use_s2() is TRUE#> Using GDAL version 3.6.0 which was retracted because it cannot write large GPKG files#> terra 1.7.8
10 random pointspts = aoi_get(state = 'CO') %>%
st_sample(10) %>% st_as_sf() test <- getGridMET(AOI = pts[1,], varname = c('pr'), startDate = "1980-01-01", endDate = "2018-12-31")
plot(test$pr, type = "l")
Working with PDSItest <- getGridMET(AOI = pts[1,],
varname = c('pdsi'), startDate = "1980-01-01", endDate = "2018-12-31")
plot(test$pdsi.y)
g = aoi_get(state = "md") %>% getGridMET(varname = 'pdsi', startDate = "2017-06-29")
plot(g$category)
plot(g$daily_mean_palmer_drought_severity_index)
Created on 2023-02-15 by the reprex package https://reprex.tidyverse.org (v2.0.1)
I hope this rewrite proves useful and that the extra datasets and greater stability prove useful if you are still pursuing these types of data questions!
Mike
— Reply to this email directly, view it on GitHub https://github.com/mikejohnson51/climateR/issues/7#issuecomment-1432590092, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGIFBYVHJR22MONR5KM4ZBLWXXCA5ANCNFSM4HXDWRPQ . You are receiving this because you were mentioned.Message ID: @.***>
AOI = getAOI(state = 'CO') %>% AOI::bbox_st()
Generate Random Points
n = 10 pts = data.frame(lat = runif(n, AOI$ymin, AOI$ymax), lon = runif(n, AOI$xmin, AOI$xmax))
test <- getGridMET(AOI = pts[1,], param = c('prcp'), startDate = "1980-01-01", endDate = "2018-12-31")
test <- getGridMET(AOI = pts[1,], param = c('palmer'), startDate = "1980-01-01", endDate = "2018-12-31")
" Error in { : task 1 failed - "NetCDF: Access failure" "