Generate ERDDAP datasets.xml configs based on NetCDF files and Sensor Tracker metadata.
Usage
usage: generator.py [-h] NetCDF_file sensor_tracker_url [mode]
Generate an ERDDAP config based on sample data and Sensor Tracker
positional arguments:
NetCDF_file
sensor_tracker_url
mode mode specifies the template set to use.
optional arguments:
-h, --help show this help message and exit
Expanding the generator
The config generator can be expanded by creating new files in the templates
folder. These files should have the same name as the mode being added. for the slocum
mode these files are called slocum.xml and slocum.json
Relevant files:
- xml file
- a jinja2 template setting the overall layout of the datasets config as well as any static parameters that are not set based on variables
- json file
- additional attributes which should be added. Top level keys are variable names in the target NetCDF and the values should be a dictionary of attribute to be added to that variable. Useful for
cf_role
attributes
- additional attributes which should be added. Top level keys are variable names in the target NetCDF and the values should be a dictionary of attribute to be added to that variable. Useful for