Running this test [test2.txt](https://github.com/UV-CDAT/uvcdat/files/65625/test2.txt) produces  Uncommenting the line that sets bg to 1 fixes the problem.
Running this test

test2.txt
produces
Uncommenting the line that sets bg to 1 fixes the problem.