The Kadomtsev-Petviashvili (KP) equation is a partial differential  equation that describes nonlinear wave moves. It is known that  algebro-geometric approaches to the KP equation provide solutions  coming from a complex algebraic curve, in terms of the Riemann theta  function associated with the curve.  Reviewing this relation, I will introduce an algebraic object and discuss  its geometric features: the so-called Dubrovin threefold of a complex algebraic  curve, which parametrizes the solutions. Mentioning the relation  of this threefold with the classical algebraic geometry problem, namely the  Schottky problem, I will report a procedure that is via the threefold and based on numerical algebraic geometric tools, which can be  used to deal with the Schottky problem from the lens of computations. I will  finally focus on the geometric behaviour of the threefold when the underlying  curve degenerates.    This is joint work with Daniele Agostini and Bernd Sturmfels.