NEDAS.models.vort2d.util module

NEDAS.models.vort2d.util.initial_condition(grid, Vmax, Rmw, Vbg, Vslope, loc_sprd=0)[source]

Initialize the 2d vortex model with a Rankine vortex embedded in a random wind flow.

Parameters:
  • grid (Grid) – The model domain, doubly periodic, described by a Grid obj

  • Vmax (float) – Maximum wind speed (vortex intensity), m/s

  • Rmw (float) – Radius of maximum wind (vortex size), m

  • Vbg (float) – Background flow average wind speed, m/s

  • Vslope (int) – Background flow kinetic energy spectrum power law (typically -2)

  • loc_sprd (float, optional) – The ensemble spread in vortex center position, m

Returns:

The vector velocity field, shape (2, ny, nx).

Return type:

np.ndarray

NEDAS.models.vort2d.util.rankine_vortex(grid, Vmax, Rmw, center_x, center_y)[source]

Generate a Rankine vortex velocity field.

Parameters:
  • grid (Grid) – The model domain, doubly periodic

  • Vmax (float) – Maximum wind speed (vortex intensity), m/s

  • Rmw (float) – Radius of maximum wind (vortex size), m

  • center_x (float) – Vortex center X-coordinate.

  • center_y (float) – Vortex center Y-coordinate.

Returns:

The vector velocity field with shape (2, ny, nx)

Return type:

np.ndarray

NEDAS.models.vort2d.util.random_flow(grid, amp, power_law)[source]

Generate a random velocity field as the background flow

Parameters:
  • grid (Grid) – The model domain, doubly periodic, described by a Grid obj

  • amp (float) – wind speed amplitude, m/s

  • power_law (int) – wind kinetic energy spectrum power law (typically -2)

Returns:

The vector velocity field with shape (2, ny, nx)

Return type:

np.ndarray

NEDAS.models.vort2d.util.advance_time(fld: ndarray, dx: float, t_intv: float, dt: float, gen: float, diss: float) ndarray[source]

Advance forward in time to integrate the model (forecasting)

Parameters:
  • fld (np.ndarray) – The prognostic velocity field with shape (2,ny,nx)

  • dx (float) – Model grid spacing, meter

  • t_intv (float) – Integration time period, hour

  • dt (float) – Model time step, second

  • gen (float) – Vorticity generation rate

  • diss (float) – Dissipation rate

Returns:

The forecast velocity field

Return type:

np.ndarray

NEDAS.models.vort2d.util.get_scaled_wn(x, dx)[source]

scaled wavenumber k for pseudospectral method

NEDAS.models.vort2d.util.forcing(u, v, zeta, dx, gen, diss)[source]

forcing terms on RHS of prognostic equations