Unidata / netcdf-java

The Unidata netcdf-java library
https://docs.unidata.ucar.edu/netcdf-java/current/userguide/index.html
BSD 3-Clause "New" or "Revised" License
151 stars 71 forks source link

NEXRAD Message 31 Changes #167

Open dopplershift opened 4 years ago

dopplershift commented 4 years ago

NEXRAD will be beta testing some Message 31 adjustments this spring as part of their normal beta testing of RPG/RDA build 19.0. These data are currently available from the FOP1 testbed, and I've attached a sample file that contains the format adjustments. This file does not completely parse with the current code:

  1. ZDR now contains 11-bit data, which is stored as shorts in the file rather than just bytes. This will break the assumptions made here:

https://github.com/Unidata/netcdf-java/blob/63a28093a1c707cbb834345cb1492444b589eb36/cdm/radial/src/main/java/ucar/nc2/iosp/nexrad2/Nexrad2IOServiceProvider.java#L284-L289

and https://github.com/Unidata/netcdf-java/blob/63a28093a1c707cbb834345cb1492444b589eb36/cdm/radial/src/main/java/ucar/nc2/iosp/nexrad2/Level2Record.java#L1117-L1138

Really, this code should not be hard-coded based on the moment and instead be looking at the data word bits (8 or 16) encoded in the data file.

  1. There is a new moment CFP (Clutter Filter Power Removed). There's a lot of code that's based around an explicit set of options. This sample below is representative: https://github.com/Unidata/netcdf-java/blob/63a28093a1c707cbb834345cb1492444b589eb36/cdm/radial/src/main/java/ucar/nc2/iosp/nexrad2/Level2Record.java#L589-L829

I...uh...don't know where to begin.

We could probably live without CFP for (well probably forever). The change to ZDR means the data are incorrect for any site shipping the new version. This is why we use what's in the file and don't hard-code decisions unless it's absolutely necessary, boys and girls.

lesserwhirls commented 4 years ago

Ok, so we'll put CFP on the shelf until the radar IOSP rewrite, because yikes. Unidata/netcdf-java#514 fixes the data word size issue by using the word size encoded in the file rather than relying on hard-coded exceptions for differential phase.

maditilden commented 6 months ago

Hey there, I know this bug is really old, but if you all by chance have some time to work on it in the near future that would be awesome. I am working on rebuilding AWIPS from scratch and this bug seems to be the main problem blocking me from being able to use this library to build out the NEXRAD RADAR decoder. The client has concerns about the data we would miss from CFP not being processed properly.

This is the warning we see quite often: Missing radial product dbp8=8068 tname=CFP

I appreciate all your time! Your libraries have been super helpful for GOES-R and GRIB2 already.