I am trying to decompose a wind field (u,v) into the irrotational and non-divergent fields (uchi, vchi, upsi, vpsi). This field is global, and in the form (time, level,lat,l