Energy norm in NWP optimization