Skip to content

Conversation

@aldotapia
Copy link

Short Description

Added an Actual vapor pressure estimation when RH is not provided following Allen et al. (1998) recommendation. This assumes that dew temperature is close to the minimum temperature.

Without this change, Priestley-Taylor method fails even when RH is listed as an optional parameter. Minimum reproducible example:

import pandas as pd
import pyet
import matplotlib.pyplot as plt

data_16412 = pd.read_csv('data/example_1/klima_daily.csv', index_col=1, parse_dates=True)
data_16412

meteo = pd.DataFrame({"time":data_16412.index, "tmean":data_16412.t, "tmax":data_16412.tmax, "tmin":data_16412.tmin, "rh":data_16412.rel, 
                      "wind":data_16412.vv, "rs":data_16412.strahl/100})
time, tmean, tmax, tmin, rh, wind, rs = [meteo[col] for col in meteo.columns]

lat = 47.077778*np.pi/180  
elevation = 367  

pet1 = pyet.priestley_taylor(tmean, tmax=tmax, tmin=tmin, rs=rs, elevation=elevation, lat=lat, rh=rh)
pet2 = pyet.priestley_taylor(tmean, tmax=tmax, tmin=tmin, rs=rs, elevation=elevation, lat=lat)

plt.scatter(pet1, pet2)

Checklist before PR can be merged:

  • closes issue #xxxx
  • is documented
  • Format code with Black formatting
  • type hints for functions and methods
  • tests added / passed
  • Example Notebook (for new features)
  • Remove output for all notebooks with changes

Added an Actual vapor pressure estimation when RH is not provided
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant