Closed benjaminleighton closed 9 months ago
@benjaminleighton my idea is to use the components to define output locations. I have implemented all The Locations
and Write
components in the components branch, I'm finishing up fixing a few things and will then think of how to best connect these with the SwanConfig.
The components functionality for swan output has now been implemented since https://github.com/rom-py/rompy/pull/45, if everyone is happy with the new approach then I think we could remove these legacy objects including OutLocs
and close these issue. Examples to define swan output using the components are provided in these notebooks. Docs are defined here.
The model output is now defined using the swan components, this has become obsolete.
In OutputLocs the coords are a list of Coordinate objects see https://github.com/rom-py/rompy/blob/main/rompy/swan/config.py#L36. The comment on line 39 hints at the expected format and matches the default snippet supplied in the cookiecutter.json file at https://github.com/rom-py/rompy/blob/main/rompy/templates/swan/cookiecutter.json#L9. However when OutputLocs is used to build the cc_full dictionary prior to cookiecutting at https://github.com/rom-py/rompy/blob/main/rompy/swan/config.py#L245 the resulting format assigned to the cc_full dictionary is a dictionary keyed by 'coords' which has a value of a list of dictionaries keyed by 'lon' and 'lat'. At this point I think coords should have a value of a flat list of lon, lat pairs. A snippet from my debug looks like