CFD Online Discussion Forums

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

PPPO November 5, 2012 02: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 03: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 10: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 14:09.