In this paper, we construct four infinite families of ternary linear codes
associated with double cosets in $O(2n+1,q)$ with respect to certain maximal
parabolic subgroup of the special orthogonal group $SO(2n+1,q)$. Here $q$ is a
power of three. Then we obtain two infinite families of recursive formulas, the
one generating the power moments of Kloosterman sums with $``$trace nonzero
square arguments" and the other generating the even power moments of those.
Both of these families are expressed in terms of the frequencies of weights in
the codes associated with those double cosets in $O(2n+1,q)$ and in the codes
associated with similar double cosets in the symplectic group $Sp(2n,q)$. This
is done via Pless power moment identity and by utilizing the explicit
expressions of exponential sums over those double cosets related to the
evaluations of $"$Gauss sums" for the orthogonal group $O(2n+1,q)$.