module documentation
Generic class for LIVVkit Extensions.
This supplies several common methods for plotting and data analysis.
| Class | LEX |
Define a LIVVkit extension. |
| Function | annotate |
Add land / ocean, gridlines, colourbar. |
| Function | area |
Compute a masked and weighted area average of some field. |
| Function | check |
Check that longitudes are -180 - +180. |
| Function | closest |
Determine closest model points to set of observation x/y points. |
| Function | compute |
Compute reasonable min / max levels for one to three arrays which are comparable. |
| Function | gen |
Undocumented |
| Function | gen |
Undocumented |
| Function | gen |
Undocumented |
| Function | get |
Get the name of which type of averaging is used (annual, seasonal, monthly). |
| Function | get |
Determine season bounds for climatology files. |
| Function | img |
Convert the module name into a file prefix for the image output. |
| Function | load |
Undocumented |
| Function | load |
Load data for timeseries. |
| Function | parse |
Undocumented |
| Function | parse |
Undocumented |
| Function | plot |
Undocumented |
| Function | plot |
Undocumented |
| Function | proc |
Process the climatology file to maintain backward compatibility with standalone LEX. |
| Function | summarize |
Provides a snapshot of the extension's results to be provided on the summary webpage and printed to STDOUT via the print_summary method |
| Function | var |
Undocumented |
| Constant | DAYS |
Undocumented |
| Constant | DAYS |
Undocumented |
| Constant | MON |
Undocumented |
| Constant | SEASON |
Undocumented |
| Constant | TFORM |
Undocumented |
def area_avg(data, config, area_file, area_var, mask_file=None, mask_var=None, sum_out=False, land_only=False):
(source)
¶
Compute a masked and weighted area average of some field.
- data : array_like
- Array of data to be averaged
- config : dict
- LIVVkit configuration dictionary, at least contains the variable
maskvifmask_varis not set - area_file : Path
- Path to a netCDF file containing the grid cell area which matches
data - area_var : str
- Name of the netCDF variable which contains the area data
- mask_file : Path, optional
- Path to a netCDF file containing the ice sheet mask whose shape matches
data. If not set, the mask is assumed to be in thearea_filefile - mask_var : str, optional
- Name of the netCDF variable which contains the ice sheet mask data, if not
set, then use
maskvfromconfig
| Returns | |
|
Compute reasonable min / max levels for one to three arrays which are comparable.
| Parameters | |
data:dictionary | Masked array of data for which to compute contour levels |
bnds:tuple, optional | Upper / lower percentiles to use for bounds (default: (5%, 95%)) |
even:bool, optional | Use an even interval about 0 (default: False) |
| round | Undocumented |
keys:list, optional | List of keys within data for which bounds will be computed, default is all
keys in data |
| Returns | |
float | bnd_l, bnd_h - Lower, upper bounds for contouring |
def gen_file_list(config:
dict, var_name: list | tuple | str, overs: str, sea: list | tuple | str, cycle: str):
(source)
¶
Undocumented
def gen_file_list_old(config:
dict, var_name: list | tuple | str, overs: str, sea: list | tuple | str, cycle: str, mode: str):
(source)
¶
Undocumented
Process the climatology file to maintain backward compatibility with standalone LEX.
| Parameters | |
config:dict | LIVVkit /LEX configuration dict |
filestr | Configuration item which points to climatology filename to be formatted, usually
climo or climo_remap |
sea:str | Season identifier |
| Returns | |
str | climo_file - Formatted name of climatology file |
Provides a snapshot of the extension's results to be provided on the summary webpage and printed to STDOUT via the print_summary method
Undocumented
| Value |
|