Module Expr Str ImportFrom alias Assign NameStore ListLoad Str Str Str Str Str Str Str Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults Str body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Str ListLoad Str Str Num Num body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults Dict Call NameLoad body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults Dict Str Str Num Num body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults Dict Str ListLoad body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str ListLoad ListLoad body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults Str ListLoad body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Call NameLoad Call NameLoad Call NameLoad Call NameLoad Call NameLoad Call NameLoad body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list
N/A N/A 
********************************************************************************
* Name: fetchclimate.py
* Author: Alan Snow and Ezra Rice
* Created On: May 2015
* Copyright: (c) Brigham Young University 2015
* License: BSD 2-Clause
********************************************************************************
 base TethysGizmoOptions N/A __all__ N/A FetchClimateMap FetchClimateURLParameter FetchClimateMapData FetchClimateMapParameters FetchClimatePlotParameters FetchClimateVariableParameters FetchClimateGridParameters FetchClimatePointParameters FetchClimateURLParameter N/A TethysGizmoOptions N/A N/A 
    URL Parameter

    This gizmo can be used to get climate data based off of a bounding box over an area or a point.
    It is based off of Microsoft Research. See the `FetchClimate page reference
    <http://research.microsoft.com/en-us/projects/fetchclimate/>`_ for more info.

    Attributes:
        serverUrl(str): The URL to the FetchClimate server (e.g 'serverUrl':'http://fetchclimate2.cloudapp.net')
     __init__ N/A N/A self serverUrl N/A http://fetchclimate2.cloudapp.net N/A N/A 
        Constructor
         N/A N/A N/A N/A super TethysGizmoOptions self __init__ N/A N/A self serverUrl serverUrl N/A N/A FetchClimateMapData N/A TethysGizmoOptions N/A N/A 
    Map Parameters - map_data

    Attributes:
        api_key(str): API key for Google maps.
        drawing_types_enabled(str): A list of the types of geometries the user will be allowed to draw.
        Valid types are: RECTANGLE, and POINTS. (e.g.: drawing_types_enabled=['RECTANGLE','POINTS'])
        initial_drawing_mode(str): A string representing the drawing mode that will be enabled by default.
        Valid modes are: 'RECTANGLE', 'POINTS'. The mode used must be one of the drawing_types_enabled that the user is allowed to draw.
        max_num_grids(int): The maximum number of grids allowed for the user. Default is unlimited. (e.g. 'max_num_grids':0).
        max_num_points(int): The maximum number of points allowed for the user. Default is unlimited. (e.g 'max_num_points':0).
     __init__ N/A N/A self api_key drawing_types_enabled initial_drawing_mode max_num_grids max_num_points N/A N/A RECTANGLE RECTANGLE 0 0 N/A N/A 
        Constructor
         N/A N/A N/A N/A super TethysGizmoOptions self __init__ N/A N/A self api_key api_key N/A N/A self drawing_types_enabled drawing_types_enabled N/A N/A self initial_drawing_mode initial_drawing_mode N/A N/A self max_num_grids max_num_grids N/A N/A self max_num_points max_num_points N/A N/A FetchClimateMapParameters N/A TethysGizmoOptions N/A N/A 
    Map Parameters
    Optional if grid or point included. Otherwise, required!

    Attributes:
        css(dict):Custom css elements. FORMAT:{'css-element-name': 'css-value'}.
        If no width or height included, 500px X 500px assumed.
        map_data(dict): Data needed to create the map.
     __init__ N/A N/A self css map_data N/A N/A N/A FetchClimateMapData N/A N/A 
        Constructor
         N/A N/A N/A N/A super TethysGizmoOptions self __init__ N/A N/A self css css N/A N/A self map_data map_data N/A N/A FetchClimatePlotParameters N/A TethysGizmoOptions N/A N/A 
    Plot Parameters

    Attributes:
        dimensions(dict): The integer is in pixels for width (`Highcharts width reference <http://api.highcharts.com/highcharts#chart.width>`_) or height (`Highcharts height reference <http://api.highcharts.com/highcharts#chart.height>`_). Not required to be defined.
     __init__ N/A N/A self dimensions N/A N/A width height 100 500 N/A N/A 
        Constructor
         N/A N/A N/A N/A super TethysGizmoOptions self __init__ N/A N/A self dimensions dimensions N/A N/A FetchClimateVariableParameters N/A TethysGizmoOptions N/A N/A 
    Variable Parameters

    To find out which variables you can use and their parameters, go to your service url with '/api/configuration' at the end. (e.g. `http://fetchclimate2.cloudapp.net/api/configuration <http://fetchclimate2.cloudapp.net/api/configuration>`_). Look in "EnvironmentalVariables" for the variable names. Then, to find the data source ID's of sources available, go to "DataSources".

    Attributes:
        variables(dict): Must have variable defined. It is in the format {'variable_name':[variable_id,variable_id,variable_id]}.
     __init__ N/A N/A self variables N/A N/A precip N/A N/A N/A 
        Constructor
         N/A N/A N/A N/A super TethysGizmoOptions self __init__ N/A N/A self variables variables N/A N/A FetchClimateGridParameters N/A TethysGizmoOptions N/A N/A 
    Grid Parameters

    Optional if there is a map or point included. Otherwise, it is required! No map needed. If map included, it will initialize with input grid.

    Attributes:
        title(str): The name of the grid area.
        boundingBox(dict): An array of length 4 with bounding lat and long. e.g.[min lat, max lat, min lon, max long].
        gridResolution(dict): An array of length 2. Number of grid cells in lat and lon directions. e.g.[lat resolution,lon resolution].
     __init__ N/A N/A self title boundingBox gridResolution N/A N/A N/A N/A N/A 
        Constructor
         N/A N/A N/A N/A super TethysGizmoOptions self __init__ N/A N/A self title title N/A N/A self boundingBox boundingBox N/A N/A self gridResolution gridResolution N/A N/A FetchClimatePointParameters N/A TethysGizmoOptions N/A N/A 
    Point Parameters

    Optional if there is a map or grid included. Otherwise, it is required! No map needed. If map included, it will initialize with input point.

    Attributes:
        title(str): The name of the point location.
        location(dict): An array of length 2 with lat and lon of point. e.g.[lat,lon].
     __init__ N/A N/A self title location N/A N/A N/A N/A 
        Constructor
         N/A N/A N/A N/A super TethysGizmoOptions self __init__ N/A N/A self title title N/A N/A self location location N/A N/A FetchClimateMap N/A TethysGizmoOptions N/A N/A 
    Plot Parameters

    Attributes:
        dimensions(dict): The integer is in pixels for width (`Highcharts width reference <http://api.highcharts.com/highcharts#chart.width>`_) or height (`Highcharts height reference <http://api.highcharts.com/highcharts#chart.height>`_). Not required to be defined.

    Example

    ::

        # CONTROLLER
        from tethys_sdk.gizmos import *

        fetchclimate_map = FetchClimateMap(
                    url_parameter=FetchClimateURLParameter(serverUrl='http://fetchclimate2.cloudapp.net'),
                    variable_parameters = FetchClimateVariableParameters(variables={
                        'prate': [423, 432, 426, 424],
                        'elev': []
                    }),
                    map_parameters=FetchClimateMapParameters(
                        css={'height': '600px',
                             'width': '100%'},
                        map_data=FetchClimateMapData(
                            drawing_types_enabled=['RECTANGLE', 'POINTS'],
                            initial_drawing_mode='RECTANGLE',
                            max_num_grids=2
                        )
                    ),
                    grid_parameters=FetchClimateGridParameters(
                        title='Provo Canyon Watershed',
                        boundingBox=[40.308836, 40.381579, -111.654462, -111.550778],
                        gridResolution=[25, 25]
                    ),
                    point_parameters=FetchClimatePointParameters(
                        title='Clyde Building',
                        location=[40.246942, -111.647971],
                    ),
                    plot_parameters=FetchClimatePlotParameters(dimensions={'width': 500, 'height': 350})
        )

        # TEMPLATE

        {% gizmo fetchclimate fetchclimate_with_map_plot %}

     __init__ N/A N/A self url_parameter map_parameters plot_parameters variable_parameters grid_parameters point_parameters N/A N/A FetchClimateURLParameter N/A FetchClimateMapParameters N/A FetchClimatePlotParameters N/A FetchClimateVariableParameters N/A FetchClimateGridParameters N/A FetchClimatePointParameters N/A N/A 
        Constructor
         N/A N/A N/A N/A super TethysGizmoOptions self __init__ N/A N/A self url_parameter url_parameter N/A N/A self map_parameters map_parameters N/A N/A self plot_parameters plot_parameters N/A N/A self variable_parameters variable_parameters N/A N/A self grid_parameters grid_parameters N/A N/A self point_parameters point_parameters N/A N/A