NOAA-ORR-ERD / PyGnome

The General NOAA Operational Modeling Environment
https://gnome.orr.noaa.gov/doc/pygnome/index.html
Other
59 stars 44 forks source link

PyGNOME validation and calibration #70

Open egiraldof opened 4 years ago

egiraldof commented 4 years ago

Hello,

I am trying to validate and calibrate the PyGNOME outputs for a case in the Colombian Pacific, the validation I hope to do using satellite images of a spill that occurred in the past in the study area. I want to know if there is any configuration of the model where the particles do not move in the simulation at the same time and that when they move the trace of the oil "stain" on the water is observed. Do you have any other ideas to validate the outputs of the model?

thanks for the kindness in your answers.

ChrisBarker-NOAA commented 4 years ago

I'm not sure what you mean by " the particles do not move in the simulation at the same time" ? could you clarify?

As to: "when they move the trace of the oil "stain" on the water is observed.".

Not directly, but you can post process the output to see where all the particles are at all times, and produce any visualization you want.

Depending on what tools you are familiar with, you can use shapefile, KMZ, or netcf output -- and then post process as you need.

egiraldof commented 4 years ago

Thanks @ChrisBarker-NOAA

Could you tell me how to get the outputs as shapefile. I can get the outputs for GIS from GNOME Desktop, but I don't know how to do it in PyGNOME.

ChrisBarker-NOAA commented 4 years ago

you an add a number of "outputters" to the model in py_gnome:

https://gnome.orr.noaa.gov/doc/pygnome/scripting/outputters.html

for example:

import gnome.scripting as gs
model.outputters += gs.ShapeOutput( filename, zip_output=True, surface_conc="kde")
egiraldof commented 4 years ago

Hello @ChrisBarker-NOAA

Thanks for the information, I had the manual 0.6.

I get this error when I try to have the outputs as shapefiles:

image

ChrisBarker-NOAA commented 4 years ago

that's a bug / issue with the shapefile package.

what did you use as a filename? I think it cannon have a "dot: in it. Try using a_name rather than a_name.shp

ChrisBarker-NOAA commented 4 years ago

BTW: I just updated the master branch -- there may be a fix (or at least a beter error message) for this issue in there. If it's what I think it is.

egiraldof commented 4 years ago

Hi @ChrisBarker-NOAA !

I already updated the git but I still get the same error.

git pull https://github.com/NOAA-ORR-ERD/PyGnome.git

image

I am not typing the name with a dot, I am not getting a different message than the image I attached above. I wrote like this in my code:

import gnome.scripting as gs model.outputters + = gs.ShapeOutput ('tumaco_output', zip_output = True, surface_conc = "kde")

ChrisBarker-NOAA commented 4 years ago

it's working on my end (from gitHub master)

Try the scripts/script_surface_concentration/ script.

It could be your version of pyshp. Do a conda list and see what you get, I have:

pyshp 1.2.12 py_2 conda-forge

and I know 1.3 had some significant changes (which we will be using on future versions, but for now, you need 1.2.12

You can also try:

python -c "import shapefile; print(shapefile.__version__)"

to get the version you are running.