esmvaltool/diag_scripts/ocean/diagnostic_transects.py
def determine_transect_str(cube):
    """
    Determine the Transect String

    Takes a guess at a string to describe the transect.
    """
    options = ['latitude', 'longitude']
    for option in options:
        coord = cube.coord(option)
        if len(coord.points) > 1:
            continue
        value = coord.points.mean()
        if option == 'latitude':
            return str(value) + ' N'
        if option == 'longitude':
            if value > 180.:
                return str(value - 360.) + ' W'
            return str(value) + ' E'
    return ''

    Determine the Transect String

    Takes a guess at a string to describe the transect.
    
Determine the Transect String
Takes a guess at a string to describe the transect.
Determine the Transect String Takes a guess at a string to describe the transect .
def determine_transect_str(cube):
    options = ['latitude', 'longitude']
    for option in options:
        coord = cube.coord(option)
        if len(coord.points) > 1:
            continue
        value = coord.points.mean()
        if option == 'latitude':
            return str(value) + ' N'
        if option == 'longitude':
            if value > 180.:
                return str(value - 360.) + ' W'
            return str(value) + ' E'
    return ''
def determine_transect_str ( cube ) : options = [ 'latitude' , 'longitude' ] for option in options : coord = cube . coord ( option ) if len ( coord . points ) > 1 : continue value = coord . points . mean ( ) if option == 'latitude' : return str ( value ) + ' N' if option == 'longitude' : if value > 180. : return str ( value - 360. ) + ' W' return str ( value ) + ' E' return ''
Determine the Transect String
Takes a guess at a string to describe the transect.
Determine the Transect String Takes a guess at a string to describe the transect .
"""
    Determine the Transect String

    Takes a guess at a string to describe the transect.
    """
cube