MeteoSwiss / pyrad

Python Radar Data Processing
https://meteoswiss.github.io/pyrad/
Other
37 stars 10 forks source link

Allow custom variable names mapping #65

Closed wolfidan closed 2 weeks ago

wolfidan commented 1 month ago

Currently in pyrad it is not possible to load files which have custom non-standard names, such as for example a CFRadial where the reflectivity name is not "reflectivity". For some datatypes, it is assumed that the names are pyart standard (CFRadial) for example in others, the mapping is done by pyrad without any control by the user (metranet, ODIM for example).

It would be nice if the user could specify in the config files, its own mapping.

The closest we have is the MFCFradial datatype which supports the structure DataTypeID in the loc config file. e.g.

# identifier of each data type in file name
DataTypeID STRUCT 7
    dBZ STRING ref
    ZDR STRING zdr
    RhoHV STRING rhv
        PhiDP STRING psd
        KDP STRING kdp
        V STRING vel
        W STRING vsw

and remaps the custom variable names (e.g. rhv) to pyrad names (RhoHV). I think we can adapt this way of doing to all data readers in pyrad.

wolfidan commented 2 weeks ago

Solved by adding the new key DataTypeIDINFiles in ad8dafa