ACDDBaseCheck#
- class compliance_checker.acdd.ACDDBaseCheck[source]#
Methods
Check if acknowledgment/acknowledgment attribute is present.
check_high
(ds)Performs a check on each highly recommended attributes' existence in the dataset
Check that the values of geospatial_lat_min/geospatial_lat_max approximately match the data.
Check that the values of geospatial_lon_min/geospatial_lon_max approximately match the data.
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 that the values of time_coverage_start/time_coverage_end approximately match the data.
Checks each applicable variable for the long_name attribute
Checks each applicable variable for the standard_name attribute
check_var_units
(ds)Checks each applicable variable for the units attribute
Check that the values of geospatial_vertical_min/geospatial_vertical_max approximately match the data.
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.
Verify that the version in the Conventions field is correct
Checks that the geospatial bounds is well formed OGC WKT
Attributes Summary
Methods Summary
__init__
()Check if acknowledgment/acknowledgment attribute is present.
check_high
(ds)Performs a check on each highly recommended attributes' existence in the dataset
Check that the values of geospatial_lat_min/geospatial_lat_max approximately match the data.
Check that the values of geospatial_lon_min/geospatial_lon_max approximately match the data.
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 that the values of time_coverage_start/time_coverage_end approximately match the data.
Checks each applicable variable for the long_name attribute
Checks each applicable variable for the standard_name attribute
check_var_units
(ds)Checks each applicable variable for the units attribute
Check that the values of geospatial_vertical_min/geospatial_vertical_max approximately match the data.
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.
Verify that the version in the Conventions field is correct
Checks that the geospatial bounds is well formed OGC WKT
Attributes Documentation
- HIGH = 3#
- LOW = 1#
- MEDIUM = 2#
- supported_ds = []#
Methods Documentation
- check_acknowledgment(ds)[source]#
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)[source]#
Performs a check on each highly recommended attributes’ existence in the dataset
- Parameters:
ds (netCDF4.Dataset) – An open netCDF dataset
- check_lat_extents(ds)[source]#
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)[source]#
Check that the values of geospatial_lon_min/geospatial_lon_max approximately match the data.
- Parameters:
ds (netCDF4.Dataset) – An open netCDF dataset
- check_recommended(ds)[source]#
Performs a check on each recommended attributes’ existence in the dataset
- Parameters:
ds (netCDF4.Dataset) – An open netCDF dataset
- check_suggested(ds)[source]#
Performs a check on each suggested attributes’ existence in the dataset
- Parameters:
ds (netCDF4.Dataset) – An open netCDF dataset
- check_time_extents(ds)[source]#
Check that the values of time_coverage_start/time_coverage_end approximately match the data.
- check_var_long_name(ds)[source]#
Checks each applicable variable for the long_name attribute
- Parameters:
ds (netCDF4.Dataset) – An open netCDF dataset
- check_var_standard_name(ds)[source]#
Checks each applicable variable for the standard_name attribute
- Parameters:
ds (netCDF4.Dataset) – An open netCDF dataset
- check_var_units(ds)[source]#
Checks each applicable variable for the units attribute
- Parameters:
ds (netCDF4.Dataset) – An open netCDF dataset
- check_vertical_extents(ds)[source]#
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)[source]#
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.