Skip to content

Item redefinition

Description

This transformation is applicable to multidimensional models that contain collection of "items" (e.g. variables). Dfs2, Dfs3, netcdf files typically contain one or more items (such as temperature, sea surface height and so on), but also datasets in the Multidimensional storage have items. The transformation allows changing the name and EUM itemId/unit id for each item.

The data for the transformation is provided as a list (named "ItemRedefinitions") of objects, each object is used to redefine the properties of a single item. The redefinition object may have the following properties: - OriginalName (required): the original name of the item - NewName (optional): new name to be assigned to the item; if not provided the original is used - NewItemId (optional): new ItemId (from DHI EUM selection) to be assigned to the item; if not provided the original is used - NewUnitId (optional): new UnitId (from DHI EUM selection) to be assigned to the item; if not provided the original is used

Example

This request to /api/conversion/upload-convert

{
    "readerName": "<reader name>",
    "writerName": "<writer name>",
    ...
    "transformations": [
    {
        "type": "ItemTransformation",
        "itemRedefinitions": [
            { "originalName": "item1", "newName": "temperature", "newItemId": "eumITemperature" }
        ]
    }
    ]
}

will change the "item1" name to "temperature" its item id to "eumITemperature". The unit id will remain unchanged.