added function to compute a horizontal flux budget over a region
updated functions