It is a challenging question to write down a function from real 3-dimensional space to the complex numbers such that the preimage if zero (say) is a given knot or link. If, in addition, the function appears as a solution of some physically interesting partial differential equation, or minimizes some physically motivated functional, then the knotted field might be realisable in nature. I will discuss our approach and (partial) solution this problem applied to such knotted fields in coherent optical fields (i.e. laser beams), but with applications to other systems such as knotted vorticity lines in fluids. If there is time, I will also describe how random fields (which model modes of chaotic wave systems) naturally contain a tangle of many knotted nodal lines.