__init__.py 2.05 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
__import__('pkg_resources').declare_namespace(__name__)
__docformat__ = 'Epytext'

import os
from metobs.ceilo import CONFIG as c

instrument_name = 'ceilo'

def get_ascii_name(dt, site='rig'):
    """
    Make a standard filename for a tower ascii file.
    
    @type dt: datetime
    @param dt: datetime of the url to generate.
    @type site: str
    @param site: Name of an implemented instrument site
    """
    return c.get_ascii_filename(dt)

def get_nc_name(dt, site='rig'):
    """
    Make a standard filename for a ceilometer netcdf file.
    
    @type dt: datetime
    @param dt: datetime of the url to generate.
    @type site: str
    @param site: Name of an implemented instrument site
    """
    return c.get_nc_filename(dt)

def get_thumbnail_name(begin, end=None, site='rig', plottype=1):
    """Make a standard filename for a ceilometer image thumbnail file.
    """
    return c.get_image_filename(begin, end, ptype=plottype, tag='tn')

def get_nc_url(dt, site='rig', host=None):
    """
    Get a URL to a ceilometer NetCDF file.
    
    @type dt: datetime
    @param dt: datetime of the url to generate.
    @type site: str
    @param site: Name of an implemented instrument site
    
    @rtype: str
    @return: A full URL suitable for OPeNDAP access
    """
    return c.get_nc_url(dt)
    
def get_ascii_url(dt, site="rig", host=None):
    """Get a URL to a ceilometer ASCII file on the opendap server
    
    @type dt: datetime
    @param dt: datetime of the url to generate.
    @type site: str
    @param site: Name of an implemented instrument site
    
    @rtype: str
    @return: A full URL suitible for HTTP access
    """
    return c.get_ascii_url(dt)

def get_thumbnail_url(begin, end=None, site="rig", host=None, plottype=1):
    return c.get_image_url(begin, end, ptype=plottype, tag='tn')

def get_image_url(begin, end=None, site="rig", host=None, plottype=1):
    return c.get_image_url(begin, end, ptype=plottype, tag='')

def get_type_name():
    return c.get_type_name()

def _handle_plottype(plottype=1):
    return c._handle_plot_type(plottype)