def check_lat_lon_bounds(latd, latm, lond, lonm):
    
    """ Check the bounds of the given lat, long are within -90 to +90 and -180 
    to +180 degrees 
    
    Paramters
    ---------
    latd, latm, lond, lonm : int or float
    
    Returns
    -------
    latd, latm, lond, lonm : bounded to -90:90 and -180:180 and converted to
    decimal degrees
    
    Otherwise, an exception is raised
    
    """
    
    if latd < -90 or latd > 90 or latm < -60 or latm > 60:
        raise ValueError(f'Latitude {latd} or {latm} out of bounds.')
    if lond < -360 or lond > 360 or lonm < -60 or lonm > 60:
        raise ValueError(f'Longitude {lond} or {lonm} out of bounds.')
    if latm < 0 and lond != 0:
        raise ValueError(f'Lat mins {latm} and {lond} out of bounds.')
    if lonm < 0 and lond != 0:
        raise ValueError(f'Longitude mins {lonm} and {lond} out of bounds.')
        
              
    # Convert to decimal degrees        
    if (latd < 0):
        latm = -latm
    lat = latd + latm/60.0

    if (lond < 0):
        lonm = -lonm
    lon = lond + lonm/60.0
    
    return lat, lon