1

I am currently working with DPR L3 products from NEXRAD and reading them with the metpy library. As far as I understand, the data should be stored as 16-bits integers, but the values are way higher than what I expected. I wanted to have confirmation that they are indeed milli-inch per hour.

I am reading the dataset as the following:

from metpy.io import Level3File

radar = Level3File(filename)
datadict = radar.sym_block[0][0]
data = radar.map_data(datadict['data'])

Then, I'm dividing by 1000 (milli-inch to inch) and multiplying by 25.4 (inch to mm) to obtain data in mm/h. However, the data seems very high. I run some comparison with collocation from GPM/DPR and found a factor of around 32 between both sources.

Am I missing something?

Robert
  • 7,394
  • 40
  • 45
  • 64
acolin
  • 11
  • 1
  • Can you add the output of `radar.header` above? I tried to reproduce your issue with my own DPR product, but it doesn't even have the 'data' field you use above, so I want to make sure I'm using the right data. Or, could you link to a sample file you're looking at? – DopplerShift Mar 27 '23 at 19:50
  • @DopplerShift You are indeed right. Following your message, I checked and indeed I wasn't using the reader that I thought was using (using `data = np.array([radial.data for radial in datadict['components'].radials])` instead of `data = radar.map_data(datadict['data'])`). Therefore I wasn't applying the normalization by 1000/25.4 (which is equal to 39.4, quite near the 35 factor I found collocating with GPM). `datadict['components'].radials` indicates a unit in inches/hour but I guess they are indeed mili-inches/hour. I'm sorry, my question would have been answered I did basic checks. – acolin Mar 29 '23 at 07:01
  • Your solution is technically correct, but see below for a more generic solution – DopplerShift Mar 29 '23 at 15:36

1 Answers1

0

There are a ton of things that we need to do better with the NEXRAD decoders (because we could do so much of this automatically), but right now here's the best way to do this and not need to know about the details:

from metpy.io import Level3File
import numpy as np

f = Level3File('Level3_LCH_DPR_20230329_1517.nids')
datadict = f.sym_block[0][0]
raw_data = np.array([radial.data for radial in datadict['components'].radials])

# The product has map_data to properly convert raw values into physical values
data = f.map_data(raw_data)

Now, it turns out that for this product, the mapper here is essentially dividing all the raw integer values by 1000, matching what you're doing. This process is more robust because it's been implemented for each product based on the NEXRAD spec/ICD.

DopplerShift
  • 5,472
  • 1
  • 21
  • 20