For a given partition $[n\_{1},...,n\_{k}]$ of $N \in \mathbb{N}$ there exists a corresponding nilpotent orbit variety $O\_{[n\_{1},...,n\_{k}]}$ in $\mathfrak{gl}(N)$ which can be represented by a set of polynomial equations relating the conditions on matrices in $\mathfrak{gl}(N)^{\text{nilp}}$. I was wondering if anyone has implemented the computation of nilpotent orbit varieties in Sage or Magma, because otherwise I am going to make my own code for doing so. If you happen to know of any references, that would help!



Sage or Magma Implementation of Nilpotent Orbit Varieties
I don't know how this would help "constructing local weak Neron models for the varieties given as output of the program", but the defining equations of the nilpotent varieties are known. They were conjectured by Tanisaki and proved by Weyman in 


[The equations of conjugacy classes of nilpotent matrices](http://www.ams.org/mathscinet-getitem?mr=1016262), Invent. Math. 98:2 (1989).


Weyman's later book, [Cohomology of vector bundles and syzygies](http://www.ams.org/mathscinet-getitem?mr=1988690), contains a complete exposition.


The easiest way to describe the equations on a matrix $A$ in the nilpotent variety is by saying that the characteristic polynomial of $A$ is equal to $\lambda^N$ and for $1\leq k\leq N-1$, the order $k$ minors of $\lambda I\_N-A$ are divisible by $\lambda^{d\_k}$, where $d\_k$ is an integer given by a simple formula in terms of the parts of the corresponding partition. 


(These generators for the defining ideal are $Ad$-invariant but not minimal, and there is an alternative system, also non-minimal, whose definition involves the inverse matrix $(\lambda I\_N -A)^{-1}$, that may be better computationally.)


