fitMod function

Internal function that fits the seawaveQ model.