How to add a n-mosfet subckt model in gschem ngspice?
What happens when you generate the netlist if you use device=NMOS_TRANSISTOR is gnetlist assumes it's looking for a MODEL definition even though you are loading a SUBCKT. gnetlist will then "correct" refdes=Q1 to MQ1 and fail to find the model. In fact, even if you explicitly make refdes=X1 it will change it to MX1.

The solution is instead to use device=SUBCKT_NMOS and refdes=X1 and you will find gnetlist leaves it alone.

Re: [Ngspice-users] Adding attributes to subcircuit that show up in netlist


  This has been quietly included since 2011 and is present in the gaf
  1.8 stable release.


Emphasis added ;)