IOOS0_1Check#

class compliance_checker.ioos.IOOS0_1Check(options=None)[source]#

Methods

check_altitude_units(ds)

If there's a variable named z, it must have units.

check_global_attributes(ds)

Check all global NC attributes for existence.

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_variable_attributes(ds)

Check IOOS concepts that come from NC variable attributes.

check_variable_names(ds)

Ensures all variables have a standard_name set.

check_variable_units(ds)

Ensures all variables have units.

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__([options])

check_altitude_units(ds)

If there's a variable named z, it must have units.

check_global_attributes(ds)

Check all global NC attributes for existence.

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_variable_attributes(ds)

Check IOOS concepts that come from NC variable attributes.

check_variable_names(ds)

Ensures all variables have a standard_name set.

check_variable_units(ds)

Ensures all variables have units.

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__(options=None)#
check_altitude_units(ds)[source]#

If there’s a variable named z, it must have units.

@TODO: this is duplicated with check_variable_units :param netCDF4.Dataset ds: An open netCDF dataset

check_global_attributes(ds)[source]#

Check all global NC attributes for existence.

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_variable_attributes(ds)[source]#

Check IOOS concepts that come from NC variable attributes.

Parameters:

ds (netCDF4.Dataset) – An open netCDF dataset

check_variable_names(ds)[source]#

Ensures all variables have a standard_name set.

check_variable_units(ds)[source]#

Ensures all variables have units.

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