GDAL does not like 1-dimensional raster bands. WithinThe error message makes sense since the netcdf file, longitudes and latitudes are stored on 1D arrays. The main data is in 2D-tables, but unfortunately X stores tables of different size and Y swappeddimensions. If you run
gdalinfo ssh_grids_v1609_2014122612.nc >out2.txt
Youyou see that there are 5 subdatasets stored inside the file. Alternatively, you can use NASA GISS panoply to investigate the file, and maybe export its tables to CSV. Alternatively
To resize a subdataset, you can use the QGIS Netcdf browser pluginhave to loadrun either:
gdalwarp -of netCDF -ts 480 1080 NETCDF:"ssh_grids_v1609_2014122612.nc":SLA o1.nc
gdal_translate -of netCDF -outsize 480 1080 NETCDF:"ssh_grids_v1609_2014122612.nc":SLA o2.nc
for every dataset you are interested in.
Unfortunately, the X and Y coordinates in the 2D tables as raster (unfortunately still-tables are swapped), and.
You can translate them to tif files with this command line:
gdal_translate -of GTIFF NETCDF:"path/to/ssh_grids_v1609_2014122612"ssh_grids_v1609_2014122612.nc":SLA D:/Karten/netcdf/ssh.tif
the file looks like this:
toTo turn the image to the usual view, you might follow Making QGIS interpret coordinates as long-lat instead of lat-long?
So the full workflow is:
gdal_translate -of VRT NETCDF:"ssh_grids_v1609_2014122612.nc":SLA ssh1.vrt
gdal_translate -of VRT -gcp 0 0 360 -80 -gcp 960 0 360 80 -gcp 0 2160 0 -80 -gcp 960 2160 0 80 ssh1.vrt ssh2.vrt
gdalwarp -r bilinear -t_srs EPSG:4326 ssh2.vrt ssh2.tif
gdal_translate -of VRT -a_ullr 0 80 360 -80 ssh2.tif ssh3.vrt
gdalwarp -t_srs WGS84 ssh3.vrt ssh.tif -wo SOURCE_EXTRA=1000 --config CENTER_LONG 0
to get the right picture:
EDIT
It seems that adding the NETCDF:
prefix and specifying the subdataset name solves the error message you get. This makes sense since the netcdf file stores tables of different size and dimensions.
So if you only want to change the resolution, you can run either of
gdalwarp -of netCDF -ts 480 1080 NETCDF:"ssh_grids_v1609_2014122612.nc":SLA o1.nc
gdal_translate -of netCDF -outsize 480 1080 NETCDF:"ssh_grids_v1609_2014122612.nc":SLA o2.nc
for every dataset you are interested in. The steps above are still necessary, if you want to combine the data with other GIS data when using GDAL-based GIS software.