These plants look somewhat like pineapples, but they are pinuelas, also called piros. They are 1 - 1.5 meters (3-4.5 ft.) high and, as shown in this photo, they grow in very thick patches.
They are native to the dry forest lowland areas of Guanacaste, from sea level up to about 800 meters (2,500 ft.), growing in areas partly shaded by trees. The scientific name is bromelia pinguin.
Tomorrow and the next day I will show the fruit and a close-up of a leaf. This patch happened to be along a hike in Rincon de la Vieja National Park, although patches of pinuelas can be seen in many places in the region around Tamarindo.