How to manipulate and save data in shaderbuffers

I can access bufferdata with a shader, and use it within the shader code, but how could I save updated data into back the same buffer with the shader?

Im trying to buld some Lattice Boltzmann simulations in this manner:
0. Make buffers for the simulation data.

  1. Feed data into shaders where you do the parallel calculations.
  2. Somehow save the updated data back into the buffer.
    (visualise)
  3. back to step 1.

I have understood one can use layouts to access data. Something like (if A1 is the buffer with the Id 0):

layout(binding = 0) buffer dcA1 { float A1 [ ]; };

after which the changes I make to buffer A1 will stay there. (I think this would be the format used in openframeworks).

But I don’t get these layout locations to work with Processing. I also could not find Processing examples on this.