Yes, you can do this by declaring a module-scoped variable with either a "desc" attribute or a "units" attribute attached (or both). The correct syntax is "(* desc="description" *) or (* units="unit" *) added to the declaration line at the beginning of the line.
"Module-scoped variable" means a variable declared after the "module" line but before the "analog begin" block.
If you look in the Xyce/utils/ADMS/examples directory, many of the CMC standard models contained there have output variables like gm, vth, etc. and you can see how they're defined,but those are not "simple" examples.
I am attaching a simple modification of the "
diode2.va" model included in the Xyce/utils/ADMS/example/toys directory. This model has the "Qd" internal variable declaration modified so that it can be output via N() to view the capacitor charge.
If you would like to see it in action, follow the directions for building the "toys" plugin, but replace
diode2.va in that directory with the attached version, and run the attached DiodeClipper.cir circuit which has had its .PRINT line modified to add the N(D1:Qd) variable to the output.