Skip to content

Commit

Permalink
Merge pull request #39 from cedadev/cf1_7
Browse files Browse the repository at this point in the history
Further CF-1.7 checks
  • Loading branch information
RosalynHatcher authored Feb 28, 2018
2 parents a162a9f + b7ed52f commit b66e954
Show file tree
Hide file tree
Showing 37 changed files with 501 additions and 87 deletions.
390 changes: 345 additions & 45 deletions src/cfchecker/cfchecks.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test_files/CF_1_0_OK.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: CF_1_0_OK.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)


Expand Down
73 changes: 68 additions & 5 deletions test_files/CF_1_7.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: CF_1_7.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.7
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Area Type Table Version 6 (22 February 2017)
Using Standardized Region Name Table Version 2 (12 June 2013)

Expand All @@ -11,7 +11,6 @@ ERROR: (2.6.3): Variable external_var2 named as an external variable must not be
------------------
Checking variable: lat
------------------
ERROR: (5): co-ordinate variable not monotonic

------------------
Checking variable: lon
Expand Down Expand Up @@ -65,6 +64,70 @@ Checking variable: arv4
ERROR: (2.5.1): actual_range attribute must be of same type as variable arv4
ERROR: (2.5.1): actual_range values must be greater than or equal to 15.0 (valid_min)

ERRORS detected: 14
WARNINGS given: 0
INFORMATION messages: 0
------------------
Checking variable: current_speed_qc
------------------
WARN: (3.3): Use of standard_name modifier status_flag is deprecated

------------------
Checking variable: current_speed_qc2
------------------
WARN: (3.3): Use of standard_name modifier number_of_observations is deprecated

------------------
Checking variable: n_heat_transport
------------------

------------------
Checking variable: geo_region
------------------
ERROR: (3.3): Invalid region name: dummy_ocean

------------------
Checking variable: lev
------------------
ERROR: (4.3.3): Standard name of variable PS inconsistent with that of lev
ERROR: (4.3.3): PTOP is not declared as a variable
ERROR: (5): co-ordinate variable not monotonic

------------------
Checking variable: PS
------------------

------------------
Checking variable: sigma
------------------
ERROR: (4.3.3): Formula term dummy not present in formula for ocean_sigma_coordinate
ERROR: (4.3.3): Standard names of formula_terms variables are inconsistent/invalid
ERROR: (5): co-ordinate variable not monotonic

------------------
Checking variable: var2
------------------
INFO: (3.1): No units attribute set. Please consider adding a units attribute for completeness.

------------------
Checking variable: var3
------------------
INFO: (3.1): No units attribute set. Please consider adding a units attribute for completeness.

------------------
Checking variable: sigma2
------------------
WARN: (3.1): units attribute should be present
ERROR: (4.3.3): computed_standard_name attribute is only allowed on a coordinate variable which has a formula_terms attribute
ERROR: (5): co-ordinate variable not monotonic

------------------
Checking variable: temp
------------------

------------------
Checking variable: crs
------------------
ERROR: (5.6): Attribute longitude_of_prime_meridian of incorrect data type (Appendix F)
ERROR: (5.6): reference_ellipsoid_name, prime_meridian_name, horizontal_datum_name and geographic_crs_name must all be definied if any one is defined

ERRORS detected: 24
WARNINGS given: 3
INFORMATION messages: 2
Binary file modified test_files/CF_1_7.nc.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion test_files/CRM018_test1.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: CRM018_test1.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)

WARN: (2.6.1): No 'Conventions' attribute present
Expand Down
2 changes: 1 addition & 1 deletion test_files/CRM021_test1.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: CRM021_test1.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)


Expand Down
2 changes: 1 addition & 1 deletion test_files/CRM024_test1.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: CRM024_test1.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)

ERROR: (2.6.1): This netCDF file does not appear to contain CF Convention data.
Expand Down
2 changes: 1 addition & 1 deletion test_files/CRM026_test2.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: CRM026_test2.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)


Expand Down
2 changes: 1 addition & 1 deletion test_files/CRM027_test1.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: CRM027_test1.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)

WARN: (7.1): Data for variable time lies outside cell boundaries
Expand Down
2 changes: 1 addition & 1 deletion test_files/CRM027_test2.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: CRM027_test2.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)

WARN: (7.1): Data for variable time lies outside cell boundaries
Expand Down
2 changes: 1 addition & 1 deletion test_files/CRM028_test1.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: CRM028_test1.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)

WARN: (2.6.1): No 'Conventions' attribute present
Expand Down
2 changes: 1 addition & 1 deletion test_files/CRM032_test1.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: CRM032_test1.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)

ERROR: (2.6.1): This netCDF file does not appear to contain CF Convention data.
Expand Down
2 changes: 1 addition & 1 deletion test_files/CRM033_test1.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: CRM033_test1.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)

WARN: (2.6.1): No 'Conventions' attribute present
Expand Down
2 changes: 1 addition & 1 deletion test_files/CRM035.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: CRM035.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)

WARN: (2.6.1): No 'Conventions' attribute present
Expand Down
2 changes: 1 addition & 1 deletion test_files/CRM037.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: CRM037.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)


Expand Down
2 changes: 1 addition & 1 deletion test_files/CRM038.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: CRM038.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)


Expand Down
2 changes: 1 addition & 1 deletion test_files/CRM041.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: CRM041.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)


Expand Down
2 changes: 1 addition & 1 deletion test_files/GregRappa.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: GregRappa.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)


Expand Down
2 changes: 1 addition & 1 deletion test_files/Trac020_test1.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: Trac020_test1.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)


Expand Down
2 changes: 1 addition & 1 deletion test_files/Trac020_test2.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: Trac020_test2.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)


Expand Down
2 changes: 1 addition & 1 deletion test_files/Trac022.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: Trac022.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)

WARN: (2.6.1): No 'Conventions' attribute present
Expand Down
2 changes: 1 addition & 1 deletion test_files/Trac049_test1.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: Trac049_test1.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.4
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Area Type Table Version 6 (22 February 2017)
Using Standardized Region Name Table Version 2 (12 June 2013)

Expand Down
2 changes: 1 addition & 1 deletion test_files/Trac049_test2.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: Trac049_test2.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.4
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Area Type Table Version 6 (22 February 2017)
Using Standardized Region Name Table Version 2 (12 June 2013)

Expand Down
2 changes: 1 addition & 1 deletion test_files/UpgradeVn.pl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# $standardNameVN as appropriate.
#--------------------------------------------------------------------------
$checkerVN="3.0.6-dev";
$standardNameVN="48 (2017-11-28T15:32:48Z)";
$standardNameVN="49 (2018-02-13T08:44:33Z)";

$TEST_FILES_DIR="/home/ros/puma2/git-projects/cf-checker/test_files";
chdir $TEST_FILES_DIR or die "Failed to cd to $TEST_FILES_DIR: $!\n";
Expand Down
2 changes: 1 addition & 1 deletion test_files/badc_units.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
CHECKING NetCDF FILE: badc_units.nc
=====================
Using CF Checker Version 3.0.6-dev
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)

WARNING (7.1): Data for variable time lies outside cell boundaries

Expand Down
2 changes: 1 addition & 1 deletion test_files/cell_measures.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: cell_measures.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)

ERROR: (7.1): Incorrect dimensions for boundary variable: lon_vertices
Expand Down
2 changes: 1 addition & 1 deletion test_files/cell_methods.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: cell_methods.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)

ERROR: (7.1): Incorrect dimensions for boundary variable: lon_vertices
Expand Down
2 changes: 1 addition & 1 deletion test_files/complex.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: complex.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.0
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Standardized Region Name Table Version 2 (12 June 2013)

WARN: (2.6.1): No 'Conventions' attribute present
Expand Down
51 changes: 51 additions & 0 deletions test_files/example_5.10.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
CHECKING NetCDF FILE: example_5.10.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.7
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Area Type Table Version 6 (22 February 2017)
Using Standardized Region Name Table Version 2 (12 June 2013)


------------------
Checking variable: x
------------------
ERROR: (5): co-ordinate variable not monotonic

------------------
Checking variable: y
------------------
ERROR: (5): co-ordinate variable not monotonic

------------------
Checking variable: z
------------------
ERROR: (5): co-ordinate variable not monotonic

------------------
Checking variable: lat
------------------

------------------
Checking variable: lon
------------------

------------------
Checking variable: temp
------------------

------------------
Checking variable: pres
------------------

------------------
Checking variable: crsOSGB
------------------

------------------
Checking variable: crsWGS84
------------------

ERRORS detected: 3
WARNINGS given: 0
INFORMATION messages: 0
Binary file added test_files/example_5.10.nc.gz
Binary file not shown.
5 changes: 2 additions & 3 deletions test_files/example_6.2.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: example_6.2.nc
=====================
Using CF Checker Version 3.0.6-dev
Checking against CF Version CF-1.7
Using Standard Name Table Version 48 (2017-11-28T15:32:48Z)
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Area Type Table Version 6 (22 February 2017)
Using Standardized Region Name Table Version 2 (12 June 2013)

Expand All @@ -14,7 +14,6 @@ Checking variable: n_heat_transport
------------------
Checking variable: time
------------------
ERROR: (5): co-ordinate variable not monotonic

------------------
Checking variable: lat
Expand All @@ -24,6 +23,6 @@ Checking variable: lat
Checking variable: geo_region
------------------

ERRORS detected: 1
ERRORS detected: 0
WARNINGS given: 0
INFORMATION messages: 0
Binary file modified test_files/example_6.2.nc.gz
Binary file not shown.
Loading

0 comments on commit b66e954

Please sign in to comment.