Unless there is a strongly compelling reason to write a main program, writing a subroutine is definitely the way to proceed. This section gives two words. It requires that you write some Ingrid code that specifies how the grids, names, etc, of the streams should be manipulated. Ingrid will apply this function to scalars or streams or a limited mixture. NIN is the number of input streams, and NOUT is the number of output streams.
NAME is defined within the current object.
Ultimately this is simple, but it requires a lot of explanation. We now need to make m calls to NewBuffer , one for each output buffer. OUT1 through OUTm are always streams. For example, suppose we want to write a simple filter that operates on XY blocks of data, reading in an XY block and returning the same size XY block. On the other hand, suppose we wanted to write the filter so that we could apply it to any two dimensions, not just X and Y .