Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Fri Jul 19, 2019 2:37 pm




Post new topic Reply to topic  [ 13 posts ] 

All times are UTC

Author Message
PostPosted: Fri May 15, 2015 8:23 am 
Offline

Joined: Thu Feb 15, 2007 12:19 pm
Posts: 11
Location: Helmholtz Zentrum Geesthacht
Who knows where I can find a version of "seagrid.m" which works with MATLAB R2014b on LINUX 64bit? Since I upgraded from the previous MATLAB version, seagrid crashes with the following error messages:
------------------------------------------------------
Undefined function 'any' for input arguments of type 'matlab.graphics.GraphicsPlaceholder'.
Error in busy (line 15)
if ~any(findobj('Type', 'figure')), return, end
Error in seagrid (line 101)
busy
------------------------------------------------------
Thereafter, I commented out line 15 in "busy.m" and seagrid crashed with
------------------------------------------------------
Undefined function 'any' for input arguments of type 'matlab.graphics.GraphicsPlaceholder'.
Error in seagrid/doaddmenus (line 27)
if any(h), delete(h), end
Error in seagrid (line 119)
theMenus = doaddmenus(self);
-------------------------------------------------------
Hence I suppose that there is something wrong with the processing of figure handles in MATLAB R2014b. Any idea?

Cheers,
Reiner


Top
 Profile  
Reply with quote  
PostPosted: Tue May 26, 2015 6:45 pm 
Offline

Joined: Mon Jan 12, 2015 4:12 pm
Posts: 17
Location: URI GSO
I am having the same problem, kindly let me know if you find a solution.

Thank you


Top
 Profile  
Reply with quote  
PostPosted: Tue May 26, 2015 6:50 pm 
Offline

Joined: Mon Jan 12, 2015 4:12 pm
Posts: 17
Location: URI GSO
Have you updated your mex files yet? I believe that is my issue, though maybe you have already updated them. From the SEAGRID README.txt in the mex file subdirectory

Code:
Building SEAGRID requires building 3 mex files:
mexsepeli.F
mexrect.F
mexinside.c

These mex files are machine dependent, and can also be matlab version dependent.
...

I have yet to find any for Linux 64 bit.


Top
 Profile  
Reply with quote  
PostPosted: Fri May 29, 2015 1:42 am 
Offline
User avatar

Joined: Thu May 24, 2007 12:12 pm
Posts: 26
Location: South Australian Research and Development Institute
Seagrid doesn't need to have any mex files in order to run, in spite of the error message, if they are not there seagrid uses m files to perform the same functions. The bigger problem is that starting with Matlab 2014b handles are no longer floating point numbers by default - they have a new class called "handle", Seagrid checks a lot of handle states with the "any" function but this won't work with the new handles - you would probably have start by replacing all "any" statements with "~isempty" to resolve this problem and even if you do that there may still be other issues. I eventually decided to start with the seagrid fast Poisson Solver and recreate the Seagrid functionality in a new stand-alone executable which is hosted on John Luick's Austides site at http://austides.com/downloads/. We are calling it GridBuilder but is based on the look and feel of Seagrid. At the moment the executable only runs on Windows 64bit machines but you don't need to have Matlab on the machine for it to run.


Top
 Profile  
Reply with quote  
PostPosted: Fri May 29, 2015 3:09 pm 
Offline

Joined: Mon Jan 12, 2015 4:12 pm
Posts: 17
Location: URI GSO
Thank you for your reply Charles. A couple of days ago I did switch out all the instances of function "any" to agree with the new r2014b graphics handles but you are right about there still being other issues.

Unfortunately, I am not a Windows machine so I think for now I will just locate an older version of Matlab in order to write grid files but I will be very interested to try your stand-alone GridBuilder someday.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 12, 2017 11:41 pm 
Offline

Joined: Tue Oct 04, 2011 6:01 pm
Posts: 2
Location: Rutgers
Hi,

I realize this is a pretty old post, but was there ever a solution to this thread? I am trying to get seagrid to work with Matlab 2016b and am having similar errors.

Thanks!


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 13, 2017 4:27 am 
Offline

Joined: Tue Apr 14, 2015 1:27 pm
Posts: 1
Location: University of Western Australia
jmcsween,

Did you end up resolving the issues with seagrid on matlab2016b? I'm also facing similar issues and wondered if you could advise.

Cheers


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 14, 2017 12:35 pm 
Offline
User avatar

Joined: Mon Apr 28, 2003 5:44 pm
Posts: 491
Location: Rutgers University
No one has updated seagrid. It's too hard and there are other tools.

We keep an old version of Matlab on our system just for this purpose.

_________________
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 15, 2017 2:21 pm 
Offline

Joined: Fri Apr 25, 2003 9:22 pm
Posts: 123
Location: USGS
I haven't tried GridBuilder, but from the documentation it looks pretty powerful, with SeaGrid's capabilities and then some. And even though available from a consulting company, it's free: http://austides.com/downloads/. If someone tries it, please report back to this thread!


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 20, 2017 2:41 am 
Offline
User avatar

Joined: Thu May 24, 2007 12:12 pm
Posts: 26
Location: South Australian Research and Development Institute
Development on gridbuilder began by trying to fix Seagrid, but the old presto toolbox that was used to drive the gui would also have had to be rewritten so we gave up on that approach - at the heart of Seagrid (and GridBuilder) is the routine rect2grid which uses a fast Poisson solver to generate the interior points of the grid. Our version of this program is called bpsi2grid and is essentially a cleaned up version of rect2grid and doesn't require any mex files and hopefully I've attached it to this post. To form the grid you need to select the boundary points clockwise from the first corner (going the other way around produces weird results), for an m by n grid the vectors for x and y on the boundary need to be 2*((m-1)+(n-1)) in length with the last boundary point being the last point before the first corner. If the points are evenly spaced between each corner the resulting grid should be pretty good although some grids with telescoping resolution will need some additional cleaning up. Seagrid and Gribuilder essentially provide an interface for defining and transforming those boundary points in a user friendly way and then add on a few bells and whistles for building topography, masks and writing out a ROMS compatible grid file.


Attachments:
File comment: GridBuilder version of rect2grid
bpsi2grid.m [2.66 KiB]
Downloaded 172 times
Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 21, 2017 1:39 pm 
Offline

Joined: Sun Dec 04, 2016 1:03 am
Posts: 20
Location: ocean university of china
Dear friends
I am facing the same difficulty with you,and I believe you must have solved this problem with your talent and hardwork.I really hope you can share your experience with me and give me a answer at your convenience.thank you very much!


Top
 Profile  
Reply with quote  
PostPosted: Tue Apr 17, 2018 8:30 am 
Offline

Joined: Mon Nov 21, 2016 5:58 pm
Posts: 4
Location: Ocean University of China
I must say the GridBuilder is very powerful!


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 25, 2018 1:50 am 
Offline
User avatar

Joined: Thu May 24, 2007 12:12 pm
Posts: 26
Location: South Australian Research and Development Institute
After some encouragement I have decided to release the full GridBuilder source code and files in the form of a Matlab toolbox. The latest version should run on any version of Matlab 2014b or later. I have only tested it on a Windows machine so I would be interested in hearing how it goes on Macs and Linux. I'm calling this release 1.2 and it includes a new orthogonal grid format suggested by John Wilkin. The grid is constructed like a rectangular grid but rotations, expansions, and translations will try to maintain the 0% orthogonality error of the grid (it will appear slightly distorted on my Cartesian global projection when rotated). Spacing points can be added in Orhtogonal mode but control points are not available as they will change the orhtogonality of the grid. Free Format and Rectangular Format are still available as options. In addition to the new Orthogonal Mode I've tried to incoroporate a help guide within GridBuilder through the toolbox which seems to work. I'll try and continue to provide executable versions of GridBuilder for users who don't have access to Matlab 2014b or higher. John Luick is continuing to host the links to the code so see http://austides.com/downloads for latest versions. We are hoping to have the toolbox hosted through myroms.org as well. The toolbox is quite large as I have packaged the eTopo topography, coastlines, and documentation in one file. Once it is downloaded it should install in Matlab by double clicking on the GridBuilder.mltbx file (from inside Matlab). This will install the code, data, and help files on your matlab path and you should be able to run it by typing GridBuilder at the command prompt.
I have done most of the debugging myself with the help of feedback from users of the executable. I will try to respond to any bug reports as soon as possible so please let me know if you find a problem, even if you fix it yourself! I'm setting up a git repository on git-hub for code only so that will another source for the latest code fixes. Enjoy!


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


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