Unidata / MetPy

MetPy is a collection of tools in Python for reading, visualizing and performing calculations with weather data.
https://unidata.github.io/MetPy/
BSD 3-Clause "New" or "Revised" License
1.25k stars 415 forks source link

Level3File e :I couldn't parse the data file information when I used Level3File to process the Storm Structure data file #2620

Closed eaven123 closed 2 years ago

eaven123 commented 2 years ago

What went wrong?

question: standalone_tabular = 62 , debug error and i try self._unpack_symblock and self._unpack_graphblock ,the result always wrong . raise error: this data cannot use Level3File ? why ?

Operating System

Windows

Version

1.2.0

Python Version

3.7

Code to Reproduce

standalone_tabular = [62, 73, 75, 82]
if self.header.code in self.standalone_tabular:
    if self.prod_desc.sym_off:
        self._unpack_tabblock(msg_start, 2 * self.prod_desc.sym_off, False)
question:
standalone_tabular = 62 , debug error and i try  self._unpack_symblock and self._unpack_graphblock ,the result always wrong .
raise error:
try 1:
# self._unpack_graphblock(msg_start, 2 * self.prod_desc.graph_off)
# Bad divider for graphical block: 22 should be -1
try 2:
# self._unpack_tabblock(msg_start, 2 * self.prod_desc.sym_off, False) 
# exception: no description
try 3:
# self._unpack_symblock(msg_start, 2 * self.prod_desc.sym_off)  
# Bad divider for symbology block: -2561 should be -1

Errors, Traceback, and Logs

# Bad divider for graphical block: 22 should be -1
# exception: no description
# Bad divider for symbology block: -2561 should be -1
dopplershift commented 2 years ago

Can you please share the file you're parsing here? (Zipping it should allow you to attach it to this GitHub issue.)

If you're unable to do that, can you at least tell me the site and date/time? That way I can go find it and try to replicate the problem.

eaven123 commented 2 years ago

Sorry, I can't give you the test data and the download data link, radar data in China parsing will have a lot of problems. I hope you can write more specific parameters of Level3File in the official document, so that I can check and solve.

dopplershift commented 2 years ago

You can find the official documentation for the NEXRAD product file format, which is what Level3File follows, here. Best of luck.

Closing since there's not a bug in MetPy's code demonstrated here.

eaven123 commented 2 years ago

ok, thanks.