opendrift.models.openoil.adios.models.oil.cleanup
cleanup modules
all cleanup classes are registered here
- so far:
compute density from API
possible things to cleanup:
normalizing units for various things
putting distillation cuts in order
Submodules
Package Contents
Classes
initialize a Cleanup object with an oil object |
|
adds (or replaces) the API value, from the density measurements |
Attributes
- class opendrift.models.openoil.adios.models.oil.cleanup.Cleanup(oil)[source]
initialize a Cleanup object with an oil object
- Parameters:
oil (adios_db.models.oil.oil.OIl) – the oil object you want to clean up
- ID
- abstract cleanup(oil, do_it=False)[source]
run this particular cleanup option
- Parameters:
oil – an Oil object to act on
do_it=False – flag to tell the cleanup to do its thing. If False, the method returns a message. If True, the action is taken, and the Oil object is altered.
- Returns:
a message of what could be done, or what was done.
- class opendrift.models.openoil.adios.models.oil.cleanup.FixAPI(oil)[source]
Bases:
opendrift.models.openoil.adios.models.oil.cleanup.cleanup.Cleanup
adds (or replaces) the API value, from the density measurements
- NOTE: this could be extended to interpolate, but it that actually needed?
There is code in the computation.physical_properties package to help, if needed.
initialize a Cleanup object with an oil object
- Parameters:
oil (adios_db.models.oil.oil.OIl) – the oil object you want to clean up
- ID = '001'
- check()[source]
checks to see if there is something to fix
returns: flag, msg
if nothing is needed, flag is None if something can be cleaned up, flag is True if something is wrong, but can not be cleaned up, flag is False
fixme: – maybe cleanup and validation should be better integrated?
- cleanup()[source]
run this particular cleanup option
- Parameters:
oil – an Oil object to act on
do_it=False – flag to tell the cleanup to do its thing. If False, the method returns a message. If True, the action is taken, and the Oil object is altered.
- Returns:
a message of what could be done, or what was done.
- opendrift.models.openoil.adios.models.oil.cleanup.ALL_CLEANUPS = []
- opendrift.models.openoil.adios.models.oil.cleanup.CLEANUP_MAPPING