reading netcdf file in matlab

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
dhtjtks
Posts: 36
Joined: Thu Apr 19, 2007 12:18 am
Location: University of Florida

reading netcdf file in matlab

#1 Unread post by dhtjtks »

Hi everyone,

I am using MATLAB for reading netcdf file in my pc. Now I am trying to read netcdf file in the UNIX computer. So I set path in the matlab (in UNIX computer). However, it doesn't work. I downloaded 'netcdf-3.6.2' and 'mexcdf' from website and set path to these folders. It worked in PC but not in UNIX. Did I wrong? Any suggestion will be appreciated.

Lee

hyy
Posts: 17
Joined: Wed Apr 22, 2009 6:01 pm
Location: National Institute for Environmental Studies

Re: reading netcdf file in matlab

#2 Unread post by hyy »

Hi Lee,
Can I make some questions? We need more information in detail;

1) What is version of your MATLAB?
2) Why don't you use (download) the newest netCDF Library: netcdf-4.0.1 so far?
3) I can't understand the meaning of your sentence clearly as follows: "It worked in PC but not in UNIX.". Pls. tell me in detail.

I'm looking forward to seeing your answers.
Cheers,
Hiroshi

User avatar
wilkin
Posts: 875
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: reading netcdf file in matlab

#3 Unread post by wilkin »

Recent versions of Matlab have support built in for reading netcdf files. A very convenient set of high level utilities that exploits the built-in functions is "snctools" available at http://mexcdf.sourceforge.net/downloads/

The roms plotting routines I have posted elsewhere on the roms user forum uses these snctools as the underlying method for reading roms output.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

fdaryabor
Posts: 78
Joined: Wed Jan 02, 2008 3:15 pm
Location: University of Copenhagen

Re: reading netcdf file in matlab

#4 Unread post by fdaryabor »

Hi dhtjtks
Dear my friend best guide for set netcdf library for your machine refer to downloading "toolboxes" in following address,
http://roms.mpl.ird.fr/download.php in "Roms_Agrif"
download "mexnc" and "mex60" and set netcdf library in "/home/.../Roms_tools/mexnc/mexopts.sh" and make sure path for "matlab(R2007a) for linux" if you face to error massage for reading let me know.
Best Regards
F.Daryabor

dhtjtks
Posts: 36
Joined: Thu Apr 19, 2007 12:18 am
Location: University of Florida

Re: reading netcdf file in matlab

#5 Unread post by dhtjtks »

Hi Wilkin:

Thanks, it works now. I really appreciate.

Thanks again.

Lee
Last edited by dhtjtks on Mon Sep 28, 2009 3:22 pm, edited 1 time in total.

dhtjtks
Posts: 36
Joined: Thu Apr 19, 2007 12:18 am
Location: University of Florida

Re: reading netcdf file in matlab

#6 Unread post by dhtjtks »

Hi Hiroshi:

Thanks for your interest. I just followed Wilkin's solution and it works now. Thanks anyway.

Lee

hyy wrote:Hi Lee,
Can I make some questions? We need more information in detail;

1) What is version of your MATLAB?
2) Why don't you use (download) the newest netCDF Library: netcdf-4.0.1 so far?
3) I can't understand the meaning of your sentence clearly as follows: "It worked in PC but not in UNIX.". Pls. tell me in detail.

I'm looking forward to seeing your answers.
Cheers,
Hiroshi

Post Reply