The Decl'NetCDF plugin was created to read from and write to NetCDF files in a declarative way.
Decl'NetCDF plugin allows you to:
UNLIMITED
dimension and dimensions names.The root of Decl'NetCDF plugin configuration (named decl_netcdf
), is a dictionary or a list of dictionaries that contains the following subtrees:
key | value | |
---|---|---|
file | file subtree | *mandatory* |
communicator | communicator subtree | *optional* |
on_event | on_event subtree | *optional* |
groups | groups subtree | *optional* |
variables | variables subtree | *optional* |
write | write subtree | *optional* |
read | read subtree | *optional* |
Configuration examples:
Defines name (path) of the input/output file.
key | value |
---|---|
file | string containing filename (can have $-expressions ) |
Configuration example:
Enables parallel NetCDF input/output. Defines communicator to use on read/write (all processes must have the same communicator and filename).
key | value |
---|---|
communicator | $-expression to valid MPI_comm |
Configuration example:
Defines on which events the plugin reads/writes data from/to NetCDF file. The value can be either single event name or the array of events names (both examples presented below).
key | value |
---|---|
on_event | string or array of string that cointain event names |
Configuration examples:
Defines the condition on which plugin will execute input/output operation on the file.
key | value |
---|---|
when | $-expression condition evalueated to boolean value |
Configuration example:
Defines groups in the NetCDF file. Mainly used to read/write attributes values of the groups.
If group won't have any attributes, this subtree can be omitted. Decl'NetCDF plugin will create group by default for every variable.
key | value |
---|---|
groups | Map of group name subtree |
Configuration example:
key | value |
---|---|
name (path) of the group | Map with attribute key with value as map of attribute subtree |
Defines variables in the NetCDF file. Mainly used to define dimensions names and read/write attributes of the variable.
UNLIMITED
dimension (size of dimension must be then set to 0
)./
group notation: group_name/varaibale_name
)key | value |
---|---|
variable path | variable definition subtree |
Configuration example:
key | value | |
---|---|---|
type | type of variable (defined the same way as other types in PDI) | *optional* |
dimensions | array of dimensions names of variable | *optional* |
attributes | Map of attribute subtree | *optional* |
key | value |
---|---|
attribute name | $-expression value to be written as attribute |
The write
subtree can have 2 definitions:
Just a name of descriptor to write or the list of descriptors names to write to file. In this case the name of NetCDF variable will be the same as the name of the descriptor and have the same type and no attributes.
Configuration examples:
key | value | |
---|---|---|
when | read/write when subtree | *optional* |
variable | variable name to write (may be defined in variables subtree) | *optional* |
variable_selection | subtree | *optional* |
Configuration example:
Defines the part of file NetCDF variable where from read/to write the data. The hyperslab will be created from given start
and subsize
(count
) lists.
key | value | |
---|---|---|
start | list specifying start index for each dimension | *optional* |
subsize | list specifying count for each dimension | *optional* |
Defines the condition on which plugin will read/write specific variable.
key | value |
---|---|
when | $-expression condition evalueated to boolean value |
The read
subtree can have 2 definitions:
Just a name of descriptor to read or the list of descriptors names to read to file. In this case the name of NetCDF variable must be the same as the name of the descriptor and have the same type and no attributes will be read.
Configuration examples:
key | value | |
---|---|---|
when | read/write when subtree | *optional* |
variable | variable name to read (may be defined in variables subtree) | *optional* |
variable_selection | subtree | *optional* |
Configuration example: