Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a better approximation of the average temperature and dewpoint temperature #57

Open
edwinkost opened this issue Nov 20, 2024 · 0 comments
Labels
enhancement Enhancement request feature Feature request

Comments

@edwinkost
Copy link
Contributor

In the shortwave radiation module in lines 777-791, this is a better approximation of the average temperature and dewpoint temperature according to FAO:

    # decide whether the day classifies as a wet day on the basis of the
    # daily precipitation amount
    wet_day = prec_daily > self.prec_limit

    # relative humidity [1]
    rel_hum = relative_humidity
    if rel_hum is None:
        # estimate the relative humidity from dewpoint temperature 
        # - if not defined, using the minimum daily temperature as the dewpoint temperature
        if dew_temperature is None: dew_temperature = temp_min_daily - 2.0
        # - if not defined, using the maximum daily temperature as the average temperature
        if  temp_avg_daily is None: temp_avg_daily  = 0.5 * (temp_min_daily + temp_max_daily)
        rel_hum = estimate_relative_humidity(t = temp_avg_daily , \
                                             tdew = dew_temperature)
@edwinkost edwinkost added enhancement Enhancement request feature Feature request labels Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement request feature Feature request
Projects
None yet
Development

No branches or pull requests

1 participant