IOOSNCCheck#

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

Methods

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.

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

supported_ds

Methods Summary

__init__([options])

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.

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#
supported_ds = {<class 'netCDF4._netCDF4.Dataset'>, <class 'compliance_checker.MemoizedDataset'>}#

Methods Documentation

__init__(options=None)#
check_station_location_lat(ds)[source]#

Checks station lat attributes are set

check_station_location_lon(ds)[source]#

Checks station lon attributes are set

check_time_period(ds)[source]#

Check that time period attributes are both set.

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