opendrift.models.openoil.adios.models.oil.cleanup.density

cleanups that work with density

Module Contents

Classes

FixAPI

adds (or replaces) the API value, from the density measurements

class opendrift.models.openoil.adios.models.oil.cleanup.density.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.

check_for_valid_api()[source]

check is the API value is already valid

find_density_near_15C()[source]

Returns the density (in kg/m3)

It will interpolate and extrapolate as needed