Skip to content

Actual vapor pressure estimation when RH is not present in data#85

Merged
raoulcollenteur merged 2 commits into
pyet-org:devfrom
aldotapia:master
May 1, 2026
Merged

Actual vapor pressure estimation when RH is not present in data#85
raoulcollenteur merged 2 commits into
pyet-org:devfrom
aldotapia:master

Conversation

@aldotapia
Copy link
Copy Markdown
Contributor

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
@raoulcollenteur
Copy link
Copy Markdown
Member

Hi @aldotapia,

Thanks for the PR! Can you change the PR to merge into the Dev branch? I'll merge this as soon as this is done.

Cheers,
Raoul

@aldotapia aldotapia changed the base branch from master to dev April 30, 2026 17:55
@aldotapia
Copy link
Copy Markdown
Contributor Author

Done, switched to Dev branch. Thanks for taking care of.

Best

@raoulcollenteur
Copy link
Copy Markdown
Member

Thanks, merging!

@raoulcollenteur raoulcollenteur merged commit 9cf23bc into pyet-org:dev May 1, 2026
0 of 7 checks passed
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.

2 participants