def getType(vv):
    
    """ Gets the variable type from its name
        Types are:
            0 - str
            1 - int
            2 - float
            3 - time
    """
    
    vartype = {'station_id':0,'sensor_id':0,'"latitude (degree)"':2,'"longitude (degree)"':2,\
    'date_time':3,'"sensor_depth (m)"':2,'"direction_of_sea_water_velocity (degree)"':2,\
    '"sea_water_speed (cm/s)"':2,'"platform_orientation (degree)"':2,'"platform_pitch_angle (degree)"':2,\
    '"platform_roll_angle (degree)"':2,'"sea_water_temperature (C)"':2,'orientation':0,'"sampling_rate (Hz)"':2,\
    '"reporting_interval (s)"':1,'processing_level':0,'"bin_size (m)"':2,'"first_bin_center (m)"':2,\
    'number_of_bins':1,'"bin (count)"':1,'"bin_distance (m)"\n':2,\
    '"water_surface_height_above_reference_datum (m)"':2,'"vertical_position (m)"':2,'datum_id':0}
    
    if vv in vartype:
        return vartype[vv]
    #else:
        #print 'Unknown variable type: %s'%vv