The Fortran program EQUIB solves the statistical equilibrium equation for each ion and yields atomic level populations and line emissivities for given physical conditions, namely electron temperature and electron density, appropriate to the zones in an ionized nebula where the ions are expected to exist.
https://ui.adsabs.harvard.edu/abs/1981ucl..rept.....H and https://ui.adsabs.harvard.edu/abs/2016ascl.soft03005H