-
Notifications
You must be signed in to change notification settings - Fork 87
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
GeoClawData.read: manning_break with single value is read as float instead of list #554
Comments
This is duplicated functionality as the |
Thanks for the response! Is |
|
Regarding using Regarding Also I think what is called
and the last two lists are really In the original implementation there is also a Finally, the |
Thanks @rjleveque, I am not entirely sure why I had started from scratch with the functionality in I guess what we should really decide is how to standardize the code and make sure all the options are there that should be. I am not entirely sure how best to do that but I agree with some of your points regarding what things should be made similar. |
When using the function
GeoClawData.read
on a"geoclaw.data"
file that has been previously written using the functionGeoClawData.write
, themanning_break
attribute might be read as a float instead of a list if it only contains a single value. This is because the functionclawpack.clawutil.data.ClawData.read
can only recognize lists correctly if they contain more than a single value.I would really love to have an implementation of
GeoClawData.read
that restores the originalmanning_break
attribute. In my applications, I usually havemanning_break = [0.0]
. When reading in the data, modifying it and attempting to write again, an error is raised becauseGeoClawData.write
expects thatmanning_break
is a list-type attribute.Note that other attributes might be affected by the same issue and it might be worth going through all subclasses of
ClawData
and making sure that list-type attributes are read as actual list types.The text was updated successfully, but these errors were encountered: