Run
modlunit filename
on each mod file to check its units.
This is very important.
Even the simplest mechanisms can involve parameters and
variables that have strange and confusing combinations
of units. Unless you're very careful or very lucky,
it is all too easy to write code that looks OK
but produces results that are wrong by orders of magnitude
because of a missing or incorrect conversion factor.
The modlunit utility is provided to help detect and correct
such errors.
For instructions about how to fix units errors and how to define new units,
read this.