ValidMovementNetCDF#

class movement.validators.files.ValidMovementNetCDF(file, *, extra_kwargs=dict())[source]#

Bases: object

Class for validating movement netCDF (.nc) files.

The validator ensures that:

  • the file is a valid netCDF (.nc) file, and

  • the dataset contains the expected dimensions and variables for a movement dataset.

Because validation is performed on the dataset opened with extra_kwargs, any kwargs that change what is read (e.g. drop_variables or group) are taken into account.

Raises:

ValueError – If the file is not a valid netCDF file or does not match the expected structure for a movement dataset.

extra_kwargs: dict[str, Any]#

Extra keyword arguments forwarded from the loader and passed to xarray.open_dataset().

file: Path#

Path to the movement netCDF (.nc) file to validate.

suffixes: ClassVar[set[str]] = {'.nc'}#

Expected suffix(es) for the file.