Coffee, Irish whiskey and cream.

Taken separately they’re a tasty trio. But combine them just the right way and in just the right proportions and they get even better, transforming into a drink that can perk up the grayest day.

We’re talking Irish coffee, of course, a drink that’s especially popular around St. Patrick’s Day, but good any time you want to add some zing to your caffeine.

The secret, says Larry Silva, general manager of the Buena Vista Cafe in San Francisco — which serves up 2,000 Irish coffees a day — is how you put the drink together.

At the Buena Vista — the original source of the drink in the U.S. — Irish coffee starts with a stemmed, 6-ounce glass that’s been preheated with hot water. And both of those elements are critical. A bigger or smaller glass would throw off the coffee-booze balance. A cold glass results in a tepid cocktail. There was a bit of a hitch a few years back when Libbey Glass stopped making the type the Buena Vista uses. Silva had to scramble to find another source but, happily, Libbey has since reinstated the product.

For a touch of sweetness, the Buena Vista recipe adds two cubes of sugar, though other recipes call for brown sugar. The cream, meanwhile, should be fresh and just slightly whipped — nothing from an aerosol can.

As for the whiskey, the Buena Vista is currently using Tullamore Dew. In general, what you are seeking is a smooth whiskey that won’t fight with the other flavors, says Silva. This isn’t the time to pull out that peaty Scotch. But don’t be afraid to use something good.

“Using a premium spirit elevates any cocktail,” says John Concannon, a California vintner who has teamed with Ireland’s Cooley Distillery to develop Concannon Irish Whiskey, which also makes a good Irish coffee.

The whiskey, made and aged in Ireland, is matured in bourbon barrels, then finished off with some time in wine barrels that have been used to age Concannon Vineyard’s flagship petite sirah wine. “Because of the unique barrel finishing in the distilling process, Concannon has a complexity and character all its own, making for a one-of-a-kind Irish coffee experience,” Concannon said via email.

Though it seems likely that people have been introducing a drop or two of whiskey into coffee for a while, the drink as a cocktail was popularized in Ireland at the Foynes port, precursor to Shannon Airport, in the 1940s when chef Joe Sheridan decided to pep up some coffee with Irish whiskey to cheer chilly travelers. The drink was much appreciated and one of the passengers is said to have asked, “Was that Brazilian coffee?” Sheridan jokingly answered, “No, that was Irish Coffee,” and a tradition was born.

San Francisco newspaperman Stanton Delaplane tried the coffee while flying from Shannon Airport in 1952 and on his return got together with Jack Koeppler, then-owner of the Buena Vista, to recreate the drink. The trickiest part was getting the cream to float on top, something that was solved by whipping the cream just a bit, then pouring it carefully over the back of a spoon into the cup.

St. Patrick’s Day has a special resonance for Concannon since his great-grandfather and winery founder, James Concannon, was born on March 17 in the Aran islands off the coast of Ireland. The winery, based in the Livermore Valley region east of San Francisco, will be celebrating this year with traditional, live Irish music and a toast (with wine) to their founder.

And they’ll be busy at the Buena Vista, too. Last year, thirsty revelers sucked down 3,640 Irish coffees.

Take that, green beer.

Looking to brew a little Irish cheer yourself this St. Patrick’s Day? Try this classic recipe, or the chocolate-laced variation.

IRISH COFFEE

Depending on which version of the “original” Irish coffee you subscribe to, it is sweetened with either 2 sugar cubes or 1 teaspoon brown sugar. For a rich and chocolaty take on Irish coffee, stir 2 tablespoons of milk chocolate bits into the coffee at the same time as the sugar. Once the chocolate bits have melted, proceed with the recipe.

Start to finish: 5 minutes

Servings: 1

Boiling water

Hot coffee

2 sugar cubes or 1 teaspoon brown sugar

1 1/2 ounces Irish whiskey

1/4 cup heavy or whipping cream, lightly beaten (but still pourable)

Fill a large coffee cup with boiling water to preheat it. Let it stand for about 1 minute, then empty the glass.

Fill the glass three-quarters full with hot coffee. Add the sugar, then stir until dissolved. Stir in the whiskey.

Top the coffee-whiskey blend with the lightly whipped cream. To do this, hold an overturned spoon over the coffee, then slowly pour the cream over it. The goal is for the cream to float on top of the coffee; do not mix it in. Part of the Irish coffee experience is drinking the hot coffee through a layer of cool cream.

Recipe adapted from The Buena Vista Cafe, San Francisco