Comments (5)
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.
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.
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.
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.
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)
- ValueError: Dataset.plot cannot be called directly. Use an explicit plot method HOT 2
- error in imdlib respiratory HOT 1
- Hi! Still your code have some problems HOT 4
- Adding the recipe to conda-forge
- Date-wise download from realtime grid data section on IMD website HOT 3
- Feature request: function to directly open a data file HOT 4
- for plotting in xarray need to have matplotlib as a requirement HOT 2
- Data file download failed HOT 10
- rainfall data size of data-length mismatch HOT 4
- Complete API documentation, standardise the API calls HOT 1
- Update version.py
- Clip by Shape files HOT 2
- Resolution for IMD tmax/tmin data HOT 2
- to_csv add lat and lon if None is selected HOT 2
- change of input arguments HOT 2
- Add feature to_geotiff HOT 1
- Add new feature get_data. If a variable is assigned then it should open all the downloaded files as well. HOT 1
- Unable to install on conda for python 3.8.3 HOT 2
- Adding Climate and Forecasting (CF) metadata convention in to_netcdf 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 imdlib.