|
PHYEX 0.9.5
PHYsique EXternalisée
|


Public Member Functions | |
| __init__ (self, dataset, attrs=None) | |
| contains (self, varname) | |
| get (self, varname, slice_idx=None) | |
| duration (self) | |
| description (self) | |
| description (self, value) | |
| get_interpolator (self, varname, grid) | |
| Public Member Functions inherited from pyphyex.phyex1d.case.Case | |
| __enter__ (self) | |
| __exit__ (self, *args) | |
| close (self) | |
Public Attributes | |
| int | adv_ua = 0 |
| int | adv_va = 0 |
Protected Attributes | |
| _dataset = dataset | |
| dict | _interpolators = {} |
| _description = value | |
Case backed by an in-memory xarray Dataset
Parameters
----------
dataset : xarray.Dataset
Dataset containing all case variables. Variable names must match the
phyex1d internal names (e.g. 'T', 'qv', 'u', 'zh', 'Ps', 'lat', ...).
attrs : dict, optional
Additional attributes to set on the case (overrides dataset attrs).
| pyphyex.phyex1d.case.CaseXarray.__init__ | ( | self, | |
| dataset, | |||
| attrs = None ) |
| pyphyex.phyex1d.case.CaseXarray.contains | ( | self, | |
| varname ) |
Check if a variable exists in the dataset
Parameters
----------
varname : str
Variable name
Returns
-------
bool
True if the variable exists
Reimplemented from pyphyex.phyex1d.case.Case.
| pyphyex.phyex1d.case.CaseXarray.description | ( | self | ) |
Case description
Returns
-------
str
Case description string
Reimplemented from pyphyex.phyex1d.case.Case.
| pyphyex.phyex1d.case.CaseXarray.description | ( | self, | |
| value ) |
Set a custom description string
Reimplemented from pyphyex.phyex1d.case.Case.
| pyphyex.phyex1d.case.CaseXarray.duration | ( | self | ) |
Simulation duration
Returns
-------
float
Duration in seconds (time[-1] - time[0])
Reimplemented from pyphyex.phyex1d.case.Case.
| pyphyex.phyex1d.case.CaseXarray.get | ( | self, | |
| varname, | |||
| slice_idx = None ) |
Read a variable from the dataset
Parameters
----------
varname : str
Variable name
slice_idx : int or None, optional
Slice index to read. None returns the full array.
Returns
-------
numpy.ndarray
The data array
Reimplemented from pyphyex.phyex1d.case.Case.
| pyphyex.phyex1d.case.CaseXarray.get_interpolator | ( | self, | |
| varname, | |||
| grid ) |
Get from cache or build an interpolator for a forcing variable
Parameters
----------
varname : str
Variable name
grid : Grid
Grid instance for vertical coordinate
Returns
-------
RegularGridInterpolator
The interpolator
Reimplemented from pyphyex.phyex1d.case.Case.
Definition at line 355 of file case.py.

|
protected |
|
protected |
|
protected |