Events held in ski areas or high mountains often have long climbs that take 20 to 60 minutes, or more, to complete. These events require strong muscular endurance or time-trial-type efforts. If you plan to race an event that has this kind of profile, but your local mountain biking venue lacks long climbs, you need to do muscular endurance training on the road bike.
If your goal race has short, steep climbs followed by technical downhill sections, doing well at this type of event typically requires the ability to put out a strong, effort that is above lactate threshold. That high effort is followed by the ability to descend while keeping intensity levels high. In other words, the downhill sections are not used for recovery.
These strong efforts that range from one to three minutes long can be trained on the road or on the mountain bike—at least initially. As race day gets closer, this kind of training needs to be done on a mountain bike and should include clearing obstacles that are similar to the race course technical sections if possible.