pyiem.mrms module#

Multi-RADAR Multi-Sensor (MRMS) Helper Functions.

Hopefully useful functions to help with the processing of MRMS data

pyiem.mrms.find_ij(lon, lat)[source]#

CAUTION: This is for the netcdf files, not grib2 files.

Parameters:
Return type:

tuple[int | None, int | None]

pyiem.mrms.is_gzipped(text)[source]#

Check that we have gzipped content.

pyiem.mrms.get_url(center, valid, product)[source]#

Return the URL given the provided options.

pyiem.mrms.fetch(product, valid, tmpdir='/mesonet/tmp')[source]#

Get a desired MRMS product.

Applies the following logic:
  • does the file exist in tmpdir?

  • can I fetch it from mtarchive?

  • if recent, can I fetch it from NOAA MRMS website

Parameters:
  • product (str) – MRMS product type

  • valid (datetime) – Datetime object for desired timestamp

  • tmpdir (str,optional) – location to check/place the downloaded file

pyiem.mrms.make_colorramp()[source]#

Make me a crude color ramp.

pyiem.mrms.reader(fn)[source]#

Return metadata and the data.

pyiem.mrms.write_worldfile(filename)[source]#

Write a worldfile to the given filename.

Parameters:

filename (str) – filename to write the world file information to