Defining a function $g(x,y)$ in a 2 dimensional region $0<x<L$, $0<y<L$ and considering a periodic boundary condition for it so that
$g(x=0,y)=g(x=L,y)$ and $g(x,y=0)=g(x,y=L)$,
is it possible to find a function that satisfies the above boundary condition and gives a non-zero value for the below integral?
$\int_0^L \int_0^L dx dy \partial_x g(x,y) $
$\int_0^L \partial_x g(x,y) dx =g(L,y)-g(0,y)=0.$