ensembleMetadata.append

Add variables to an ensembleMetadata object


Syntax



Description

obj = obj.append(ensMeta2)

Adds the variables in a second ensembleMetadata object to the current object. The second ensembleMetadata object must have the same number of ensemble members as the current object. By default, throws an error if the second object has any variables with the same name as a variable in the current object.

obj = obj.append(ensMeta2, “error”|”e”|0)
obj = obj.append(ensMeta2, “first”|”f”|1)
obj = obj.append(ensMeta2, “second”|”s”|2)

Indicate how to treat variable names that are repeated in the current and second ensembleMetadata objects. If “error”|”e”|0, throws an error when duplicate variable names occur. If “first”|”f”|1, retains the variable in the current ensembleMetadata object and discards the variable in the second object. If “second”|”s”|2, discards the variable in the current object, and retains the variable in the second object.


Input Arguments

ensMeta2

scalar ensembleMetadata object
A second ensembleMetadata object whose variables should be added to the current object.

responseToRepeats

string scalar | scalar integer
Indicates how to treat variables with duplicate names across the current and second ensembleMetadata objects.

[0|”e”|”error” (default)]: Throws an error when duplicate names occur

[1|”f”|”first”]: Uses the variables in the current object

[2|”s”|”second”]: Uses the variables in the second object


Output Arguments

obj

scalar ensembleMetadata object
The ensembleMetadta object with updated variables.