If I understand your question, what you want is to save the spectrum as an output variable, like HM0, am I correct?
If so, there is a problem here. TOMAWAC, although treated as a 3D model (the directions as the third dimension), only saves 2D results, integrating the wave spectrum at each step.
What you would need to do, in that case, is to program yourself the output of the spectrum to a selafin file other than the standard results file, since it would need to be 3D.
It is fairly simple to do, but quite expensive in terms of disk space (saving a value for all the mesh nodes, all the directions and all the frequencies).
If this is what you want, I may be able to help, as I already done something like that.
Best regards,
Phelype