Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Fri Nov 24, 2017 1:33 am




Post new topic Reply to topic  [ 6 posts ] 

All times are UTC

Author Message
PostPosted: Tue Jan 31, 2012 10:43 am 
Offline

Joined: Mon Jun 22, 2009 3:46 pm
Posts: 135
Location: Indian Institute of Tropical Meteorology, Pune, INDIA
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


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 16, 2012 7:39 pm 
Offline

Joined: Tue Jul 12, 2011 6:07 pm
Posts: 13
Location: University of Miami
Hi, I was wondering if you have found a resolution to this problem?


Top
 Profile  
Reply with quote  
PostPosted: Fri Jun 01, 2012 9:00 pm 
Offline

Joined: Fri Apr 25, 2003 9:22 pm
Posts: 121
Location: USGS
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:
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

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


Top
 Profile  
Reply with quote  
PostPosted: Fri Jun 14, 2013 11:39 am 
Offline

Joined: Fri May 24, 2013 3:05 am
Posts: 23
Location: UWA
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


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 10, 2014 6:52 am 
Offline

Joined: Mon Jul 21, 2014 9:39 pm
Posts: 2
Location: Zhejiang Ocean University
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


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:
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

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


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 17, 2017 8:17 am 
Offline

Joined: Thu Sep 29, 2016 4:03 pm
Posts: 2
Location: Nanjing University of Information Sci. &Technology
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.
Code:
>> [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);

>>

thnks and i hope that i can get answers.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group