IOOS0_1Check#
- class compliance_checker.ioos.IOOS0_1Check(options=None)[source]#
Methods
If there's a variable named z, it must have units.
Check all global NC attributes for existence.
Checks station lat attributes are set
Checks station lon attributes are set
Check that time period attributes are both set.
Check IOOS concepts that come from NC variable attributes.
Ensures all variables have a standard_name set.
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
Methods Summary
__init__
([options])If there's a variable named z, it must have units.
Check all global NC attributes for existence.
Checks station lat attributes are set
Checks station lon attributes are set
Check that time period attributes are both set.
Check IOOS concepts that come from NC variable attributes.
Ensures all variables have a standard_name set.
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
- 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