The International Maritime Organization (IMO) identifies speed optimization as a key operational measure for achieving energy efficiency through reduced emissions. Ocean Liner services have fixed port rotations and schedules. While the speed can be optimized for emissions, the service level in terms of schedules arrival and departure need to be carefully considered not to loose market share. This already challenging problem is further complicated when dynamic weather conditions along the service route are considered. In fact, few contributions can be found that address this issue. We study the operational problem of dynamically determining a vessel's speed, departure time and arrival time at each port of call under dynamic weather conditions. We model the minimization of cost, namely bunkering costs and early and delayed departure and arrival penalties, using calculus of variations. The proposed algorithm leverages upon a discretization technique based on the Weierstrass-Erdmann condition. The numerical tests show the efficiency and effectiveness of this algorithm over standard techniques like IVP.