Dear
I am working with Netcdf files of ERA5-Land monthly averaged data https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-land-monthly-means?tab=overview.
I’ve encountered some difficulty in confirming the EPSG code from the ERA5 website. Although the data are indicated as WGS84 (see here ERA5: What is the spatial reference - Copernicus Knowledge Base - ECMWF Confluence Wiki ) I was expecting a clear reference to EPSG 4326.
Indeed the EPSG returned by the CRS function in R is quite strange
[1] "GEOGCRS[\"unknown\",\n DATUM[\"World Geodetic System 1984\",\n ELLIPSOID[\"WGS 84\",6378137,298.257223563,\n LENGTHUNIT[\"metre\",1]],\n ID[\"EPSG\",6326]],\n PRIMEM[\"Greenwich\",0,\n ANGLEUNIT[\"degree\",0.0174532925199433],\n ID[\"EPSG\",8901]],\n CS[ellipsoidal,2],\n AXIS[\"longitude\",east,\n ORDER[1],\n ANGLEUNIT[\"degree\",0.0174532925199433,\n ID[\"EPSG\",9122]]],\n AXIS[\"latitude\",north,\n ORDER[2],\n ANGLEUNIT[\"degree\",0.0174532925199433,\n ID[\"EPSG\",9122]]]]"
I am working on aligning these ERA5 data with a reference raster in WGS 84 EPSG 4326, which has an extent of -90, -180, 90, 180. However, I have noticed a discrepancy between the EPSG and extent of the ERA5 data compared to those of the reference raster.
I understand that the ERA5 data require a transformation because they present longitudes between 0 and 360 degrees, which are typical of global climate models. Therefore, I have rotated the data to fit the standard coordinate system, from -180 to 180 degrees.
After the rotation, I obtained an extent of -180.05, 179.95, -90.05, 90.05, which slightly differs from the standard extent of my reference raster, which is -180, 180, -90, 90.
The main issue remains the EPSG. The ERA5 data are in WGS 84, yet the CRS function in R yields an unusual EPSG. Should I proceed with a reprojection or a bilinear resampling to align the data with my template?
To address this issue, I have performed a bilinear resampling of the ERA5 rasters. After checking some samples, the values seem consistent, which is encouraging, but I would still like to clarify what the correct EPSG should be for the ERA5 data.
My final goal is to work with EPSG 4326. My fundamental question is whether, after rotating the coordinates of the NetCDF file, I should perform a resampling to match the data with EPSG 4326 and the extent of my template, or if it is enough to “correct” the EPSG definition and “force” the extent to be -180, 180, -90, 90. Or maybe I should just “crop” the extent after forcing the EPSG 4326 …
I am confused because in theory the ERA5 should be already in EPSG 4326 and the extent should be -180, 180, -90, 90.
I would like to avoid value alterations due to resampling. I would like to know if there is a way to avoid resampling if possible.
Thank you for your help