iamsaswata / imdlib

Download and process binary IMD meteorological data in Python
https://imdlib.readthedocs.io
MIT License
30 stars 16 forks source link

Date-wise download from realtime grid data section on IMD website #17

Closed answerquest closed 1 year ago

answerquest commented 2 years ago

Hi Saswata, first of all thanks a ton for making this amazing lib which made the gridded data usage a breeze.

There is a separate section in IMD website: https://imdpune.gov.in/lrfindex.php where there is gridded real time data : It offers date-wise .grd downloads. Would this library support downloading/opening those too?

I'm actually looking more for how to properly open and read those files than downloading them. How are you opening the yearwise files - inside are they directly xarray data? Or is some transformation needed?

If some modification may be needed, then can you point me to some places in the code where to do, I know python and might be able to make a PR for the same.

answerquest commented 2 years ago

My work on the yearly gridded data using your lib : https://github.com/answerquest/IMD-grid-data-work

iamsaswata commented 2 years ago

Appreciation like yours means a lot. And also loved your work "IMD-grid-data-work"

I am more than happy to know that you also thought of incorporating real time imd data into the imdlib framework. I am excited to tell you that I am already working on it from last couple of days. If you are aware, the long lived imd-gridded data portal (https://imdpune.gov.in/Clim_Pred_LRF_New) has stopped functioning. Therefore, I made changes to imdlib and now it is taking data request from https://imdpune.gov.in/lrfindex.php (same as you mentioned). I looked into the real time data there, and incorporation of them in imdlib is in-progress.

So to answer specific question of yours.

Would this library support downloading/opening those too? -->> Yes. Actually, In one or two coming weeks.

I'm actually looking more for how to properly open and read those files than downloading them. How are you opening the yearwise files - inside are they directly xarray data? Or is some transformation needed? --> Opening of binary data was mentioned in data description part of https://imdpune.gov.in/lrfindex.php. No. It is not directly inside xarray. A separate python class (IMD) is created for this purpose.

if some modification may be needed, then can you point me to some places in the code where to do, I know python and might be able to make a PR for the same. --> I am really glad and appreciate your interest in contribution to the IMDLIB. If you want to make a PR, my suggestion would be to first check the IMD class. Then add two functions for downloading and reading real time fine grid imd data, but maintaining the existing imdlib styles and making the in-between data consistent with IMD class object. One thing I want to mention here, if you can wait for one-two weeks, I can assure you I will incorporate them into the library by that time.

answerquest commented 2 years ago

Hi @iamsaswata, great to know you're already working on incorporating more data sources. I checked out the code - more complicated for me, won't be able to do much. You please go ahead with your planned work.