rompy.swan.components.physics.BRAGG_FILE#
- pydantic model rompy.swan.components.physics.BRAGG_FILE[source]#
Bragg scattering with bottom spectrum from file.
BRAGG [ibrag] [nreg] [cutoff] FILE 'fname' [idla] [mkx] [mky] [dkx] [dky]
The bed elevation spectrum FB(kx, ky) is read from a file.
Notes
This spectrum is taken to be uniform over the entire computational domain.
Examples
In [12]: from rompy.swan.components.physics import BRAGG_FILE In [13]: bragg = BRAGG_FILE(fname="bottom_spectrum.txt", nreg=500, mkx=99, dkx=0.1) In [14]: print(bragg.render()) BRAGG nreg=500 FILE fname='bottom_spectrum.txt' mkx=99 dkx=0.1 In [15]: kwargs = dict( ....: ibrag=3, ....: nreg=500, ....: cutoff=5.0, ....: fname="bottom_spectrum.txt", ....: mkx=99, ....: mky=149, ....: dkx=0.1, ....: dky=0.1, ....: ) ....: In [16]: bragg = BRAGG_FILE(**kwargs) In [17]: print(bragg.render()) BRAGG ibrag=3 nreg=500 cutoff=5.0 FILE fname='bottom_spectrum.txt' mkx=99 mky=149 dkx=0.1 dky=0.1
- Fields:
- field cutoff: float | None = None#
Cutoff to the ratio between surface and bottom wave numbers. Note: seethe Scientific/Technical documentation for details (SWAN default: 5.0)
- field dkx: float [Required]#
Mesh size in x-direction of the wave number grid related to bottom spectrum (1/m)
- field dky: float | None = None#
Mesh size in y-direction of the wave number grid related to bottom spectrum (1/m) (SWAN default: dky = dkx)
- field fname: str [Required]#
Name of file containing the bottom spectrum
- Constraints:
max_length = 36
- field ibrag: Literal[1, 2, 3] | None = None#
Indicates the computation of Bragg scattering term:
1: source term is calculated per sweep and bottom spectrum is interpolated at the difference wave number a priori (thus requiring storage)
2: source term is calculated per sweep and bottom spectrum is interpolated at the difference wave number per sweep (no storage)
3: source term is calculated per iteration and bottom spectrum is interpolated at the difference wave number per iteration (no storage)
(SWAN default: 1)
- field mkx: int [Required]#
Number of cells in x-direction of the wave number grid related to bottom spectrum (this is one less than the number of points in this direction)
- field mky: int | None = None#
Number of cells in y-direction of the wave number grid related to bottom spectrum (this is one less than the number of points in this direction)(SWAN default: mky = mkx)
- field model_type: Literal['file', 'FILE'] = 'file'#
Model type discriminator
- field nreg: int [Required]#
Size of square region around computational grid point (centered) for computing the mean depth and, if desired, the bed elevation spectrum. It is expressed in terms of the number of grid points (per direction) of the inputted bottom grid