We investigate a singular Poisson bracket which appears in Hamiltonian fluid mechanics. It is shown that we can get the most general Casimir for such systems by solving the functional equations which correspond to zero eigenvalue equations. Especially, in the case of a three-dimensional adiabatic perfect fluid, the most general Casimir is shown to be the generalized enstrophy only.