opendrift.models.openoil.adios.models.oil.validation.validate

Validation of a single oil record

The actual validation is done in the Oil object (and sub-objects)

This just provides some convenient wrappers around the validate call

Module Contents

Functions

validate_json(oil_json)

validate a json-compatible-python record

validate(oil)

validate an Oil object

Attributes

logger

opendrift.models.openoil.adios.models.oil.validation.validate.logger
opendrift.models.openoil.adios.models.oil.validation.validate.validate_json(oil_json)[source]

validate a json-compatible-python record

An Oil object is returned, if it’s possible to do so.

The “status” field is updated in place, with no other alterations of the record

opendrift.models.openoil.adios.models.oil.validation.validate.validate(oil)[source]

validate an Oil object

oil.status is updated in place – this is simply a wrapper around Oil.reset_validation() – probably no longer needed