These programs do weather routing, and produce a route that can be exported to OpenCPN in GPX format.OtVlm is a free, opensource, weather routing program, for Linux, Mac and Windows.
QtVlm Documentation and installation
QtVlm Sourceforge Download
OpenCpn Weather Routing Notes on working with qtVlm
OpenCpn Summary of Routes Transfer between OpenCpn and qtVlm, see bottom of page.
OpenCpn Grib Weather Plugin
Bluewater Racing is another free tool (currently only available on windows):