Skip to content

Commit

Permalink
Merge pull request #19 from cedadev/issue18
Browse files Browse the repository at this point in the history
Set default location for standard name/area type table when called inline
  • Loading branch information
RosalynHatcher authored Mar 23, 2017
2 parents 2896960 + 977f8fb commit 80f7235
Show file tree
Hide file tree
Showing 58 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion src/cfchecker/cfchecks.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ class FatalCheckerError(Exception):
#======================
class CFChecker:

def __init__(self, uploader=None, useFileName="yes", badc=None, coards=None, cfStandardNamesXML=None, cfAreaTypesXML=None, version=newest_version, debug=False, silent=False):
def __init__(self, uploader=None, useFileName="yes", badc=None, coards=None, cfStandardNamesXML=STANDARDNAME, cfAreaTypesXML=AREATYPES, version=newest_version, debug=False, silent=False):
self.uploader = uploader
self.useFileName = useFileName
self.badc = badc
Expand Down
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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)


------------------
Expand Down
Binary file modified test_files/CF_1_0_OK.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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)

WARN: (2.6.1): No 'Conventions' attribute present
ERROR: (7.1): bounds attribute referencing non-existent variable bounds_lat
Expand Down
Binary file modified test_files/CRM018_test1.nc.gz
Binary file not shown.
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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)


------------------
Expand Down
Binary file modified test_files/CRM021_test1.nc.gz
Binary file not shown.
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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)

ERROR: (2.6.1): This netCDF file does not appear to contain CF Convention data.
ERROR: (5.6): MSLP - Invalid syntax for 'grid_mapping' attribute
Expand Down
Binary file modified test_files/CRM024_test1.nc.gz
Binary file not shown.
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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)


------------------
Expand Down
Binary file modified test_files/CRM026_test2.nc.gz
Binary file not shown.
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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)

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

Expand Down
Binary file modified test_files/CRM027_test1.nc.gz
Binary file not shown.
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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)

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

Expand Down
Binary file modified test_files/CRM027_test2.nc.gz
Binary file not shown.
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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)

WARN: (2.6.1): No 'Conventions' attribute present

Expand Down
Binary file modified test_files/CRM028_test1.nc.gz
Binary file not shown.
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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)

ERROR: (2.6.1): This netCDF file does not appear to contain CF Convention data.
ERROR: (5.6): MSLP - Invalid syntax for 'grid_mapping' attribute
Expand Down
Binary file modified test_files/CRM032_test1.nc.gz
Binary file not shown.
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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)

WARN: (2.6.1): No 'Conventions' attribute present

Expand Down
Binary file modified test_files/CRM033_test1.nc.gz
Binary file not shown.
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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)

WARN: (2.6.1): No 'Conventions' attribute present

Expand Down
Binary file modified test_files/CRM035.nc.gz
Binary file not shown.
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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)


------------------
Expand Down
Binary file modified test_files/CRM037.nc.gz
Binary file not shown.
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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)


------------------
Expand Down
Binary file modified test_files/CRM038.nc.gz
Binary file not shown.
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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)


------------------
Expand Down
Binary file modified test_files/CRM041.nc.gz
Binary file not shown.
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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)


------------------
Expand Down
Binary file modified test_files/GregRappa.nc.gz
Binary file not shown.
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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)


------------------
Expand Down
Binary file modified test_files/Trac020_test1.nc.gz
Binary file not shown.
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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)


------------------
Expand Down
Binary file modified test_files/Trac020_test2.nc.gz
Binary file not shown.
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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)

WARN: (2.6.1): No 'Conventions' attribute present

Expand Down
Binary file modified test_files/Trac022.nc.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions test_files/Trac049_test1.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ CHECKING NetCDF FILE: Trac049_test1.nc
=====================
Using CF Checker Version 3.0.0
Checking against CF Version CF-1.4
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Area Type Table Version 5 (25 January 2017)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)
Using Area Type Table Version 6 (22 February 2017)


------------------
Expand Down
Binary file modified test_files/Trac049_test1.nc.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions test_files/Trac049_test2.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ CHECKING NetCDF FILE: Trac049_test2.nc
=====================
Using CF Checker Version 3.0.0
Checking against CF Version CF-1.4
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Area Type Table Version 5 (25 January 2017)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)
Using Area Type Table Version 6 (22 February 2017)


------------------
Expand Down
Binary file modified test_files/Trac049_test2.nc.gz
Binary file not shown.
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.0";
$standardNameVN="39 (2016-12-16T16:59:53Z)";
$standardNameVN="41 (2017-02-22T08:54:22Z)";

$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.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)

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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)

ERROR: (7.1): Incorrect dimensions for boundary variable: lon_vertices
WARN: (7.1): Data for variable lon lies outside cell boundaries
Expand Down
Binary file modified test_files/cell_measures.nc.gz
Binary file not shown.
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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)

ERROR: (7.1): Incorrect dimensions for boundary variable: lon_vertices
WARN: (7.1): Data for variable lon lies outside cell boundaries
Expand Down
Binary file modified test_files/cell_methods.nc.gz
Binary file not shown.
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.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)

WARN: (2.6.1): No 'Conventions' attribute present
WARN: (7.1): Data for variable lat lies outside cell boundaries
Expand Down
Binary file modified test_files/complex.nc.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion test_files/flag_tests.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: flag_tests.nc
=====================
Using CF Checker Version 3.0.0
Checking against CF Version CF-1.3
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)


------------------
Expand Down
Binary file modified test_files/flag_tests.nc.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion test_files/formula_terms.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: formula_terms.nc
=====================
Using CF Checker Version 3.0.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)

WARN: (7.1): Data for variable lat lies outside cell boundaries

Expand Down
Binary file modified test_files/formula_terms.nc.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion test_files/hfogo_O1_labelVariable_KT.check
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHECKING NetCDF FILE: hfogo_O1_labelVariable_KT.nc
=====================
Using CF Checker Version 3.0.0
Checking against CF Version CF-1.0
Using Standard Name Table Version 40 (2017-01-25T13:15:07Z)
Using Standard Name Table Version 41 (2017-02-22T08:54:22Z)


------------------
Expand Down
Binary file modified test_files/hfogo_O1_labelVariable_KT.nc.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion test_files/stdName_test.check
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CHECKING NetCDF FILE: stdName_test.nc
Using CF Checker Version 3.0.0
Checking against CF Version CF-1.6
Using Standard Name Table Version 2 (2006-09-26T18:12:43Z)
Using Area Type Table Version 5 (25 January 2017)
Using Area Type Table Version 6 (22 February 2017)

WARN: (2.6.1): Inconsistency - This netCDF file appears to contain CF-1.0 data, but you've requested a validity check against CF-1.6
ERROR: (7.1): Boundary var time_bnds has inconsistent std_name to time
Expand Down
Binary file modified test_files/stdName_test.nc.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion test_files/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mkdir $outdir
std_name_table=http://cfconventions.org/Data/cf-standard-names/current/src/cf-standard-name-table.xml
area_table=http://cfconventions.org/Data/area-type-table/current/src/area-type-table.xml

cfchecker="cfchecks"
cfchecker="/home/ros/puma2/dev/bin/cfchecks"

failed=0

Expand Down

0 comments on commit 80f7235

Please sign in to comment.