Dump to specific format (dump2format / std)

Description

This transform allows to dump the data at the end of the control vector transformations to a specific format. The data can be regridded and resampled before being dumped.

Yaml arguments

The following arguments are used to configure the plugin. pyCIF will return an exception at the initialization if mandatory arguments are not specified, or if any argument does not fit accepted values or type:

Mandatory arguments

parameter: (mandatory)

Name of the parameter to dump to a specific format.

accepted type: str

component: (mandatory)

Name of the component to dump to a specific format.

accepted type: str

Optional arguments

orig_parameter_plg: (optional)

Plugin object on which the transform works on

accepted type: Plugin

orig_component_plg: (optional)

Corresponding component object on which the transform works on

accepted type: Plugin

successor: (optional)

Name of the successor transform

accepted type: str

precursor: (optional)

Name of the precursor transform

accepted type: str

dump_dir: (optional)

Dump directory for the files, the simulation period run subdirectory is used by default.

accepted type: str

dump_file: (optional): dump_%Y%m%d

File format for the files

accepted type: str

dump_format: (optional)

Definition of the plugin to use to dump the data, this plugin should have a write method implemented

accepted structure:

name: (mandatory)

Name of the plugin

accepted type: str

version: (mandatory)

Version of the plugin

accepted type: str

type: (mandatory)

Type of the plugin

accepted type: str

dump_options: (optional)

Dumping options, i.e., options for the plugin chosen in dump_format

use_defined_domain: (optional): False

Get the dump domain from the YAML configuration as a plugin dependency, the domain plugin is picked from this plugin or from the root level if none is defined within this plugin

accepted type: bool

use_get_domain: (optional)

Get the dump domain with get_domain method of the plugin defined with dump_format and dump_options, the dump_options arguments are passed to the dump plugin’s get_domain method with the tracer keyword argument.

accepted structure:

file: (mandatory)

File name passed as the second positional argument (ref_file) of the dump plugin’s get_domain method

accepted type: str

dir: (optional):

Directory passed as the first positional argument (ref_dir) of the dump plugin’s get_domain method

accepted type: str

resample_dump: (optional)

Resample the data before dumping

accepted structure:

file_freq: (mandatory)

Dump files frenquency

accepted type: str

var_freq: (mandatory)

Variable frequency inside each file

accepted type: str

Requirements

The current plugin requires the present plugins to run properly:

Requirement name

Requirement type

Explicit definition

Any valid

Default name

Default version

domain

Domain

True

True

None

None

Yaml template

Please find below a template for a Yaml configuration:

 1transform:
 2  plugin:
 3    name: dump2format
 4    version: std
 5    type: transform
 6
 7  # Mandatory arguments
 8  parameter: XXXXX  # str
 9  component: XXXXX  # str
10
11  # Optional arguments
12  orig_parameter_plg: XXXXX  # Plugin
13  orig_component_plg: XXXXX  # Plugin
14  successor: XXXXX  # str
15  precursor: XXXXX  # str
16  dump_dir: XXXXX  # str
17  dump_file: XXXXX  # str
18  dump_format:
19    name: XXXXX  # str
20    version: XXXXX  # str
21    type: XXXXX  # str
22  dump_options: XXXXX  # any
23  use_defined_domain: XXXXX  # bool
24  use_get_domain:
25    dir: XXXXX  # str
26    file: XXXXX  # str
27  resample_dump:
28    file_freq: XXXXX  # str
29    var_freq: XXXXX  # str