Code to disable xxxx_VOLCONS

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
Message
Author
User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

Code to disable xxxx_VOLCONS

#1 Unread post by m.hadfield »

This is not really a bug, but a design decision that I want to take issue with...

I have a simulation that uses xxxx_M2CLAMPED and xxxx_VOLCONS conditions on all boundaries. Why clamp the velocity and then adjust it? Because...
  • The velocities I am prescribing don't conserve volume exactly, eg they are from an outer model with slightly different bathymetry
  • Even if they did conserve volume, this would be broken when zeta changes
(BTW, what's the syntax for a list in this thing?)

Anyway, this worked fine in ROMS 2.0 and through several ROMS 2.1 pre-releases, but failed in ROMS 2.1 final because of the following code in globaldefs.h:

Code: Select all

#if !defined WEST_M2OBC && defined WEST_VOLCONS
# undef WEST_VOLCONS
#endif
#if !defined EAST_M2OBC && defined EAST_VOLCONS
# undef EAST_VOLCONS
#endif
#if !defined NORTH_M2OBC && defined NORTH_VOLCONS
# undef NORTH_VOLCONS
#endif
#if !defined SOUTH_M2OBC && defined SOUTH_VOLCONS
# undef SOUTH_VOLCONS
#endif
I submit that this code should be removed. If the user wants to specify xxxx_VOLCONS on a boundary, let him/her have it.

Actually I don't think the above code does what it was intended to anyway. It says that xxxx_VOLCONS will be disabled if xxxx_M2OBC is not defined, presumably on the grounds that xxxx_M2OBC means "boundary xxxx is open for M2 velocities". (In other words, allow xxxx_VOLCONS only for open boundaries, which seems reasonable, though I disagree with it). But what xxxx_M2OBC actually means is "boundary xxxx requires M2 data". However I may be getting confused here :)

Post Reply