pydsstools.core.gridinfo.hrap

HRAP grid type implementation and utilities.

This module provides the HrapInfo class and HRAP-specific utility functions. HRAP (Hydrologic Rainfall Analysis Project) uses a polar stereographic projection commonly used for precipitation data.

Classes

HrapInfo(**data)

Metadata for HRAP (Hydrologic Rainfall Analysis Project) grid.

class pydsstools.core.gridinfo.hrap.HrapInfo(**data)[source]

Bases: GridInfo

Metadata for HRAP (Hydrologic Rainfall Analysis Project) grid.

HRAP uses a polar stereographic projection centered on the North Pole, commonly used for precipitation data in hydrologic modeling. The standard HRAP grid has 4.7625 km cell size at 60°N latitude.

In addition to the parameters inherited from GridInfo, this class adds data_source for tracking data provenance.

Examples

Create HRAP grid for NEXRAD precipitation:

>>> from pydsstools.core.gridinfo import HrapInfo, GridType, DataType
>>> info = HrapInfo(
...     grid_type=GridType.hrap,
...     data_type=DataType.per_aver,
...     shape=(100, 150),
...     cell_size=HRAP_CELL_SIZE,  # 4762.5 m
...     data_units="MM",
...     data_source="NEXRAD"
... )

Or use the factory function (recommended):

>>> from pydsstools.core.gridinfo import GridInfoCreate
>>> info = GridInfoCreate(
...     grid_type=GridType.hrap,
...     data_type=DataType.per_aver,
...     shape=(100, 150),
...     cell_size=HRAP_CELL_SIZE,
...     data_units="MM",
...     data_source="NEXRAD"
... )

Notes

HRAP Projection Parameters:

  • Projection: Polar Stereographic

  • Latitude of true scale: 60N

  • Central meridian: 105W

  • False easting: 401 grid cells

  • False northing: 1601 grid cells

  • Standard cell size: 4.7625 km at 60N

Typical Users:

  • National Weather Service (NWS)

  • River Forecast Centers (RFCs)

  • HEC-HMS for precipitation input

Coordinate System:

  • Origin is at the North Pole

  • X-axis points along 105W meridian

  • Grid cells are 4.7625 km x 4.7625 km at 60N

  • Standard grid covers the United States

Common Data Sources:

  • NEXRAD - Next-Generation Radar

  • MPE - Multi-sensor Precipitation Estimator

  • RFC - River Forecast Center

  • PRISM - Parameter-elevation Regressions on Independent Slopes Model

References

[hrap1]

NOAA National Weather Service, “HRAP Coordinate System” https://www.nws.noaa.gov/oh/hrl/nwsrfs/users_manual/part2/_pdf/22hrap.pdf

grid_type

Type of grid projection. Only hrap and hrap_time are valid. Default GridType.hrap_time.

Type:

GridType

data_source

Source or provenance of the data. Common values: "NEXRAD", "MPE", "RFC", "PRISM". Default "".

Type:

str