-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nexrad Level 3 unsupported product code #311
Comments
I guess the second issue would be...does this actually support loading directly from the tar file? |
The NEXRAD Level 3 reader does not do support loading directly from a tar file, nor do I think it should. Trying to support inline unpacking/decompression of various archive formats get complicated fast and can be handled easily outside the read function. I'll add support for reading from a file-like object so that it will be possible to open the file with the standard library tarfile module and pass a member to the NEXRAD Level 2 supports reading directly from bzip2 files as some service was serving files in that format (NCDC) and it was simple enough to add and the bz2 module was already being imported. In hindsight it probably would have been better to refer users to the bz2 module and have them pass a BZ2File to the Finally it should be mentioned that |
The more tricky question is can the NEXRAD Level 3 reader perform partial reading of unsupported products. The Level 3 or NIDS format is a message based file format which can contain radial, Cartesian, and some other more obscure layouts. Only radial data can be mapped to the Radar data model, other formats cannot. Hence the NEXRADLevel3 class has only implemented support for reading radial Level 3 data products and raises the NotImplementedError for non-radial data products. I'm not sure how these could be skipped over exactly, there is no data to map into the Radar class so what would the expected return be, an empty Radar object? I think raising the NotImplementedError is more agreeable, you can always catch this error if you are iterating over files. |
PR #312 Adds support for reading NEXRAD Level 3 files from a file like object. The following snippet can be used to read from tarfiles: import pyart
import tarfile
tf = tarfile.TarFile('foo.tar')
f = tf.extractfile(tf.getmember('KLOT_SDUS33_N1PLOT_201304170004'))
radar = pyart.io.read_nexrad_level3(f) @josephhardinee Let me know if you still are interested in handling the NotImplemented issue differently. If not I'll close this issue once the PR is merged. |
Hmm okay let me think on this a little more. I didn't realize lvl3 files were available in radial format(Most my work is with research networks). In particular for the grid files however, I assume they are all on the same grid(per lvl), and so would it be possible to set something up to accumulate them all into a single radar object? Otherwise for each volume you end up with 300 or so radar objects(per moment). |
Level 3 radial files contain a PPI scan from a single elevation scan for a particular moment or product (rain rate, etc). Multiple moments from the same radar and time period could be combined with the This method requires a lot of work to generate a more complete but still not comprehensive NEXRAD volume. A Level 2 file provides the complete volume in a single file, I think directing users at these files when this level of information is needed is more prudent. Level 2 files do not provide KDP, rain rates and a few other higher order products which Level 3 file provide. Also the moments in Level 2 data are not corrected (velocity dealiasing, etc) where as the Level 3 data is so there still cases where Level 3 data provides helpful information. |
Changing label to Large Scale as implementing fixing the |
Hello @jjhelmus. |
@agumartina Can you provide a link to the file causing issues? Product N1Q is a base reflectivity product which should be supported by Py-ART, but KBOU does not seem to be a valid NEXRAD site and the FTG part of the filename suggests to me that this may be a Free Text message in NIDS format. Converting to NetCDF using wct-viewer will not work with Py-ART, NetCDF files need to be in the CfRadial format which wct-viewer does not produce. That said performing a |
Being looked into on the xradar side, closing. |
When reading in a lvl 3 tar file from KTFG received the following error:
NotImplementedError: Level3 product with code 18259 is not supported
Is it possible to have this be issued as a warning instead of an error and just step over unsupported products, or load them in unnormalized similar to how the iris files are handled?
The text was updated successfully, but these errors were encountered: