Search
AND
OR
Front page
|
Reload
Coastal and Oceanic Research Group at Kobe University
Navigation
Top
Members
Contact and Access
Message
Projects
Publications
Funding
Awards
Gallery
Linux
Matlab
ROMS
Seminars
Classes
COFTEC
Internal
(authenticated)
recent(5)
2023-09-28
Matlab/Basic2
2023-09-27
Seminars
2023-09-25
Publications
2023-09-17
gallery_2023.9.13
Gallery
since Feb 2012.
edit
Total:0/Today:0
Matlab/OpenDAP
Start:
#br
*opendap for Matlab [#u1771e89]
#br
**"libcurl" [#ia84f8fe]
First of all, make sure if you'd have libcurl on your sys...
# su
# rpm -qa | grep curl
lib64curl-devel-7.20.1-2.1mdv2010.2
libcurl4-7.20.1-2.1mdv2010.2
lib64curl4-7.20.1-2.1mdv2010.2
curl-7.20.1-2.1mdv2010.2
You should have the four items listed above. If there is...
**Install "libdap" and "loaddap" [#j468c058]
Download the source files for these two libraries.
-http://opendap.org/pub/source/loaddap-3.7.0.tar.gz
-http://opendap.org/pub/source/libdap-3.9.3.tar.gz
We assume here that we'd want to install the opendap tool...
cd ~/matlab/toolbox/opendap/libdap-3.9.3
vi util_mit.cc
add the following in line 36
#include <cstdio>
comment out line 39
//#include <string>
then modify the configuration as
sh ./configure --prefix=~/matlab/toolbox/opendap
make
make install
cd ~/matlab/toolbox/opendap/loaddap-3.7.0
setenv PKG_CONFIG_PATH ~/matlab/toolbox/opendap/lib/pkgc...
setenv PKG_CONFIG_PATH {$PKG_CONFIG_PATH}:/usr/lib64/pkg...
sh ./configure --prefix=~/matlab/toolbox/opendap --with-...
make
make install
You should be aware that some later versions of Matlab ar...
Start matlab (with -nojvm or -nodesktop) and do the follo...
>> addpath ~/matlab/toolbox/opendap/bin
>> x = loaddap('-A', 'http://test.opendap.org/opendap/da...
>> temps = loaddap('http://test.opendap.org/opendap/data...
>> x = temps.SST.COADSX ;
>> y = temps.SST.COADSY ;
>> te = temps.SST.SST ;
>> te (abs(te) > 100) = NaN ;
>> pcolor (x,y,te) ; shading flat ; colorbar
Now access to opendap servers is fully functional.
**Alternative configuration and possible errors [#je6d745c]
To load Matlab R2009a, you should edit your .cshrc file s...
setenv MATLABROOT /opt/MATLAB/R2009a
Also it is useful to avoid adding the path to the opendap...
setenv MATLABPATH $MATLABPATH":$HOME/matlab/toolbox/open...
You may encounter an error message as follows upon callin...
>> x = loaddap('-A', 'http://test.opendap.org/opendap/d...
/home/kobe/matlab/toolbox/
opendap/bin/writedap: error while loading
shared libraries: libdapclient.so.3: cannot open shared ...
No such file or directory
Error: Communication with the loaddap helper application...
Resource temporarily unavailable
This may be due to an earlier error. However, if there w...
error message, please report this to support at opendap....
There are two ways to sneak it. The first way is to add t...
setenv LD_LIBRARY_PATH $HOME/matlab/toolbox/opendap/lib:...
The other way is to simply copy the libraries in ~/matlab...
# su
# cd /usr/lib64
# ls -la libdap*
lrwxrwxrwx 1 root root 23 Aug 9 11:33 libdap.so -> ...
lrwxrwxrwx 1 root root 16 Feb 10 2011 libdap.so.10 ...
-rwxr-xr-x 1 root root 925232 Oct 7 2009 libdap.so.10....
lrwxrwxrwx 1 root root 21 Feb 10 2011 libdapclient....
-rwxr-xr-x 1 root root 242520 Oct 7 2009 libdapclient....
lrwxrwxrwx 1 root root 21 Feb 10 2011 libdapserver....
-rwxr-xr-x 1 root root 72624 Oct 7 2009 libdapserver....
Another error I encountered is an inconsistent libstdc++....
>> x = loaddap('-A', 'http://test.opendap.org/opendap/d...
/home/kobe/matlab/toolbox/opendap/loaddap-3.7.0/writedap:
/opt/MATLAB/R2009a/sys/os/glnxa64/libstdc++.so.6: versi...
/home/kobe/matlab/toolbox/opendap/loaddap-3.7.0/writedap)
/home/kobe/matlab/toolbox/opendap/loaddap-3.7.0/writedap:
/opt/MATLAB/R2009a/sys/os/glnxa64/libstdc++.so.6: version
`GLIBCXX_3.4.11' not found (required by /usr/lib64/libda...
/home/kobe/matlab/toolbox/opendap/loaddap-3.7.0/writedap:
/opt/MATLAB/R2009a/sys/os/glnxa64/libstdc++.so.6: version
`GLIBCXX_3.4.11' not found (required by /usr/lib64/libda...
Error: Communication with the loaddap helper application...
No such file or directory
This may be due to an earlier error. However, if there wa...
error message, please report this to support at opendap.o...
This is solvable by making a symbolic of your current lib...
# cd /usr/lib64
# ls -al libstd*
lrwxrwxrwx 1 root root 18 2011-08-19 18:42 libstdc+...
-rwxr-xr-x 1 root root 833936 2008-07-31 08:14 libstdc+...
lrwxrwxrwx 1 root root 19 2011-08-19 18:30 libstdc+...
-rwxr-xr-x 1 root root 1015328 2010-02-09 17:59 libstdc+...
So we would like to use libstdc++.so.6.0.13 rather than t...
# su
# cd /opt/MATLAB/R2009a/sys/os/glnxa64/
# mv libstdc++.so.6 libstdc++.so.6.BAK
# ln -s /usr/lib64/libstdc++.so.6.0.13 libstdc++.so.6
Then, everything should work just fine.
(Many thanks to Jaison Kurian at UCLA!)
End:
#br
*opendap for Matlab [#u1771e89]
#br
**"libcurl" [#ia84f8fe]
First of all, make sure if you'd have libcurl on your sys...
# su
# rpm -qa | grep curl
lib64curl-devel-7.20.1-2.1mdv2010.2
libcurl4-7.20.1-2.1mdv2010.2
lib64curl4-7.20.1-2.1mdv2010.2
curl-7.20.1-2.1mdv2010.2
You should have the four items listed above. If there is...
**Install "libdap" and "loaddap" [#j468c058]
Download the source files for these two libraries.
-http://opendap.org/pub/source/loaddap-3.7.0.tar.gz
-http://opendap.org/pub/source/libdap-3.9.3.tar.gz
We assume here that we'd want to install the opendap tool...
cd ~/matlab/toolbox/opendap/libdap-3.9.3
vi util_mit.cc
add the following in line 36
#include <cstdio>
comment out line 39
//#include <string>
then modify the configuration as
sh ./configure --prefix=~/matlab/toolbox/opendap
make
make install
cd ~/matlab/toolbox/opendap/loaddap-3.7.0
setenv PKG_CONFIG_PATH ~/matlab/toolbox/opendap/lib/pkgc...
setenv PKG_CONFIG_PATH {$PKG_CONFIG_PATH}:/usr/lib64/pkg...
sh ./configure --prefix=~/matlab/toolbox/opendap --with-...
make
make install
You should be aware that some later versions of Matlab ar...
Start matlab (with -nojvm or -nodesktop) and do the follo...
>> addpath ~/matlab/toolbox/opendap/bin
>> x = loaddap('-A', 'http://test.opendap.org/opendap/da...
>> temps = loaddap('http://test.opendap.org/opendap/data...
>> x = temps.SST.COADSX ;
>> y = temps.SST.COADSY ;
>> te = temps.SST.SST ;
>> te (abs(te) > 100) = NaN ;
>> pcolor (x,y,te) ; shading flat ; colorbar
Now access to opendap servers is fully functional.
**Alternative configuration and possible errors [#je6d745c]
To load Matlab R2009a, you should edit your .cshrc file s...
setenv MATLABROOT /opt/MATLAB/R2009a
Also it is useful to avoid adding the path to the opendap...
setenv MATLABPATH $MATLABPATH":$HOME/matlab/toolbox/open...
You may encounter an error message as follows upon callin...
>> x = loaddap('-A', 'http://test.opendap.org/opendap/d...
/home/kobe/matlab/toolbox/
opendap/bin/writedap: error while loading
shared libraries: libdapclient.so.3: cannot open shared ...
No such file or directory
Error: Communication with the loaddap helper application...
Resource temporarily unavailable
This may be due to an earlier error. However, if there w...
error message, please report this to support at opendap....
There are two ways to sneak it. The first way is to add t...
setenv LD_LIBRARY_PATH $HOME/matlab/toolbox/opendap/lib:...
The other way is to simply copy the libraries in ~/matlab...
# su
# cd /usr/lib64
# ls -la libdap*
lrwxrwxrwx 1 root root 23 Aug 9 11:33 libdap.so -> ...
lrwxrwxrwx 1 root root 16 Feb 10 2011 libdap.so.10 ...
-rwxr-xr-x 1 root root 925232 Oct 7 2009 libdap.so.10....
lrwxrwxrwx 1 root root 21 Feb 10 2011 libdapclient....
-rwxr-xr-x 1 root root 242520 Oct 7 2009 libdapclient....
lrwxrwxrwx 1 root root 21 Feb 10 2011 libdapserver....
-rwxr-xr-x 1 root root 72624 Oct 7 2009 libdapserver....
Another error I encountered is an inconsistent libstdc++....
>> x = loaddap('-A', 'http://test.opendap.org/opendap/d...
/home/kobe/matlab/toolbox/opendap/loaddap-3.7.0/writedap:
/opt/MATLAB/R2009a/sys/os/glnxa64/libstdc++.so.6: versi...
/home/kobe/matlab/toolbox/opendap/loaddap-3.7.0/writedap)
/home/kobe/matlab/toolbox/opendap/loaddap-3.7.0/writedap:
/opt/MATLAB/R2009a/sys/os/glnxa64/libstdc++.so.6: version
`GLIBCXX_3.4.11' not found (required by /usr/lib64/libda...
/home/kobe/matlab/toolbox/opendap/loaddap-3.7.0/writedap:
/opt/MATLAB/R2009a/sys/os/glnxa64/libstdc++.so.6: version
`GLIBCXX_3.4.11' not found (required by /usr/lib64/libda...
Error: Communication with the loaddap helper application...
No such file or directory
This may be due to an earlier error. However, if there wa...
error message, please report this to support at opendap.o...
This is solvable by making a symbolic of your current lib...
# cd /usr/lib64
# ls -al libstd*
lrwxrwxrwx 1 root root 18 2011-08-19 18:42 libstdc+...
-rwxr-xr-x 1 root root 833936 2008-07-31 08:14 libstdc+...
lrwxrwxrwx 1 root root 19 2011-08-19 18:30 libstdc+...
-rwxr-xr-x 1 root root 1015328 2010-02-09 17:59 libstdc+...
So we would like to use libstdc++.so.6.0.13 rather than t...
# su
# cd /opt/MATLAB/R2009a/sys/os/glnxa64/
# mv libstdc++.so.6 libstdc++.so.6.BAK
# ln -s /usr/lib64/libstdc++.so.6.0.13 libstdc++.so.6
Then, everything should work just fine.
(Many thanks to Jaison Kurian at UCLA!)
Page: