This page looks best with JavaScript enabled

Real time data processing using IMDLIB

 ·  ☕ 2 min read  ·  🤖 Saswata Nandi

Description

Tutorial showcasing IMDLIB for real-time data processing.

Installation

IMDLIB can be installed via pip, conda, or using the source file from Github. It is tested for both Windows and Linux platforms with 64 bit architecture only.

Installation using pip.

1
pip install imdlib

Installation using conda.

1
conda install -c iamsaswata imdlib

Installation from source file.

1
pip install git+https://github.com/iamsaswata/imdlib.git

Usage

Downloading real-time data from IMD

IMDLIB, with its v.0.1.15, now support processing of real-time daily IMD rainfall 0.25o and temperature data 0.50o.

The steps are similar to the data downloading and opening of IMD gridded archive data.

An example is presented below.

1
2
3
4
5
6
7
8
9
import imdlib as imd

# Downloading dail real-time rainfall data for India
import imdlib as imd    
start_dy = '2020-01-31'
end_dy = '2020-03-05'
var_type = 'rain'
file_dir='../data'
data = imd.get_real_data(var_type, start_dy, end_dy, file_dir)

The output is:

    Downloading: rain for date 2020-01-31
    Downloading: rain for date 2020-02-01
    Downloading: rain for date 2020-02-02
    Downloading: rain for date 2020-02-03
    Downloading: rain for date 2020-02-04
    Downloading: rain for date 2020-02-05
    Downloading: rain for date 2020-02-06
    Downloading: rain for date 2020-02-07
    Downloading: rain for date 2020-02-08
    Downloading: rain for date 2020-02-09
    Downloading: rain for date 2020-02-10
    Downloading: rain for date 2020-02-11
    Downloading: rain for date 2020-02-12
    Downloading: rain for date 2020-02-13
    Downloading: rain for date 2020-02-14
    Downloading: rain for date 2020-02-15
    Downloading: rain for date 2020-02-16
    Downloading: rain for date 2020-02-17
    Downloading: rain for date 2020-02-18
    Downloading: rain for date 2020-02-19
    Downloading: rain for date 2020-02-20
    Downloading: rain for date 2020-02-21
    Downloading: rain for date 2020-02-22
    Downloading: rain for date 2020-02-23
    Downloading: rain for date 2020-02-24
    Downloading: rain for date 2020-02-25
    Downloading: rain for date 2020-02-26
    Downloading: rain for date 2020-02-27
    Downloading: rain for date 2020-02-28
    Downloading: rain for date 2020-02-29
    Downloading: rain for date 2020-03-01
    Downloading: rain for date 2020-03-02
    Downloading: rain for date 2020-03-03
    Downloading: rain for date 2020-03-04
    Downloading: rain for date 2020-03-05
    Download Successful !!!

Reading downloaded real-time dataset

1
2
3
4
5
6
import imdlib as imd    
start_dy = '2020-01-31'
end_dy = '2020-03-05'
var_type = 'rain'
file_dir='../data'
data = imd.open_real_data(var_type, start_dy, end_dy, file_dir) 
Share on

Saswata Nandi
WRITTEN BY
Saswata Nandi
Postdoc@SNRI, UC Merced