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_dict

Return the dictionary of arrays (not FieldVariables).

div

The divergence field.

field_list

Return the list of fields.

grid

Return the grid of the model.

p

The pressure field.

xr

State as xarray dataset

xrs

State of sliced domain as xarray dataset

property p: FieldVariable#

The pressure field.

property div: FieldVariable#

The divergence field.