<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def global_mean(field):
 """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:: Field(11.997968598413685) """

    try:
        lat = field.domain.lat.points
    except:
        raise ValueError('No latitude axis in input field.')
    try:
        #  Field is 2D latitude / longitude
        lon = field.domain.lon.points
        return _global_mean_latlon(field.squeeze())
    except:
        #  Field is 1D latitude only (zonal average)
        lat_radians = np.deg2rad(lat)
        return _global_mean(field.squeeze(), lat_radians)