New Module Instance

since 2025.02 a new transformation is available to copy many time series to a new module instance at once.

It uses a time series filtering mechanism instead of <variable>'s and <timeSeriesSet>'s.

All time series in the database that match the criteria within the element <inputTimeSeries> are used as input.

In the current example the time series must have the moduleInstanceId equal to "RUW", the parameter must either be equal to "Par1", "Par2" or be contained in parameter group "Group1" or "Group2" and the location must be contained in location set "Vast". For more info see: LocationSetsparameter group & parameters in csv 

Other possible elements on which can be filtered are:

  • valueType
  • <locationId>'s or <locationSetId>'s. 
  • qualifiers, via 1 or more <qualifierId>'s
  • timeSeriesType
  • timeStep
  • aggregationPeriod
  • cycle
  • ensembleId
  • ensembleMemberId

The time series will not be filtered on elements that are not configured within the <inputTimeSeries> element. This means that if you want the filter to be applied to all parameters, no <paramterId> or <parameterGroupId> should be configured. 

However for this transformation there should always be a <locationId> or <locationSetId>.

For all those time series the content is copied to a (new) output time series that only a differs in module instance id.

A <relativePeriod start="X" end="Y" unit="Z"/> must be configured within the <period> element to determine the run period.

Copy New Module Instance
<?xml version="1.0" encoding="UTF-8"?>
<transformationModule xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews https://fewsdocs.deltares.nl/schemas/version1.0/transformationModule.xsd" version="1.0">
    <transformation id="CopyDataToValidationModuleInstance">
		<copy>
			<newModuleInstance>
				<period>
					<relativePeriod start="-7" end="0" unit="hour"/>
				</period> 
                <inputTimeSeries>
					<moduleInstanceId>RUW</moduleInstanceId>
					<parameterId>Par1</parameterId>
					<parameterId>Par2</parameterId>
					<parameterGroupId>Group1</parameterGroupId>
					<parameterGroupId>Group2</parameterGroupId>
					<locationSetId>Vast</locationSetId>
				</inputTimeSeries>
				<outputModuleInstanceId>VALIDATED</outputModuleInstanceId>
				<includeUnreliableInputValues>true</includeUnreliableInputValues> 
            </newModuleInstance>
		</copy>
	</transformation>
</transformationModule>

 There is an extra option to determine if it is desired to also copy unreliable data: <includeUnreliableInputValues>

aggregateQualifierGroup

It is also possible to aggregate qualifier groups, this way in the input time series all time series that only differ on qualifiers from groups that should be aggregated will be combined via the chosen <qualifierAggregation> method.

This way in the ouput there will be no time series with qualifiers belonging to any of the <aggregateQualifierGroup>'s

Copy New Module Instance
<?xml version="1.0" encoding="UTF-8"?>
<transformationModule xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews https://fewsdocs.deltares.nl/schemas/version1.0/transformationModule.xsd" version="1.0">
    <transformation id="AggregateQualifiersGroups">
		<copy>
			<newModuleInstance>
				<period>
					<relativePeriod start="-7" end="0" unit="hour"/>
				</period>
				<inputTimeSeries>
					<moduleInstanceId>CopyNewModuleInstanceSumQualifiersTest</moduleInstanceId>
					<parameterId>H.obs.proc</parameterId>
					<locationSetId>Vast</locationSetId> 
					<timeStep unit="hour" multiplier="1"/>
				</inputTimeSeries>
				<outputModuleInstanceId>CopyNewModuleInstanceSumQualifiersTestOutput</outputModuleInstanceId>
				<includeUnreliableInputValues>true</includeUnreliableInputValues>
				<aggregateQualifierGroup>gender</aggregateQualifierGroup>
				<aggregateQualifierGroup>lengthClass</aggregateQualifierGroup>
				<qualifierAggregation>sum</qualifierAggregation>
			</newModuleInstance>
		</copy>
	</transformation>
</transformationModule>

Copy samples

It is als possible to copy the samples connected to the time series.

For this the element <outputSampleIdPostFix> needs to be configured so the newly copied sample has a different sample id then the original.

In case the input samples already contain a postfix, it will be removed when that postfix is configured in <inputSampleIdPostFix>.

Copy New Module Instance
<?xml version="1.0" encoding="UTF-8"?>
<transformationModule xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews https://fewsdocs.deltares.nl/schemas/version1.0/transformationModule.xsd" version="1.0">
    <transformation id="CopySamplesToNewModuleInstance">
		<copy>
			<newModuleInstance>
				<period>
					<relativePeriod start="-7" end="0" unit="hour"/>
				</period>
				<inputTimeSeries>
					<moduleInstanceId>CopySamplesToNewModuleInstanceTest</moduleInstanceId>
					<valueType>sample</valueType>
					<locationId>H564000</locationId>
				</inputTimeSeries>
				<outputModuleInstanceId>CopySamplesToNewModuleInstanceTestOutput</outputModuleInstanceId>
				<includeUnreliableInputValues>true</includeUnreliableInputValues>
                <inputSampleIdPostFix>_original</outputSampleIdPostFix>
                <outputSampleIdPostFix>_copied</outputSampleIdPostFix>
			</newModuleInstance>
		</copy>
	</transformation>
</transformationModule>
  • No labels