zapata.lib module¶
- zapata.lib.get_values_from_dict(input_dict, keys)[source]¶
Get values from dictionary input_dict for keys in keys
- Parameters:
input_dict -- Dictionary
keys -- List of keys
- Return type:
List of values
- zapata.lib.year2date(years, i)[source]¶
Transform index i in string date yy/mm.
Rounding requires the small shift Years are obtained from np.arange(1979,2018, 1/12)
- zapata.lib.date2year(years, date)[source]¶
Transform index date ['Jan' '1989' ] in index i.
Years are from np.arange(1979,2018, 1/12)
- zapata.lib.putna(left, right, xar, scalar=None)[source]¶
Put NaN in xarray according if they are laying in the interval left,right
- Parameters:
left,right -- Extremes of the interval where the values must be NaN
xar -- Xarray
scalar -- If set all entries not satisfying the condition are put equal to scalar
- Return type:
Modified array
- zapata.lib.go_to(dir)[source]¶
Set Working directory
- Parameters:
dir -- Target directory relative to users' root directory
- Yields:
Change working directory
- zapata.lib.long_string(lon, cent_lon=0)[source]¶
Get nice formatted longitude string
- Parameters:
lon -- Longitude
cent_lon -- Central longitude for projection used
- Yields:
string in nice format
- zapata.lib.lat_string(lat)[source]¶
Get nice formatted latitude string
- Parameters:
lat -- Latitude
- Yields:
string in nice format
- zapata.lib.get_environment_info(option)[source]¶
Get information about the Python environment
- Parameters:
option -- String Options are: 'interpreter': Get the path of the Python interpreter 'version': Get the Python version 'packages': Get the list of installed packages
- Return type:
Information about the Python environment