- multiplying u and v with the coastal mask and multiplying with the
cell length (needs some thought dx = 1/2 (x_i - xi_1) + 1/2 (x_i+1 -
x_i) = 1/2 (x_i+1 - x_i_1) or so) gives all transports. The sum over the
area the full budget.
- Now use compressi to put the data onto two lines. Regridding to a new
grid to put the data onto one long line is the next step. Almost there.
That's clever! But, I don't know how to merge "dx*v" and "dy*u" to get a one-dimensional flux function. Suppose our coastline extends predominantly eastward so that the flux is mostly dx*v. But, it's not exactly eastward, so that we have to insert −dy*u when the coastline line extends northward and dy*u when the coastline extends southward. When the coastline temporarily extends northwestward, it's more complicated.
Regards,
Ryo