[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20051220: netCDF Unix Build - Extracting data (in ASCII format) from Netcdf
- Subject: 20051220: netCDF Unix Build - Extracting data (in ASCII format) from Netcdf
- Date: Tue, 20 Dec 2005 14:17:43 -0700
>From: "Peter Msikela." <address@hidden>
>Organization: Howard University
>Keywords: 200512202058.jBKKwZQS004067 netCDF ncdump
Hi Peter,
>Institution: Howard University
>Package Version: 3
>Operating System: SunOS
>Hardware Information: SUNW,Ultra-5_10
re:
>Inquiry: Hi ,
>Which is the best way to get an ASCII data from Netcdf data file.In
>other words,if i have a netcdf file( usually contains metadata and data)
>and i want to get only ASCII data not including metadata, what is the
>best way to do that?
The quickest way to extract ASCII representations of data stored in
an netCDF file is to use the netCDF utility 'ncdump'. Here is a
snippit from the 'ncdump' man page:
man ncdump
...
DESCRIPTION
ncdump generates an ASCII representation of a specified
netCDF file on standard output. The ASCII representation is
in a form called CDL (``network Common Data form Language'')
that can be viewed, edited, or serve as input to ncgen.
ncgen is a companion program that can generate a binary
netCDF file from a CDL file. Hence ncgen and ncdump can be
used as inverses to transform the data representation
between binary and ASCII representations. See ncgen for a
description of CDL and netCDF representations.
...
As to what the best way to extract the data is, you could write
a program to extract the data in exactly the manner you want.
I think the best thing to do to start, however, is investigate use
of 'ncdump' to see if can do what you need.
Cheers,
Tom Yoksas
--
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publicly available
through the web. If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.