openradar / xradar

A tool to work in weather radar data in xarray
https://docs.openradarscience.org/projects/xradar
MIT License
85 stars 17 forks source link

Make sure cfradial1 reader conforms to cfradial 1.4 standard #107

Closed mgrover1 closed 10 months ago

mgrover1 commented 1 year ago

Description

The current cfradial1 reader does not work with cfradial version 1.4 files, specifically with the name of the sweep variable

According to the cradial 1.4 documentation, this variable is named sweep and not sweep_number which is used in the current cfradial1 xradar reader.

What I Did

import xradar as xd

tree = xd.io.open_cfradial1_datatree(file)

which returned

ValueError: cannot rename 'sweep_number' because it is not a variable or coordinate in this dataset
kmuehlbauer commented 10 months ago

@mgrover1 Somehow this went under my radar. Can you share the file in question. According to the linked standard, sweep_number is a valid mandatory sweep variable (see 4.7 p. 22).

mgrover1 commented 10 months ago

@kmuehlbauer - I think we can close this, I could not track down the file + you are right about sweep_number being a required variable! Sorry about that!!

kmuehlbauer commented 10 months ago

@mgrover1 No worries. The thing is I was getting errors mentioning sweep_number recently, too. It has to do with coord/non-coord. If I encounter again I'll create a new issue.