Coder Social home page Coder Social logo

Comments (5)

iamsaswata avatar iamsaswata commented on June 25, 2024 1

Hi @thisisashukla.
Thanks for your kind words and reaching out to me.

I am happy you reported the full code-block. This error is not related to imdlib, but due to the unavailability of 2022 IMD data at this point in time.

If you look into the downloaded data after running your code (in the created folder 'rain'), you should see two files, namely 2021.grd and 2022.grd. If you look into the properties of these two files, you will notice 2021.grd has a size of ~25mb but 2022.grd has a size of ~0 mb. Why 2022.grd has no data? Because it is not released yet from IMD (yearly archive version).

Unless the data is added in the imd server, you should use the "max year" as 2021 in your program.

from imdlib.

iamsaswata avatar iamsaswata commented on June 25, 2024 1

Appreciate your suggestion to the fullest. It looks like you are talking about the real-time data from the mentioned site. In this regard, I am happy to tell you it is already in the pipeline , and already discussed in the imdlib issues few weeks back, more regarding it can be found in #17 and #18 (if you are interested).

And just an endnote to this, and perhaps not related to imdlib, which is I dont believe 'any practical use cases' must have or always need real-time/latest data. But surely they do come handy in different use cases.

from imdlib.

thisisashukla avatar thisisashukla commented on June 25, 2024

The following code can be used to reproduce the error:

import imdlib as imd

start_yr = 2021
end_yr = 2022
variable = 'rain' # other options are ('tmin'/ 'tmax')
data = imd.get_data(variable, start_yr, end_yr, fn_format='yearwise')

from imdlib.

thisisashukla avatar thisisashukla commented on June 25, 2024

i checked the code and found out that the value of len(data) (line number 326) is coming out to be 0 for 2022 data.

from imdlib.

thisisashukla avatar thisisashukla commented on June 25, 2024

Thanks for your response @iamsaswata, after raising the issue I took a dive in the code and reached the same conclusion mentioned by you. I am able to see that https://imdpune.gov.in/lrfindex.php this website has an option to download daily rainfall data.
May be you can look at how can you enable pulling data day wise and then aggregating it for currently running year. Any practical use case would most probably need the latest data. Please consider this enhancement if you have the necessary bandwidth at your end.

from imdlib.

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.