Skip to content

Commit aaccefe

Browse files
authored
Merge pull request #11 from JimBiardCics/master
Initial version of the ncldDump application.
2 parents 7d624ab + 45f36fb commit aaccefe

File tree

4 files changed

+905
-0
lines changed

4 files changed

+905
-0
lines changed

ncldDump/ReadMe.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
The ncldDump application requires the python packages jinja2, netCDF4, and
2+
numpy.
3+
4+
To see how to run the application, run it with a single '-h' argument.
5+
6+
In this initial version there is no attempt to find alias information inside
7+
the netCDF file being dumped. All context and alias definitions are found in
8+
the JSON alias file that is specified to the application using the -a argument.
9+
10+
The aliases.json file is a working example. It is currently populated with
11+
aliases for all CF attribute names and for certain attribute values. If a
12+
dictionary key in the "values" section is '*', this indicates that any
13+
attribute value for the parent attribute name will produce a match. All items
14+
in the dictionary can be treated as patterns that can have a python '{}'
15+
element. This element will be replaced by the key value. (If the key is '*'
16+
then the attribute value will treated as the key value.)
17+
18+
The initial version of the application has a placeholder in the aliases.json
19+
file for context definitions, but the code does not yet recognize or use them.

ncldDump/aliases.json

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
{
2+
"contexts" :
3+
{
4+
"bald" : "http://binary-array-ld.net/latest/{}",
5+
"rdf" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#{}"
6+
},
7+
"names" :
8+
{
9+
"Conventions" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#Conventions",
10+
"_FillValue" : "http://www.unidata.ucar.edu/netcdf/docs/netcdf.html#Attribute-Conventions",
11+
"acknowledgement" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#acknowledgement",
12+
"add_offset" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#packed-data",
13+
"ancillary_variables" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#ancillary-data",
14+
"axis" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#coordinate-types",
15+
"bounds" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#cell-boundaries",
16+
"calendar" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#calendar",
17+
"cdm_data_type" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#cdm_data_type",
18+
"cell_measures" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#cell-measures",
19+
"cell_methods" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#cell-methods",
20+
"cf_role" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#coordinates-metadata",
21+
"climatology" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#climatological-statistics",
22+
"comment" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#comment",
23+
"compress" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#reduced-horizontal-grid",
24+
"contributor_name" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#contributor_name",
25+
"contributor_role" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#contributor_role",
26+
"coordinates" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#coordinate-system",
27+
"coverage_content_type" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#coverage_content_type",
28+
"creator_email" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#creator_email",
29+
"creator_institution" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#creator_institution",
30+
"creator_name" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#creator_name",
31+
"creator_type" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#creator_type",
32+
"creator_url" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#creator_url",
33+
"date_created" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#date_created",
34+
"date_issued" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#date_issued",
35+
"date_metadata_modified" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#date_metadata_modified",
36+
"date_modified" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#date_modified",
37+
"featureType" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#featureType",
38+
"flag_masks" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#flags",
39+
"flag_meanings" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#flags",
40+
"flag_values" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#flags",
41+
"formula_terms" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#dimensionless-vertical-coordinate",
42+
"geospatial_bounds" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#geospatial_bounds",
43+
"geospatial_bounds_crs" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#geospatial_bounds_crs",
44+
"geospatial_bounds_vertical_crs" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#geospatial_bounds_vertical_crs",
45+
"geospatial_lat_max" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#geospatial_lat_max",
46+
"geospatial_lat_min" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#geospatial_lat_min",
47+
"geospatial_lat_resolution" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#geospatial_lat_resolution",
48+
"geospatial_lat_units" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#geospatial_lat_units",
49+
"geospatial_lon_max" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#geospatial_lon_max",
50+
"geospatial_lon_min" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#geospatial_lon_min",
51+
"geospatial_lon_resolution" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#geospatial_lon_resolution",
52+
"geospatial_lon_units" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#geospatial_lon_units",
53+
"geospatial_vertical_max" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#geospatial_vertical_max",
54+
"geospatial_vertical_min" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#geospatial_vertical_min",
55+
"geospatial_vertical_positive" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#geospatial_vertical_positive",
56+
"geospatial_vertical_resolution" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#geospatial_vertical_resolution",
57+
"geospatial_vertical_units" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#geospatial_vertical_units",
58+
"grid_mapping" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#grid-mappings-and-projections",
59+
"history" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#history",
60+
"id" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#id",
61+
"instance_dimension" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#representations-features",
62+
"institution" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#institution",
63+
"instrument" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#instrument",
64+
"instrument_vocabulary" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#instrument_vocabulary",
65+
"keywords" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#keywords",
66+
"keywords_vocabulary" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#keywords_vocabulary",
67+
"leap_month" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#calendar",
68+
"leap_year" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#calendar",
69+
"license" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#license",
70+
"long_name" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#long-name",
71+
"metadata_link" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#metadata_link",
72+
"missing_value" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#missing-data",
73+
"month_lengths" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#calendar",
74+
"naming_authority" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#naming_authority",
75+
"platform" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#platform",
76+
"platform_vocabulary" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#platform_vocabulary",
77+
"positive" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#COARDS",
78+
"processing_level" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#processing_level",
79+
"product_version" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#product_version",
80+
"program" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#program",
81+
"project" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#project",
82+
"publisher_email" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#publisher_email",
83+
"publisher_institution" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#publisher_institution",
84+
"publisher_name" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#publisher_name",
85+
"publisher_type" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#publisher_type",
86+
"publisher_url" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#publisher_url",
87+
"references" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#references",
88+
"sample_dimension" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#representations-features",
89+
"scale_factor" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#packed-data",
90+
"source" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#source",
91+
"standard_error_multiplier" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#standard-name-modifiers",
92+
"standard_name" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#standard-name",
93+
"standard_name_vocabulary" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#standard_name_vocabulary",
94+
"summary" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#summary",
95+
"time_coverage_duration" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#time_coverage_duration",
96+
"time_coverage_end" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#time_coverage_end",
97+
"time_coverage_resolution" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#time_coverage_resolution",
98+
"time_coverage_start" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#time_coverage_start",
99+
"title" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3#title",
100+
"units" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#units",
101+
"valid_max" : "http://www.unidata.ucar.edu/netcdf/docs/netcdf.html#Attribute-Conventions",
102+
"valid_min" : "http://www.unidata.ucar.edu/netcdf/docs/netcdf.html#Attribute-Conventions",
103+
"valid_range" : "http://www.unidata.ucar.edu/netcdf/docs/netcdf.html#Attribute-Conventions",
104+
"SDN_ParameterDiscoveryCode" : "http://vocab.nerc.ac.uk/isoCodelists/sdnCodelists/cdicsrCodeList.xml#{}",
105+
"unit_id" : "http://qudt.org/1.1/schema/qudt#unit",
106+
"medium_id" : "http://environment.data.gov.au/def/op#matrix",
107+
"scaledQuantityKind_id" : "http://environment.data.gov.au/def/op#propertyKind",
108+
"substanceOrTaxon_id" : "http://environment.data.gov.au/def/op#objectOfInterest"
109+
},
110+
"values" :
111+
{
112+
"Conventions" :
113+
{
114+
"CF-1.6" : "http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html",
115+
"ACDD-1.3" : "http://wiki.esipfed.org/index.php/Attribute_Convention_for_Data_Discovery_1-3"
116+
},
117+
"ancillary_variables" :
118+
{
119+
"*" : "#variable_{}"
120+
},
121+
"bounds" :
122+
{
123+
"*" : "#variable_{}"
124+
},
125+
"climatology" :
126+
{
127+
"*" : "#variable_{}"
128+
},
129+
"coordinates" :
130+
{
131+
"*" : "#variable_{}"
132+
},
133+
"grid_mapping" :
134+
{
135+
"*" : "#variable_{}"
136+
},
137+
"standard_name" :
138+
{
139+
"*" : "http://mmisw.org/ont/cf/parameter/{}"
140+
},
141+
"SDN_ParameterDiscoveryCode" :
142+
{
143+
"BactTaxaAbundSed" : "http://vocab.nerc.ac.uk/collection/P02/current/BAUC/"
144+
},
145+
"units" :
146+
{
147+
"*" : "https://ncics.org/portfolio/other-resources/udunits2/#{}"
148+
}
149+
}
150+
}

0 commit comments

Comments
 (0)