IT IS just after 6pm on a Friday as I close up our second-floor office on Post Street. I'm heading for San Francisco's 10th annual film noir festival and the downtown streets and weather outside match the mood and look of a black-and-white film.

Dashiell Hammett, in his apartment nearby at 891 Post, wrote of evenings like this in the 1920s. He knew the locale so well and it figures heavily in The Maltese Falcon and other detective novels he teased out on his typewriter there.

Downstairs, I raise my coat collar and step out on to the wet, shining sidewalk. Down these mean streets a man must go, or at least that was Raymond Chandler's insistence in The Simple Art of Murder.

Though the classic period of film noir production drew to a close in the late 1950s, the genre remains popular and thousands of fans attend festivals staged in US cities by the Film Noir Foundation. The latest begins in Hollywood this weekend but the biggest is the annual Noir City festival in San Francisco.

The city's streets have thrown up many noir movie locations. Across the road from my office, a boarded-up flower stand is where James Stewart, in a brown suit and fedora, once stooped to pin an orchid to Kim Novak's blouse in Hitchcock's Vertigo (1958). I walk on a few yards to Union Square, pausing to look back towards the Stockton Street tunnel, where Miles Archer's body was found after he was shot with a single bullet through the heart in The Maltese Falcon (1941).

The rain has become as torrential and incessant as in The Big Sleep (1946) but I take shelter on an old-fashioned streetcar and my destination is soon in front of me - the neon lights of the Castro Theatre, a 1920s movie palace that is hosting the opening night of Noir City.

By the ornate period box office, a tall woman dressed in 1940s clothing is there to greet me. I grab a seat near the front and watch a mighty Wurlitzer organ rise from beneath the stage. The organist plays The Lady is a Tramp and other femme fatale favourites, before a sharp-suited Eddie Muller, the festival organiser, takes the stage, after being introduced as "the Tsar of Noir, the Mayor of Dark City".

I wonder how sunny California ever gave birth to such dark cinema, inspired by pulp fiction and German expressionism and defined by French film critic Nino Frank. Muller tells us about the 40-film season he recently presented in Paris in front of audiences of 350, but there are four times that number in the packed Castro.

Profits from the festival go towards restoring and preserving 35mm celluloid prints of classic film noir but Muller says the spread of digital projection systems is putting such screenings at risk.

We savour what remains, as 1947's Dark Passage, set in San Francisco and starring Humphrey Bogart and Lauren Bacall, plays on opening night. There are some rare Dashiell Hammett films ahead during the 10-day programme, bus tours of famous film noir locations and a party with torch singers and burlesque artistes.

As I head home, the streets of San Francisco, charged with rain, darkness, neon and memories, seem as magical as any movie.

. The next San Francisco festival (www.noircity.com) will be in January 2013. For details of other festivals see www.film noirfoundation.org

© 2012 The Financial Times Limited