NCAR / CfRadial

NetCDF CF Conventions for radial coordinate data for RADAR and LIDAR
BSD 2-Clause "Simplified" License
21 stars 7 forks source link

Move `frequency` variable into `radar_calibration` subgroup? #6

Open marack opened 5 years ago

marack commented 5 years ago

We currently have a frequency variable defined at the global level. To support the rare case that multiple frequencies are used this variable is defined as a 1D array, which means we are also forced to have a dedicated frequency dimension.

For the 99% of users having frequency be an array is an annoying detail to trip over. Since this variable is not linked to anything else, we also provide no way for users to determine what data/metadata is associated with each frequency.

I would like to propose moving frequency from the global level into the radar_calibration subgroup. This has the advantage of no longer requiring a dedicated dimension to support a single variable. It also unambiguously associates the other calibration parameters with a particular frequency when multiple are used.

For dual-wavelength radars where the same geometry is scanned using two frequencies simultaneously the suggested approach would be to store the data from each wavelength in a separate sweep. The geometry of the two sweeps would be identical. Something like:

group: sweep_0.5_wl1:
   dimensions:
    time = 360;
    range = 512;
  variables:
    double time(time);
    double range(range);
    calib_index(time);       # all values set to 0
    byte DBZH(time, range);  # reflectivity from frequency 1
group: sweep_0.5_wl2:
   dimensions:
    time = 360;
    range = 512;
  variables:
    double time(time);       # exact same values as the wl1 sweep
    double range(range);     # exact same values as the wl2 sweep
    calib_index(time);       # all values set to 1
    byte DBZH(time, range);  # reflectivity from frequency 2
group: radar_calibration
  dimensions:
    calib = 2;
  variables:
    float frequency(calib);  # lists the frequencies
mike-dixon commented 4 years ago

This one is a bit tricky. 'frequency' does not belong in the calibration group - though perhaps the calibration group should have an attribute or variable that refers to frequency. calibration depends on pulse width, but frequency is also a factor. Some radars have different frequencies for beam steering - they support multiple beams at once, each of a different frequency, which causes the antenna to focus the beam at a different angle. Other radars are frequency agile. There is no easy answer here. I believe frequency belongs at the global level, since it is so fundamental to radars. I think we should stick to frequency(frequency). Although it is a bit clumsy, it is not difficult to deal with properly. It has not caused problems in CfRadial1.