NOAA-ORR-ERD / adios_oil_database

System for managing petroleum, product data for use in oil spill response
https://adios.orr.noaa.gov
5 stars 1 forks source link

Unable to make gnome_oil from apparently gnome_suitable oil #6

Open knutfrode opened 1 month ago

knutfrode commented 1 month ago

Hi! With the release of v1.2, I get Viscosities must be decreasing with temperature when trying to make gnome_oils from some of the oils, although their metadata indicate that the oil should be "gnome suitable". E.g. for the AUK oil:

from adios_db.models.oil.oil import Oil 
from adios_db.computation import gnome_oil
o = Oil.from_file('/home/knutfd/software/noaa-oil-data/data/oil/AD/AD00082.json')
print(o.metadata.gnome_suitable)
oil = gnome_oil.make_gnome_oil(o)

If I understand correctly, does this mean that the oil metadata (i.e. json files) should (eventually) be updated to match the new requirements?

Would it be an idea to make gnome_suitable a dynamic criteria determined by the actual version of the code, instead of a hard coded metadata item?

ChrisBarker-NOAA commented 1 month ago

Actually, it is dynamic -- we've done some updates to the code recently (I pushed it yesterday), but I forgot to update the data.

Stay tuned.

knutfrode commented 2 weeks ago

This sounds good! It seems that gnome_suitable is still a field in the json-files, but I understand that this will soon be removed?

And does it also mean that oils where viscosiity is not decreasing with temperature (like ADO000082) will be discarded? https://github.com/NOAA-ORR-ERD/noaa-oil-data/blob/production/data/oil/AD/AD00082.json#L20 Or such oils may perhaps remain in library, but will be dynamicaly marked as not gnome_suitable by adios_db?