-
Notifications
You must be signed in to change notification settings - Fork 44
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
polygon oil spill #165
Comments
The only parameter you need to pass in for the PolygonRelease is filename. If you don't have a shapefile with all the information you would have to pass in the polygons instead. import gnome.scripting as gs There are other parameters you might want to include, depending on your scenario (like release_time or substance), which are described in the documentation - https://gnome.orr.noaa.gov/doc/pygnome/index.html |
thanks a lot ! |
Could you please email the .gnome file to [email protected] That will be the easiest way for us to troubleshoot. |
The polygon spill does not work in WebGnome at the moment. We are working on the issue. In the meantime you could try setting up your release as a NESDISRelease with the same parameters. That should load in, but let us know if you notice any issues with it. |
Hi AmyMacFadyen, I have emailed you my .gnome file to [email protected] for your investigation. Hi coconnor8, I have tried gs.PolygonRelease(filename = 'shapefilename.zip') as you suggested with myself defined polgyon shape file which worked in pygnome and I can get the .gif animation as shown here. Thanks for that! for your information: I have previously downloaded a polygon zip file from https://www.ospo.noaa.gov/products/ocean/marinepollution/ To me it seems the webgnome works with polygon oil release. Pls correct me if I am wrong. |
What is not working correctly is setting up the PolygonRelease in a script, making a save file, and loading it into WebGnome. The NESDIS release works in WebGnome, and that is what is created when you upload your zip file to WebGnome. The PolygonRelease is slightly different so we need to change a few things to make that work as well. |
I got your point. thanks. import gnome.scripting as gs however, I got an error: I also tried: "from gnome.spills import NESDISRelease" which gave me: I went to the _init_py. but did not find the 'NESDISRelease' in |
Sorry about that, I added NESDISRelease to scripting locally. You would need to import it - |
Thanks. It works for me now. And I want to point out here for other users who might encounter this usage issue of NESDISRelease that it needs to set the timeformat as: I also realize in the release.py code there are feature variables "weights" and "thicknesses" in the NESDISRelease that we can set for the substance property. May I know how to use them as well? like what are the units of weights and thickness? are these two values user defined or if I define one like weight for a special type of oil, the thickness shall be calculated by myself based on the oil volume and the polygon surface area? |
The NESDIS release does not allow you to set the thicknesses and weights (they will be ignored if you pass them in). It sets thickness based on 'oil_type' of 'thin' or 'thick' and defaults to 'thin'. You would have to use the PolygonRelease to pass in thicknesses or weights, and we are still working on how that will work in WebGnome (hopefully that should be working soon). You can pass in either weights or thicknesses but not both - Thickness wasn't included in the documentation but should be in meters, also the same length as polygons, and our defaults for the NESDISRelease are 50e-6 for 'thick' and 5e-6 for 'thin'. |
I have downloaded zip file for polygon oil spilling from https://www.ospo.noaa.gov/products/ocean/marinepollution/
May I know how it work in pygnome ? I have no idea how to write the proper command lines by referring to
gnome.spills.release.PolygonRelease(filename=None, features=None, polygons=None, weights=None, thicknesses=None, **kwargs)
The text was updated successfully, but these errors were encountered: