def create_req_xml(layer, date):
    """Create XML string representing the WMS-TMS gibs service
    """
    xml = f"""<GDAL_WMS>
        <Service name="TMS">
            <ServerUrl>http://gibs.earthdata.nasa.gov/wmts/epsg4326/best/{layer}/default/{date}/250m/${{z}}/${{y}}/${{x}}.jpg</ServerUrl>
        </Service>
        <DataWindow>
            <UpperLeftX>-180.0</UpperLeftX>
            <UpperLeftY>90</UpperLeftY>
            <LowerRightX>396.0</LowerRightX>
            <LowerRightY>-198</LowerRightY>
            <TileLevel>8</TileLevel>
            <TileCountX>2</TileCountX>
            <TileCountY>1</TileCountY>
            <YOrigin>top</YOrigin>
        </DataWindow>
        <Projection>EPSG:4326</Projection>
        <BlockSizeX>512</BlockSizeX>
        <BlockSizeY>512</BlockSizeY>
        <BandsCount>3</BandsCount>
    </GDAL_WMS>"""

    return xml.encode()