CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Error 52-Fortran (http://www.cfd-online.com/Forums/main/108918-error-52-fortran.html)

PPPO November 5, 2012 03:45

Error 52-Fortran
 
Hi
"Error 52, Invalid character in field"
anyone seen this error?
It occurs when trying to read a data file:
http://designco.netne.net/img/e3197aae95c2.jpg
what's problem?

flotus1 November 5, 2012 04:41

My initial guess would be that the format of your data file does not meet the format declaration of the variables d, u or ff.

cdegroot November 5, 2012 11:13

Yeah you should put a format statement otherwise how is it going to know what to look for? Lets say you are reading 3 reals that are floating point numbers 12 spaces wide with 9 decimal places and are separated by 3 spaces you would use:

read(14,100) d(i),u(i),ff(i)
100 format(F12.9,3x,F12.9,3x,F12.9)


All times are GMT -4. The time now is 20:03.