The ocean-data-parser provides a odpy [ODPY OPTIONS] [METHOD] [method OPTIONS]
tool.
odpy
Ocean Data Parser command line main interface.
Usage:
Options:
--version Show the version and exit.
--verbose Logger format present more information
--log-level [TRACE|DEBUG|INFO|WARNING|ERROR]
Logger level used
--log-file PATH Log to a file.
--log-file-level [TRACE|DEBUG|INFO|WARNING|ERROR]
Log file level used
--help Show this message and exit.
convert
Run ocean-data-parser conversion on given files.
Usage:
Options:
-i, --input-path TEXT Input path to file list. It can be a glob
expression (ex: *.cnv)
--exclude TEXT Glob expression of files to exclude.
--parser TEXT Parser used to parse the data. Default to auto
detectection. Use --parser_list to retrieve
list of parsers available
--overwrite BOOLEAN Overwrite already converted files when source
file is changed.
--multiprocessing INTEGER Run conversion in parallel on N processors.
None == all processors available
-e, --errors [ignore|raise] Error hanlding method
--registry-path PATH File conversion registry path (*.csv or
*.parquet). If --registry_path=None, no
registry is used.
--output-path PATH Output directory where to save converted
files.
--output-file-name PATH Output file path where to save converted
files.
--output-file-suffix PATH Output file name suffix to add
-c, --config PATH Path to configuration file
--new-config PATH Generate a new configuration file at the given
path
--parser-list Get the list of parsers available
--show-arguments [stop|True] Print present argument values. If stop
argument is given, do not run the conversion.
--version Show the version and exit.
--help Show this message and exit.
inspect-variables
Inspect NetCDF files variables and variables attributes.
Usage:
Options:
-i, --input TEXT Glob expression of input files [default:
**/*.nc]
--exclude TEXT Glob expression of files to exclude
--groupby TEXT Comma separated list of attributes to
regroup variables by. [default: variable,un
its,standard_name,sdn_parameter_urn,sdn_para
meter_name]
-m, --multiprocessing INTEGER RANGE
Load files in parallele with n processors.
If the option is set as a flag, all the
processors available (=10) will be used.
[default: 1; 1<=x<=10]
-t, --output-table TEXT Result table output: - None =
console(default) - path to csv or
markdown(*.md) file.
--output-erddap-xml, --xml TEXT
Output an ERDDAP XML blurb or all the
variables.
--show-arguments [stop|True] Print present argument values. If stop
argument is given, do not run the
conversion.
--help Show this message and exit.
Environment Variables
All the inputs available within the odpy
command can be defined through environment variables: ODPY_*
, ODPY_CONVERT_*
and ODPY_COMPILE_*
respectively.
Example:
- ODPY_LOG_LEVEL=WARNING
will force odpy
to log only the warning events.
- ODPY_CONVERT_OUTPUT_PATH=output
will force odpy convert
to output to the the local directory ./output/
Warning
An argument take priority over an environment variable.