ENH: Updated Glue Files - Encoding/Time offset corrections #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the
.a1
xprecipradar
datastream has mismatched netcdf encodings for missing value codes (i.e. the encoding on the file does not match the MVC used within the arrays and does not match our CMAC product DOD). Additionally, the.a1
datastream uses integer times, which results in ~36-37 azimuths angles (depending on elevation scan) (and thus roughly 784k gates) containing the same exact time.To conform to ARM standards, two functions are written to correct and create a
.b1
level "glue file" which corrects the encodings and adds an offset (in nanoseconds) to each specific gate within the merged volume.To overcome writing to existing files, updated xarray datasets are first written to a temporary directory than moved to the data directory for the given month. This has been tested within this notebook to work with the Dask cluster on Cumulus.