loaddaps (Net cdf) problem on new computer (Windows 7) and new version (2011b) of Matlab
6 次查看(过去 30 天)
显示 更早的评论
Hello,
I recently switched computers (from XP to Windows 7) and updated from 2009b to 2011b versions of Matlab.
I have old code that runs off the opendap toolbox. It used to run, but it won't anymore. Here is a snippet that should work for anyone that has loaded the OpenDAP functions:
addpath('C:\opendap\loaddap')
Sal=loaddap('http://iridl.ldeo.columbia.edu/expert/SOURCES/.NOAA/.NODC/.WOA09/.Grid-1x1/.Annual/.salinity/.s_an/dods');
The data are salinity data from the World Ocean Atlas 2009. I receive the following error:
??? Error: File: loaddap.m Line: 1 Column: 27
Unbalanced or unexpected parenthesis or bracket.
I have tried to point the ncread function to the same url, but I get the following error:
Sal=ncread('http://iridl.ldeo.columbia.edu/expert/SOURCES/.NOAA/.NODC/.WOA09/.Grid-1x1/.Annual/.salinity/.s_an/dods');
??? Error using ==> nc>nc.openToRead at 1255
Could not open http://iridl.ldeo.columbia.edu/expert/SOURCES/.NOAA/.NODC/.WOA09/.Grid-1x1/.Annual/.salinity/.s_an/dods for
reading
Error in ==> nc>nc.nc at 123
this.openToRead();
Error in ==> ncread at 51
ncObj = internal.matlab.imagesci.nc(ncFile);
I don't know if this is a loaddaps problem, a Matlab problem, a problem with the database, or a problem with my understanding of this code. Can anyone help me with this issue?
Thank you, Brad
0 个评论
采纳的回答
Walter Roberson
2012-4-25
When you upgraded, did you happen to go to 64 bit MATLAB? If you did then you are going to have to rebuild opendap from source, as the provided binaries are for windows 32 bit.
If you were to try to use the 32 bit binary with 64 bit MATLAB then it would not find the .mex* binary because of the architecture difference, and then it would try to execute the .m file as if it was MATLAB source code.
Side note: MATLAB R2012a includes opendap support; see http://www.opendap.org/user/jimg/blog/matlab_2012a
3 个评论
Walter Roberson
2012-4-26
Yes! My bulk-rate subscription to Psychic Friends Hotline is _so_ worth it!
K E
2015-8-4
Walter: Very, very useful side note that this functionality is now built in to Matlab. I now no longer have to mess around with cygwin, loaddap, etc. You just saved me 1+ days of work.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 NetCDF 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!