pysteps.io.nowcast_importers.import_netcdf_pysteps
pysteps.io.nowcast_importers.import_netcdf_pysteps¶
- pysteps.io.nowcast_importers.import_netcdf_pysteps(filename, onerror='warn', **kwargs)¶
Read a nowcast or an ensemble of nowcasts from a NetCDF file conforming to the CF 1.7 specification.
If an error occurs during the import, the corresponding error message is shown, and ( None, None ) is returned.
- Parameters
- filename: str
Name of the file to import.
- onerror: str
Define the behavior if an exception is raised during the import. - “warn”: Print an error message and return (None, None) - “raise”: Raise an exception
- Returns
- precipitation: 2D array, float32
Precipitation field in mm/h. The dimensions are [latitude, longitude]. The first grid point (0,0) corresponds to the upper left corner of the domain, while (last i, last j) denote the lower right corner.
- metadata: dict
Associated metadata (pixel sizes, map projections, etc.).
- Other Parameters
- dtype: str
Data-type to which the array is cast. Valid values: “float32”, “float64”, “single”, and “double”.
- fillna: float or np.nan
Value used to represent the missing data (“No Coverage”). By default, np.nan is used.