[Wrf-users] pb compiling WRF with GRIB2 on x86_64 GNU/Linux with gfortran
HEDDE Thierry
thierry.hedde at cea.fr
Thu Oct 1 08:06:39 MDT 2009
Hello dear wrf users,
I've got an F90 syntax error while compiling WRF 3.1.1 with the grib2 option on a x86_64 GNU/Linux machine using the gfortran compiler
It compiles OK with the ifort compiler.
It is a known error with gfortran : when you try to define an allocatable variable inside a TYPE definition.
I had a look at the io_grib2. file but it looks quite hard to modify in a simple way the fortran source to get rid of the error
Did anybody have the same problem and fixed it?
- Using another version of gfortran?
- Modifying the io_grib2.F file?
- Through other means???
Thanks a lot
---------------------------------------------------------------------------------------------------------------------------------------------------
Here is the configuration/version obtained with the gfortran -v instruction:
Target: x86_64-redhat-linux5E
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --with-gxx-include-dir=/usr/include/c++/3.4.3 --enable-libgcj-multifile --enable-languages=c,c++,java,f95 --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux5E
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)
---------------------------------------------------------------------------------------------------------------------------------------------------
Here is the extraction from compilation listing :
gfortran -I. -w -ffree-form -ffree-line-length-none -fconvert=big-endian -frecord-marker=4 -I. -Ig2lib -Ibacio-1.3 -I../io_grib_share -c grib2tbls_types.f90
rm -f io_grib2.o
/lib/cpp -C -P -traditional -I. -Ig2lib -Ibacio-1.3 -I../io_grib_share io_grib2.F > io_grib2.f90
gfortran -I. -w -ffree-form -ffree-line-length-none -fconvert=big-endian -frecord-marker=4 -I. -Ig2lib -Ibacio-1.3 -I../io_grib_share -c io_grib2.f90
In file io_grib2.f90:78
character (DateStrLen), dimension(:),allocatable :: Times(:)
1
Error: Attribute at (1) is not allowed in a TYPE definition
In file io_grib2.f90:109
make[4]: [io_grib2.o] Error 1 (ignored)
---------------------------------------------------------------------------------------------------------------------------------------------------
Io_grib2.f90 extract :
TYPE :: HandleVar
character, dimension(:), pointer :: fileindex(:)
integer :: CurrentTime
integer :: NumberTimes
integer :: sizeAllocated = 0
logical :: write = .FALSE.
character (DateStrLen), dimension(:),allocatable :: Times(:) !!!!!!!!!!!!!! here is the problem !!
logical :: committed, opened, used
character*128 :: DataFile
integer :: FileFd
integer :: FileStatus
integer :: recnum
real :: last_scalar_time_written
ENDTYPE
TYPE (HandleVar), dimension(maxFileHandles),SAVE :: fileinfo
---------------------------------------------------------------------------------------------------------------------------------------------------
Best regards
Thierry HEDDE
Laboratoire de Modélisation des Transferts dans l'Environnement
CEA/CADARACHE
DEN/DTN/SMTM/LMTE
Bât. 307 Pièce 69
13108 ST PAUL LEZ DURANCE CEDEX
FRANCE
Tél : 0(0 33)4 42 25 38 41
Secr : 0(0 33)4 42 25 70 10
Fax : 0(0 33)4 42 25 62 72
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/wrf-users/attachments/20091001/fa82bfcd/attachment.html
More information about the Wrf-users
mailing list