IOOS1_1Check#

class compliance_checker.ioos.IOOS1_1Check[source]#

Compliance checker implementation of IOOS Metadata Profile, Version 1.1

Related links: https://ioos.github.io/ioos-metadata/ioos-metadata-profile-v1-1.html#ioos-netcdf-metadata-profile-attributes ioos/compliance-checker#69 ioos/compliance-checker#358

Methods

check_geophysical_vars_fill_value(ds)

Check that geophysical variables contain fill values.

check_geophysical_vars_standard_name(ds)

Check that geophysical variables contain standard names.

check_high(ds)

Performs a check on each highly recommended attributes' existence in the dataset

check_platform_variable_attributes(ds)

Platform variables must contain the following attributes:

check_platform_variables(ds)

The value of platform attribute should be set to another variable which contains the details of the platform.

check_recommended(ds)

Performs a check on each recommended attributes' existence in the dataset

check_station_location_lat(ds)

Checks station lat attributes are set

check_station_location_lon(ds)

Checks station lon attributes are set

check_time_period(ds)

Check that time period attributes are both set.

check_units(ds)

Required for most all variables that represent dimensional quantities.

get_test_ctx(severity, name[, variable])

Creates an existing TestCtx object in _defined_results dict if it does not exist for the current checker instance, or an returns the existing TestCtx for modification.

setup(ds)

Common setup method for a Checker.

std_check_in(dataset, name, allowed_vals)

Returns 0 if attr not present, 1 if present but not in correct value, 2 if good

std_check

Attributes Summary

HIGH

LOW

MEDIUM

register_checker

supported_ds

Methods Summary

__init__()

check_geophysical_vars_fill_value(ds)

Check that geophysical variables contain fill values.

check_geophysical_vars_standard_name(ds)

Check that geophysical variables contain standard names.

check_high(ds)

Performs a check on each highly recommended attributes' existence in the dataset

check_platform_variable_attributes(ds)

Platform variables must contain the following attributes:

check_platform_variables(ds)

The value of platform attribute should be set to another variable which contains the details of the platform.

check_recommended(ds)

Performs a check on each recommended attributes' existence in the dataset

check_station_location_lat(ds)

Checks station lat attributes are set

check_station_location_lon(ds)

Checks station lon attributes are set

check_time_period(ds)

Check that time period attributes are both set.

check_units(ds)

Required for most all variables that represent dimensional quantities.

get_test_ctx(severity, name[, variable])

Creates an existing TestCtx object in _defined_results dict if it does not exist for the current checker instance, or an returns the existing TestCtx for modification.

setup(ds)

Common setup method for a Checker.

std_check(dataset, name)

std_check_in(dataset, name, allowed_vals)

Returns 0 if attr not present, 1 if present but not in correct value, 2 if good

Attributes Documentation

HIGH = 3#
LOW = 1#
MEDIUM = 2#
register_checker = True#
supported_ds = [<class 'netCDF4._netCDF4.Dataset'>]#

Methods Documentation

__init__()[source]#
check_geophysical_vars_fill_value(ds)[source]#

Check that geophysical variables contain fill values.

Parameters:

ds (netCDF4.Dataset) – An open netCDF dataset

check_geophysical_vars_standard_name(ds)[source]#

Check that geophysical variables contain standard names.

Parameters:

ds (netCDF4.Dataset) – An open netCDF dataset

check_high(ds)[source]#

Performs a check on each highly recommended attributes’ existence in the dataset

Parameters:

ds (netCDF4.Dataset) – An open netCDF dataset

check_platform_variable_attributes(ds)[source]#
Platform variables must contain the following attributes:

ioos_code long_name short_name type

Parameters:

ds (netCDF4.Dataset) – An open netCDF dataset

check_platform_variables(ds)[source]#

The value of platform attribute should be set to another variable which contains the details of the platform. There can be multiple platforms involved depending on if all the instances of the featureType in the collection share the same platform or not. If multiple platforms are involved, a variable should be defined for each platform and referenced from the geophysical variable in a space separated string.

Parameters:

ds (netCDF4.Dataset) – An open netCDF dataset

Performs a check on each recommended attributes’ existence in the dataset

Parameters:

ds (netCDF4.Dataset) – An open netCDF dataset

check_station_location_lat(ds)#

Checks station lat attributes are set

check_station_location_lon(ds)#

Checks station lon attributes are set

check_time_period(ds)#

Check that time period attributes are both set.

check_units(ds)[source]#

Required for most all variables that represent dimensional quantities. The value should come from udunits authoritative vocabulary, which is documented in the CF standard name table with it’s corresponding standard name.

Parameters:

ds (netCDF4.Dataset) – An open netCDF dataset

get_test_ctx(severity, name, variable=None)#

Creates an existing TestCtx object in _defined_results dict if it does not exist for the current checker instance, or an returns the existing TestCtx for modification. Takes a severity level and name and uses the two element tuple formed by the arguments as a key into the dict.

Parameters:
  • severity (int) – A BaseCheck severity level

  • name (str) – The name of the check

Rtype compliance_checker.base.TestCtx:

Returns:

A new or or existing TestCtx instance taken from this instance’s _defined_results dict

setup(ds)#

Common setup method for a Checker.

Automatically run when running a CheckSuite. Define this method in your Checker class.

classmethod std_check(dataset, name)#
classmethod std_check_in(dataset, name, allowed_vals)#

Returns 0 if attr not present, 1 if present but not in correct value, 2 if good