| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| build | 2014-02-04 | 148 Bytes | |
| README | 2013-10-30 | 2.5 kB | |
| reorder_rows.f90 | 2007-04-17 | 8.5 kB | |
| 3D-table.dat | 2007-01-24 | 2.6 MB | |
| Totals: 4 Items | 2.6 MB | 0 | |
REORDER_ROWS Description:
Purpose:
Reorder the (significant) rows in a tabulation so that the leading n
columns (presumed to be coordinates of a rectangular table for one or
more equal-sized "blocks") vary most rapidly in a different way.
The number of dimensions, n, may be 2 or 3 initially, but this could be
extended up to 7, which is the Fortran limit on number of subscripts.
This was prompted by a need to reorder an aerothermal database so that
the first 3 columns vary in the Fortran order (column 1 most rapidly,
column 2 next most rapidly, and so on).
File names, etc., are prompted for - there is no control file.
Strategy:
Header records tell how many dimensions, subtables, etc., but the number
of pure text lines heading each subtable is prompted for, along with the
desired output order.
All lines are read as character strings and stored in arrays for writing
in the specified order.
The column order is preserved; see "extract_columns" for revising it.
Sample Input (aerothermal database):
2 # surface points (1: stagnation, 2: shoulder) (# subtables)
11 # alphas
25 # Machs
19 # dynamic pressures
// Point: 1 triangle: 5371 3.41388 0.0434033 -1.56086, id = 1010
Alpha Mach Qbar Temp Press Ch
(deg) (-) (atm) (deg.K) (Pa) (Kg/s-m2)
147 1.3 1e-06 121.856 0.221915 8.21526e-05
147 1.3 1e-05 155.482 2.21892 0.000264979
147 1.3 0.0001 205.681 22.1908 0.000864174
: : : : : :
147 1.3 0.475 320.558 105399 0.141527
147 2.0 1e-06 194.261 0.187776 8.98921e-05
: : : : : :
The example shown has column 3 values varying most rapidly and column 1
values varying least rapidly. Enter 321 at the appropriate prompt for
the existing order or permutation.
To change the row order so that the 2nd column values vary most rapidly
and the 3rd column values least rapidly, enter 213 as the desired output
permutation.
History:
04/14/07 D.Saunders Initial implementation for ndims = 2 and 3.
Author: David Saunders, ELORET Corporation/NASA Ames Research Center, CA