|VCS Scripts: Script Command: Loop|
The Loop command aids in making images of temporal sequences of variables by looping over indices (I,J,K,L,M,N). The effect is as if the following pseudo code were executed:
Loop I from i1 to i2 by di
Loop J from j1 to j2 by dj
Loop K from k1 to k2 by dk
Loop L from l1 to k2 by dk
Loop M from m1 to m2 by dm
Loop N from n1 to n2 by dn
Only those indices needed to create the desired effect and only the output command that is desired, if any, should be included. The increments di, dj, etc. need not be supplied if they are +1 or -1. The sign of the increment will be set according to the relative sizes of i1 and i2, j1 and j2, etc.; just the size of the increment is retained from the user input. Commas only need be included between successive arguments.
It is, of course, necessary that the single index or indices that are looped over be used in an array data attribute that will have an effect on an active display table entry; otherwise, the loop will have no effect. Note, as it is automatically assumed that the output files will be in `append' mode, the Raster, CGM, netCDF, HDF, and DRS commands need not specify the output mode as `append'.
Examples of using Loop scripts: