I tried to project the EURO CORDEX data in R with the PROJ4 string. It is not working anymore (PROJ4 and RDGAL retired). Is there a more recent approach to reproject/transform the EURO CORDEX data in R based on a EPSG code or anything else? I am working with the terra package. Which libraries need to be installed in R and what is the correct command?
The EURO CORDEX data I use is downloaded from the Copernicus Data Storage CDS https://cds.climate.copernicus.eu/cdsapp#!/dataset/projections-cordex-domains-single-levels?tab=doc.
library(terra)
load .nc file
x <- terra::rast(“nc”)
Define projection
crs<-“+proj=ob_tran +o_proj=longlat +o_lon_p=-162 +o_lat_p=39.25 +lon_0=180 +to_meter=0.01745329”
Change projection
y <- project(x, crs)
Error: [project] input raster CRS not set
If I project the raster to another CRS (of a vector data e.g.), the raster data is empty without values.
z <- terra::project(x, crs(ve))
summary(z)
Warnmeldung: [summary] SpatRaster has no values
user243627 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.