Closed mbjoseph closed 3 years ago
should be good to go! Thanks again @mbjoseph
library(AOI)
library(climateR)
climateR::getMACA(
AOI = AOI::aoi_get(state = "FL"),
model = "CCSM4",
param = 'prcp',
scenario = c('rcp45', 'rcp85'),
startDate = "2080-06-29", endDate = "2080-06-30")
#> $ccsm4_prcp_rcp45_mm
#> class : RasterStack
#> dimensions : 144, 183, 26352, 2 (nrow, ncol, ncell, nlayers)
#> resolution : 0.04165649, 0.04166603 (x, y)
#> extent : -87.63539, -80.01225, 25.04224, 31.04215 (xmin, xmax, ymin, ymax)
#> crs : +proj=longlat +datum=WGS84 +no_defs
#> names : X2080.06.29, X2080.06.30
#> min values : 0, 0
#> max values : 17.49149, 29.23121
#>
#>
#> $ccsm4_prcp_rcp85_mm
#> class : RasterStack
#> dimensions : 144, 183, 26352, 2 (nrow, ncol, ncell, nlayers)
#> resolution : 0.04165649, 0.04166603 (x, y)
#> extent : -87.63539, -80.01225, 25.04224, 31.04215 (xmin, xmax, ymin, ymax)
#> crs : +proj=longlat +datum=WGS84 +no_defs
#> names : X2080.06.29, X2080.06.30
#> min values : 0, 0
#> max values : 23.11818, 30.21123
Created on 2021-01-19 by the reprex package (v0.3.0)
Currently some of the function calls in climateR will raise a warning about
+init=epsg
syntax deprecation, e.g.,Created on 2021-01-15 by the reprex package (v0.3.0)
For MACA, this appears to happen because of this line: https://github.com/mikejohnson51/climateR/blob/9afa270f7ed93d5e87fb171ce94c2a201b29332d/data-raw/grid_meta2.R#L5
Suggested solution
Changing this to the integer value of the EPSG code solves the issue for MACA:
This integer would then get used here: https://github.com/mikejohnson51/climateR/blob/master/R/utility_define_grid.R#L29
The deprecated syntax also shows up for EDDI: https://github.com/mikejohnson51/climateR/blob/9afa270f7ed93d5e87fb171ce94c2a201b29332d/data-raw/grid_meta2.R#L54-L55
I think a fix there might be to use the proj4string like this: