Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Confirmed.

Scalar functions return a single value, based on one or more input values.

FunctionArityDescription
now()0Returns the current date and time
date_now()0Returns the current date
time_now()0Returns the current time
year(date)1Returns the year part of a date
month(date)1Returns the month part of a date
day(date)1Returns the day part of a date
hour(time)1Returns the hour part of a time
minute(time)1Returns the minute part of a time
second(time)1Returns the second part of a time
timestamp(date, time)2returns the timestamp of a date and time (format: YYYYMMDDHHMMSS)
tdiff(tgdate, tgtime, andate, antime)4Time difference in seconds (tgdate,tgtime) are target times from which the nominal analysis timestamp (andate,antime) is getting subtracted from
cos(x)1Cosine (where x is in degrees)
sin(x)1Sine (where x is in degrees)
tan(x)1Tangent (where x is in degrees)
acos(x)1Arc cosine (the result is in degrees)
asin(x)1Arc sine (the result is in degrees)
atan(x)1Arc tangent (the result is in degrees)
atan2(x,y)2Arc tangent of two variables (the result in degrees)
exp(x)1Exponent
ldexp(x,n)2x 2n
cosh(x)1Hyperbolic cosine
sinh(x)1Hyperbolic sine
tanh(x)1Hyperbolic tangent
int(x), trunc(x)1Truncate to integer
nint(x)1Round-up to integer
floor(x)1Calculate floor value
ceil(x)1Calculate ceiling value
abs(x)1Absolute value
max(x)1Maximum value of x (x is an array) or values can be separated by a comma i.e. max(1,2,10,3)=10min(x)1Minimum value x (x is an array) or values can be separated by a comma i.e. min(1,2,10,3)=1count(x)1Return number of rowssum(x)1Compute sumavg(x)1Compute averagestdev(x)1Compute standard deviationvar(x)1Compute variancerms(x)1Compute Root Mean Square of xdotp(x,y)2Compute the dot product of x and ynorm(x,y)2Compute the norm of x,y
ibits(x,pos,len)3Extract len bits from x offset pos
mod(x,y) or x%y2x modulo y with floating point numbers accepted
pow(x,y) or x**y or x^y2x power of y (xy)
sqrt(x)1Square root (√x)
log(x),ln(x)1Natural logarithm
log10(x),lg(x)1Base-10 logarithm
deg2rad(x), radians(x)1Convert degrees to radians
rad2deg(x), degrees(x)1Convert radians to degrees
celsius(x), k2c(x)1Convert Kelvin to Celsius
c2k(x)1Convert Celcius to Kelvin
fahrenheit(x), k2f(x)1Convert Kelvin to Fahrenheit
f2k(x)1Convert Fahrenheit to Kelvin
c2f(x)1Convert Celsius to Fahrenheit
f2c(x)1Convert Fahrenheit to Celsius
circle(x,x0,y,y0,r)4Returns 1, if the point (x,y) is inside (or on) the (planar) circle with origin at (x0,y0) and radius r
rad(lat0, lon0, angle, lat, lon)4Returns 1, if the (lat,lon) is inside the great-circle (of any radius) with origin (lat0,lon0), and view angle (in degrees)
distance(lat1, lon1, lat2, lon2)4Distance (expressed in metres) between two positions (lat1,lon1) and (lat2,lon2) along a great-circle of the Earth (R=6371km)
km(lat1, lon1, lat2, lon2)4Synonym of distance-function but expressed in kilometres.
dist(reflat, reflon, refdist_km, lat, lon)5return 1, if (lat,lon) is inside the great-circle of radius refdist_km (in kilometres) with origin (reflat,reflon)
eq_boxlat(lat,lon,resol)3Compute the latitude by partitioning the unit spher into regions of equal area and small diameter (Algorithm by Paul Leopardi, School of Mathematics, University of South Wales)
eq_boxlon(lat,lon,resol)3Same as eq_boxlat but compute the longitude instead
rgg_boxlat(lat,lon,Txxxx)3Maps the latitude into its Reduced Gaussian Grid box at resolution Txxxx. (lat,lon) are assumed to be in degrees. Please note that some resolution may not be available.
rgg_boxlon(lat,lon,Txxxx)3Maps the longitude into its Reduced Gaussian Grid box at resolution Txxxx. (lat,lon) are assumed to be in degrees. Please note that some resolution may not be available.
thin(value,x)
 
2x is a vector. It returns a new vector where only 1 over value is kept from x