A man caught growing hundreds of cannabis plants was experimenting with medical uses for marijuana, a Nelson court has heard.

Joshua Wilfred Harley, 38, admitted cultivating cannabis after police searched his Wairau Valley property in December last year and discovered more than 200 cannabis plants.

Police found 22 mature plants, but the majority were seedlings or sprouts, irrigated and growing under lights in what defence lawyer Mark Dollimore conceded was a "significant system".

Supplied GROWER: Josh Harley was convicted of cannabis cultivation and sentenced to community detention.

However, police found no evidence to suggest that Harley had been selling or supplying, Mr Dollimore said.

In the Nelson District Court, Crown prosecutor Mark O'Donoghue accepted there was no proof of commerciality, but said there was potential for some of the marijuana to find its way into the community.

"Lucky for [Harley] and the community, police have nipped this [offending] in the bud at an early stage," Mr O'Donoghue said, arguing for a restrictive sentence of community detention as well as community work.

Mr Dollimore told the court that Harley had been brewing "cannabis tea" which he made from crushing large amounts of cannabis plant matter and extracting the "juice".

Harley was genuinely interested in making medicines that might help people who were physically sick, mentally unwell, or even dying, but he had not fully considered the consequences of his experimenting, Mr Dollimore said.

Four years ago, Harley's partner Kelly passed away after battling cancer, leaving him to raise their two children, Mr Dollimore told the court.

He said Harley's mother also died of cancer around the same time.

Not long after they died, Harley decided to become a fulltime "herbalist medicine man" or "plant pharmacologist", Mr Dollimore said.

He had been studying the effects of cannabidiol - a chemical found in cannabis, which he believed contained compounds that killed or stemmed the growth of tumors.

Twenty individuals wrote letters to the court, supporting Harley and testifying to his good character and intentions, Mr Dollimore said.

Harley also penned his own letter to the judge, explaining the experiments.

"I realise that what I have done is wrong ... My intention was never to hurt anyone, nor was my intention to make any money from cultivating cannabis," Harley wrote.

"In the Bible, God allows us the use of all plants and herbs, then he commands us to heal with them. He also commands us to obey the laws of the land, and this is where I contradict myself."

He told Judge Zohrab in his letter that he was making medicine for himself, and for cancer patients whom he knew personally. He said he did not "get high" or own any "smoking utensils", as he believed that "smoking cannabis for medicinal purposes is an oxymoron".

Harley said "juice" from the marijuana plant contained wider health benefits, which helped ease the anxiety he had suffered from since losing his partner.

In court, Mr Dollimore said Harley's conviction was a "big learning curve".

"He knows he could go to jail quite easily for this. It has been a big wake-up call," Mr Dollimore said.

Harley had one previous conviction for selling a "tinny", but Judge Tony Zohrab accepted that that was many years ago, and had only involved a small amount.

Mr Dollimore said his client had been entirely co-operative with police.

Harley was convicted, and sentenced to six months' community detention and 300 hours of community work.

Judge Zohrab said he had trouble believing that there was no commercial aspect to Harley's grow operation, saying truth was often the first casualty in cases like this.

He told Harley that further offending of this type would likely attract a custodial sentence.

Outside court, Mr Dollimore said Harley was a "bloody good guy" and someone who was "ahead of his times", in terms of experimenting with alternative medicines.

"Eventually, guys like him, in many years to come, might be like naturopaths.

"Eventually, they will change the law," Mr Dollimore said.

He said Harley would strive to complete his community work sentence by volunteering at his children's school.

Harley's former partner Kelly Bannister died after a battle with cancer in September, 2009, aged 34, just 10 weeks after the birth of her second child.

While pregnant, she had declined conventional cancer treatment, to ensure her child was born without complication.

She was well known in Golden Bay for her community work and fundraising efforts for the Cancer Society. A memorial for Ms Bannister, in the form of a colourful bench covered in mosaic tiles, overlooks the sea at Tata Beach.