Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difficulty implementing multiple BLOCK commands in SWAN INPUT file generation #118

Open
alsonathif opened this issue Sep 20, 2024 · 2 comments

Comments

@alsonathif
Copy link

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?

@rafa-guedes
Copy link
Collaborator

@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.

@rafa-guedes
Copy link
Collaborator

This has been implemented in #119. A notebook with example usage is provided here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants