Hello All
I just got an issue with my river setup. Please look at the grid below
... p-v-p-v-p-v-p-v-p-v-p ...
... u-r-u-r-u-r-u-r-u-r-u ...
... p-v-p-V-p-V-p-v-p-v-p ...
.... ------------u-r-u-r-u ...
.... ------------p-v-p-v-p ...
This is part of a grid. I just labeled the masked points with letters. If I set a southward river at the left big V point, it has no problem. But if right big V point, the result looks like no-river case.
I did some tests and finally concluded, in my grid, for all the southward river, if there is a wall just right on the east (on the west it is ok), the river doesnt work (not sure if I say it clearly enough...).
I didnt check rivers with other directions. I might do something stupid here or violate the rule how to set river
Please help indicate where I made mistake. Thanks a lot
river issue
-
- Posts: 39
- Joined: Wed Jun 25, 2008 2:49 am
- Location: Georgia Institute of Technology
Re: river issue
What would be more helpful to us would be if you could print out that V value from several places in the code to confirm that it's getting set back to zero - and pin down where that's happening. Or else watch in the debugger.
Are you sure you have the right i,j? Same as the rho point just above it?
Are you sure you have the right i,j? Same as the rho point just above it?
-
- Posts: 39
- Joined: Wed Jun 25, 2008 2:49 am
- Location: Georgia Institute of Technology
Re: river issue
Thanks Kate. Definitely it is a good idea to print out V values at several places. I ll do thatkate wrote:What would be more helpful to us would be if you could print out that V value from several places in the code to confirm that it's getting set back to zero - and pin down where that's happening. Or else watch in the debugger.
Are you sure you have the right i,j? Same as the rho point just above it?
As for the indices, since my left V gave me no problem, I guess the indices could be right
btw shouldnt the indices be the same as the rho point below it?
Thanks
Yisen
Re: river issue
It depends. In the ROMS view, the v indices match the rho above. In the netcdf file view, the indices match the rho below. The grid indices were fixed before we starting using netcdf I/O and would perhaps be done differently if we were to start over.seashellingolds wrote:As for the indices, since my left V gave me no problem, I guess the indices could be right
btw shouldnt the indices be the same as the rho point below it?
-
- Posts: 39
- Joined: Wed Jun 25, 2008 2:49 am
- Location: Georgia Institute of Technology
Re: river issue
I see your point. The rho point index starts from 0 while v point starts from 1 in the code. I ll look into the indices too to make sure everything is all right.kate wrote:It depends. In the ROMS view, the v indices match the rho above. In the netcdf file view, the indices match the rho below. The grid indices were fixed before we starting using netcdf I/O and would perhaps be done differently if we were to start over.seashellingolds wrote:As for the indices, since my left V gave me no problem, I guess the indices could be right
btw shouldnt the indices be the same as the rho point below it?
Thank again!
- arango
- Site Admin
- Posts: 1361
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: river issue
Actually, our ROMS design is much better. This is going to be quite complicate in the near future with the nesting, since we are going to have negative indices. There are not alternatives!!! The problem is in NetCDF, which is not generic enough to allow 0 and negative indices. It seems that they wanted to avoid lower and upper bound dimensions when defining arrays in a NetCDF. I can see why this will get complicate very quickly. So we have to use array shift with lower index 1 in all NetCDF arrays.