Changes between Initial Version and Version 2 of Ticket #1302


Ignore:
Timestamp:
Aug 20, 2012, 3:16:56 PM (12 years ago)
Author:
neteler
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1302

    • Property Keywords r.out.ascii added
    • Property Milestone 6.4.16.4.4
  • Ticket #1302 – Description

    initial v2  
    66The error is probabely due to the format specification in the   fprintf   statements in the file   formspecific.c:
    77
     8{{{
    89******************************************************************
    910/* write MODFLOW ASCII ARRAY */
     
    2526            }
    2627******************************************************************
    27 
     28}}}
    2829
    2930For demonstrating the problem, see the next simple test program
    3031(I use MINGW gcc 4.5.2 for compiling):
    3132
     33{{{
    3234******************************************************************
    3335#include <stdio.h>
     
    4850}
    4951******************************************************************
     52}}}
    5053
    5154Running the above test  program, the result is:
    5255
     56{{{
    5357[1.2555e+0021.2555e+0021.2555e+0021.2555e+0021.2555e+002]
    5458[-1.2555e+002-1.2555e+002-1.2555e+002-1.2555e+002-1.2555e+002]
     59}}}
    5560
    5661Changing the format specification as follow:
    5762
     63{{{
    5864    printf("%*.*e", dp + 7, dp - 1, DCELL);
     65}}}
    5966
    6067the result became suitable:
    6168
     69{{{
    6270[ 1.2555e+002 1.2555e+002 1.2555e+002 1.2555e+002 1.2555e+002]
    6371[-1.2555e+002-1.2555e+002-1.2555e+002-1.2555e+002-1.2555e+002]
    64 
     72}}}
    6573
    6674Sincerely   Zoltan