Using the ExtData component: Difference between revisions
Line 105: | Line 105: | ||
=== Derived Exports === | === Derived Exports === | ||
The user can also specify derived exports. The user specifies an import to satisfy, an expression, and a refresh template. When the import is updated it is updated with the result of the expression. The expression is evaluated user the MAPL parser component and can involve any fields in the primary export section. Although it is currently not checked, the refresh template on the derived export should be the same as the primary exports in the expression. Also, the primary exports in the expression need not actually be needed to fulfill an import but can still be used in a derived expression. | <pre> | ||
The user can also specify derived exports. The user specifies an import to satisfy, an expression, and a refresh template. When the import is updated it is updated with the result of the expression. The expression is evaluated user the MAPL parser component and can involve any fields in the primary export section. Although it is currently not checked, the refresh template on the derived export should be the same as the primary exports in the expression. Also, the primary exports in the expression need not actually be needed to fulfill an import but can still be used in a derived expression. In addition to arithmetic expressions the there two functions that are currently supported for derived expressions. | |||
The two supported functions are a region mask and zone mask. | |||
The region mask function has the following syntax: | |||
regionmask(variable_to_mask,name_of_mask;n1,n2,...) | |||
the variable_to_mask is en entry from the primary exports | |||
the name_of_mask is an entry from the mask exports | |||
following these two entries, there is a semi-colon and a comma-separated list of integers. Anywhere the mask is one of these integers it uses the value from the variable to be masked, outside these points the variable is undefined. | |||
The zone masking function has the following syntax: | |||
zonemask(variable_to_mask,lower_lat,upper_lat) | |||
the variable_to_mask is en entry from the primary exports | |||
lower_lat and upper_lat are the latitudes in degrees. Anywhere between these values the value of the variable from the primary export is used, outside the variable is undefined. | |||
<pre> | |||
DerivedExports:: | |||
# ---------|------------|------| | |||
# Export | Name on | | | |||
# Name | File | File | | |||
# ---------|------------|------| | |||
CO_CH4nbeu regionmask(CO_CH4,CO_regionMask;3,9) %y4-%m2-%d2t12:00:00 | |||
CO_CH4bbbo zonemask(CO_CH4,45,90) %y4-%m2-%d2t12:00:00 | |||
:: | |||
</pre> |