[MITgcm-devel] fortran namelist syntax & gfortran

Ed Hill ed at eh3.com
Thu Nov 24 11:31:48 EST 2005


Hi folks,

I've been trying to get MITgcm working smoothly with gfortran:

  http://gcc.gnu.org/fortran/

and the only remaining problem has been the reading of arrays-of-strings
in namelists which I've discussed before and is detailed in this bug
report:

  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24459

Today one of the GCC developers contacted me and explained that the F95
standard requires syntax such as either:

   # valid Fortran-95 with no ending index
   &diags
   names(1:,1) = 'ETAN    ','ETANSQ  ','DETADT2 ','PHIBOT  ',
   /

or
   
   # valid Fortran-95 with an ending index
   &diags
   names(1:4,1) = 'ETAN    ','ETANSQ  ','DETADT2 ','PHIBOT  ',
   /

I've verified that essentially all the compilers we use (g77, Intel,
etc.) are happy with the latter ending-index-included syntax and that
g77, in particular, is not happy with the former no-ending-index syntax.

So, if there are no objections, I'll cleanup our namelist syntax
everywhere in MITgcm/verification so that it uses the standards-
compliant F95 array triplets.  This will allow us to continue using all
the compilers that we already use (including g77) and will allow us to
start using gfortran -- which will then be added to our daily tests.

Ed

-- 
Edward H. Hill III, PhD
office:  MIT Dept. of EAPS;  Rm 54-1424;  77 Massachusetts Ave.
             Cambridge, MA 02139-4307
emails:  eh3 at mit.edu                ed at eh3.com
URLs:    http://web.mit.edu/eh3/    http://eh3.com/
phone:   617-253-0098
fax:     617-253-4464




More information about the MITgcm-devel mailing list