loaddaps (Net cdf) problem on new computer (Windows 7) and new version (2011b) of Matlab

조회 수: 3 (최근 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

채택된 답변

Walter Roberson
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
Walter Roberson 2012년 4월 26일
Yes! My bulk-rate subscription to Psychic Friends Hotline is _so_ worth it!
K E
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 CenterFile Exchange에서 NetCDF에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by