The following code will show the problem. We are currently using formatter1 for many floats in Python. This can be a problem if the model code is reading fixed format. The problem shows up when using 1.e6 for DT0 for mt3d, for example. I'm working on a fix for this, but it is something to be aware of. formatter2 is better I think, but it is also problematic.
formatter1 = '{:10}'
formatter2 = '{:10f}'
numbers = [1.e6, 1000000000, 1.e30, 1.e-30]
for number in numbers:
n = float(number)
print 10 * '-'
print formatter1.format(n)
print formatter2.format(n)
output:
1000000.0
1000000.000000
1000000000.0
1000000000.000000
1000000000000000019884624838656.000000
0.000000
The following code will show the problem. We are currently using formatter1 for many floats in Python. This can be a problem if the model code is reading fixed format. The problem shows up when using 1.e6 for DT0 for mt3d, for example. I'm working on a fix for this, but it is something to be aware of. formatter2 is better I think, but it is also problematic.
formatter1 = '{:10}'
formatter2 = '{:10f}'
numbers = [1.e6, 1000000000, 1.e30, 1.e-30]
for number in numbers:
n = float(number)
print 10 * '-'
print formatter1.format(n)
print formatter2.format(n)
output:
1000000.0
1000000.000000
1000000000.0
1000000000.000000
1000000000000000019884624838656.000000
0.000000