src.var#
This module defines the data objects used in the program.
Classes
|
Analysis object, contains all the attributes required to compute the idealised pseudo-momentum fluxes |
|
Grid class |
|
Helper object to generate class instances on the fly |
|
User parameter class |
|
Topography class with its corresponding lat-lon values |
Inherits and initialises an instance of |
- class src.var.grid#
Grid class
- __init__()#
Contains the
(lat,lon)
of each triangular grid cell with the corresponding vertices(lat_1, lat_2, lat_3)
,(lon_1, lon_2, lon_3)
.link
is a lookup table linking the grid cell to the corresponding topography file.
- class src.var.topo_cell#
Inherits and initialises an instance of
src.var.topo
, to be used for storing data associated to a grid cell- __init__()#
- gen_mgrids(grad=False)#
Generates a meshgrid based on the lat-lon values
Parameters#
- gradbool, optional
deprecated by 0.90.0, by default False
- get_masked(triangle=None, mask=None)#
Gets the masked attributes
Parameters#
- triangle
src.utils.gen_triangle
instance of the generate-triangle class, by default None
- maskarray-like, optional
2D array of the mask, by default None
- triangle
- get_grad_topo(triangle)#
Computes the gradient of the topography
Deprecated since version 0.90.0.
- class src.var.analysis#
Analysis object, contains all the attributes required to compute the idealised pseudo-momentum fluxes
- __init__()#
Initialises empty attributes
- get_attrs(fobj, freqs)#
Copies required attributes given the arguments
Parameters#
- fobj
src.fourier.f_trans
instance of the Fourier transformer
- freqsarray-like
2D (abs. valued real) spectrum
- fobj
- grid_kk_ll(fobj, dat)#
Deprecated since version 0.90.0.
- class src.var.params#
User parameter class
Defines required and optional parameters to run a simulation
- __init__()#
Defines the required parameters for a simulation run
- self_test()#
Checker method if user-defined parameters contains sensible compulsory parameters. Calls
src.var.params.check_init()
andsrc.var.params.check_delaunay()
.Returns#
- bool
True if test passed, False otherwise
- check_init()#
Checks if all required parameters are defined.
- check_delaunay()#
If run uses a Delaunay triangulation, this method checks if all required parameters are defined.
- static checker(arg, compulsory_params)#
Auxiliary function that checks if
arg
is incompulsory_params