pyschism icon indicating copy to clipboard operation
pyschism copied to clipboard

Question: Should I set up tidal boundary per open boundary?

Open SorooshMani-NOAA opened this issue 1 year ago • 3 comments

In the old pyschism API, I would just specify the type of tidal BC I needed, e.g. elevation and velocity, and it would automatically write it for all the open boundary conditions in the mesh files. It seems now that the new API requires that I know the number of open boundary conditions, and pass the conditions for each boundary separately.

This is really inconvenient when dealing with automation scripts. Do you have a suggested/preferred way of setting the boundary types for all the mesh open boundaries? Should I just say something like:

...
flags=[[0,0,3,3] for i in hgrid.boundaries.open.itertuples()]
...

or there's a better way?

SorooshMani-NOAA avatar Oct 23 '23 18:10 SorooshMani-NOAA

@SorooshMani-NOAA Sorry for the inconvenience. These changes were made to expose more options to users as Joseph requested and to make it more robust. For example, the Pacific mesh has 9 open boundaries, including several rivers. You still need to specify bctypes for each boundary with the old API. In your case, the way you suggested can work. I'll think about if we can do it better.

cuill avatar Oct 23 '23 19:10 cuill

I see thank you. So for now I stick with the for-loop in my prior comment. That's good enough, but I just wanted to make sure there's no better way. Take my feedback mainly as a "legacy user" feedback; I'm used to doing something and I bring it up when I see a change!

SorooshMani-NOAA avatar Oct 23 '23 19:10 SorooshMani-NOAA

@SorooshMani-NOAA No problem. And thanks for making an effort to test the changes, which is good to make pyschism more bug-free and user-friendly.

cuill avatar Oct 23 '23 19:10 cuill