Dear Friends ,
I am building a grid with seagrid. I have following errors while reading bathymetry via read_srtm30plus.m script,
[xbathy,ybathy,zbathy]=read_srtm30plus([-20 37],[30 49],60);
??? Error using ==> rtifc
/tmp/tp8377d624_0366_4942_b7c9_623a47471fcf: Not a TIFF file, bad magic number 16188 (0x3f3c).
Error in ==> readtif at 52
[X, map, details] = rtifc(args);
Error in ==> imread at 432
[X, map] = feval(fmt_s.read, filename, extraArgs{:});
Error in ==> read_srtm30plus at 60
pix=imread(url,'tif');
So, can you please tell how to solve this error.
in addition also look the discussion page link :
https://www.myroms.org/wiki/index.php/Talk:seagrid
Thanks
error in read_srtm30plus.m script ....
Re: error in read_srtm30plus.m script ....
Hi, I was wondering if you have found a resolution to this problem?
Re: error in read_srtm30plus.m script ....
Unfortunately NASA took down the WMS site, but fortunately, it's easy to get
subsetted global and other bathymetry data using NCTOOLBOX:
1. Get NCTOOLBOX for Matlab (easy install at http://code.google.com/p/nctoolbox/)
2. Use the "geosubset" method to subset bathy data. For SRTM30PLUS, it would look like:
![Image](http://content.screencast.com/users/rsignell/folders/Snagit/media/36092775-ae4f-46dc-8c56-e9e4e61a6a37/06.01.2012-16.58.43.png)
You can substitute any other OPeNDAP URL in this catalog, which includes ETOPO2, ETOPO1, NOAA Coastal Relief Model for the US, and more:
http://geoport.whoi.edu/thredds/bathy_catalog.html
Good Luck,
Rich
subsetted global and other bathymetry data using NCTOOLBOX:
1. Get NCTOOLBOX for Matlab (easy install at http://code.google.com/p/nctoolbox/)
2. Use the "geosubset" method to subset bathy data. For SRTM30PLUS, it would look like:
Code: Select all
url='http://geoport.whoi.edu/thredds/dodsC/bathy/srtm30plus_v1.nc';
nc=ncgeodataset(url)
topovar=nc.geovariable('topo')
s.lon=[-71.2 -69.9]
s.lat=[41 42];
%s.h_stride=[2 2]; %get every other value
g=topovar.geosubset(s)
imagesc(g.grid.lon,g.grid.lat,g.data);axis xy;colorbar;
title('SRTM (m)')
![Image](http://content.screencast.com/users/rsignell/folders/Snagit/media/36092775-ae4f-46dc-8c56-e9e4e61a6a37/06.01.2012-16.58.43.png)
You can substitute any other OPeNDAP URL in this catalog, which includes ETOPO2, ETOPO1, NOAA Coastal Relief Model for the US, and more:
http://geoport.whoi.edu/thredds/bathy_catalog.html
Good Luck,
Rich
-
- Posts: 23
- Joined: Fri May 24, 2013 3:05 am
- Location: UWA
Re: error in read_srtm30plus.m script ....
Dear Prof. Signell,
Thanks a lot for all your shared tools!
It would be nice if someone can update the wikiRoms page. Both, the svn repositories and the usage of read_srtm30plus are incorrect and mislead us.
Thanks a lot,
Alexis Espinosa
UWA
Thanks a lot for all your shared tools!
It would be nice if someone can update the wikiRoms page. Both, the svn repositories and the usage of read_srtm30plus are incorrect and mislead us.
Thanks a lot,
Alexis Espinosa
UWA
Re: error in read_srtm30plus.m script ....
Dear friends,
I tried the method below, but I got the wrong message like this,
-----------------------------------------
>> [x,y,z]=read_srtm30plus(ax(1:2),ax(3:4),30);
Warning: The netcdf-java cdm contains no coordinate information
associated with the variable. Returning ncvariable instead of
ncgeovariable object. (Methods that rely on coordinate information
like 'grid' or 'geosubset' are not available.
> In ncgeodataset>ncgeodataset.geovariable at 215
In ncgeodataset>ncgeodataset.subsref at 378
In read_srtm30plus2 at 32
??? Error using ==> subsref
No appropriate method, property, or field geosubset for class
ncvariable.
Error in ==> ncvariable>ncvariable.subsref at 295
sref = builtin('subsref',obj,s);
Error in ==> read_srtm30plus2 at 36
g=topovar.geosubset(s);
------------------------------
I will be pretty appreciated if anyone gives some suggestions,
Tony
I tried the method below, but I got the wrong message like this,
-----------------------------------------
>> [x,y,z]=read_srtm30plus(ax(1:2),ax(3:4),30);
Warning: The netcdf-java cdm contains no coordinate information
associated with the variable. Returning ncvariable instead of
ncgeovariable object. (Methods that rely on coordinate information
like 'grid' or 'geosubset' are not available.
> In ncgeodataset>ncgeodataset.geovariable at 215
In ncgeodataset>ncgeodataset.subsref at 378
In read_srtm30plus2 at 32
??? Error using ==> subsref
No appropriate method, property, or field geosubset for class
ncvariable.
Error in ==> ncvariable>ncvariable.subsref at 295
sref = builtin('subsref',obj,s);
Error in ==> read_srtm30plus2 at 36
g=topovar.geosubset(s);
------------------------------
I will be pretty appreciated if anyone gives some suggestions,
Tony
rsignell wrote:Unfortunately NASA took down the WMS site, but fortunately, it's easy to get
subsetted global and other bathymetry data using NCTOOLBOX:
1. Get NCTOOLBOX for Matlab (easy install at http://code.google.com/p/nctoolbox/)
2. Use the "geosubset" method to subset bathy data. For SRTM30PLUS, it would look like:
Code: Select all
url='http://geoport.whoi.edu/thredds/dodsC/bathy/srtm30plus_v1.nc'; nc=ncgeodataset(url) topovar=nc.geovariable('topo') s.lon=[-71.2 -69.9] s.lat=[41 42]; %s.h_stride=[2 2]; %get every other value g=topovar.geosubset(s) imagesc(g.grid.lon,g.grid.lat,g.data);axis xy;colorbar; title('SRTM (m)')
You can substitute any other OPeNDAP URL in this catalog, which includes ETOPO2, ETOPO1, NOAA Coastal Relief Model for the US, and more:
http://geoport.whoi.edu/thredds/bathy_catalog.html
Good Luck,
Rich
Re: error in read_srtm30plus.m script ....
I also meet that problem like you. But my problem is lack of 'private'. i don't know whether it needs to download and where.
thnks and i hope that i can get answers.
Code: Select all
>> [xbathy,ybathy,zbathy]=read_srtm30plus(lon_range,lat_range,60);
??? Error: File: ncgeodataset.m Line: 60 Column: 38
Undefined function or variable 'private'.
Error in ==> read_srtm30plus at 34
nc=ncgeodataset(url);
>>