http://www.fortran.com/F77_std/rjcnf0001-sh-13.html
breifly, you are writing three general (g) format floats per line. Each float has a total field width of 20 characters and 10 places to the right of the decimal. Large magnitude numbers are in exponential form.
The 1x
s are simply added spaces (which could as well have been accomplished by increasing the field width ie, g21.10
since the numbers are right justified. The 5x
puts an additional 5 spaces at the beginning of each line.
The somewhat tricky thing here is tha lead 1p
which is a scale factor. It causes the mantissa of all exponential form numbers produced by the following g
format to be multiplied by 10, and the exponent changed accordingly, ie instead of the default,
g17.10 -> b0.1234567890E+12
you get:
1p,g17.10 -> b1.2345678900E+11
b
denotes a blank in the output. Be sure to allow room for a -
in your field width count...
for completeness in the case of scale greater than one the number of decimal places is reduced (preserving the total precision) ie,
3p,g17.10 -> b123.45678900E+09 ! note only 8 digits after the decimal
that is 1p
buys you a digit of precision over the default, but you don't get any more. Negative scales cost you precision, preserving the 10 digits:
-7p,g17.10 -> b0.0000000123E+19
I should add, the p
scale factor edit descriptor does something completely different on input. Read the docs...