def METHOD_NAME(fname,pts,ncdata):
    outfile=open(fname,'w')
    Npts=pts.shape[0]
    outfile.write("<?xml version=\"1.0\"?>\n")
    outfile.write("<VTKFile type=\"PolyData\" version=\"0.1\" byte_order=\"LittleEndian\">\n")
    outfile.write("<PolyData>\n")
    outfile.write("<Piece NumberOfPoints=\"%d\" NumberOfVerts=\"0\" NumberOfLines=\"0\" NumberOfStrips=\"0\" NumberOfPolys=\"0\">\n"%(Npts))
    outfile.write("<PointData>\n")
    n_ncdata=ncdata.shape[0]
    if(n_ncdata > 0):
        for ndataset in range(n_ncdata):
            outfile.write("<DataArray type=\"Float32\" Name=\"Point_data%d\" format=\"ascii\">\n"%(ndataset))
            for i in range(ncdata.shape[1]):
                outfile.write("%e "%(ncdata[ndataset][i]))
            outfile.write("\n</DataArray>\n")
    outfile.write("</PointData>\n")
    outfile.write("<Points>\n")
    outfile.write("<DataArray type=\"Float32\" Name=\"Points\" NumberOfComponents=\"3\" format=\"ascii\">\n")
    for i in range(Npts):
        outfile.write("%e\t%e\t%e\t"%(pts[i][0],pts[i][1],pts[i][2]))
    outfile.write("\n</DataArray>\n")
    outfile.write("</Points>\n")
    outfile.write("</Piece>\n")
    outfile.write("</PolyData>\n")
    outfile.write("</VTKFile>\n")
    outfile.close()