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

fgmax: include duration of inundation #530

Open
tovogt opened this issue Dec 17, 2021 · 6 comments
Open

fgmax: include duration of inundation #530

tovogt opened this issue Dec 17, 2021 · 6 comments
Labels

Comments

@tovogt
Copy link
Contributor

tovogt commented Dec 17, 2021

This is not a bug report, but a feature request/proposal. Thanks for your consideration!

Currently, it's possible to obtain the maximum flood height at a set of points using the fgmax functionality. In addition to that, the time of arrival of the wave at each location can be recorded. One other feature that would be good for impact analysis is the duration of inundation of the fgmax points.

@mandli mandli added the feature label Dec 17, 2021
@mandli
Copy link
Member

mandli commented Dec 17, 2021

This would not be difficult to implement as the code for checking arrival times has most of what would be needed. If there are multiple times where a point goes wet and/or dry would you want to record every time it changes or just the total time that a point was wet?

@tovogt
Copy link
Contributor Author

tovogt commented Dec 19, 2021

Together with the arrival time, the total time would be very useful already. Of course it would be more flexible to have the start and end times of each time it changes, but I can imagine that this would raise many more questions, especially because the fgmax output file format currently has a fixed number of output values per point (https://www.clawpack.org/fgmax.html).

I would propose to record three values: arrival time, total wet time (duration), last wet time.

@mandli
Copy link
Member

mandli commented Dec 19, 2021

Given that the arrival time was the last value recorded in the data files it may be possible to handle this in a nice way where each point could have a variable number of data although it does introduce a ragged data format. This would actually be backwards compatible to a large extent given that the first value will always be the original arrival time. My one concern is that a point near the foremost inundation may oscillate significantly and cause there to be a lot of data created.

If it would be helpful to have this specificity I think we could implement with little additional cost over the original routines if you are also recording maximum inundation values.

@mandli
Copy link
Member

mandli commented Dec 19, 2021

@rjleveque do you have thoughts on this? You are (I think) the original author of this functionality so let me know if I am missing something that would make this unworkable.

@tovogt
Copy link
Contributor Author

tovogt commented Dec 20, 2021

if you are also recording maximum inundation values.

Yes, it would be exactly for the points for which I use the fgmax functionality already now.

My one concern is that a point near the foremost inundation may oscillate significantly and cause there to be a lot of data created.

Yes, this is well possible. As I said, it would be extremely useful already to have arrival time, total wet time and the last time the point was wet.

@rjleveque
Copy link
Member

This is timely since I've been working on making fgmax output a bit more flexible. In particular, I have a version that only writes one or two values per fgmax point, and in binary instead of the current version that writes many more columns in ascii (including the long/lat of each point). For a PTHA or machine learning study we may need to do hundreds or runs (or more) that all have the same fgmax points, so no need to keep repeating these, and if the fgmax grid has a large extent, we want to minimize file size for each output.

So more options could also be added. Let me think about the best way to handle this. Maybe internally we could keep track of the wet duration and the current state of each fgmax point, and then also keep track of its "drying time" whenever the point changes state from wet to dry. Then at the end, assuming the point is still dry, this time would be output as the final time of inundation.

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

No branches or pull requests

3 participants