Skip to content

rainbow/backend may be using wrong string for startrange vs. start_range #272

@Steve-Roderick

Description

@Steve-Roderick

As an example, consider the RAINBOW file used in the notebook: https://github.com/openradar/xradar/blob/main/examples/notebooks/Rainbow.ipynb

filename = DATASETS.fetch("2013051000000600dBZ.vol")
ds = xr.open_dataset(filename, group="sweep_0", engine="rainbow")

Inspecting the file 2013051000000600dBZ.vol carefully:

$ grep -a startrange 2013051000000600dBZ.vol
$ # No match

Notice the following search for (start_range) instead.

$ grep -a start_range 2013051000000600dBZ.vol
         <start_range>0</start_range>
         <start_range>0</start_range>

Consider the source https://github.com/openradar/xradar/blob/main/xradar/io/backends/rainbow.py#L720

        start_range = self.root._get_rbdict_value(
            var, "startrange", default=0, dtype=float
        )

I believe the start range may not always be populated correctly and some rainbow files may not decode at all.

The rainbow spec may prescribe start_range and not startrange.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions