HF Radar Compliance Checker Script

Purpose:

Run the compliance checker on NDBC and SIO HF radar data to compare the metadata compliance.

Written by: JAB


In [1]:
from compliance_checker.runner import ComplianceChecker, CheckSuite

# Load all available checker classes.
check_suite = CheckSuite()
check_suite.load_all_available_checkers()

URLs to the east coast and Gulf of Mexico 1 km resolution HF Radar data


In [2]:
NDBC_HFR = 'http://sdf.ndbc.noaa.gov/thredds/dodsC/hfradar_usegc_1km'
SIO_HFR = 'http://hfrnet.ucsd.edu/thredds/dodsC/HFRNet/USEGC/1km/hourly/RTV'

NDBC


In [3]:
from IPython.display import HTML, display

output_filename = 'NDBC_HFR.html'
kw = dict(checker_names=['cf', 'acdd'],
          verbose=True,
          criteria='normal',
          output_format='html')

ret_val, err = ComplianceChecker.run_checker(NDBC_HFR, output_filename=output_filename, **kw)


with open(output_filename) as f:
    display(HTML(f.read()))


Compliance Checker

Scoring Breakdown:

| 3
Name Score
§2.2 Valid netCDF data types 12/12
§2.3 Legal variable names 12/12
§2.4 Unique dimensions 12/12
§2.6.1 Global Attribute Conventions includes CF-1.6 0/1
§2.6.2 Convention Attributes 5/5
§3.1 Variables contain valid CF Units 0/1
§3.1 Variables contain valid units for the standard_name 6/6
§3.3 Standard Names 7/7
§3.4 Ancillary Variables 2/2
§4 Coordinate Variable latitude contains valid attributes 2/2
§4 Coordinate Variable longitude contains valid attributes 2/2
§4.4 Time coordinate variable and attributes 0/1
| 1
Name Score
§4 Coordinate Variables 3/3
§4.1 Coordinates representing latitude 6/6
§4.1 Coordinates representing longitude 6/6
§5.1 Geophysical variables contain valid dimensions 0/5
§8.1 Packed Data 8/8
Name Score

Corrective Actions

Name Priority Corrective action
§2.6.1 Global Attribute Conventions includes CF-1.6 3 Conventions field is not "CF-1.6"
§3.1 Variables contain valid CF Units 3 unknown units type (None) for procParams
§4.4 Time coordinate variable and attributes 3 time does not have units
§5.1 Geophysical variables contain valid dimensions 2 The time dimension for the variable time does not have an associated coordinate variable, but is a Lat/Lon/Time/Height dimension.
§5.1 Geophysical variables contain valid dimensions 2 The time dimension for the variable u does not have an associated coordinate variable, but is a Lat/Lon/Time/Height dimension.
§5.1 Geophysical variables contain valid dimensions 2 The time dimension for the variable v does not have an associated coordinate variable, but is a Lat/Lon/Time/Height dimension.
§5.1 Geophysical variables contain valid dimensions 2 The time dimension for the variable DOPx does not have an associated coordinate variable, but is a Lat/Lon/Time/Height dimension.
§5.1 Geophysical variables contain valid dimensions 2 The time dimension for the variable DOPy does not have an associated coordinate variable, but is a Lat/Lon/Time/Height dimension.

Scripps


In [4]:
output_filename = 'SIO_HFR.html'
ret_val, err = ComplianceChecker.run_checker(SIO_HFR, output_filename=output_filename, **kw)

with open(output_filename) as f:
    display(HTML(f.read()))


Compliance Checker

Scoring Breakdown:

| 4
Name Score
§2.2 Valid netCDF data types 14/14
§2.3 Legal variable names 14/14
§2.4 Unique dimensions 14/14
§2.6.1 Global Attribute Conventions includes CF-1.6 0/1
§2.6.2 Convention Attributes 5/5
§3.1 Variables contain valid CF Units 0/1
§3.1 Variables contain valid units for the standard_name 7/9
§3.3 Standard Names 9/9
§3.4 Ancillary Variables 2/2
§4 Coordinate Variable latitude contains valid attributes 2/2
§4 Coordinate Variable longitude contains valid attributes 2/2
§4.4 Time coordinate variable and attributes 6/6
§5.2 Latitude and longitude coordinates of a horizontal grid 5/5
§9.1 Feature Types are all the same 0/1
| 3
Name Score
§4 Coordinate Variables 3/3
§4.1 Coordinates representing latitude 6/6
§4.1 Coordinates representing longitude 6/6
§5.1 Geophysical variables contain valid dimensions 6/6
§5.3 Is reduced horizontal grid 0/4
§6.2 Alternative Coordinates 1/1
§9.3.1 Orthogonal Multidimensional Array 14/14
§9.4 featureType attribute 0/1
§9.5 Discrete Geometry 2/9
§9.6 Missing Data 4/4
Name Score

Corrective Actions

Name Priority Corrective action
§2.6.1 Global Attribute Conventions includes CF-1.6 3 Conventions field is not "CF-1.6"
§3.1 Variables contain valid CF Units 3 unknown units type (None) for procParams
§3.1 Variables contain valid units for the standard_name 3 units are hours since 2012-01-01T00:00:00Z, standard_name units should be s
§3.1 Variables contain valid units for the standard_name 3 units are hours since 2012-01-01T00:00:00Z, standard_name units should be s
is_reduced_horizontal_grid 2 Coordinate is not a proper variable
is_reduced_horizontal_grid 2 Coordinate is not a proper variable
is_reduced_horizontal_grid 2 Coordinate is not a proper variable
is_reduced_horizontal_grid 2 Coordinate is not a proper variable
§9.1 Feature Types are all the same 3 At least one of the variables has a different feature type than the rest of the variables.
§9.1 Feature Types are all the same 3 procParams(nProcParam) site_lat(nSites) time_offset(time) u(time, lat, lon) site_code(nSites, maxStrlen64) site_netCode(nSites, maxStrlen64) v(time, lat, lon) site_lon(nSites) time_run(time)
§9.4 featureType attribute 2 The featureType is provided and is not from the featureType list.
dataset 2 The cf_role featureType is not properly defined.
check_coordinates 2 The variable procParams does not have associated coordinates
check_coordinates 2 The variable site_code does not have associated coordinates
check_coordinates 2 The variable site_lat does not have associated coordinates
check_coordinates 2 The variable site_lon does not have associated coordinates
check_coordinates 2 The variable site_netCode does not have associated coordinates
check_coordinates 2 The variable time_offset does not have associated coordinates