def global_mean(field):
try:<EOL><INDENT>lat = field.domain.lat.points<EOL><DEDENT>except:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>try:<EOL><INDENT>lon = field.domain.lon.points<EOL>return _global_mean_latlon(field.squeeze())<EOL><DEDENT>except:<EOL><INDENT>lat_radians = np.deg2rad(lat)<EOL>return _global_mean(field.squeeze(), lat_radians)<EOL><DEDENT>
Calculates the latitude weighted global mean of a field
    with latitude dependence.

    :param Field field: input field
    :raises: :exc:`ValueError` if input field has no latitude axis
    :return: latitude weighted global mean of the field
    :rtype: float

    :Example:

        initial global mean temperature of EBM model::

            >>> import climlab
            >>> model = climlab.EBM()
            >>> climlab.global_mean(model.Ts)
            Field(11.997968598413685)