What does (8000,4) represent?

What does (8000,4) represent in the following command if Fortran?

COMMON/QUAKE/QKE(8000,4),ERR(8000,4),YR(8000),DL(8000),TH(8000).

It is a declaration, not a command and it allocates space for 2 dimensional array “QKE” with 32,000 elements. Depending on other declarations it might be any of the possible data types and is accessible from any other program unit that has a “QUAKE” common block declared. You want to learn more about “common blocks”, a feature of fortran that has existed at least in Fortran 66.

2 Likes

Welcome to Fortran Discourse! Although the immediate question has been answered, it may be useful to say that we started replacing common blocks with modules about 30 years ago, and if you are trying to modernize some code, this is a good place to ask questions. Good luck

1 Like

Others have answered the question. Here is a style suggestion.

What is the physical meaning of the 8000 and the 4? Is 8000 the size of some grid? Then write

integer, parameter :: ngrid = 8000
COMMON/QUAKE/QKE(ngrid,4),ERR(ngrid,4),YR(ngrid),DL(ngrid),TH(ngrid)

It makes the code easier to understand and to change, if you want to change ngrid.

This was suggested on Twitter @FortranTip.

1 Like

Thank you Sir. Your comment was much helpful