[ncl-talk] Netcdf to text file

Gus Correa gus at ldeo.columbia.edu
Mon Feb 18 07:58:41 MST 2019


Hi Soma

ncdump (part of the netCDF library) is your friend!
No need for NCL, CDO, or NCO for this.

ncdump -b c foo.nc > foo.cdl (for C-style indexes, starting with 0)
ncdump -b F foo.nc > foo.cdl (for Fortran-style indexes, starting with 1)

This will produce a text file with the whole netCDF structure (file, global
attributes,
dimensions, coordinate variables  and their attributes, and regular
variables and their attributes),
the "cdl" description.

Beware that if your foo.nc file is big, the output text file foo.cdl will
be gigantic.

For more details see "man ncdump".

I hope this helps,
Gus Correa

On Mon, Feb 18, 2019 at 6:34 AM Soma Roy <somaroy892 at gmail.com> wrote:

> Hi,
> How to convert a entire netcdf file to a text file using NCL/CDO?
> Please kindly inform me.
>
> Thanks,
> Soma
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190218/dc8f0c2d/attachment.html>


More information about the ncl-talk mailing list