Closed rafa-guedes closed 1 year ago
I have had a look, I think this all makes sense, but I wonder if the default boundary type for SWAN should be BOUNDSPEC rather than BOUNDNEST1.
We can make BOUNDSPEC
the default @pbranson, my idea was to allow generating the different boundary types by interfacing with the data objects, Boundnest1
only happened to be the first one to be implemented in this new approach. The way these objects are being defined might as well change if that makes more sense.
The main thing with this current pull request though is the separation of the previously-defined rompy.swan.boundary.DataBoundary
into a rompy.core.boundary.BoundaryWaveStation
part which interacts with "stations" dataset and interpolates the spectra, and a rompy.core.swan.Boundnest1
part, which modifies BoundaryWaveStation
to produce boundary in swan ascii format for the boundnest1 command (which is what DataBoundary was doing before). We could then implement similar objects to generate BOUNDSPEC
etc. This will also allow using the logic defined with BoundaryWaveStation
with schism and other models more easily.
@benjaminleighton would you be able to also review this and merge if happy please since you have been working with that boundary object? This implements some changes from DataBoundary.
Hi @rafa-guedes this looks good to me.
This pull request moves the old
rompy.swan.boundary.DataBoundary
into a new core objectrompy.core.boundary.BoundaryWaveStation
. The old swan boundary object is now calledrompy.swan.boundary.Boundnest1
and inherits fromBoundaryWaveStation
with only small changes to theget
method to create SWAN ASCII boundary files instead of netcdf.Addresses https://github.com/rom-py/rompy/issues/27.