24 INTEGER,
PARAMETER :: double = selected_real_kind(p=14,
r=30)
25 real(kind=double),
allocatable ::
x(:),
y(:),
z(:)
26 INTEGER,
allocatable :: blockdims(:,:)
27 character*50 infile,outfile
28 real(kind=double) scalefactor
29 INTEGER numblocks, numnodes,
blocks,
i,
j,
k
31 Write(*,*)
"**********************************************************"
32 Write(*,*)
"This program is designed to take a GRIDGEN-generated text"
33 Write(*,*)
"grid file (.grd), and multiply every x, y, and z in the "
34 Write(*,*)
"file by a uniform factor. It was written to translate a "
35 Write(*,*)
"grid in millimeters to one in meters. "
36 Write(*,*)
"**********************************************************"
38 write(*,*)
'Enter Input File Name:'
40 write(*,*)
'Enter Output File Name:'
42 write(*,*)
'Enter Multiplicative Scale Factor for all x,y,z:'
48 WRITE(*,*)
"Ready to read numBlocks"
50 WRITE(*,*)
"numblocks = ", numblocks
51 allocate (blockdims(numblocks, 3))
53 WRITE(*,*)
"Read block dimensions."
58 WRITE(*,*)
"Write new block header in new file."
59 WRITE(11,102) numblocks
64 WRITE(*,*)
"Read and write block data."
67 WRITE(*,*)
"Processing block:",
blocks,
" out of ", numblocks,
" block(s)"
71 allocate (
x(numnodes),
y(numnodes),
z(numnodes))
73 READ(10,*) (
x(
i),
i=1, numnodes)
74 READ(10,*) (
y(
j),
j=1, numnodes)
75 READ(10,*) (
z(
k),
k=1, numnodes)
77 WRITE(11,101) (
x(
i)*scalefactor,
i=1, numnodes)
78 WRITE(11,101) (
y(
j)*scalefactor,
j=1, numnodes)
79 WRITE(11,101) (
z(
k)*scalefactor,
k=1, numnodes)
88 101
format(4(es19.11))
89 102
format(i8, 1
x, i8, 1
x, i8)
void int int REAL REAL * y
const std::string & unit() const
Obtain the unit of the attribute.
void int int int REAL REAL REAL * z
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE form
bool blocks
Input data is block-structured grid.