What was the intent here? The `clfile` isn't a 2-d array so this block isn't executed and the following `else` is *always* executed.

Also the following block (L624) has `kx=2, ky=2` even thoug the comment says to use linear order.