Fortran 95 question about dimension error

Click For Summary
SUMMARY

The discussion addresses a dimension error (error 542) encountered in Fortran 95, specifically regarding the variables I and J used in the context of a numerical solution for the heat diffusion equation via the Crank-Nicolson method. The error indicates that these variables are not recognized as valid dummy arguments or accessible variables. The issue arises when attempting to reference temperature values in a two-dimensional array T(i,j), which requires proper declaration and context for the indices used.

PREREQUISITES
  • Understanding of Fortran 95 syntax and variable declaration
  • Familiarity with numerical methods, particularly the Crank-Nicolson method
  • Knowledge of array indexing in Fortran
  • Experience with debugging and troubleshooting Fortran programs
NEXT STEPS
  • Review Fortran 95 variable declaration rules
  • Study the implementation of the Crank-Nicolson method in Fortran
  • Learn about array handling and indexing in Fortran 95
  • Explore debugging techniques specific to Fortran programming
USEFUL FOR

This discussion is beneficial for Fortran developers, numerical analysts, and anyone involved in implementing numerical solutions for differential equations using Fortran 95.

loukoumas
Messages
14
Reaction score
0
error 542, J appears in the dimension of a variable,yet is not a dummy argument,a variable available through USE or CONTAINS association,a COMMON variable,a PARAMETER,or a PURE FUNCTION
the same error about I
i am using i,j in order to point the temperature in length and time T(i,j)
it is a numerical solution for the heat diffusion equation that uses the previous and the next value according to length of temperature and the previous value of temperature according to time( Crank-Nicolson method)
 
Technology news on Phys.org
It's going to be hard to troubleshoot your program without a listing.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
17K
  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 11 ·
Replies
11
Views
12K
  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 22 ·
Replies
22
Views
5K