ModelSettings#
- class fridom.shallowwater.ModelSettings(grid: GridBase, **kwargs)[source]#
Bases:
ModelSettingsBaseModel settings for the 2D shallow water model.
Parameters#
- gridGrid
The grid object.
Methods
__init__(grid, **kwargs)add_field_to_state(kwargs)Add a field variable to the state vector.
diagnostic_state_constructor()Construct the diagnostic state vector from this model settings.
set_attributes(**kwargs)Set model settings attributes from keyword arguments.
setup()Set the model settings up.
setup_grid()Set the grid object up.
Set the model settings parameters up.
Construct the state vector from this model settings.
Attributes
The Rossby number.
The beta term of the Coriolis parameter (f=f0 + beta*y).
The phase speed of the gravity waves.
The variable c²(x,y) field.
custom_fieldsList of custom fields to be added to the state vector.
diagnosticsThe module container for all diagnostics.
The aspect ratio.
The constant term f0 of the Coriolis parameter (f=f0 + beta*y).
The variable coriolis parameter field
gridThe spatial grid.
haloReturn the halo size of the model.
nan_check_intervalThe interval at which the model checks for NaN values.
Return a dictionary with all parameters of the model settings.
progress_barThe progress bar object (default: ProgressBar).
restart_moduleThe restart module.
tendenciesThe module container for all tendencies.
time_stepperThe time stepper object (default: AdamBashforth).
timerThe timing module.
Examples using
fridom.shallowwater.ModelSettings#- model_name = 'ShallowWater'#
- property parameters: dict#
Return a dictionary with all parameters of the model settings.
Description#
This method should be overridden by the child class to return a dictionary with all parameters of the model settings. This dictionary is used to print the model settings in the __repr__ method.
- property f0: float#
The constant term f0 of the Coriolis parameter (f=f0 + beta*y).
- property beta: float#
The beta term of the Coriolis parameter (f=f0 + beta*y).
- property f_coriolis: FieldVariable#
The variable coriolis parameter field
- property csqr: float#
The phase speed of the gravity waves.
- property csqr_field: FieldVariable#
The variable c²(x,y) field.
- property Ro: float#
The Rossby number.
- property dsqr: float#
The aspect ratio. \(\delta^2\).