Hello everyone,
I am trying to output the following part in my code into .dat file
I expected to have one column in my output file, however, I am getting seven columns with different data
Can you explain it? is it related to use IJK index?
How can I make do loop to get the data in x direction and y direction?
cgw
September 20, 2022, 2:26pm
#2
How many solids phases have you defined? T_s
is a 2-dimensional array, the first index is cell number (IJK), the second is solids phase.
one, so it is written on my code t_s(IJK, 1)
cgw
September 20, 2022, 3:37pm
#6
It’s just printing the values of the t_s array one after the other. There are no columns, possibly you are seeing an artefact of text-wrapping on your display (try changing your screen width).
I’m not really sure what you want here, but if you want the numbers one per line, you need to either use a FOR loop, or write with a format descriptor other than *
- see this posting for example https://stackoverflow.com/questions/51534237/controlling-newlines-when-writing-out-arrays-in-fortran
1 Like