Problem with the MATLAB R2009a version (7.8.0) and Netcdf

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
angelolemos
Posts: 34
Joined: Wed Mar 11, 2009 4:24 pm
Location: UFES

Problem with the MATLAB R2009a version (7.8.0) and Netcdf

#1 Unread post by angelolemos »

People, I have installed a new version of Matlab. I already download the matlab-toolbox-roms.
So, the problem appear when nothing is working anymore.
I can't find a mexnc and snctools compatible with this new version of matlab to create a grid file with seagrid.

I'm severely thinking to change to EASYGRID, but there I need these mexnc and snctools for matlab, too.

The error is:

>> seagrid2roms('seagrid.mat', grdfile);
## SeaGrid Source File : seagrid.mat
## ROMS Destination File: /home/angelolemos/src/ROMS/roms-grid/coast-grid.nc
??? Error using ==> feval
Invalid MEX-file '/home/angelolemos/src/ROMS/roms-grid/matlab/netcdf/mexcdf53.mexglx':
/home/angelolemos/src/ROMS/roms-grid/matlab/netcdf/mexcdf53.mexglx: undefined symbol: _fxstat.

Error in ==> ncmex at 139
[varargout{:}] = feval(fcn, varargin{:});

Error in ==> netcdf.create at 13
[theNCid, status] = ncmex('create', name(self), thePermission);

Error in ==> netcdf.netcdf at 413
result = create(result, thePermission);

Error in ==> seagrid2roms at 152
nc = netcdf(theRomsFile, 'clobber');


Someone can help me?! Or is better change to a newest version of matlab.

Thanks.

rsignell
Posts: 124
Joined: Fri Apr 25, 2003 9:22 pm
Location: USGS

Re: Problem with the MATLAB R2009a version (7.8.0) and Netcdf

#2 Unread post by rsignell »

You need the netcdf_toolbox, which I just found out was removed from the instructions on the mexcdf page, because John Evans, who maintains these pages, doesn't want to support it. But it's still there:

Use SVN to get the latest mexnc, snctools and netcdf_toolbox and you should be good to go with NetCDF and Matlab 2009a:

Code: Select all

svn co http://mexcdf.svn.sourceforge.net/svnroot/mexcdf/mexnc/trunk mexnc
svn co http://mexcdf.svn.sourceforge.net/svnroot/mexcdf/snctools/trunk snctools
svn co http://mexcdf.svn.sourceforge.net/svnroot/mexcdf/netcdf_toolbox/trunk netcdf_toolbox
One additional tip: do a "which mexnc" and make sure it points to the version in the mexnc directory you just downloaded, and not an old one.

ocecept
Posts: 42
Joined: Tue Jan 08, 2008 3:57 pm
Location: Universidade Federal do Ceará
Contact:

Re: Problem with the MATLAB R2009a version (7.8.0) and Netcdf

#3 Unread post by ocecept »

You can find the Mexnc and SNCTOOLS for Matlab 2009a (and later) at:

http://mexcdf.sourceforge.net/downloads/2008b.php

And some instructions on how to install it at:

https://www.myroms.org/wiki/index.php/MEXNC

Install and test it. If everything is Ok, try to use Seagrid.

Note that now, Matlab is looking for the mexnc library at:

/home/angelolemos/src/ROMS/roms-grid/matlab/netcdf/mexcdf53

So make sure you have the right library and it appears first in your Matlab path:

Cheers;

Carlos Teixeira

angelolemos
Posts: 34
Joined: Wed Mar 11, 2009 4:24 pm
Location: UFES

Re: Problem with the MATLAB R2009a version (7.8.0) and Netcdf

#4 Unread post by angelolemos »

Hi,

I'm with a serious problem with Matlab 7.8.0 (R2009a) and the NetCDF.

So, I'm begin in ROMS Model, and I don't know how set up my Set Path correctly at Matlab.
I downloaded the Roms Netcdf Toolbox, which contain the following files (I think they are the main):

./main_data
./matlab
./matlib
./data/NCEP_daily
./seagrid
./GSHHS
./m_map

Where I put my netcdf packages (mexnc, snctools and netcdf_toolbox)? There are 3 packages netcdf - ./matlab/netcdf - ./matlib/netcdf - ./matlib/netcdf7.

The command seagrid2roms('seagrid.mat', grdfile) from MAIN_grid.f isn't working, because the netcdf isn't correct.

Netcdf always was my big problem with numerical modeling.
Please, someone can help me?

Thanks a lot!

Post Reply