Refactored weather parameter and unit code.