ArtesiaWater / hydropandas

Module for loading observation data into custom DataFrames
https://hydropandas.readthedocs.io
MIT License
51 stars 10 forks source link

Add option to allow for different ObsClasses in FEWS xml reader #119

Closed martinvonk closed 1 year ago

martinvonk commented 1 year ago

Sometimes there can be different Observation Classes in the same FEWS xml. These can be recognized using the parameterId. For instance, the parameterId's h.G.w and P.radar should return the type GroundwaterObs and PrecipitationObs respectively. Currently, the function https://github.com/ArtesiaWater/hydropandas/blob/0039a76eb4cf526b00350a8cfc970f382e8c8abc/hydropandas/obs_collection.py#L1216-L1232 only takes one argument for ObsClass. It would be nice if we could maybe input a translation dictionary:

{"h.G.w" : hpd.GroundwaterObs, "P.radar": hpd.PreciptationObs}

This translation dictionary is of course different per waterboard.

OnnoEbbens commented 1 year ago

Good idea! Would you like to implement this?