How to use ana_grid to setup nonuniform horizontal grid?

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
jinbow
Posts: 2
Joined: Tue Feb 13, 2007 10:28 pm
Location: MIT/WHOI

How to use ana_grid to setup nonuniform horizontal grid?

#1 Unread post by jinbow »

Hi Folks,
I want to use ana_grid to setup an nonuniform horizontal grid with finer resolution close to the boundary. I think it should be easy but I did not find any example or discussion. Thanks in advance for the help!
Jinbo Wang

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

#2 Unread post by kate »

Gosh, I've never done it in ana_grid, but I used to make analytical functions externally with a lot of ugly fussing and math. Remember, ROMS wants it's pm and pn fields to be as smoothly varying as the bathymetry. John Wilkin's thesis had a grid in which there was a slight jump in the grid spacing and you could see it in the results (it was small and outside the area of main interest). As usual, there's more than one way to do it:

* How are you with splines, tanh or polynomials? Set up a smooth function through a field of pm, then sum them to get the x values. Tweak to get the final domain size you were after. In the day, I'd work backwards from a desired domain size and some polynomials to match the slopes at the subdomain boundaries - say uniform in the middle, getting finer towards the coast and coarser at the open off-shore boundary.

* Do it outside ROMS - it's not hard to set up a box grid file. You could then use Seagrid or xpots to smoothly vary the gridpoints for you.

Also note, your smallest gridsize will be setting the timestep, all else being equal.

jinbow
Posts: 2
Joined: Tue Feb 13, 2007 10:28 pm
Location: MIT/WHOI

#3 Unread post by jinbow »

Thank you Kate! It helps, I'll try them.

Post Reply