added atmosphere discretization check/correction