[GIS] Convert to lat-lon coordinates GDAL

coordinate systemgdallatitude longitude

I have a netCDF file and would like to convert it to LAT-LON coordinates.
1) I do not know the projection in the file but from the website of the data provider, the data is on a polar-stereographic (PS) grid covering North America and adjacent waters with a 10 km resolution at 60 degrees north.
2) How can I project to latlon using a suitable coordinate system for the north pole?

Here is my sample file:

https://www.dropbox.com/s/lgni1s5tgu1sbwh/data.nc?dl=0

Best Answer

The projection looks like it matches this custom entry in http://spatialreference.org:

PROJCS["Stereographic_North_Pole",
    GEOGCS["GCS_Coordinate System imported from GRIB file",
        DATUM["D_unknown",
            SPHEROID["Sphere",6371229,0]],
        PRIMEM["Greenwich",0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Stereographic_North_Pole"],
    PARAMETER["standard_parallel_1",60],
    PARAMETER["central_meridian",249],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["Meter",1]]

http://spatialreference.org/ref/sr-org/8237/

Depending on the software you have at hand, that should be usable in one format or another.

If you want to transform a shapefile in lat-long to this grid system, then try this:

require(rgdal)
target = "+proj=stere +lat_0=90 +lat_ts=60 +lon_0=249 +k=1 +x_0=0 +y_0=0 +a=6371229 +b=6371229 +units=m +no_defs"
shgrid = spTransform(shlatlong, CRS(target))

plot the shgrid object to make sure. You might get problems if the shapefile crosses the dateline or rounds the pole...

Not knowing how you've loaded your netCDF into R, I can't be sure how to crop it, but if its a raster then mask from the raster package probably does the trick.

Related Question