[Gdal-dev] problems warping a netcdf file

Joaquim Luis jluis at ualg.pt
Fri Nov 14 13:51:23 EST 2008


edfialk wrote:
> Hello, I'm fairly new to reprojection and my experience with gdal is limited,
> so I'll do my best to keep up.  I have tried searching through a number of
> messages without finding anything quite like my problem.
> 
> I've been completely unsuccessful trying to reproject a netcdf file for some
> time now and I'm becoming fairly desperate for some help.  I'm going for
> changing "Lambert Conformal with a perfect sphere geoid with earth
> radius=6370km centered at 40N, 97W with standard latitudes at 33N, 45N to
> geographic lat, long (flat) projection."
> 
> First, a little gdal info on one particular subdataset for the netcdf file:
> Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute
> Driver: netCDF/Network Common Data Format
> Size is 148, 112
> Coordinate System is `'
> ...
> ad then coordinates, cdate, ctime, xcent, ycent, etc. etc.  I was wondering
> if NC_Global or the coordinate system being `' might cause a problem.  
> 
> and then, running the command (going to mercator just to get a successful
> reprojection, I'll deal with lat/lon later):
> gdalwarp -s_srs "+proj=lcc" -t_srs "+proj=merc" NETCDF:"test_0910.nc":PM25
> NETCDF:"test_out.nc":PM25
> 
> gives me:
> Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute
> ERROR 1: Unable to compute a transformation between pixel/line
> and georeferenced coordinates for NETCDF:test_0910.nc:PM25.
> There is no affine transformation and no GCPs.

You can try the GMT program grdproject but I warn you already that it might not be obvious.
Also you can try my front end to grdproject in Mirone. It should be easier but again there will
probably be fine details that one need to adjust.

Joaquim Luis


More information about the gdal-dev mailing list