Open alsonathif opened 2 weeks ago
@alsonathif sorry I missed this issue. I'll have a look at this, if multiple block commands isn't supported it won't be difficult to implement it. I'll look into this soon and get back to you.
This has been implemented in https://github.com/rom-py/rompy/pull/119. A notebook with example usage is provided here.
I am having trouble writing multiple BLOCK commands for the SWAN INPUT file using the current output.py in rompy/swan/components. I would like to be able to create multiple BLOCK commands and combine them using another class that can handle multiple blocks, similar to the CURVES as below: block1 = BLOCK( sname="COMPGRID", fname="./output-grid1.nc", output=["hsign", "dir"], ) block2 = BLOCK( sname="BOTTGRID", fname="./output-grid2.nc", output=["watlev"], ) blocks = BLOCKS(blocks=[block1, block2]) print(blocks.cmd())
Questions Is there a current way to achieve this functionality that I'm overlooking? If not, could this feature be added to the rompy package? Are there any plans to extend the SWAN output functionality in rompy to handle such instances with lists?