GithubHelp home page GithubHelp logo

The radiation input provided is greater than 100 MJ/m2d, which is not realistic. Please convert the radiation input to MJ/m2d about pyet HOT 8 CLOSED

miaozewei avatar miaozewei commented on June 15, 2024
The radiation input provided is greater than 100 MJ/m2d, which is not realistic. Please convert the radiation input to MJ/m2d

from pyet.

Comments (8)

raoulcollenteur avatar raoulcollenteur commented on June 15, 2024

Does this also occur if you use the dev-branch of this repository?

from pyet.

miaozewei avatar miaozewei commented on June 15, 2024

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.

miaozewei avatar miaozewei commented on June 15, 2024

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.

raoulcollenteur avatar raoulcollenteur commented on June 15, 2024

Can you run pyet.show_versions() and report the PyET version?

from pyet.

mvremec avatar mvremec commented on June 15, 2024

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.

miaozewei avatar miaozewei commented on June 15, 2024

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.

mvremec avatar mvremec commented on June 15, 2024

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.

miaozewei avatar miaozewei commented on June 15, 2024

Matevz, thanks so much. It works well.

Cheers,

Zewei

from pyet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.