ACDD1_3Check#

class compliance_checker.acdd.ACDD1_3Check[source]#

Methods

check_acknowledgment(ds)

Check if acknowledgment/acknowledgment attribute is present.

check_high(ds)

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

check_id_has_no_blanks(ds)

Check if there are blanks in the id field

check_lat_extents(ds)

Check that the values of geospatial_lat_min/geospatial_lat_max approximately match the data.

check_lon_extents(ds)

Check that the values of geospatial_lon_min/geospatial_lon_max approximately match the data.

check_metadata_link(ds)

Checks if metadata link is formed in a rational manner

check_recommended(ds)

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

check_suggested(ds)

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

check_time_extents(ds)

Check that the values of time_coverage_start/time_coverage_end approximately match the data.

check_var_coverage_content_type(ds)

Check coverage content type against valid ISO-19115-1 codes

check_var_long_name(ds)

Checks each applicable variable for the long_name attribute

check_var_standard_name(ds)

Checks each applicable variable for the standard_name attribute

check_var_units(ds)

Checks each applicable variable for the units attribute

check_vertical_extents(ds)

Check that the values of geospatial_vertical_min/geospatial_vertical_max approximately match the data.

get_applicable_variables(ds)

Returns a list of variable names that are applicable to ACDD Metadata Checks for variables.

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

verify_convention_version(ds)

Verify that the version in the Conventions field is correct

verify_geospatial_bounds(ds)

Checks that the geospatial bounds is well formed OGC WKT

std_check

Attributes Summary

HIGH

LOW

MEDIUM

register_checker

supported_ds

Methods Summary

__init__()

check_acknowledgment(ds)

Check if acknowledgment/acknowledgment attribute is present.

check_high(ds)

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

check_id_has_no_blanks(ds)

Check if there are blanks in the id field

check_lat_extents(ds)

Check that the values of geospatial_lat_min/geospatial_lat_max approximately match the data.

check_lon_extents(ds)

Check that the values of geospatial_lon_min/geospatial_lon_max approximately match the data.

check_metadata_link(ds)

Checks if metadata link is formed in a rational manner

check_recommended(ds)

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

check_suggested(ds)

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

check_time_extents(ds)

Check that the values of time_coverage_start/time_coverage_end approximately match the data.

check_var_coverage_content_type(ds)

Check coverage content type against valid ISO-19115-1 codes

check_var_long_name(ds)

Checks each applicable variable for the long_name attribute

check_var_standard_name(ds)

Checks each applicable variable for the standard_name attribute

check_var_units(ds)

Checks each applicable variable for the units attribute

check_vertical_extents(ds)

Check that the values of geospatial_vertical_min/geospatial_vertical_max approximately match the data.

get_applicable_variables(ds)

Returns a list of variable names that are applicable to ACDD Metadata Checks for variables.

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

verify_convention_version(ds)

Verify that the version in the Conventions field is correct

verify_geospatial_bounds(ds)

Checks that the geospatial bounds is well formed OGC WKT

Attributes Documentation

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

Methods Documentation

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

Check if acknowledgment/acknowledgment attribute is present. Because acknowledgement has its own check, we are keeping it out of the Global Attributes (even though it is a Global Attr).

Parameters:

ds (netCDF4.Dataset) – An open netCDF dataset

check_high(ds)#

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

Parameters:

ds (netCDF4.Dataset) – An open netCDF dataset

check_id_has_no_blanks(ds)[source]#

Check if there are blanks in the id field

Parameters:

ds (netCDF4.Dataset) – An open netCDF dataset

check_lat_extents(ds)#

Check that the values of geospatial_lat_min/geospatial_lat_max approximately match the data.

Parameters:

ds (netCDF4.Dataset) – An open netCDF dataset

check_lon_extents(ds)#

Check that the values of geospatial_lon_min/geospatial_lon_max approximately match the data.

Parameters:

ds (netCDF4.Dataset) – An open netCDF dataset

Checks if metadata link is formed in a rational manner

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_suggested(ds)#

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

Parameters:

ds (netCDF4.Dataset) – An open netCDF dataset

check_time_extents(ds)#

Check that the values of time_coverage_start/time_coverage_end approximately match the data.

check_var_coverage_content_type(ds)[source]#

Check coverage content type against valid ISO-19115-1 codes

Parameters:

ds (netCDF4.Dataset) – An open netCDF dataset

check_var_long_name(ds)#

Checks each applicable variable for the long_name attribute

Parameters:

ds (netCDF4.Dataset) – An open netCDF dataset

check_var_standard_name(ds)#

Checks each applicable variable for the standard_name attribute

Parameters:

ds (netCDF4.Dataset) – An open netCDF dataset

check_var_units(ds)#

Checks each applicable variable for the units attribute

Parameters:

ds (netCDF4.Dataset) – An open netCDF dataset

check_vertical_extents(ds)#

Check that the values of geospatial_vertical_min/geospatial_vertical_max approximately match the data.

Parameters:

ds (netCDF4.Dataset) – An open netCDF dataset

get_applicable_variables(ds)#

Returns a list of variable names that are applicable to ACDD Metadata Checks for variables. This includes geophysical and coordinate variables only.

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

verify_convention_version(ds)#

Verify that the version in the Conventions field is correct

verify_geospatial_bounds(ds)#

Checks that the geospatial bounds is well formed OGC WKT