6.7.4. Long-term average

6.7.4.1. Operation


Operation name:Long-term average
Description:This Operation serves for the calculation of long-term averages as reference.
Utilised in:Use Case #6 Workflow

6.7.4.2. Options


name:preserve saisonality
description:calculate long-term mean for every timestep inside a year (month, day, …)
settings:reference period

name:one value
description:calculate one long-term mean without preserving saisonality
settings:reference period

6.7.4.3. Input data


name:longitude (lon, x)
type:floating point number
range:[-180.; +180.] respectively [0.; 360.]
dimensionality:vector
description:grid information on longitudes

name:latitude (lat, y)
type:floating point number
range:[-90.; +90.]
dimensionality:vector
description:grid information on latitudes

name:height (z)
type:floating point number
range:[-infinity; +infinity]
dimensionality:vector
description:grid information on height/depth

name:variable(s)
type:floating point number
range:[-infinity; +infinity]
dimensionality:cube or 4D
description:values of (a) certain variable(s)

name:time (steps)
type:integer or double
range:[0; +infinity]
dimensionality:vector
description:days/months since …

6.7.4.4. Output data


name:long-term average
type:floating point number
dimensionality:one value or vector
description:input data transformed to long-term average

6.7.4.5. Parameters


name:time1, tim1
type:integer or double
valid values:[0; +infinity]
default value:start point of input period
description:starting point of reference period

name:time2, tim2
type:integer or double
valid values:[0; +infinity]
default value:terminal point of input period
description:terminal point of reference period

6.7.4.6. Example

# ny number of years
# variable: var(year, month)

##############################
# with saisonality
do month=1,12
        longtermmean(month)=mean(var(year, month), year=1,ny)
enddo

#anomaly
var(year, month)=var(year,month)-longtermmean(month)

##############################
# without seasonality

longtermmean=mean(var)

#anomaly
var(year, month)=var(year,month)-longtermmean