ArtesiaWater / hydropandas

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

Different kinds of reference evaporation from KNMI #73

Closed martinvonk closed 2 years ago

martinvonk commented 2 years ago

This PR adds different kinds of reference evaporation to the EvaporationObs. The three kinds of reference evaporation are Penman, Hargreaves and Makkink. The Makkink evaporation calculates the same value as the EV24 evaporation from KNMI.

The evaporation can be called with: hydropandas.EvaporationObs.from_knmi(260, et_type='penman') where et_type can be: penman, makkink, hargreaves or auto (default - EV24).

martinvonk commented 2 years ago

One thing that needs checking is the metadata. hpd.EvaporationObs.from_knmi(260, et_type='penman').meta returns:

{'LON_east': {'260': 5.18}, 'LAT_north': {'260': 52.1}, 'ALT_m': {'260': 1.9}, 'NAME': {'260': 'De Bilt'}, 'UG': 'Etmaalgemiddelde relatieve vochtigheid (in procenten) / Daily mean relative atmospheric humidity (in percents)', 'x': 141002.9965565314, 'y': 456772.0176960721, 'station': 260, 'name': 'UG_DE-BILT', 'variable': 'UG'}

because the metadata uses metadata from the last variable called to calculate (in this example) Penman evaporation. The metadata should probably be a bit more customized for the new evaporation types.

OnnoEbbens commented 2 years ago

Nice to add this new functionality! I changed some code to fix failing tests. This involved renaming 'auto' to 'EV24'.

I think it is nice to add two more things before we merge this:

Let me know if you want to do this. I don't mind doing it myself but you probably have already done some parts of this.

OnnoEbbens commented 2 years ago

Thanks, would you mind translating your part in the notebook to English? I noticed there was already some Dutch in the notebook but the main language of hydropandas is English so I think we should stick to that.