Skip to content

Commit 98d5764

Browse files
committed
Initial version of the ncldDump application.
1 parent 70f82d3 commit 98d5764

File tree

4 files changed

+701
-0
lines changed

4 files changed

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

0 commit comments

Comments
 (0)