This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hello, and thanks for reaching out! So, if you're using MetPy's `GiniFile` reader, then that is reading in the underlying PNG in these files and providing back pixel values 0-255. As best I can tell, these *should* match the original GEMPAK data range [1] of 0-105 (close to your approximation!) So, if you scale these values to 105 and then subtract 30, you'll accomplish the conversion that GEMPAK would to provide a final dBZ range of (-30, 75). e.g., data_dbz = data_int / 255 * 105 - 30 However, we here might suggest that if your goal is to better characterize the reflectivity at each pixel, consider using a product like MRMS [2]. However, if the imagery here works out for your use, don't let me get in the way! Hope this helps, and don't hesitate to follow up if not. [1]: https://github.com/Unidata/gempak/blob/master/gempak/tables/unidata/nex2gini.tbl [2]: https://www.unidata.ucar.edu/data/fnexrad.html#mrms_products All the best, Drew > I use metpy and python in general to plot the NEXRCOMP Gini imagery > > E.G: > N0R, 0.5 degree Reflectivity > <https://www.unidata.ucar.edu/data/images/nexrcomp/n0r1km.gif>, 1km > > - Pattern Action: > > FNEXRAD ^rad/NEXRCOMP/1km/n0r_(........)_(....) > FILE -close data/gempak/images/sat/NEXRCOMP/1km/n0r/n0r_\1_\2 > > All the data flow, metpy and plotting work fine. My question is on the > nature of these gini images and the raw data. The data range goes from 0 > to 200, while dBZ values in the NIDS nexrad III files are in the -30 to 80 > range. So to convert the gini, I use something like multiply by .55 to > make the range 0 to 110, then subtract 30 to get -30 to 80. And this gives > images that appear pretty close to what I think the dBZ values are. > > BUT, my question: is there a known conversion to go from the gini NEXRCOMP > back to dBZ like in the raw NEXRAD III (NIDS) files? Ticket Details =================== Ticket ID: OVJ-523139 Department: Support Python Priority: Low Status: Closed =================== NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.