ascat.regrid package

Submodules

ascat.regrid.interface module

ascat.regrid.interface.parse_args_swath_regrid(args)[source]

Parse command line arguments for regridding an ASCAT swath file to a regular grid.

Parameters:

args (list) – Command line arguments.

Returns:

parser – Argument Parser object.

Return type:

ArgumentParser

ascat.regrid.interface.run_swath_regrid()[source]

Run command line interface for temporal aggregation of ASCAT data.

ascat.regrid.interface.swath_regrid_main(cli_args)[source]

Regrid an ASCAT swath file or directory of swath files to a regular grid and write the results to disk.

Parameters:

cli_args (list) – Command line arguments.

ascat.regrid.regrid module

ascat.regrid.regrid.regrid_swath_ds(ds, src_grid, trg_grid, grid_lut)[source]

Convert a swath dataset to their nearest neighbors on a regular lat/lon grid.

Parameters:
  • ds (xarray.Dataset) – Swath dataset.

  • src_grid (pygeogrids.grids.BasicGrid) – Sourde grid.

  • trg_grid (pygeogrids.grids.BasicGrid) – Target grid.

  • trg_grid_lut (numpy.ndarray) – Grid look-up table.

Returns:

ds – Swath dataset resampled on a regular lat/lon grid.

Return type:

xarray.Dataset

ascat.regrid.regrid.retrieve_or_store_grid_lut(src_grid, src_grid_id, trg_grid_id, trg_grid_size, store_path=None)[source]

Get a grid and its lookup table either from a store directory or create and return them.

Parameters:
  • src_grid (pygeogrids.BasicGrid) – Source grid.

  • src_grid_id (str) – The source grid’s id.

  • trg_grid_id (str) – The target grid’s id.

  • trg_grid_size (int) – The size of the target grid in degrees.

  • store_path (str, optional) – Path to the store directory (default: None).

Returns:

  • trg_grid (pygeogrids.grids.BasicGrid) – Target grid.

  • grid_lut (numpy.ndarray) – Look-up table.

Module contents