Ocean Modeling Discussion


Search for:
It is currently Fri Apr 20, 2018 4:47 pm

Post new topic Reply to topic  [ 2 posts ] 

All times are UTC

Author Message
PostPosted: Tue Mar 14, 2017 1:50 pm 

Joined: Mon Jul 04, 2016 1:31 pm
Posts: 11
Location: University of the Aegean, GR
as part of my ROMS learning procedure, I set-up a very simple realistic application in the Mediterranean, with atmospheric forcing, rivers, boundaries and a simple square grid with a refined two-way nesting.
It ran flawlessly and after some tweaking of parameters (basically hor.diffusion and lateral bry cond.types), reproduced expected patterns, so I decided to move-on to the next step.

I decided to construct a more complex-shaped grid using the same tools-procedure as before (pyroms-pygridgen for the grid generation and matlab-coarse2fine for the refinement).
But when I used the coarse2fine function to refine the grid, it gave me the following error:

Interpolating from coarse to fine ...
Warning: Duplicate data points have been detected and removed - corresponding values have been averaged.
> In coarse2fine (line 286)
  In coarse2fine (line 289)
  In coarse2fine (line 289)
Error using TriScatteredInterp/subsref
The interpolant is in an invalid state.
The number of data point locations should equal the number of data point values.

Error in coarse2fine (line 289)
    RSr.V = C.lat_rho(:);   F.lat_rho = RSr(F.x_rho, F.y_rho);
289     RSr.V = C.lat_rho(:);   F.lat_rho = RSr(F.x_rho, F.y_rho);

One clue is that this time I used positive as well as negative turns to construct the grid, and I had to fill in the nan values that occurred (ones for the bathymetry, and the mean value for the rest, as proposed in another post by Kate).
I'm guessing that the problem has to do with that value allocation in the grid, but I cannot test whether this is the case, as pyroms won't construct the grid if I don't fill the nan values.
Any hint-help would be much appreciated.

Reply with quote  
PostPosted: Wed Mar 15, 2017 8:03 pm 
User avatar

Joined: Mon Apr 28, 2003 5:44 pm
Posts: 440
Location: Rutgers University
If the coordinates you used for lon_rho and lat_rho have duplicates - even if they are NaN - TriScatteredInterp will throw an error.

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

Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 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