Figuring Out Missing Values in Fortran Array

  • Context: Fortran 
  • Thread starter Thread starter Azorio
  • Start date Start date
  • Tags Tags
    Fortran
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 4K views
Azorio
Messages
6
Reaction score
0
I am trying to figure out how to represent missing values in an array with a value I know won't be in there for example -99.9.

A sample of my code, is below. The array "pro" has been read in from a data file of numeric values. I need the do loop range to stay fixed because other parts of the array that I will be working with fill the range, but this specific part does not.

Code:
DO i=1,31
PRINT *, pro(1,3,i)
END DO

I have tried setting the array equal to -99.9 before the loop but all that prints is "*****".
 
Physics news on Phys.org
Azorio said:
I am trying to figure out how to represent missing values in an array with a value I know won't be in there for example -99.9.

A sample of my code, is below. The array "pro" has been read in from a data file of numeric values. I need the do loop range to stay fixed because other parts of the array that I will be working with fill the range, but this specific part does not.

Code:
DO i=1,31
PRINT *, pro(1,3,i)
END DO

I have tried setting the array equal to -99.9 before the loop but all that prints is "*****".

You need to post the entire code. The code that doesn't work
is what precedes these 3 lines.