Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Thu Oct 18, 2018 10:26 pm




Post new topic Reply to topic  [ 2 posts ] 

All times are UTC

Author Message
PostPosted: Wed Feb 06, 2008 8:23 pm 
Offline

Joined: Tue Feb 17, 2004 6:15 pm
Posts: 21
Location: Anchor QEA, LLC
We are having problems along tiles, and one that is a little harder to track down, in our developmental bottom boundary layer gravity flow code. We want to make sure we are mapping u and v points to the rho points and the rho points to the u and v points properly. I have questions regarding the use of i and j indicies with tiling and their use in mapping variables to other grids, such as a rho point variable onto a u grid. Basically, I am confused by all the combinations of Istr, IstrU, IstrU-1, etc in the code. :?:

1. When exactly should IstrU / JstrV be used instead of Istr / Jstr?

2. Why do some places in the code use "DO IstrU-1,Iend+1" and others leave off the plus and minus one, or just leave off the minus one?

3. What is the correct way to map u and v points onto the rho grid, and rho points onto the u and v grids, in the middle of loops dealing mostly with rho points. I assume the rho points loop should go from Istr to Iend and Jstr to Jend?

4. Why might a person have to use Istr-1 and Jstr-1 to include the entire domain when dealing with strictly rho points? Should all rho loops be Istr-1?

Thanks
Aaron


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 07, 2008 11:29 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3515
Location: IMS/UAF, USA
abever wrote:
We are having problems along tiles, and one that is a little harder to track down, in our developmental bottom boundary layer gravity flow code. We want to make sure we are mapping u and v points to the rho points and the rho points to the u and v points properly. I have questions regarding the use of i and j indicies with tiling and their use in mapping variables to other grids, such as a rho point variable onto a u grid. Basically, I am confused by all the combinations of Istr, IstrU, IstrU-1, etc in the code. :?:

Here are some images which might help. The entire grid is here:
http://people.arsc.edu/~kate/ROMS/whole_grid.png
Note that the thick outer line is where the walls would be, if it has walls. The regular model physics happens on the inner white portion and boundary conditions apply to the pinkish areas. If you are tiling in the i direction, it looks like this:
http://people.arsc.edu/~kate/ROMS/Istr.png
The domain is either periodic or not, periodic joins work similar to tile joins.
Quote:
1. When exactly should IstrU / JstrV be used instead of Istr / Jstr?

When the fields being operated on are at U/V points and they care about the periodicity flag.

Quote:
2. Why do some places in the code use "DO IstrU-1,Iend+1" and others leave off the plus and minus one, or just leave off the minus one?

If you are writing to a scratch array and you know you'll be wanting to use the IstrU-1 value, then load it up. Some operations are inherently 1-D in the vertical so you won't be needing the neighboring value - save by not computing it.

Quote:
3. What is the correct way to map u and v points onto the rho grid, and rho points onto the u and v grids, in the middle of loops dealing mostly with rho points. I assume the rho points loop should go from Istr to Iend and Jstr to Jend?

If you want a u value at a rho point, then compute using rho loop bounds and average the u(i,j) with u(i+1,j) to get u at the (i,j) rho point.

Quote:
4. Why might a person have to use Istr-1 and Jstr-1 to include the entire domain when dealing with strictly rho points? Should all rho loops be Istr-1?

It just depends. The code I use is written such that you never write to an i,j value not on your tile, even though there may be times that that could save an exchange (halo computation) unless it is a scratch array that's local to the tile. So, I can write to Istr-1 of the scratch arrays, but not the global tiled arrays. The code is parallel to both MPI and OpenMP, and there are strange things to watch out for if you don't want to break either one. Hernan is always having to remind me of this...


Top
 Profile  
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