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
use pyflwdir package to parse nextxy data of CaMa-Flood! #21
Comments
And I also email to Prof. Dai Yamazaki, he replied that the traditionary GMT and Fortran code for river network visualization don't work now, so I am trying to learn the pyflwdir toolbox recently. |
Hi @Jiangchao3, Thanks for using pyflwdir! I had a look at your data and noticed that pits have a value of -10 instead of -9 in the nextxy data. Perhaps this has changed in the recent CaMa-Flood updates? Pinging Prof Yamazaki (@bigasmountain) here to confirm this has indeed changed in which case I'll update the code. For now you can just change the pit values in the nextxy data to use pyflwdir.
To make nice visualization you will want to use either the Hope this helps! PS. For a next issue anywhere on github it is always useful if you paste the actual code instead of a screenshot to quickly be able to reproduce it. Otherwise your issue was really clear and had the data for me to debug it! |
Yes -10 is inland termination, while -9 is for usual river mouth flowing to ocean, |
Hi @DirkEilander and @bigasmountain, thanks very much for your kindly reply. And yes I also noticed that the latest CaMa-Flood manual describes that -10 represents the inland termination while -9 represents the river mouth. |
Hi @DirkEilander , your recomended script worked after replace the pits of -10 with -9. I will spend some time to further learn the whole package of pyflwdir. And looking forward to your update of the code to be able to parse the new river network dataset of cama-flood. Many thanks for your kindly help. |
This is fixed in 16b1ac0 (still unrealeased - for now you get the update by updating pyflwdir directly from git)
|
So great for providing such a detailed script. I will check it after getting back to office tomorrow! Thanks again! |
Hi @DirkEilander, the above script you provided works well, many thanks to your sincere help! |
Dear @DirkEilander ,
This is Jiangchao Qiu, a Ph.D. student from Sun Yat-sen University, China. I am major in simulating storm surge using physical model.
I know you by reading your paper : The effect of surge on riverine flood hazard and impact in deltas globally. Great works!
Recently, my collaborator provides me some global modeling result using CaMa-Flood in 15 arcmin resolution. I am trying to analyze these result and make some visualization, especially the river network and river mouths along the coastlines.
Firstly, I used the function of cmf_maps_io.py (in your compound_hotpots repositories) to transform the nextxy.bin file to nextxy.tif file
glb_15min.zip
Secondly, I want to use the pydlwdir package to visualize the river network, but some errors occurred when I parse the nextxy.tif file to
the actionable common format.
the following is the screensnaps
I try to use the function of pyflwdir.FlwdirRaster and pyflwdir.from_array, but both failed, I don't know how to fix it, could you please help me check and give some suggestion about how to solve this problem.
By the way, the environment of my package seems no problem, since all of the example in the notebook folder can be carried out smothly.
Many thanks to you and looking forward to your reply.
Best regards,
Jiangchao
The text was updated successfully, but these errors were encountered: