The 17-year-old, who cannot be named, committed the offence while on a community payback order he received for having sex with a 12-year-old girl when he was 14.
A court heard that he had sex with the 13-year-old in the grounds of Dundee and Angus College.
The meeting was arranged on Snapchat.
Dundee Sheriff Court heard how the pair had met through mutual friends in 2015 but there was no contact between them until June 2016 when he added her on the social networking app.
Fiscal depute Eilidh Robertson said that when they met they chatted for some time and the accused was immediately affectionate towards the girl, kissing and cuddling her.
"He told her he had been 'choking to go with her' and they then walked towards the college," Ms Robertson said.
"He repeatedly asked her if she would have sex with him, and when in the grounds of the college he said 'have sex with me there' and pointed to a grassy area.
"They went there and had sex, after which he stood up and said he had to leave."
The girl's mother picked her up before the 13-year-old told her what had happened the next day.
She then told a counsellor who called in police.
The teenager was given a community payback order last year for his previous sex offence conviction.
Sheriff Alastair Carmichael told him that custody was the only option this time because he did not appear to have learned from his previous community sentence.
The 17-year-old pleaded guilty on indictment to a charge under the Sexual Offences (Scotland) Act.
Defence solicitor Katrina Clark urged the court to impose a second community payback order instead of a jail term.
She said: "He's aware he faces more time in custody.
"The more effective way forward for him would be through the intensive project outlined for him in the social work reports. That wouldn't be an easy option.
"This could be dealt with by a non-custodial sentence due to his age, the period he has spent in custody on remand and his acceptance of his guilt at an early stage."
Sheriff Alastair Carmichael imposed a one-year sentence of detention on the teenager, placed him on the sex offenders register for 10 years and imposed a sexual offences prevention order for six years during which time he will be monitored by specialist police officers.
He said: "Unfortunately from your perspective no other method than custody is appropriate.
"I've come to that decision based on the gravity of the offence and also because you were subject to a CPO with specialist elements which you don't appear to have learned from."About 80,000 lightning strikes were recorded, some damaging power generation facilities, while winds toppled over 22 transmission towers.
Power was restored to Adelaide area by 03:00 local time (17:30 GMT) but tens of thousands of homes remain cut off.
On Thursday, authorities advised people to leave work early as winds were expected to intensify again.
How 'unprecedented' storm played out
The state premier said "twin tornadoes" had hit northern areas in "an extreme weather event" on Wednesday. Jay Weatherill compared the storm to Hurricane Sandy which hit New York in 2012.
He said officials in charges of the power grid had told him "any system would not be able to cope with a weather system of this kind".
"We had winds which were so strong that when they hit power lines they created such energy they were tearing the towers out of the ground."
While South Australia's wild weather was widely forecast, no-one could really predict the impact it would have on everyday life.
In Adelaide, commuters were left feeling their way in the dark as the lights went off on their way home. Gridlock followed, as trains and trams came to a standstill.
At the airport, some passengers had to depend on handwritten boarding passes, after power for the printers failed. Some describe the whole experience as "apocalyptic", while one woman, who was on the operating table in the local hospital and about to undergo surgery, said it was simply "funny".
What has been predictable is that an extreme weather event has very quickly turned into an Australian political storm, with the state's dependency on renewable energy now being debated with the full force and bluster of a tornado.
The Bureau of Meteorology (BOM) said the storm was a once-in-50-years event.
It is forecasting further heavy rainfall throughout Thursday and into Friday. Further gales of up to 140km/h (87mph) are expected, and flood warnings remain in place.
On Thursday, South Australia's State Emergency Service has warned residents to prepare for more high winds and rain, caution