swirlspy.sat.safnwc package

SAFNWC output data parser.

swirlspy.sat.safnwc.read_asii(data_path: str, asii_type: swirlspy.sat.safnwc._asii.Asii_Type, top: float = 50, bottom: float = -10, y_step: float = -0.025, left: float = 70, right: float = 160, x_step: float = 0.025) → xarray.core.dataset.Dataset

Reads SAFNWC-ASII (Aviation) module product file. Returns a labelled xarray.DataArray.

Parameters:
  • data_path (str) – File path of product file to read.
  • asii_type (Asii_Type) – Aviation product type to be return.
  • top (float, optional) – Upper boundary in latitude. Default 50
  • bottom (float, optional) – Lower boundary in latitude. Default -10
  • y_step (float, optional) – Vertical step size of grid. Default -0.025
  • left (float, optional) – Left boundary in longitude. Default 70
  • right (float, optional) – Right boundary in longitude. Default 160
  • x_step (float, optional) – Horizontal step size of grid. Default 0.025
Returns:

xr_dataarray – A xarray.DataArray populated with aviation product data, meta data and color palette.

Return type:

xarray.DataArray

class swirlspy.sat.safnwc.Asii_Type

Bases: enum.IntFlag

SAFNWC-ASII (Aviation) module product type

data_name
haic = 2

Icing high-altitude crystals

name
pal
pal_levels
sc = 3

Icing supercooled droplets

trop = 1

//www.nwcsaf.org/asii-ng_description)

Type:[Tropopause Folding](https
wave = 4

Gravity Waves

swirlspy.sat.safnwc.read_ci(data_path: str, top: float = 50, bottom: float = -10, y_step: float = -0.025, left: float = 70, right: float = 160, x_step: float = 0.025) → xarray.core.dataset.Dataset

Reads [SAFNWC-CI](https://www.nwcsaf.org/ci_description) (Convection Initiation) module product file. Returns a labelled xarray.DataArray.

Parameters:
  • data_path (str) – File path of product file to read.
  • top (float, optional) – Upper boundary in latitude. Default 50
  • bottom (float, optional) – Lower boundary in latitude. Default -10
  • y_step (float, optional) – Vertical step size of grid. Default -0.025
  • left (float, optional) – Left boundary in longitude. Default 70
  • right (float, optional) – Right boundary in longitude. Default 160
  • x_step (float, optional) – Horizontal step size of grid. Default 0.025
Returns:

xr_dataarray – A xarray.DataArray populated with convection initiation product data, meta data and color palette.

Return type:

xarray.DataArray

swirlspy.sat.safnwc.read_cmic(data_path: str, mode: swirlspy.sat.safnwc._cmic.Cmic_Type, top: float = 50, bottom: float = -10, y_step: float = -0.025, left: float = 70, right: float = 160, x_step: float = 0.025) → xarray.core.dataset.Dataset

Reads [SAFNWC-CMIC](https://www.nwcsaf.org/cmic_description) (Cloud Microphysics) module product file. Returns a labelled xarray.DataArray.

Parameters:
  • data_path (str) – File path of product file to read.
  • asii_type (Cmic_Type) – Cloud Microphysics product type to be return.
  • top (float, optional) – Upper boundary in latitude. Default 50
  • bottom (float, optional) – Lower boundary in latitude. Default -10
  • y_step (float, optional) – Vertical step size of grid. Default -0.025
  • left (float, optional) – Left boundary in longitude. Default 70
  • right (float, optional) – Right boundary in longitude. Default 160
  • x_step (float, optional) – Horizontal step size of grid. Default 0.025
Returns:

xr_dataarray – A xarray.DataArray populated with cloud microphysics product data, meta data and color palette.

Return type:

xarray.DataArray

class swirlspy.sat.safnwc.Cmic_Type

Bases: enum.IntFlag

SAFNWC-CMIC (Cloud Microphysics) module product type

data_name
iwp = 1

Ice Water Path

lwp = 2

Liquid Water Path

pal_name
swirlspy.sat.safnwc.read_crr_accum(crr_path: str, crrph_path: str, top: float = 50, bottom: float = -10, y_step: float = -0.025, left: float = 70, right: float = 160, x_step: float = 0.025) → xarray.core.dataset.Dataset

Reads [SAFNWC-CRR](https://www.nwcsaf.org/crr_description) (Convective Hourly Rainfall Accumulation) module product file. [SAFNWC-PC-PH](https://www.nwcsaf.org/pc-ph_description) (Cloud Physical Properties) is also required. Returns a labelled xarray.DataArray.

Parameters:
  • crr_path (str) – File path of CRR product file to read.
  • crrph_path (str) – File path of PC-PH product file to read.
  • top (float, optional) – Upper boundary in latitude. Default 50
  • bottom (float, optional) – Lower boundary in latitude. Default -10
  • y_step (float, optional) – Vertical step size of grid. Default -0.025
  • left (float, optional) – Left boundary in longitude. Default 70
  • right (float, optional) – Right boundary in longitude. Default 160
  • x_step (float, optional) – Horizontal step size of grid. Default 0.025
Returns:

xr_dataarray – A xarray.DataArray populated with convective hourly rainfall accumulation product data, meta data and color palette.

Return type:

xarray.DataArray

swirlspy.sat.safnwc.read_crr_intensity(crr_path: str, crrph_path: str, top: float = 50, bottom: float = -10, y_step: float = -0.025, left: float = 70, right: float = 160, x_step: float = 0.025) → xarray.core.dataset.Dataset

Reads [SAFNWC-CRR](https://www.nwcsaf.org/crr_description) (Convective Rainfall Rainrate) module product file. [SAFNWC-PC-PH](https://www.nwcsaf.org/pc-ph_description) (Cloud Physical Properties) is also required. Returns a labelled xarray.DataArray.

Parameters:
  • crr_path (str) – File path of CRR product file to read.
  • crrph_path (str) – File path of PC-Ph product file to read.
  • top (float, optional) – Upper boundary in latitude. Default 50
  • bottom (float, optional) – Lower boundary in latitude. Default -10
  • y_step (float, optional) – Vertical step size of grid. Default -0.025
  • left (float, optional) – Left boundary in longitude. Default 70
  • right (float, optional) – Right boundary in longitude. Default 160
  • x_step (float, optional) – Horizontal step size of grid. Default 0.025
Returns:

xr_dataarray – A xarray.DataArray populated with convective rainfall rainrate product data, meta data and color palette.

Return type:

xarray.DataArray

swirlspy.sat.safnwc.read_ct(data_path: str, top: float = 50, bottom: float = -10, y_step: float = -0.025, left: float = 70, right: float = 160, x_step: float = 0.025) → xarray.core.dataset.Dataset

Reads [SAFNWC-CT](https://www.nwcsaf.org/ct_description) (Cloud Type) module product file. Returns a labelled xarray.DataArray.

Parameters:
  • data_path (str) – File path of product file to read.
  • top (float, optional) – Upper boundary in latitude. Default 50
  • bottom (float, optional) – Lower boundary in latitude. Default -10
  • y_step (float, optional) – Vertical step size of grid. Default -0.025
  • left (float, optional) – Left boundary in longitude. Default 70
  • right (float, optional) – Right boundary in longitude. Default 160
  • x_step (float, optional) – Horizontal step size of grid. Default 0.025
Returns:

xr_dataarray – A xarray.DataArray populated with cloud type product data, meta data and color palette.

Return type:

xarray.DataArray

swirlspy.sat.safnwc.read_ctth_alti(data_path: str, top: float = 50, bottom: float = -10, y_step: float = -0.025, left: float = 70, right: float = 160, x_step: float = 0.025) → xarray.core.dataset.Dataset

Reads [SAFNWC-CTTH](https://www.nwcsaf.org/ctth_description) (Cloud Top Temperature and Height) module product file. Returns a labelled xarray.DataArray.

Parameters:
  • data_path (str) – File path of product file to read.
  • top (float, optional) – Upper boundary in latitude. Default 50
  • bottom (float, optional) – Lower boundary in latitude. Default -10
  • y_step (float, optional) – Vertical step size of grid. Default -0.025
  • left (float, optional) – Left boundary in longitude. Default 70
  • right (float, optional) – Right boundary in longitude. Default 160
  • x_step (float, optional) – Horizontal step size of grid. Default 0.025
Returns:

xr_dataarray – A xarray.DataArray populated with cloud top temperature and height product data, meta data and color palette.

Return type:

xarray.DataArray

swirlspy.sat.safnwc.read_hrw(ds_path: str, top: float = 50, bottom: float = -10, y_step: float = -0.75, left: float = 70, right: float = 160, x_step: float = 0.75, hrw_group: list = [('100-400', 40000), ('400-600', 60000), ('600-800', 80000), ('800-1000', None)]) → xarray.core.dataset.Dataset

Reads [SAFNWC-HRW](https://www.nwcsaf.org/hrw_description) (High Resolution Winds) module product file. Returns a labelled xarray.DataArray.

Parameters:
  • data_path (str) – File path of product file to read.
  • top (float, optional) – Upper boundary in latitude. Default 50
  • bottom (float, optional) – Lower boundary in latitude. Default -10
  • y_step (float, optional) – Vertical step size of grid. Default -0.75
  • left (float, optional) – Left boundary in longitude. Default 70
  • right (float, optional) – Right boundary in longitude. Default 160
  • x_step (float, optional) – Horizontal step size of grid. Default 0.75
  • hrw_group (list, optional) –

    Range of air pressure mapping. Default: [

    (“100-400”, 40000), (“400-600”, 60000), (“600-800”, 80000), (“800-1000”, None)

    ]

Returns:

xr_dataarray – A xarray.DataArray populated with high resolution winds product data, meta data and color palette.

Return type:

xarray.DataArray

swirlspy.sat.safnwc.read_ishai(data_path: str, ishai_type: swirlspy.sat.safnwc._ishai.IShai_Type, top: float = 50, bottom: float = -10, y_step: float = -0.025, left: float = 70, right: float = 160, x_step: float = 0.025) → xarray.core.dataset.Dataset

Reads [SAFNWC-iSHAI](https://www.nwcsaf.org/ishai_description) (imaging Satellite Humidity And Instability) module product file. Returns a labelled xarray.DataArray.

Parameters:
  • data_path (str) – File path of product file to read.
  • ishai_type (IShai_Type) – iSHAI product type to be return.
  • top (float, optional) – Upper boundary in latitude. Default 50
  • bottom (float, optional) – Lower boundary in latitude. Default -10
  • y_step (float, optional) – Vertical step size of grid. Default -0.025
  • left (float, optional) – Left boundary in longitude. Default 70
  • right (float, optional) – Right boundary in longitude. Default 160
  • x_step (float, optional) – Horizontal step size of grid. Default 0.025
Returns:

xr_dataarray – A xarray.DataArray populated with imaging satellite humidity and instability product data, meta data and color palette.

Return type:

xarray.DataArray

class swirlspy.sat.safnwc.IShai_Type

Bases: enum.IntFlag

SAFNWC-iSHAI (imaging Satellite Humidity And Instability) module product type

BL = 5

Precip. Water sfc-850hPa

CAPE = 11

CAPE

DiffBL = 6

Difference in Precip. Water sfc-850hPa

DiffCAPE = 12

Difference in CAPE

DiffHL = 10

Difference in Precip. Water 500hPa up

DiffKI = 2

Difference in K Index

DiffML = 8

Difference in Precip. Water 850-500hPa

DiffTPW = 4

Difference in Total Precipitable Water

HL = 9

Precip. Water 500hPa up

KI = 1

K Index

ML = 7

Precip. Water 850-500hPa

TPW = 3

Total Precipitable Water

data_name
pal
pal_levels
swirlspy.sat.safnwc.read_rdt(data_path: str, top: float = 50, bottom: float = -10, y_step: float = -0.025, left: float = 70, right: float = 160, x_step: float = 0.025) → xarray.core.dataset.Dataset

Reads [SAFNWC-RDT](https://www.nwcsaf.org/rdt_description) (Rapidly Developing Thunderstorm - Convection Warning) module product file. Returns a labelled xarray.DataArray.

Parameters:
  • data_path (str) – File path of product file to read.
  • top (float, optional) – Upper boundary in latitude. Default 50
  • bottom (float, optional) – Lower boundary in latitude. Default -10
  • y_step (float, optional) – Vertical step size of grid. Default -0.025
  • left (float, optional) – Left boundary in longitude. Default 70
  • right (float, optional) – Right boundary in longitude. Default 160
  • x_step (float, optional) – Horizontal step size of grid. Default 0.025
Returns:

xr_dataarray – A xarray.DataArray populated with rapidly developing thunderstorm - convection warning product data, meta data and color palette.

Return type:

xarray.DataArray