The sep module provides some additional functionality to support N-dimensional programming. The function sep_dimension takes the file tag (defaulted to "in" - the standard input) and returns the effective number of dimensions in the SEPlib file. Additionaly, from_par, from_history, to_history, and other parameter handling routines accept not only scalar arguments, but also arrays of values. If iarr is an array of integer values, then
call from_par ("arr",iarr)whill fill iarr with parameter values 1, 5, 3, when the command line (or a parameter file) has either a comma-separated list arr=1,5,3 or distinct values arr1=1, arr2=5, arr3=3. This convention can be handy for reading all the dimensions from a file:
allocate (n (sep_dimension ())) call from_history ("n",n)It also works with to_history: short arrays are written to the history file as comma-separated lists, while long arrays are expanded as distinct parameters.
A suite of N-dimensional programs (using the sep module) accompany the current revision of Claerbout's Geophysical Estimation Mapping .