Skip to main content

20. sea ice output on a basic grid but stored with lonlat arrays ….

  • number: 20
  • opened: 2024-02-01
  • state when archived: open
  • url when archived: https://github.com/rgdal-dev/rasterwise/issues/20
  • archived: 2026-11-06 (authors omitted; email addresses and reply headers redacted; non-ASCII transliterated)

Opening post

The rast object doesn’t have a coord.ref, netcdf is pretty dumb like that.

These people take perfectly good information and absolutely sandblast it out of existence, and xarray has elevated the practice to world-leading expertise …. It’s so dumb.

Sigh, I don’t know how to to really advise you how to figure out how to fix this, but this fixes (it’s the same grid as the NSIDC 25km sea ice):

r <- flip(rast("CS2WFA_25km_201007.nc"), "vertical")
set.ext(r, ext(-3950000, 3950000, -3950000, 4350000))
set.crs(r, "EPSG:3031")
targetgrid <- rast(ext(-180, 180, -90, -50), res = c(0.25, 0.25), crs = "EPSG:4326")
plot(project(r, targetgrid, by_util = TRUE))

CS2WFA_25km_201007.zip