User API#

GeoCAT-comp Native Functions#

Climatologies#

anomaly

Compute anomalies for a specified time frequency.

calendar_average

This function divides the data into time periods (months, seasons, etc) and computes the average for the data in each one.

climatology

Compute climatologies for a specified time frequency.

climatology_average

This function calculates long term hourly, daily, monthly, or seasonal averages across all years in the given dataset.

month_to_season

Computes a user-specified three-month seasonal mean.

Crop#

actual_saturation_vapor_pressure

Compute 'actual' saturation vapor pressure [kPa] as described in the Food and Agriculture Organization (FAO) Irrigation and Drainage Paper 56 entitled:

max_daylight

Computes maximum number of daylight hours as described in the Food and Agriculture Organization (FAO) Irrigation and Drainage Paper 56 entitled:

psychrometric_constant

Compute psychrometric constant [kPa / C] as described in the Food and Agriculture Organization (FAO) Irrigation and Drainage Paper 56 entitled:

saturation_vapor_pressure

Compute saturation vapor pressure as described in the Food and Agriculture Organization (FAO) Irrigation and Drainage Paper 56 entitled:

saturation_vapor_pressure_slope

Compute the slope [kPa/C] of saturation vapor pressure curve as described in the Food and Agriculture Organization (FAO) Irrigation and Drainage Paper 56 entitled:

Gradient#

gradient

Extract and return the gradient values of a dataset at each point in the dataset.

arc_lat_wgs84

The arc length calculation for the wgs84 ellipsoid at a latitude uses a taylor series to obtain the value of the elliptic integral.

arc_lon_wgs84

The arc length calculation for the wgs84 ellipsoid at a longitude uses a taylor series from.

rad_lat_wgs84

The radius calculation for the wgs84 ellipsoid at a latitude uses a taylor series from.

EOF Functions#

eofunc_eofs

Computes empirical orthogonal functions (EOFs, aka: Principal Component Analysis).

eofunc_pcs

Computes the principal components (time projection) in the empirical orthogonal function analysis.

Fourier Filters#

fourier_band_block

Filter a dataset by frequency.

fourier_band_pass

Filter a dataset by frequency.

fourier_filter

Filter a dataset by frequency.

fourier_high_pass

Filter a dataset by frequency.

fourier_low_pass

Filter a dataset by frequency.

Iterpolation#

interp_hybrid_to_pressure

Interpolate data from hybrid-sigma levels to isobaric levels.

interp_sigma_to_hybrid

Interpolate data from sigma to hybrid coordinates.

interp_multidim

Multidimensional interpolation of variables.

Meteorology#

dewtemp

This function calculates the dew point temperature given temperature and relative humidity using equations from John Dutton's "Ceaseless Wind" (pp 273-274)

heat_index

Compute the 'heat index' as calculated by the National Weather Service.

relhum

This function calculates the relative humidity given temperature, mixing ratio, and pressure.

relhum_ice

Calculates relative humidity with respect to ice, given temperature, mixing ratio, and pressure.

relhum_water

Calculates relative humidity with respect to water, given temperature, mixing ratio, and pressure.

Polynomial#

detrend

Estimates and removes the trend of the leftmost dimension from all grid points.

ndpolyfit

An extension to numpy.polyfit function to support multi-dimensional arrays, Dask arrays, and missing values.

ndpolyval

Extended version of numpy.polyval to support multi-dimensional outputs provided by geocat.comp.ndpolyfit.

Skew-T Plot Parameters#

get_skewt_vars

This function processes the dataset values and returns a string element which can be used as a subtitle to replicate the styles of NCL Skew-T Diagrams.

showalter_index

Calculate Showalter Index from pressure temperature and 850 hPa lcl.

Spherical Harmonics#

decomposition

Calculate the spherical harmonics of a dataset.

recomposition

Calculate a dataset from spherical harmonics.

scale_voronoi

Calculate the area weighting for dataset.

Statistics#

pearson_r

This function wraps the function of the same name from xskillscore.

GeoCAT-comp routines from GeoCAT-f2py#

dpres_plevel

Calculates the pressure layer thicknesses of a constant pressure level coordinate system.

grid_to_triple

Converts a two-dimensional grid with one-dimensional coordinate variables to an array where each grid value is associated with its coordinates.

linint1

Interpolates from one series to another using piecewise linear interpolation across the rightmost dimension.

linint2

Interpolates a regular grid to a rectilinear one using bi-linear interpolation.

linint2pts

Interpolates from a rectilinear grid to an unstructured grid or locations using bilinear interpolation.

moc_globe_atl

Facilitates calculating the meridional overturning circulation for the globe and Atlantic.

rcm2points

Interpolates data on a curvilinear grid (i.e.

rcm2rgrid

Interpolates data on a curvilinear grid (i.e.

rgrid2rcm

Interpolates data on a rectilinear lat/lon grid to a curvilinear grid like those used by the RCM, WRF and NARR models/datasets.

triple_to_grid

Places unstructured (randomly-spaced) data onto the nearest locations of a rectilinear grid.