First off, I would say my knowledge of FORTRAN is novice. I am working in CFD research. I have looked at some resources, and conceptually, I know how to go about opening and reading files, but I am completely stumped on this one. Here's what I need to do (it may be more familiar for people with Plot3D experience)
- I have a 2D grid which is unfortunately split into two blocks. Each block is just a collection of gridpoints. The file is like this:
- Line 1 - number of blocks
- Line 2 - xmax ymax zmax (where these are the maximum number of gridpoints in each direction for the first block.
- Line 3 - xmax ymax zmax (same thing, but I have two blocks)
Then it has four columns, and it lists all of the x values for the first block, going across (x value 1 is in column 1, row 1, the fourth value is in the fourth column, at which point it goes to column 1, row 2)
After it lists the x values, it lists the y values, and finally the z values.
Here is what I need to do. I need to read in all the values from both blocks, then put them into order (think of a square grid with a chunk taken out. The chunks gridpoints are listed after the rest, and I need to put the points in where they should be).
And then I need to re-export the points back in the same format.
Thanks in advance for any help.
- I have a 2D grid which is unfortunately split into two blocks. Each block is just a collection of gridpoints. The file is like this:
- Line 1 - number of blocks
- Line 2 - xmax ymax zmax (where these are the maximum number of gridpoints in each direction for the first block.
- Line 3 - xmax ymax zmax (same thing, but I have two blocks)
Then it has four columns, and it lists all of the x values for the first block, going across (x value 1 is in column 1, row 1, the fourth value is in the fourth column, at which point it goes to column 1, row 2)
After it lists the x values, it lists the y values, and finally the z values.
Here is what I need to do. I need to read in all the values from both blocks, then put them into order (think of a square grid with a chunk taken out. The chunks gridpoints are listed after the rest, and I need to put the points in where they should be).
And then I need to re-export the points back in the same format.
Thanks in advance for any help.