A numerical strategy for coarse-graining two-dimensional atomistic models at finite temperature: The membrane case