wi function

Calculate warm index and cold index