Fix a bug in the createPotentialTemperature method when there is no time
in the field and fix a bug that crops up with Yuan's recent change.