def twmsbox2wmts(request_bbox):
    """
    Returns WMTS equivalent TILECOL and TILEROW as string.  Assumes top left is -180 90.
    Arguments:
        request_bbox -- The requested TWMS bounding box to be translated (e.g., '-81,36,-72,45').
    """

    request_bbox = request_bbox.split(",")
    
    # parse request_bbox to individual values
    request_minx = float(request_bbox[0])
    request_miny = float(request_bbox[1])
    request_maxx = float(request_bbox[2])
    request_maxy = float(request_bbox[3])
    
    x_size = request_maxx - request_minx
    y_size = request_maxy - request_miny
    
    # set top_left values
    top_left_minx = -180
    top_left_maxy = 90
    
    # calculate additional top_left values for reference
    top_left_maxx = top_left_minx + x_size
    top_left_miny = top_left_maxy - y_size
    
    print "Top Left BBOX:",str(top_left_minx)+","+str(top_left_miny)+","+str(top_left_maxx)+","+str(top_left_maxy)
    print "Request BBOX:",str(request_minx)+","+str(request_miny)+","+str(request_maxx)+","+str(request_maxy)
    
    # calculate col and row
    col = ((request_minx-top_left_minx)/x_size)
    row = ((request_miny-top_left_miny)/y_size)
    
    # calculate scale denominator for reference
    scale_denominator = (((x_size*2)/pixelsize)*units)/(tilesize*2)
    print "Scale Denominator:", str(round(scale_denominator,10))
    
    return "TILECOL=" + str(abs(int(col))) + "\n" + "TILEROW="+str(abs(int(row)))
dataset/ETHPy150Open nasa-gibs/onearth/src/scripts/twmsbox2wmts.py/twmsbox2wmts/original