FORTRAN IV DATA statements

Stephan Buchert scb@irfu.se
Tue Sep 1 12:54:00 GMT 2009


Hi,

gfortran fails to compile the
C     -----------
C        Neutral Atmosphere Empirical Model from the surface to lower
C        exosphere

The offending lines are
      COMMON/DATIME/ISDATE(3),ISTIME(2),NAME(2)
      DATA ISDATE/'01-F','EB-0','2   '/,ISTIME/'15:4','9:27'/
and the like (ISDATE implicitly declared a 3 element integer array and
expected to hold a 12 character long string).

(the complete code can be downloaded from
ftp://hanna.ccmc.gsfc.nasa.gov/pub/modelweb/atmospheric/msis/nrlmsise00/
and a description of the model is at
http://www.nrl.navy.mil/content.php?P=03REVIEW105 )

I believe that such DATA statements were allowed in FORTRAN IV and
FORTRAN 66, at least I have seen them frequently in the past. They seem
to be illegal in FORTRAN 77:

http://www.fortran.com/F77_std/rjcnf-9.html#sh-9.2

However, g77 does compile the NRLMSISE-00 code (albeit with warnings due
to other "clever" constructs).

Is there a way to get the NRLMSISE-00 code compiled with gfortran or is
the no longer maintained g77 presently the only option within gcc? If
yes, I would suggest to add an option to gfortran that allows to compile
even FORTRAN 66/IV programs, if that is not too much work.

I'm using
> gfortran -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap
--enable-shared --enable-threads=posix --enable-checking=release
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada
--enable-java-awt=gtk --disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic
--with-arch_32=i586 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC)



-- 
Stephan Buchert <scb@irfu.se>
Swedish Institute of Space Physics



More information about the Fortran mailing list