Skip to content
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

fix knmih5volscan to be able to handle more varying files and correct projection #418

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

mats-knmi
Copy link

@mats-knmi mats-knmi commented Dec 15, 2024

Changes made in this PR:

  • Internally we sometimes use a hybrid hdf5 format, that has the headers from both ODIM and KNMI hdf5, for radar volume data. Adaguc would get confused as it supports ODIM projected data and KNMI volume data and it would confuse these files between the 2. I added a check in the ODIM projected data reader so that it does not match on ODIM volume data. When we add an ODIM volume reader, that reader could take over and also read the hybrid hdf5 format and the KNMI reader would only have to match on "pure" KNMI files.
  • The KNMI hdf5 volume reader was very specific to the Dutch scan strategy and used hardcoded scan numbers to get the correct elevation angels. Now it loops over all possible scan numbers <100, finds all scans and names them based on their scan angle. 2 scans of the same angle (one short and one long) is supported.
  • Only a limited subset of variables was supported and these variables all needed to be present to be able to visualize the files. All variables that are present in Dutch radar volume files are now supported with correct units and if some are missing they are simply skipped.
  • The projection is updated to be more accurate. For radars it is common to use the four thirds earth model to model propagation of the radar beams. This is now implemented. This does means computing a bunch of sines and cosines, but locally I haven't noticed a performance hit, maybe this is an issue at slower servers?
  • As part of the location computation using the four thirds earth model the height also needs to be computed. This is also useful to have as a separate layer so that contour lines can easily be plotted, so I added this layer to this reader as well.
  • Belgian radar volume files contain data as UBYTE in stead of USHORT, so I added a check for this so that the reader supports both.

This results in the following:

  • The hybrid hdf5 volume files can now be visualized in adaguc.
  • Dutch, Belgian and German radar data, as produced internally, can now be visualized in adaguc.
  • Scan height contour lines can now be added to the visualizations.
  • The data is projected more accurately.

@mats-knmi mats-knmi changed the title Draft: fix knmih5volscan to be able to handle more varying files and correct projection fix knmih5volscan to be able to handle more varying files and correct projection Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant