PDA

View Full Version : ncdump


rajeshj
12th February 2005, 10:11 AM
hello one and all,
has anybody done grads? i want to know how 'ncdump' (a way the header of netCDF files are viewed) can be installed in a Linux Machine (FEDORA CORE 2). i down loaded it. tell me about how it is to be installed and exported in the .bashrc file.
thanks

madhu
12th February 2005, 01:37 PM
Have you installed NetCDF in your system? Try installing NetCDF.

Madhu

vinu
12th February 2005, 02:27 PM
Hi Rajesh,

Refer this page. This is a ONE PAGE instruction, How to Install
netcdf library compiled in your machine.
http://www.unidata.ucar.edu/packages/netcdf/old_docs/INSTALL_pre_360.html#linux.

read this page befor you begine compile the package.

You have to do some necessary steps like

./configure
make
make install

etc..


Before that, you have to set some 'environment variables'. Read the
last part of the above page, that will tell you how to do this for bash shell.
If you use Linux, there is a 'set of standard env. variables'. It is
mentioned in that page.
(Fedora may be fine with linux variables).

'make install' will install the libraries into the specified path.
Or, you can use the 'default location' (where the netcdf is compiled)
by seting its path in the .bashrc file. Edit your .bashrc file and
add these two sentenseces, (example)

PATH=$PATH:/home/vinu/NETCDF/netcdf-3.5.1/bin:/home/vinu/NETCDF/netcdf-3.5.1/lib
export PATH

#this will take care of your ncdump and ncgen and the libraries

save and quit, and give the command in your shell prompt,

source .bashrc

This may work, i am not used to bash shell, (may be it is fine)



you may need some trial and error practice to compile
the netcdf package successfuly,

Try, if any problem found, just report,

rocksea
24th March 2005, 02:27 PM
hi rajesh,
Since you are familiar with MatLab, you can use ncdump
there also. You may have to install the netcdf interface
for MatLab as explained in this post.

http://www.oceanographers.net/forums/showpost.php?p=624&postcount=2

If you have already installed it, just giving
>> a=netcdf('filename.nc','nowrite');
>> ncdump(a)
will retrieve you the headers.
For more options, check
>> help ncdump;