Comments (8)
Does this also occur if you use the dev-branch of this repository?
from pyet.
Yes. My radiation (rs (surface radiation)) is much less than 100 MJ/m2d, only 3-6 MJ m-2d-1. But the error is still coming out. Thanks
from pyet.
Raoul,
Please see the example data. I downloaded a zip file from this division and pip install the zip file to my computer. Thanks very much in advance.
data_16412.csv
from pyet.
Can you run pyet.show_versions()
and report the PyET version?
from pyet.
Hi @miaozewei,
Based on your screenshot, it is not visible how you convert the radiation data from 'data_16412.csv'. Since the radiation data in 'data_16412.csv' is in J/cm²d, you need to divide it by 100 to convert it to MJ/m²d. Let me know if this works, or send the script you are using so I can double-check.
Cheers, Matevz
from pyet.
Hi Matevz:
Thanks so much for your reply. Yes, I had divide the radiation data - data_16412.strahl/100 by 100. Please see the example data and testing code. look forward to your feedback soon.
data_16412.csv
pyet_test.txt
Thanks again.
Zewei
P.S.: Since a *.py file is not supported to upload in github, I saved my test python codes to a text file. Thanks
from pyet.
Hi @miaozewei,
I didn't encounter the same error as you, but I noticed an issue with the input data you're using for the pyet.pm_fao56 function.
The input's index should be of type "DatetimeIndex", as shown in the examples. I realize this detail isn't emphasized enough in the documentation. I'll consider ways to make this requirement more visible, perhaps in the documentation or the README file.
Here's the corrected code that should work:
data = pd.read_csv("data_16412.csv", index_col="time", parse_dates=True)
meteo = pd.DataFrame({"tmean":data.t, "tmax":data.tmax, "tmin":data.tmin,
"rh":data.rel, "wind":data.vv,
"rs":data.strahl/100}, index=data.index)
tmean, tmax, tmin, rh, wind, rs = [meteo[col] for col in meteo.columns]
lat = 47.077778*np.pi/180 # Latitude of the meteorological station, converting from degrees to radians
elevation = 367 # meters above sea-level
pet_pm = pyet.pm_fao56(tmean, wind, rs=rs, elevation=elevation, lat=lat, tmax=tmax, tmin=tmin, rh=rh)
pet_df = pyet.calculate_all(tmean, wind, rs, elevation, lat, tmax=tmax, tmin=tmin, rh=rh)
Please let me know if you still encounter the same error when using the above.
Cheers,
Matevz
from pyet.
Matevz, thanks so much. It works well.
Cheers,
Zewei
from pyet.
Related Issues (20)
- Built check for lat values HOT 1
- Remove Travis CI and stick to GitHub CI HOT 1
- fix ReadTheDocs issues HOT 3
- get_rn method undocumented and in strange place HOT 1
- methods don't work with Pandas DataFrame HOT 2
- pm-fao56 method does not work for my Xarray.dataArray data HOT 3
- Excluding areas above/below certain latitude HOT 3
- Speeding up calculations HOT 1
- Unrealistic negative/positive values for the Turch equation at sub-freezing temperatures HOT 1
- Hargreaves method is not calculating for some days in winter HOT 4
- pm_fao56 error HOT 2
- "Haude" method error in calculate_all HOT 1
- pyet.calc_rad_net attribute error with pandas.series HOT 4
- Start using pyproject.toml instead of setup.py HOT 1
- Start using Github Actions HOT 1
- Add recent publications using PyEt HOT 1
- Add Issue and PR templates HOT 1
- Remove 'shape' as argument from 'extraterrestrial_r' method in meter_utils.py HOT 6
- Specific humidity to relative humidity HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyet.