How, exactly, did I end up on the roof of a coffeehouse in Tokyo, kneeling over a single-burner camp stove and something called a Whirley Pop?

Sweat soaked my T-shirt as the wind kept blowing out the fire. To make matters worse, the sun made the flame nearly invisible, so I couldn’t even tell when the stove was on. I’d learned the hard way already, burning myself in the process. The scent of half-roasted coffee beans, normally one of my favorite smells, only stressed me out more.

Finally, a flame. I set down the Whirley Pop, a contraption intended for making popcorn, not roasting beans, and started to turn the handle, hoping my coffee wasn’t ruined.

This was no way to start a revolution.

———

My adventure in Japanese coffee roasting began last Christmas, when my friend Kala Ahloy, the general manager of a small Tokyo-based coffee chain called Mojo Coffee Japan, was visiting and had a cup of a light Ethiopian I’d made. “This is really good,” he said, sounding surprised.

Ahloy and his Mojo partners were planning to expand their business, in part by introducing single-origin roasts in a country more familiar with big-batch blends. This summer, he sent me an email inviting me to join his crew for a few weeks in September.

I’ve been roasting single-origin coffee in my backyard in Los Angeles for years. I tell myself that it’s cheaper to buy green coffee beans at $7 a pound than pay $3 for a single cup in a store, but I’ve come to look forward to the small surprise of having a different kind of coffee at home every week.

Like a lot of purists — some may call us snobs — I like coffee from a single farm because it’s easier to taste its flavors, similar to how some Scotch aficionados prefer single malts because they’re a purer expression of the distillery than blends. (Yes, I like Scotch. No, I’ve never tried to make whiskey at home.) Similarly, I often roast my beans as lightly as possible because I think that lets me taste the coffee, not the roast.

But single origins also democratize the coffee experience, argues Thompson Owen of Sweet Maria’s Coffee in Oakland, where I get all my beans.

“Blends belong to this idea that we do something that you can’t possibly do, that we have some weird mojo that you don’t,” he said. “With a single origin, the most important thing is a guy on this farm did a great job and this is the output.”

Much like in Los Angeles, more Japanese consumers began moving away from caramel frappucinos to single origin as coffee knowledge became more fashionable. A Blue Bottle Coffee, an Oakland-based company known for its high-end pour-overs, opened in Tokyo this year, and the line was nearly three hours long. When I stopped for a coffee in a department store, the barista took nine minutes to brew it.

But most Japanese coffeehouses, known as kissaten, have been small cafes where socializing is more important than the quality of coffee, which is generally dark. Changing that was going to take persistence.

Still, Justine Ells, Mojo Japan’s president, thinks single-origin coffees are an important part of its future.

“If you want to be one of the cool kids,” she said, “then you need to be recognized for your specialty coffee and your single origin.”

———

I’d become a single-origin convert ever since my wife bought me a roasting course shortly after our first son was born, primarily because she’d heard that lightly cooked coffee had more caffeine and we needed all the help we could get.

I spent three hours at an Altadena house learning how to roast green beans in a Whirley Pop, listening for the tell-tale “first crack” of the beans popping and sniffing for the moment when a grassy raw bean begins changing to the sweeter scent of a lightly roasted coffee.

Timing is everything: It can take as little as 30 seconds for a bean to change from a New England roast (that is, light) to a dark, nearly charred Spanish roast.

The process can be messy, and it’s difficult to keep an eye on a pot of beans and a toddler, much less two of them. But I roasted beans every week because I found that, much like good wine, a fine coffee can add significance to moments both special and mundane.

I remember giving my wife my first attempt at roasting — a cup of thin, undercooked Kenyan coffee — and her pained face when she said it was good. The Sumatran coffee I was drinking the morning my older son first leaped out of his crib. The Brazilian espresso when my second child figured out how to tip over the trash can.

———

After flying to Japan in early September, I helped Mojo’s roaster, Claire McKone, go through a few batches to get the hang of its commercial machine, which can cook nearly 60 pounds of coffee at a time. It was fairly straightforward — the roaster is computerized, and we were cooking all the beans to medium and blending them, not experimenting with lighter or darker or single-origin beans.

At some point, the company plans to buy a small, one- or two-pound roaster so employees won’t have to worry if they burn or undercook a batch — which is inevitable when experimenting with single-origin coffee.

Before McKone left for a New Zealand vacation, we made about 20 pounds of Papua New Guinea, which we thought would have some tropical fruit notes if we cooked it lightly.

When we tried it, the fruit flavors were punctuated with a tannic, sour flavor. It was overdone.

Even if Mojo’s customers were open to lighter roasts, they wouldn’t like this one. I wasn’t off to a great start.

I needed some inspiration. I went to a Specialty Coffee Assn. of Japan exhibit that was being held while I was there.

A hall was full of the latest equipment: vacuum coffee makers that looked as if they belonged in a chemistry lab, and wooden hand grinders that cost $100.

I met with Hidenori Izaki, who won the 2014 World Champion Barista Championship and grew up in a family of coffee roasters.

Sipping a cup of Brazilian, Izaki listened to me explain my roasting and tasting adventures in Tokyo and nodded knowingly. He explained that, although the drink has been popular in Japan for years, most people liked it only one way.

“People are very used to dark, Italian roasts,” Izaki said.

Part of the reason is simply habit — “Starbucks was very influential here,” he said — but some of it is also cultural. Japanese tend to favor simpler flavors and are often put off by sweeter or fruitier notes that tend to show up in lighter roasts, Izaki said.

“Our food is about umami and being clean-tasting,” Izaki said. “We don’t really have spicy food; we don’t really have a wide variety of flavors.”

I asked Izaki what he would do if he were to start a single-origin coffee shop, and he pursed his lips tightly.

“It will take a lot of work and experimentation,” he said finally. “Traditions take a long time to change.”

———

After McKone left on vacation, I got out my Whirley Pop to roast a small batch of beans packed from home. Aware by then of a co-roaster’s complaints about the smoke from the roasting process, I decided to cook on the roof of a Mojo store.

The first attempt — the one involving burned hands and sweat-stained shirts — was a failure, thin and sour, closer to microwaved tea than richly brewed coffee.

It was even windier the second time I tried it, so I built a small shelter with a box I found on the roof. But it kept blowing over, and the flame died several times. Normally, roasting coffee should take about 12 minutes, but that day it took almost half an hour because I lost heat so many times.

When I brewed some of the beans and gave it to the staff, they said it wasn’t bad, in typically polite Japanese fashion. But it was watery, probably because it was underdone from being heated and then cooled over and over.

I was leaving in two days, and I was afraid I’d have to go home without roasting a single good batch of coffee.

I tried one more time, making a light, medium and dark roast in my Whirley Pop. After brewing them, Ahloy and I tried them with some Mojo employees.

The light roast was the least popular; it did seem a little thin. “This is not like Mojo coffee,” one employee said. The medium roast also lacked flavor.

I didn’t hold out much hope for the dark roast, but Mojo employees liked it best. I was momentarily pleased but grew disappointed when I tasted it. Instead of the delicately flavored coffee I’d hoped for, it tasted closer to dark diner joe.

In other words, a traditional Japanese coffee.