Skip to content
Snippets Groups Projects
Commit 4a0a425d authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

expr: docu update

parent de0526fe
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,10 @@
* Version 1.6.8 released
2015-03-18 Uwe Schulzweida
* expr: added support for logical operators <, >, <=, >=, !=, ==
2015-03-17 Uwe Schulzweida
* gradsdes: grib index file is empty (introduced in 1.6.7)
......
......@@ -5,6 +5,7 @@ Version 1.6.8 (26 March 2015):
New features:
* select, delete: added wildcard support for parameter name
* expr: added support for logical operators <, >, <=, >=, !=, ==
New operators:
* splityearmon: Split in years and months
* yseasadd: Add multi-year seasonal time series
......
/*
Operatoren: +, -, *, \
Arithmetic operators: +, -, *, \, ^
Logic operators: <, >, <=, >=, !=, ==
Functions: abs, sqrt, exp, log, log10, sin, cos, tan, asin, acos, atan
Functions: min, max, avg, std, var
Constansts: M_PI, M_E
......@@ -20,15 +21,21 @@ Each individual assignment statement have to end with a semi-colon.
@IfMan
The basic arithmetic operations addition +, subtraction -, multiplication *,
division / and exponentiation ^ can be used.
Available logical operators are <, >, <=, >=, != and ==.
@EndifMan
@IfDoc
The basic arithmetic operations addition \begin{math}+\end{math}, subtraction \begin{math}-\end{math}, multiplication \begin{math}*\end{math},
division \begin{math}/\end{math} and exponentiation \^\ can be used.
Available logical operators are <, >, <=, >=, != and ==.
@EndifDoc
The following intrinsic functions are available:
@BeginList log10(x)
@Item = abs(x)
Absolute value of x
@Item = floor(x)
Round to largest integral value not greater than x
@Item = ceil(x)
Round to smallest integral value not less than x
@Item = int(x)
Integer value of x
@Item = nint(x)
......@@ -89,10 +96,9 @@ STRING File with processing instructions
@BeginExample
Assume an input dataset contains at least the variables 'aprl', 'aprc'
and 'ts'. To create a new variable 'var1' with the sum
of 'aprl' and 'aprc' and a variable 'var2' which convert
the temperature 'ts' from Kelvin to Celsius use:
Assume an input dataset contains at least the variables 'aprl', 'aprc' and 'ts'.
To create a new variable 'var1' with the sum of 'aprl' and 'aprc' and a variable 'var2'
which convert the temperature 'ts' from Kelvin to Celsius use:
@BeginVerbatim
cdo expr,'var1=aprl+aprc;var2=ts-273.15;' ifile ofile
@EndVerbatim
......
......@@ -1267,8 +1267,11 @@ static char *ExprHelp[] = {
" Each individual assignment statement have to end with a semi-colon.",
" The basic arithmetic operations addition +, subtraction -, multiplication *,",
" division / and exponentiation ^ can be used.",
" Available logical operators are <, >, <=, >=, != and ==.",
" The following intrinsic functions are available:",
" abs(x) " " Absolute value of x",
" floor(x)" " Round to largest integral value not greater than x",
" ceil(x) " " Round to smallest integral value not less than x",
" int(x) " " Integer value of x",
" nint(x) " " Nearest integer value of x",
" sqr(x) " " Square of x",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment