opendrift.models.openoil.adios.models.oil.completeness

Calculate the completeness of the data contained in an oil record.

The top-level interface is a single function:

completeness(pyjson_of_an_oil_record)

(pyjson is a python dict that is a match for the JSON)

It performs calculations that were designed by RobertJ, and returns a value with a scale of 0->100%.

Module Contents

Functions

set_completeness(oil)

completeness(oil)

Calculate the completeness of the data contained in an oil record.

check_emulsion_water_content(oil)

One emulsion water content in any subsample. Score = 2.5

check_density(oil)

Fresh oil: One density or API. Score = 1

check_second_density(oil)

Fresh oil: Second density separated by temperature.

check_viscosity(oil)

Fresh oil: One viscosity. Score = 0.5

check_second_viscosity(oil)

Fresh oil: Second viscosity at a different temperature.

check_distillation(oil)

Fresh oil: Two Distillation cuts separated by mass or volume fraction.

check_weathered_density(oil)

One Evaporated oil: Density. Score = 1

check_weathered_viscosity(oil)

One Evaporated oil: Viscosity. Score = 1

is_measurement_good(measurement)

Attributes

logger

CHECKS

opendrift.models.openoil.adios.models.oil.completeness.logger
opendrift.models.openoil.adios.models.oil.completeness.set_completeness(oil)[source]
opendrift.models.openoil.adios.models.oil.completeness.completeness(oil)[source]

Calculate the completeness of the data contained in an oil record.

Parameters:

oil – The oil record to be validated, in json-compatible python data structure.

opendrift.models.openoil.adios.models.oil.completeness.check_emulsion_water_content(oil)[source]

One emulsion water content in any subsample. Score = 2.5

opendrift.models.openoil.adios.models.oil.completeness.check_density(oil)[source]

Fresh oil: One density or API. Score = 1

opendrift.models.openoil.adios.models.oil.completeness.check_second_density(oil)[source]

Fresh oil: Second density separated by temperature.

Score = deltaT/40 but not greater than 0.5

maxDeltaT: The difference between the lowest and highest measurement in the set.

opendrift.models.openoil.adios.models.oil.completeness.check_viscosity(oil)[source]

Fresh oil: One viscosity. Score = 0.5

opendrift.models.openoil.adios.models.oil.completeness.check_second_viscosity(oil)[source]

Fresh oil: Second viscosity at a different temperature.

Score = maxDeltaT/40, but not greater than 0.5

maxDeltaT: The difference between the lowest and highest measurement in the set.

opendrift.models.openoil.adios.models.oil.completeness.check_distillation(oil)[source]

Fresh oil: Two Distillation cuts separated by mass or volume fraction.

Score = 3 * maxDeltaFraction

maxDeltaFraction: The difference between the lowest and highest measurement in the set

opendrift.models.openoil.adios.models.oil.completeness.check_weathered_density(oil)[source]

One Evaporated oil: Density. Score = 1

opendrift.models.openoil.adios.models.oil.completeness.check_weathered_viscosity(oil)[source]

One Evaporated oil: Viscosity. Score = 1

opendrift.models.openoil.adios.models.oil.completeness.is_measurement_good(measurement)[source]
opendrift.models.openoil.adios.models.oil.completeness.CHECKS