Normally on these threads I explain how the sentence fits the sentencing guidelines. Here, I can't. If this was in England, he would definitely be facing several years in prison.
Scotland has only just started developing sentencing guidelines so, until recently, judges in Scotland broadly followed the sentencing guidelines for England. Scotland doesn't have sentencing guidelines for rape as yet. They do, however, have guidelines for sentencing young people, which they define as offenders under the age of 25. Those guidelines state that a custodial sentence should only be imposed when the court is satisfied that no other sentence is appropriate and, if a custodial sentence is imposed, it must be shorter than if the offender is 25 or over. In England, young people under 18 get lower sentences. This offender, being 21, would be treated the same as any other adult rapist.
My view is that this sentence is completely wrong. If this is what the Scottish Sentencing Council intended, I think they've got it badly wrong. If it wasn't what they intended, their guidelines should have been clearer. But, even with the guidelines as written, it was open to the judge to decide that anything other than a custodial sentence would not be appropriate. So, I agree that the judge has got this wrong. I hope the sentence gets increased on appeal.