Get started
Contents
Get started#
To get started simply install the package from PyPI
pip install ccres_weather_station
This will also install a command-line interface named ccres_weather_station
Command line interface#
Usage: ccres_weather_station [OPTIONS]
Command line interface for ccres_weather_station.
Options:
-v, --verbose Set the level of verbosity. By default ERROR.
-v sets the level to INFO.
-vv sets the level to DEBUG.
--start-date [%Y-%m-%d] Date from which to keep all output data.
See also --end-date for the reciprocal
--end-date [%Y-%m-%d] Date from which to remove all output data.
See also --start-date for the reciprocal
--station TEXT Station name [required]
--input-files PATH File(s) to treat [required]
--output-file PATH Output file to be written [required]
-h, --help Show this message and exit.
Configuration file#
The configuration file’s purpose is to provide metadata and encoding to the netcdf final file. It’s a toml file with the following schema :
[variables][<name>]#
Name |
Type |
Description |
Required |
|---|---|---|---|
name |
str |
Name of the variable |
Yes |
The name is the only mandatory option for the variables section.
[variables][<name>][meta]#
Name |
Type |
Description |
Required |
|---|---|---|---|
standard_name |
str |
Standard name CF conventions |
No |
long_name |
str |
Descriptive name of the variable |
No |
units |
str |
Units of the variable |
No |
comment |
str |
General commant of the variable |
No |
instrument |
str |
Instrument of the variable |
No |
cell_methods |
str |
If computation over dimensions |
No |
[variables][<name>][encoding]#
This is netcdf encoding properties. As xarray is used as backend, please see https://docs.xarray.dev/en/stable/user-guide/io.html#reading-encoded-data
Name |
Type |
Description |
Required |
|---|---|---|---|
zlib |
bool |
No |
|
shuffle |
bool |
No |
|
complevel |
int |
No |
|
fletcher32 |
bool |
No |
|
contiguous |
bool |
No |
|
chunksizes |
int |
No |
|
dtype |
str |
No |
|
units |
str |
No |
|
calendar |
str |
No |
[coords][<name>]#
Name |
Type |
Description |
Required |
|---|---|---|---|
name |
str |
Name of the variable |
Yes |
The name is the only mandatory option for the coordinates section.
[coords][<name>][meta]#
Name |
Type |
Description |
Required |
|---|---|---|---|
standard_name |
str |
Standard name CF conventions |
No |
long_name |
str |
Descriptive name of the variable |
No |
units |
str |
Units of the variable |
No |
comment |
str |
General commant of the variable |
No |
instrument |
str |
Instrument of the variable |
No |
cell_methods |
str |
If computation over dimensions |
No |
[coords][<name>][encoding]#
This is netcdf encoding properties. As xarray is used as backend, please see https://docs.xarray.dev/en/stable/user-guide/io.html#reading-encoded-data
Name |
Type |
Description |
Required |
|---|---|---|---|
zlib |
bool |
No |
|
shuffle |
bool |
No |
|
complevel |
int |
No |
|
fletcher32 |
bool |
No |
|
contiguous |
bool |
No |
|
chunksizes |
int |
No |
|
dtype |
str |
No |
|
units |
str |
No |
|
calendar |
str |
No |
[attrs]#
This section represents the global attributes of the NetCDF. This section is a hashmap, what it means, is that any field you want can be used. We often refer to this two conventions to write the global attributes
Some fields are autogenerated but can be overwrited by this configuration file, they are :
Name |
Type |
Comment |
Required |
|---|---|---|---|
time_coverage_start |
str |
ISO8601 |
No |
time_coverage_end |
str |
ISO8601 |
No |
time_coverage_duration |
str |
ISO8601 |
No |
time_coverage_resolution |
str |
ISO8601 |
No |
history |
str |
commit hash and tag if there is any |
No |
created_date |
str |
ISO8601 |
No |
metadata_modified |
str |
ISO8601 |
No |