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

Run CanFlood in Batch #91

Open
akhilk15 opened this issue Jan 29, 2024 · 4 comments
Open

Run CanFlood in Batch #91

akhilk15 opened this issue Jan 29, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@akhilk15
Copy link

Hi, is there a way to automate multiple CanFlood runs in QGIS? We have over 20 flood rasters. We would like to explore if there is a way to run CanFlood for every raster in batch. Any suggestion would be helpful. Thanks!

@cefect
Copy link
Collaborator

cefect commented Jan 29, 2024

Thank you for the question. The documentation has a short blurb on non-plugin capabilities here, but it's not very helpful. In summary, the plugin GUI is designed for building single model runs (not batch/bulk scripting); however, the underlying model architecture is designed for use in a python script (which facilitates more fancy bulk/batch runs). We don't have any documentation on this (you're the first person to ask about it) and it's been a while since I've touched this so I don't remember all the details, but some of the tutorials are set up as scripted runs for the tests. For example, here is a method to run tutorial 1 in a script.

For your specific question, it sounds like you are looking for damage estimates for 20 hazard events? (not risk... and the gui has some cap on the number of events if I remember). If this is something you only need to do a few times, I would suggest trying to run the models and generating values per asset ('res_per_asset') to get csv files of all the damages, then post-processing these to get whatever analysis you're looking for (maybe split the 20 events up into 2x10).

If you're still keen to run scripted CanFlood models, I can send you some more example code... but I'll warn you it's not very user-friendly (thats what the gui is for ;)

@cefect cefect added the enhancement New feature or request label Jan 29, 2024
@cefect
Copy link
Collaborator

cefect commented Jan 29, 2024

adding enhancement label as a reminder to improve the documentation and add some examples for scripted models

@akhilk15
Copy link
Author

Hi Seth @cefect, thank you for your quick response! I will first check the example Python script and see if I can edit it for batch runs. We could also try to split the events as you suggested. We are aiming to get some damage assessment first and see the numbers. We might do the risk assessment later. The reason we have so many rasters is because we are assessing coastal flood hazard, rainfall flood hazard, and the joint events under a range of climates. It would be beneficial for us if you could share some more example codes. My email is [email protected]. Thanks so much! :)

@lateLarch
Copy link

lateLarch commented Feb 1, 2024 via email

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

No branches or pull requests

3 participants