我已从https://esgf-index1.ceda.ac.uk/search/cordex-ceda/下载了欧洲(EUR-44)数据(示例:http://vesg.ipsl.upmc.fr/thredds/fileServer/cordex/output/EUR-44/IPSL-INERIS/IPSL-IPSL-CM5A-MR/rcp85/r1i1p1/IPSL-INERIS-WRF331F/v1/day/tasmin/v20140301/tasmin_EUR-44_MOHC-HadGEM2-ES_historical_r1i1p1_SMHI-RCA4_v1_day_19960101-20001230.nc)。这些是NetCDF文件,需要在R中进行栅格处理。
表示坐标在“旋转极点栅格”中。我尝试了不同的CRS,例如“ https://github.com/r-spatial/sf/issues/651”所示的“ + proj = ob_tran + o_proj = longlat + o_lon_p = -162 + o_lat_p = 39.25 + lon_0 = 180 + to_meter = 0.01745329”,但欧洲不在以下地区的正确位置地球,例如:
library(raster)
library(rworldmap)
crsTest1 = CRS("+proj=ob_tran +o_proj=longlat +o_lon_p=-162 +o_lat_p=39.25 +lon_0=180 +to_meter=0.01745329")
world = getMap()
world <- spTransform(world, crsTest1)
nc.raster <- raster(file.path("download", "tasmin_EUR-44_MOHC-HadGEM2-ES_historical_r1i1p1_SMHI-RCA4_v1_day_19960101-20001230.nc"))
projection(nc.raster) <- crsTest1
plot(world)
plot(nc.raster, add=TRUE, col="blue")