I need your help in solving the following error using seagrid2roms. I think it has to do with netcdf, and looks like matlab 2010b uses its own netcdf tools. I would be grateful if someone can tell me how to solve the following error that I get when running seagrid2roms
>> seagrid2roms('cdw_gridR','cdw_ROMS','ROMS Grid')
## SeaGrid Source File : cdw_gridR
## ROMS Destination File: cdw_ROMS
??? Undefined function or method 'netcdf' for input arguments of type 'char'.
Error in ==> seagrid2roms at 152
nc = netcdf(theRomsFile, 'clobber');
seagrid2roms and matlab 2010b native matlab netcdf
Re: seagrid2roms and matlab 2010b native matlab netcdf
I had to solve this problem recently (admittedly with 2009b, not 2010, but the error is the same). As far as I could find, there seem to be two schools of thought in these forums for how to deal with this particular seagrid2roms issue:
1. Recognize that MATLAB has their own netcdf commands and rewrite seagrid2roms with these new commands; probably the 'better' option in terms of taking advantage of the latest MATLAB code that comes with official support.
2. Recreate the 'old' command environment in which seagrid2roms actually functions:
Download, directly into your MATLAB directory (or one that you can 'Set Path...' to conveniently), the most recent mexnc, snctools and netcdf_toolbox -- bearing in mind that these tools are both outdated and a clunkier solution than just using MATLAB's native commands. On the other hand, these forums have some history of support for errors they generate (enough that I could piece together how to make seagrid2roms work), and seagrid2roms can work with these commands without any internal code alteration required.
rsignell's svn links worked fine for me (thanks, risgnell, especially for the svn for the netcdf_toolbox, since it's no longer directly supported by the mexcdf site):
Hope this helps!
1. Recognize that MATLAB has their own netcdf commands and rewrite seagrid2roms with these new commands; probably the 'better' option in terms of taking advantage of the latest MATLAB code that comes with official support.
2. Recreate the 'old' command environment in which seagrid2roms actually functions:
Download, directly into your MATLAB directory (or one that you can 'Set Path...' to conveniently), the most recent mexnc, snctools and netcdf_toolbox -- bearing in mind that these tools are both outdated and a clunkier solution than just using MATLAB's native commands. On the other hand, these forums have some history of support for errors they generate (enough that I could piece together how to make seagrid2roms work), and seagrid2roms can work with these commands without any internal code alteration required.
rsignell's svn links worked fine for me (thanks, risgnell, especially for the svn for the netcdf_toolbox, since it's no longer directly supported by the mexcdf site):
I went with option 2 for now, but I hope to rewrite seagrid2roms (or find someone else who has) when I have 'more time'. Ah, time. My old foe.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.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
Hope this helps!
Re: seagrid2roms and matlab 2010b native matlab netcdf
hi,
i've just stumbled upon this post. some time ago i have re-written seagrid2roms for native Matlab 2010 netcdf. i'm attaching the file below. it worked for me (over a year ago) but please check for yourself that it produces ok results.
be good,
m.
i've just stumbled upon this post. some time ago i have re-written seagrid2roms for native Matlab 2010 netcdf. i'm attaching the file below. it worked for me (over a year ago) but please check for yourself that it produces ok results.
be good,
m.
- Attachments
-
- seagrid2romsM2010a.m
- (21.96 KiB) Downloaded 607 times
Re: seagrid2roms and matlab 2010b native matlab netcdf
I get the following error message when I try to use seagrid2romsM2010a. Any idea what the problem might be?
??? Error using ==> netcdflib
Contiguous data write failed, library error message "NetCDF:
Start+count exceeds dimension bound"
Error in ==> putVar at 75
netcdflib(funcstr,ncid,varid,varargin{:});
Error in ==> seagrid2romsM2010a at 574
netcdf.putVar(ncid,hraw_var_ID,start,count,hraw_data');
??? Error using ==> netcdflib
Contiguous data write failed, library error message "NetCDF:
Start+count exceeds dimension bound"
Error in ==> putVar at 75
netcdflib(funcstr,ncid,varid,varargin{:});
Error in ==> seagrid2romsM2010a at 574
netcdf.putVar(ncid,hraw_var_ID,start,count,hraw_data');
Re: seagrid2roms and matlab 2010b native matlab netcdf
Hi,
I installed seagrid package to and when i used the seagrid2rom2010a.m, i recieved same error that you got earlier. I was wondering whether you have been able to solve.
appreciate all the help
cheers
nikhil
I installed seagrid package to and when i used the seagrid2rom2010a.m, i recieved same error that you got earlier. I was wondering whether you have been able to solve.
appreciate all the help
cheers
nikhil
-
- Posts: 7
- Joined: Mon Mar 16, 2015 3:42 pm
- Location: Japan Agency for Marine-Earth Science & Tech.
Re: seagrid2roms and matlab 2010b native matlab netcdf
I run into the same problem too. Any suggestions to make it working?
-
- Posts: 7
- Joined: Mon Mar 16, 2015 3:42 pm
- Location: Japan Agency for Marine-Earth Science & Tech.
Re: seagrid2roms and matlab 2010b native matlab netcdf
I find that it is possibly caused by an error in:
count = [1 Lp Mp];
If changed to:
count = [1 Mp Lp];
Then it works.
Is it true?
count = [1 Lp Mp];
If changed to:
count = [1 Mp Lp];
Then it works.
Is it true?
-
- Posts: 43
- Joined: Wed Mar 18, 2015 3:40 pm
- Location: Universidade Federal Fluminense
Re: seagrid2roms and matlab 2010b native matlab netcdf
dear
not bring any solution to the problem but more of a problem .
I am new to the forum and I have just download the main Roms packages , but not yet started running the model simply because I'm having problems in matlab6 installation.
the error that appears is as follows:
dell@dell-Inspiron-N5110:~$ matlab
dell@dell-Inspiron-N5110:~$ matlab6
/home/dell/Documents/fialho/Matlab6/bin/glnx86/matlab: error while loading shared libraries: /lib/libut.so: cannot read file data: Error 21
dell@dell-Inspiron-N5110:~$
I do not know if anyone of you have had an identical problem or have any TIP another version and how to obtain it .
thank you very much
not bring any solution to the problem but more of a problem .
I am new to the forum and I have just download the main Roms packages , but not yet started running the model simply because I'm having problems in matlab6 installation.
the error that appears is as follows:
dell@dell-Inspiron-N5110:~$ matlab
dell@dell-Inspiron-N5110:~$ matlab6
/home/dell/Documents/fialho/Matlab6/bin/glnx86/matlab: error while loading shared libraries: /lib/libut.so: cannot read file data: Error 21
dell@dell-Inspiron-N5110:~$
I do not know if anyone of you have had an identical problem or have any TIP another version and how to obtain it .
thank you very much