[Wrf-users] pb compiling WRF with GRIB2 on x86_64 GNU/Linux with gfortran
alberto giacomini
albi.jk at gmail.com
Tue Oct 6 08:14:02 MDT 2009
On Thu, Oct 1, 2009 at 4:06 PM, HEDDE Thierry <thierry.hedde at cea.fr> wrote:
> 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?
maybe substituting the Times definition (in external/io_grib2/io_grib2.F):
! character (DateStrLen), dimension(:),allocatable :: Times(:)
character (DateStrLen), pointer :: Times(:)
and using associated() instead of allocated:
! if (allocated(fileinfo(DataHandle)%Times)) then
! deallocate(fileinfo(DataHandle)%Times)
if (associated(fileinfo(DataHandle)%Times)) then
deallocate(fileinfo(DataHandle)%Times)
it compiles with gfortran 4.1.2 but i don't know if it really works
More information about the Wrf-users
mailing list