API reference

Top-level functions

imdlib.core Module

Developed by Saswata Nandi, Pratiman Patel and Sabyasachi Swain

Functions

LeapYear(year)

Check leap year or not

get_data(var_type, start_yr[, end_yr, ...])

Function to download binary data and return an IMD class object time range is tuple or list or numpy array of 2 int number

get_filename(year, var_type, fn_format, file_dir)

Get filename for reading the file content in future

get_lat_lon(lat, lon, lat_rage, lon_range)

Check INDEX of closest lat lon for a given co-ordinate

griddata(points, values, xi[, method, ...])

Interpolate unstructured D-D data.

open_data(var_type, start_yr[, end_yr, ...])

Function to read binary data and return an IMD class object time range is tuple or list or numpy array of 2 int number

total_days(starting_day, ending_day)

Calculate to no of days for a given starting and ending day

Classes

Compute()

Class for computing climat indices.

IMD(data, cat, start_day, end_day, no_days, ...)

Class to handle binary (.grd) IMD gridded meteorological data.

datetime(year, month, day[, hour[, minute[, ...)

The year, month and day arguments are required.

imdlib.util Module

Functions

LeapYear(year)

Check leap year or not

get_filename(year, var_type, fn_format, file_dir)

Get filename for reading the file content in future

get_filename_realtime(day, var_type, file_dir)

Get filename for reading the real-time file content in future

get_lat_lon(lat, lon, lat_rage, lon_range)

Check INDEX of closest lat lon for a given co-ordinate

total_days(starting_day, ending_day)

Calculate to no of days for a given starting and ending day

imdlib.compute Module

Functions

anu_trend(imd_obj)

Function for annual trend analysis

bk_point(data)

This method provides index (last date) of every year from daily data.

bk_point_month(data)

This method provides index (last date) of every month from daily data.

cwd(imd_obj[, threshold])

Function for finding Consecutive Wet Days in a year

d64(imd_obj[, threshold])

Function for finding number of heavy rainfall days in a year

dr(imd_obj[, threshold])

Function for finding total Rainy days in a year

dtr_anu(tmx, **kwargs)

Function for annual mean Diurnal Temperature Range

mmk_hr(x_old[, alpha, lag])

This function checks the Modified Mann-Kendall (MK) test using Hamed and Rao (1998) method.

mnadt_anu(imd_obj)

Function for minimum Annual Daily Tmin (Coolest night)

mxadt(imd_obj)

Function for maximum Annual Daily Tmax (Hottest Day)

pci(imd_obj)

Function for finding Precipitation concentration index

rankdata(a[, method, axis])

Assign ranks to data, dealing with ties appropriately.

rtwd(imd_obj[, threshold])

Function for finding Total precipitation in wet days in a year

rx5d(imd_obj)

Function for Maximum Max 5 day rainfall in a year

rxa(imd_obj)

Function for Maximum annual rainfall

sdii(imd_obj)

Function for finding Simple precipitation intensity index

sen_percerntage(x)

Computes change magnitude as percentage of mean from Sen's slope estimator

sens_slope(x)

This method proposed by Theil (1950) and Sen (1968) to estimate the magnitude of the monotonic trend.

spr(x)

Computes Spearman’s rho test statistics (Zsr) for trend analysis

Classes

Compute()

Class for computing climat indices.

datetime(year, month, day[, hour[, minute[, ...)

The year, month and day arguments are required.