General Tools

This toolbox contains some functions which are being used by the MPPy package but might be usefull to the enduser, as well.

>>> import BCO.tools.tools
daterange(start_date, end_date[, step]) This function is for looping over datetime.datetime objects within a timeframe from start_date to end_date.
datestr(dt_obj) Converts a datetime.datetime object to a string in the commonly used shape for this module.
bz2Dataset(bz2file) Generates a netCDF Dataset from a .nc.bz2 file.
download_from_zmaw_ftp(device, start, end[, …]) This function can be used to download data from the bco ftp-server to store it on your local machine.
getFileName(instrument, date, use_ftp[, …]) This function can be used to get the full path and name of the file as on the server.
getFTPClient([user, passwd]) This function can be used to get an open ftp-client to our ftp-server using the python library ‘ftplib’.

Converters

This module contains functions to convert units.

>>> import BCO.tools.convert
Celsius2Kelvin(value) Converts a Temperature from °C to K.
Kelvin2Celsius(value) Converts a Temperature from K to °C.
num2time(num[, utc]) Converts seconds since 1970 to datetime objects.
time2num(time[, utc]) Converts a datetime.datetime object to seconds since 1970 as float.