DiagnosticState#
- class fridom.nonhydro.DiagnosticState(mset: ModelSettings, is_spectral=False, field_list=None)[source]#
Bases:
StateBase- __init__(mset: ModelSettings, is_spectral=False, field_list=None) None[source]#
Methods
__init__(mset[, is_spectral, field_list])dot(other)Calculate the dot product of the state with another state.
fft([padding])Calculate the Fourier transform of the state.
from_netcdf(mset, path)Read the state from a NetCDF file.
has_nan()Check if the state contains NaN values.
ifft([padding])Calculate the inverse Fourier transform of the state.
norm_l2()Calculate the L2 norm of the state.
norm_of_diff(other)The norm of the difference between two states.
project(p_vec, q_vec)Project the state on a (spectral) vector.
sync()Synchronize the state.
to_netcdf(path)Write the state to a NetCDF file.
Attributes
arr_dictReturn the dictionary of arrays (not FieldVariables).
The divergence field.
field_listReturn the list of fields.
gridReturn the grid of the model.
The pressure field.
xrState as xarray dataset
xrsState of sliced domain as xarray dataset
- property p: FieldVariable#
The pressure field.
- property div: FieldVariable#
The divergence field.