NCL Index

NCL Index#

NCL Function

Description

Python Equivalent

Notes

avg

Computes the average of a variable regardless of dimensionality

numpy.average() or numpy.mean()

example notebook

abs

Returns the absolute value of numeric data

abs() or numpy.abs()

example notebook

asin

Computes the inverse sine of numeric types

math.asin() or numpy.arcsin()

example notebook

acos

Computes the inverse cosine of numeric types

math.acos() or numpy.arccos()

example notebook

atan

Computes the inverse cosine of numeric types

math.atan() or numpy.arctan()

example notebook

atan2

Computes the inverse tangent of (y/x) for numeric types

math.atan2() or numpy.arctan2()

example notebook

cumsum

Calculates the cumulative sum

numpy.cumsum()

example notebook

clmDayTLL

Calculates long-term daily means (daily climatology) from daily data

xarray.DataArray.groupby()

example notebook

calcMonAnomTLL

Calculates monthly anomalies by subtracting the long-term mean from each point

xarray.DataArray.groupby()

example notebook

calcDayAnomTLL

Calculates daily anomalies from a daily data climatology

xarray.DataArray.groupby()

example notebook

clmMonTLL

Calculates long-term monthly means (monthly climatology) from monthly data

xarray.DataArray.groupby()

example notebook

cos

Computes the cosine of numeric types

math.cos() or numpy.cos()

example notebook

ceil

Returns the smallest integral value greater than or equal to each input value

math.ceil() or numpy.ceil()

example notebook

cosh

Computes the hyperbolic cosine of numeric types

math.cosh() or numpy.cosh()

example notebook

decimalPlaces

Truncates or rounds to the number of decimal places specified

round() or numpy.round()

example notebook

days_in_month

Calculates the number of days in a month given month and year

cftime.datetime()

example notebook

day_of_week

Calculates the day of the week given month, day, and year

cftime.datetime()

example notebook

exp

Computes the value of e (the base of natural logarithms) raised to the power of the input

math.exp() or numpy.exp()

example notebook

floor

Returns the largest integral value less than or equal to each input value

math.floor() or numpy.floor()

example notebook

fabs

Returns the absolute value of numeric data

abs() or numpy.abs()

example notebook

get_d2r

Return a constant that converts degrees to radians

math.pi / 180 or numpy.pi / 180 or numpy.deg2rad()

example notebook

get_r2d

Return a constant that converts radians to degrees

180 / math.pi or 180 / numpy.pi or numpy.rad2deg()

example notebook

get_pi

Return pi as a type float or double

math.pi or numpy.pi

example notebook

log

Computes the natural log of a numeric type

math.log() or numpy.log()

example notebook

log10

Computes the log base 10 of a numeric type

math.log10() or numpy.log10()

example notebook

min

Computes the minimum value of a multi-dimensional array

min() or numpy.min()

example notebook

max

Computes the maximum value of a multi-dimensional array

max() or numpy.max()

example notebook

mod

Remainder function which emulates the Fortran ‘mod’ intrinsic function

% or numpy.mod()

example notebook

month_to_season

Computes a user-specified three-month seasonal mean

geocat.comp.month_to_season()

example notebook

product

Computes the product of the input

math.prod() or numpy.prod()

example notebook

qsort

Sorts a singly dimensioned array of numbers

sorted() or numpy.sort()

example notebook

round

Rounds a float or double variable to the nearest whole number

round() or numpy.round()

example notebook

rmMonAnnCycTLL

Removes the annual cycle from monthly data

xarray.DataArray.groupby()

example notebook

specxy_anal

Calculates the cross-spectra quantities of a series.

scipy.signal.periodogram(), scipy.signal.convolve(), scipy.signal.csd(), scipy.signal.coherence()

example notebook

sum

Sums the input

sum() or numpy.sum()

example notebook

sign_matlab

Mimic the behavior of Matlab’s sign function

numpy.sign()

example notebook

stdMonTLL

Calculates standard deviations of monthly means

xarray.DataArray.groupby()

example notebook

sqsort

Sorts a singly dimensioned arrays of strings

sorted() or numpy.sort()

example notebook

sinh

Computes the hyperbolic sine of numeric types

math.sinh() or numpy.sinh()

example notebook

sqrt

Computes the square root of its input

math.sqrt() or numpy.sqrt()

example notebook

specx_anal

Calculates the spectra of a series.

scipy.signal.periodogram(), scipy.signal.convolve()

example notebook

sin

Computes the sine of numeric types

math.sin() or numpy.sin()

example notebook

tanh

Computes the hyperbolic tangent of numeric types

math.tanh() or numpy.tanh()

example notebook

tan

Computes the tangent of numeric types

math.tan() or numpy.tan()

example notebook

Note

For more information on how we verify these recommendations, see the Receipts List.