get_data
- imdlib.core.get_data(var_type, start_yr, end_yr=None, fn_format=None, file_dir=None, sub_dir=False, proxies=None)
Function to download binary data and return an IMD class object time range is tuple or list or numpy array of 2 int number
Idea and drafted by Pratiman Patel Implemented by Saswata Nandi
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 downloading data
- end_yrint
Ending year for downloading 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>
- sub_dirbool
True : if you need subdirectory for each variable type False: Files will be saved directly under main directory
- proxiesdict
Give details in curly bracket as shown in the example below e.g. proxies = { ‘http’ : ‘http://uname:password@ip:port’}
Returns
IMD object