The San Francisco scale model finished in 1940 has been mostly hidden away ever since — until now.

The model is finally set to get the display it deserves on Jan. 25, when the wooden relief map will go into circulation at the San Francisco Public Library. The model includes every structure in every neighborhood, and to the neighborhoods it will go. The Main Library and all 27 branches, plus a temporary branch at the San Francisco Museum of Modern Art, will each get the portion that pertains to their area.

The installation is ongoing, with the first segments — Marina, Presidio, Golden Gate Valley, North Beach, Park, Main and SFMOMA — set up last week on saw horses and under Plexiglas. The exhibit will be on view through March 25.

If the San Francisco building you live in was here in 1938, you will be able to find it in your local library as a little carving packed in with the others on your block, detailed down to the shape and color of the house.

“With this model, everything you love about San Francisco is represented and everything you hate about San Francisco is represented,” project manager Stella Lochman says as she walks along and picks out the Noe Valley hospital where she was born, all of the schools she attended, and the dive bars she hangs out in now.

“It holds all of the different histories, both personal and civic,” says Lochman, 33.

The scale model, commissioned by the City Planning Commission to put artists to work during the Great Depression, ranges from San Bruno Mountain to Yerba Buena Island to the Presidio.

Assembled, it is 37 by 41 feet, and seeing it that way is like watching a model railroad. You can study the interior only by standing at the edge and leaning over.

But the model was built to come apart, and seeing it in smaller quadrants elevated off the floor make it easier to home in on the detail — from the tiny goalposts on the football field at Galileo High School to the long-gone roller coaster at Playland-at-the-Beach to the little Key trains on their looping track making the turn off the Bay Bridge into the Transbay Terminal.

“When it is in segments you can see your own block, and that is the magic to it,” Lochman says as she carefully examines her apartment building at 20th and Hampshire streets.

“The roof is still puke green,” she says, “but it’s a historic puke green.”

Since May, the model has been in a South of Market warehouse owned by the library, being cleaned by a horde of volunteers. The free exhibit in the libraries, called “Public Knowledge: Take Part,” was organized by SFMOMA.

On a scale of 1 inch equals 100 feet, the model city is 11 inches tall at its highest point (Mount Davidson) and composed of 6,000 removable little blocks, each one corresponding to a city block. The blocks are formed into 140 sections, each on a stand. Walking between them at the warehouse you can see the Laurel Hill Cemetery, not yet removed to Colma.

Also among the vanished and mourned are the Fox Theater, the Montgomery Block and the Rainier Brewery (later the Hamm’s plant), not yet demolished or remodeled beyond recognition. Adolph Sutro’s estate is gone, having been freshly demolished. The Sunset is still sand dunes, running down to the zoo and Fleishhacker Pool. Glen Park has streets, but that’s about it.

The streetcar lines are represented, including the push-pull cable car on the steep block of Fillmore Street, as is the Southern Pacific switching station in Visitacion Valley and the tunnels under Potrero Hill.

“It’s an architect’s dream, but also a train enthusiast’s dream,” Lochman says.

Like so much that was built to last in the city, the scale model was a federal project under the Works Progress Administration. San Francisco architect Timothy Pflueger suggested it in 1935, and the City Planning Commission sponsored it. Plans were drawn using aerial photographs and surveyors. Constructed in a church that has not been identified, it took 300 craftspeople two years to build.

Over the long years of its absence, mystery has enshrouded the model: Was it a make-work project that was destroyed? If not destroyed where has it been for all of these years? One story placed it in storage somewhere in the bowels of the Civic Center, and another story had it underneath the stands at Memorial Stadium in Berkeley.

One claim was that the model’s first appearance was at the Golden Gate International Exposition of 1939. But the model was not completed until 1940. The definitive book on the fair, “Treasure Island: San Francisco’s Exposition Years,” by Richard Reinhardt, makes no mention of the scale model. Geographer Gray Brechin, project scholar at the Living New Deal at UC Berkeley, recently said, “It was not likely at Treasure Island.”

But Lochman was able to dig up a photo that shows the downtown and waterfront portion of the model being fawned over by Zoe Dell Lantis Nutter, the expo’s “pirate girl” complete in a Robin Hood outfit, in the Redwood Empire pavilion at the fair. The picture is stamped Feb. 14, 1939 — four days before the grand opening. (Skeptics think it may be a doctored publicity photo.)

Whatever the story, this much is agreed upon: The completed model was displayed just once, intact, in the Light Court at City Hall. It cost $102,750 and its dedication in the registrar’s office was announced by a picture in The Chronicle in April 1940.

When World War II broke out, that space was suddenly in demand for the mobilization effort, and the model was disassembled and crated up.

“It was an orphan. The city didn’t want it anymore,” Brechin says.

It found a home in the College of Environmental Design at UC Berkeley, so it could be used to plan for the postwar expansion downtown. For decades, a significant portion of the model was locked in a room at Wurster Hall, strictly for use by students. The rest of it was in 17 wooden crates in deep storage at a UC warehouse in West Berkeley.

From there it moved to another UC warehouse in Richmond, and it would probably be sitting there still but for an education outreach program called Public Knowledge, which involves SFMOMA and the public library. A curator at SFMOMA knew the legend of the San Francisco model and dispatched Lochman.

“They said, ‘Find the model, and find a place to put it,’ ” she says.

So Lochman contacted Brechin, who put her in touch with a facilities administrator at UC Berkeley, which owns the model. Even when it arrived back in the city, in 22 wooden crates requiring two trucks, “there was still the mystery of what was in those crates,” Lochman says.

Amazingly, all 120 segments were accounted for.

The genius of the model is that it literally fits together like building blocks, with wooden pegs. Each city block can be lifted out of place and held in hand. The problem with that is that 175 city blocks have remained in hand and been walked off with or otherwise disappeared over the years. These include the blocks holding City Hall and Seals Stadium, both of which were rebuilt then disappeared again. The new Golden Gate Bridge and part of the Bay Bridge have also vanished. (Anyone holding a missing piece or even a photo or memory of such is invited to email publicknowledgesf@gmailcom.)

Even without all of its pieces, this is considered to be the largest and most intact of any of a number of city models built across America by the WPA.

“I just want it given back to the public so they can see it, because the public paid for it,” Brechin says.

“Public Knowledge: Take Part” is envisioned as a library treasure hunt. A map is available, to be stamped at each branch. There will also be four bicycle tours covering six to eight libraries per ride.

When the exhibition ends in March, “the hope is to put the model back together,” Lochman says. She has identified three locations big enough to hold it: the Light Court at City Hall, the Roberts Family Gallery at the new Howard Street entrance to SFMOMA, and the Ferry Building.

One location she did not mention is Treasure Island, where the model got its first exposure. The Golden

Gate International Exposition will celebrate its 80th anniversary beginning Feb. 18 and running into 2020. There is plenty of room for the scale model on the floor of the historic administration building.

“I think that is a lovely idea,” says Anne Schnoebelen, vice president of the Treasure Island Museum.

“Public Knowledge: Take Part”: Jan. 25 through March 25. San Francisco Public Library, 100 Larkin St., S.F., and all branches of the library. takepartSF.net.

Anyone with a missing piece of the San Francisco scale model or photograph of one can email publicknowledgesf@gmail.com.