Figuring Out Missing Values in Fortran Array

  • Context: Fortran 
  • Thread starter Thread starter Azorio
  • Start date Start date
  • Tags Tags
    Fortran
Click For Summary
SUMMARY

The discussion focuses on representing missing values in a Fortran array using a placeholder value of -99.9. The user encounters an issue where printing the array results in "*****" instead of the expected output. The problem arises from the need to ensure that the array is properly initialized and that the loop correctly accesses the intended elements. A complete code snippet is required for further troubleshooting.

PREREQUISITES
  • Understanding of Fortran programming language syntax
  • Familiarity with array initialization and manipulation in Fortran
  • Knowledge of handling missing data in numerical arrays
  • Experience with debugging techniques in Fortran
NEXT STEPS
  • Review Fortran array initialization techniques
  • Learn about handling missing values in Fortran arrays
  • Explore debugging methods for Fortran code
  • Investigate the implications of using placeholder values in numerical computations
USEFUL FOR

This discussion is beneficial for Fortran developers, data analysts working with numerical datasets, and anyone dealing with missing data representation in programming.

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 "*****".
 
Technology 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.
 

Similar threads

  • · Replies 20 ·
Replies
20
Views
4K
  • · Replies 4 ·
Replies
4
Views
8K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 13 ·
Replies
13
Views
5K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 19 ·
Replies
19
Views
7K
  • · Replies 4 ·
Replies
4
Views
2K