A method of diagnosing a pump apparatus having a downhole pump disposed in tubing of a deviated wellbore, the downhole pump reciprocated in the tubing by a rod string operatively moved by an actuator at surface of the deviated wellbore, the method comprising: obtaining surface data indicative of surface load and surface position of the rod string at the surface; calculating downhole data from the surface data by solving a wave equation having viscous damping and Coulomb friction factors; accounting for a mechanical friction factor between the rod string and the tubing in the calculation of the downhole data; and generating information from the downhole data representative of downhole load relative to downhole position of the downhole pump, characterized in that accounting for the mechanical friction factor between the rod string and the tubing in the calculation of the downhole data comprises, with the use of a pump controller of limited processing capability installed on the pump apparatus at surface of the deviated wellbore: modelling (112, 114) a trajectory of the deviated wellbore; parameterizing segments of the deviated wellbore trajectory; identifying each of the parameterized segments in the trajectory of the deviated wellbore, mapping (120, 122, 124, 126, 128) the rod string to the trajectory of the deviated wellbore having the parameterized segments; computing forces (130, 140) experienced by the mapped rod string during operation relative to the parameterized segments using force equations characterized for pulling out and running in the mapped rod string, wherein for each of the identified segments, a different differential equation is solved for each of the pulling out and running in the mapped rod string to determine forces, and using the computed forces in the solution of the wave equation to calculate the downhole data. obtaining surface data indicative of surface load and surface position of the rod string at the surface; calculating downhole data from the surface data by solving a wave equation having viscous damping and Coulomb friction factors; accounting for a mechanical friction factor between the rod string and the tubing in the calculation of the downhole data; and generating information from the downhole data representative of downhole load relative to downhole position of the downhole pump, characterized in that accounting for the mechanical friction factor between the rod string and the tubing in the calculation of the downhole data comprises, with the use of a pump controller of limited processing capability installed on the pump apparatus at surface of the deviated wellbore: modelling (112, 114) a trajectory of the deviated wellbore; parameterizing segments of the deviated wellbore trajectory; identifying each of the parameterized segments in the trajectory of the deviated wellbore, mapping (120, 122, 124, 126, 128) the rod string to the trajectory of the deviated wellbore having the parameterized segments; computing forces (130, 140) experienced by the mapped rod string during operation relative to the parameterized segments using force equations characterized for pulling out and running in the mapped rod string, wherein for each of the identified segments, a different differential equation is solved for each of the pulling out and running in the mapped rod string to determine forces, and using the computed forces in the solution of the wave equation to calculate the downhole data. modelling (112, 114) a trajectory of the deviated wellbore; parameterizing segments of the deviated wellbore trajectory; identifying each of the parameterized segments in the trajectory of the deviated wellbore, mapping (120, 122, 124, 126, 128) the rod string to the trajectory of the deviated wellbore having the parameterized segments; computing forces (130, 140) experienced by the mapped rod string during operation relative to the parameterized segments using force equations characterized for pulling out and running in the mapped rod string, wherein for each of the identified segments, a different differential equation is solved for each of the pulling out and running in the mapped rod string to determine forces, and using the computed forces in the solution of the wave equation to calculate the downhole data.