[gdal-dev] How to change variable names in netCDF?

Etienne Tourigny etourigny.dev at gmail.com
Thu Apr 19 07:51:29 EDT 2012


If you use gdal-1.9 the driver will use the variable name from the
original netcdf file (if any).

for example, if you use the following command the original filename
will be preserved.
gdal_translate -of netcdf in.nc out.nc

However, if copying from other formats (such as gtiff), or creating a
new netcdf file, there is no way to change the variable name with
gdal.

You can use other tools such as:
NCO -> nco.sourceforge.net/
cdo ->https://code.zmaw.de/projects/cdo

Etienne

On Thu, Apr 19, 2012 at 5:15 AM,  <blaa_katt at yahoo.co.jp> wrote:
> Hello everybody,
>
> I have a question about netCDF creation.
> I am using GDAL 1.9.0 in python.
>
> Creation Issues in http://www.gdal.org/frmt_netcdf.html mentions
> “each variable array is names Band1, Band2,… ”.
>
> I would like to change the names.
> Can anyone give me ideas?
>
> Thank you for your time.
>
> Kind regards,
>
> Asuka
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list