Merge
The merge subcommand can merge the different runs to a single IMAS db entry, using error propagation to merge the fields specified.
To run the command:
duqtools merge
Check out the command-line interface for more info on how to use this command.
The merge
config
The options of the merge
subcommand are stored under the merge
key
in the config.
These keys define which data to merge, and where to store the
output. Before merging, all keys are rebased on (1) the same radial
coordinate specified via base_ids
and (2) the timestamp.
template
- This IMAS DB entry will be used as the template.
output
- Merged data will be written to this IMAS DB entry.
ids_to_merge
- This is a list of IDSs to merge over all runs together with the
prefix
. The mean/error are written to the target IDS. base_ids
- This IDS field is taken from the template. It is used to rebase all IDS fields to same radial grid before merging using an interpolation.
prefix
- This field specifies the prefix to the IDS path, i.e. `
/ / '. The time step is implied by the template.
For example:
merge:
base_ids: grid/rho_tor_norm
ids_to_merge:
- t_i_average
- zeff
output:
db: jet
run: 9999
shot: 94785
prefix: profiles_1d
template:
db: jet
run: 1
shot: 94785
user: docs
Template and output locations
Both are specified using the IMAS scheme.
user
- Username.
db
- IMAS db/machine name.
shot
- IMAS Shot number.
run
- IMAS Run number.
For example:
template:
user: g2ssmee
db: jet
shot: 91234
run: 1
output:
db: jet
shot: 91234
run: 100
Note
Although the user can be specified for the output location, it is best left blank. In this case, the current user is filled in automatically and you will not run into issues with write permissions.