`epygram.geometries.SpectralGeometry` — Spectral Geometry class¶

Contains the class that handles spectral parameters and spectral transforms.

`epygram.geometries.SpectralGeometry.``truncation_from_gridpoint_dims`(dimensions, grid=u'linear')[source]

Compute truncation from gridpoint dimensions, according to the kind of grid.

Parameters: dimensions – dict containing dimensions, among: {‘X’:..., ‘Y’:...} for LAM grids, {‘lat_number’:..., ‘max_lon_number’:...} for Gauss grids grid – how to choose the truncation, among (‘linear’, ‘quadratic’, ‘cubic’)

Formula taken from “Spectral transforms in the cycle 45 of ARPEGE/IFS”, http://www.umr-cnrm.fr/gmapdoc/IMG/pdf/ykts45.pdf

class `epygram.geometries.SpectralGeometry.``SpectralGeometry`(*args, **kwargs)[source]

Bases: `epygram.util.RecursiveObject`, `footprints.FootprintBase`

Handles the spectral geometry and transforms for a H2DField.

Note

This class is managed by footprint.

• info: Not documented
• priority: PriorityLevel::DEFAULT (rank=1)

Automatic parameters from the footprint:

• space (`str`) - rxx - Name of spectral space.
• Values: set([‘legendre’, ‘bi-fourier’])
• truncation (`footprints.stdtypes.FPDict`) - rwx - Handles the spectral truncation parameters.
`compute_xy_spderivatives`(data, gpdims, spectral_coeff_order=u'model')[source]

Compute the derivatives of the spectral data contained in data in spectral space (assumed this spectral geometry is that of data) and return it in gridpoint space, defined by its dimensions contained in gpdims.

Parameters: data – spectral data gpdims (dict) – gridpoints dimensions spectral_coeff_order – among ‘model’ or ‘FA’, cf. default and description in config.spectral_coeff_order

Returns: (dz/dx, dz/dy)

Input and output data are both 1D.

`etrans_inq`(gpdims)[source]

Wrapper to arpifs4py ETRANS_INQ.

Parameters: gpdims (dict) – gridpoints dimensions
`gp2sp`(data, gpdims, spectral_coeff_order=u'model')[source]

Makes the transform of the gridpoint data contained in data to the spectral space and truncation of this object, and returns the spectral data.

Parameters: data – gridpoint data gpdims (dict) – gridpoints dimensions spectral_coeff_order – among ‘model’ or ‘FA’, cf. default and description in config.spectral_coeff_order

Input and output data are both 1D.

`needed_memory`

Memory needed for transforms, in bytes.

`sp2gp`(data, gpdims, spectral_coeff_order=u'model')[source]

Makes the transform of the spectral data contained in data (assumed this spectral geometry is that of data) to gridpoint space, defined by its dimensions contained in gpdims, and returns the gridpoint data.

Parameters: data – spectral data gpdims (dict) – gridpoints dimensions spectral_coeff_order – among ‘model’ or ‘FA’, cf. default and description in config.spectral_coeff_order

Input and output data are both 1D.

`trans_inq`(gpdims)[source]

Wrapper to arpifs4py TRANS_INQ.

Parameters: gpdims (dict) – gridpoints dimensions