Closed mhscott-usgs closed 3 years ago
Hi, Thank you for the comment! This was a recent change (I am actually not sure when it occurred) in some of the THREDDS servers related to the in the orientation of the X and Y variables of the datasets. In the first round of climateR I looked at these and hard coded the results. Needless to say this was a bad idea since a few have since changed. By the end of the week I hope to have a generalized solution up in the package!
Thank you again and hope the package is useful (when the data is correct of course :))
Ok great, thank you very much! I anticipate the package will certainly be useful.
I can confirm the change is coming š I can mimic your results with the GItHuv Install, and get this with the new version:
library(climateR)
library(raster)
#> Warning: package 'raster' was built under R version 4.0.2
#> Loading required package: sp
library(sf)
#> Warning: package 'sf' was built under R version 4.0.2
#> Linking to GEOS 3.8.1, GDAL 3.1.1, PROJ 6.3.1
library(AOI)
AOI = aoi_get(state = "MN")
p = getGridMET(AOI, param = 'tmax', startDate = "2018-11-20")
plot(p$tmax)
plot(st_transform(AOI$geometry, st_crs(p$tmax)), add = TRUE, lwd = 3)
AOI = aoi_get(state = "FL")
p = getGridMET(AOI, param = 'tmax', startDate = "2018-11-20")
plot(p$tmax)
plot(st_transform(AOI$geometry, st_crs(p$tmax)), add = TRUE, lwd = 3)
Created on 2020-10-07 by the reprex package (v0.3.0)
Hi, I wanted to check in and ask whether the package had been updated yet? I tried reinstalling it a few days ago but was still getting the same results as before. Thanks!
Hi @mhscott129 this should all be pushed in the new version 0.0.3. Hope it helps!
I am trying to use the getGridMET function but the coordinates/location identifier seems to be off. I am using simple example code:
AOI = aoi_get(state = "MN") p = getGridMET(AOI, param = c('tmax','tmin'), startDate = "2018-11-20")
r = raster::stack(p$tmax, p$tmin) names(r) = c('tmax', 'tmin') rasterVis::levelplot(r, main=AOI$state_abbr)
For Minnesota, I've attached the output plot (which looks like the bottom part of Texas).
Meanwhile, for Florida, the output looks like it's of the top part of Michigan.
The temperature values are also another indicator of the problem.
When I use getPRISM instead of getGridMET, the location is accurate and the output is fine. Additionally, using getGridMET for data from California seems to work properly as well. Could this be an issue with how the coordinate system used by the GridMET is read into either aoi_get or getGridMET functions? Do you have any solutions on how to get the state name input to match up properly with the physical location of the state?
Thank you for your help!