NEDAS.models.noresm package

class NEDAS.models.noresm.NorESM(context: Context | None = None, io_mode: Literal['online', 'offline'] | None = None, config_file: str | None = None, parse_args: bool = False, **kwargs)[source]

Bases: Model

NEDAS.models.noresm.filename(path, **kwargs)[source]

Parse kwargs and find matching filename for keys in kwargs that are not set, here we define the default values key values in kwargs will also be checked for erroneous values

NEDAS.models.noresm.grid_info(grid_file: str, grid_type: str, scale_x: float = 1.0, scale_y: float = 1.0, stagger: str = 'p')[source]

Fetch grid info from a given grid_file, or generate from locally stored data.

Parameters:
  • grid_file (str) – The path to the grid.nc file containing plat,plon…

  • grid_type (str) – Type of grid, ‘bipolar’ or ‘tripolar’.

  • scale_x (float) – Resolution scaling in x direction.

  • scale_y (float) – Resolution scaling in y direction.

  • stagger (str) – Staggering type, ‘p’, ‘u’, ‘v’, or ‘q’.

Returns:

A tuple containing:
  • lon (np.ndarray): Longitude defined on the grid points, of shape (ny, nx).

  • lat (np.ndarray): Latitude defined on the grid points

  • x (np.ndarray): X-coordinates of the grid points.

  • y (np.ndarray): Y-coordinates of the grid points.

  • neighbor (np.ndarray): Neighbor indices of shape (2, 4, ny, nx).

    For each point (j, i) in (ny,nx), grid_neighbors[0,:,j,i] are the j-indices for the 4 neighbors (east, north, west and south) to point (j, i) and grid_neighbors[1,:,j,i] are the corresponding i-indices

Return type:

tuple

NEDAS.models.noresm.read_grid(path, **kwargs)[source]

Generate a Grid object for the NorESM model grid

NEDAS.models.noresm.write_grid(path, **kwargs)[source]
NEDAS.models.noresm.read_var(path, grid, **kwargs)[source]
NEDAS.models.noresm.write_var()[source]

Submodules