open_data

imdlib.core.open_data(var_type, start_yr, end_yr=None, fn_format=None, file_dir=None)

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

Parameters

var_typestr

Three possible values. 1. “rain” -> input files are for daily rainfall values 2. “tmin” -> input files are for daily minimum temperature values 3. “tmax” -> input files are for daily maximum tempereature values

start_yrint

Starting year for opening data

end_yrint

Ending year for opening data

fn_formatstr or None

fn_format represent filename format. Default vales is None. Which means filesnames are accoding to the IMD conventionm and they are not changed after downloading from IMD server. If we specify fn_format = ‘yearwise’, filenames are renamed like <year.grd> (e.g. 2018.grd)

file_dirstr or None

Directory cache the files for future processing. If None, the currently working directory is used. If specify the directory address, Main directory should contain 3 subdirectory. <rain>, <tmin>, <tmax>

Returns

IMD object