Compile error/warning then I/O syntax error

Compile error/warning then I/O syntax error


I am trying to build a meteorological model in a Linux cluster (Ubuntu 12.04) using Intel fortran compiler version 14.0.1. But when trying to compile fdgrib2 module I get this warning message:

/opt/intel/bin/ifort -c  -I. /usr/local/rams60/src/pre/fdgrib2/grib_get.f90
/usr/local/rams60/src/pre/fdgrib2/grib_get.f90(209): warning #8042: This argument must be of type character of length 1.   [TOKENS]
   print*,'5--'//trim(tokens(1)), len_trim(tokens(1)),ichar(tokens(1))
ar rs fdgrib2.a grib_get.o
rm -f grib_get.o

Despite this warning the fdgrib2 executable is built but when trying to run stops with another error message:

/usr/local/rams60/build/fdgrib2$ ./fdgrib2 -f DGRIB_IN2
 num args:           2
 GRIB to GDF converter
 Namelist file name: DGRIB_IN2
 GRIB file name    : ./gfs.t00z.pgrbf06.grib2
 WGRIB exec        :
       Assumimg GRIB 2   : /usr/local/grib2/wgrib2/wgrib2
 Data date/time    : 99999999  
 Forecast hour     : 99999999  
 3D variables: UGRD      VGRD      TMP       HGT       RH        
 2D variables:
forrtl: severe (59): list-directed I/O syntax error, unit -5, file Internal List-Directed Read
Image              PC        Routine            Line        Source             
fdgrib2            08076240  Unknown               Unknown  Unknown
fdgrib2            08074C94  Unknown               Unknown  Unknown
fdgrib2            08057847  Unknown               Unknown  Unknown
fdgrib2            0804BFA2  Unknown               Unknown  Unknown
fdgrib2            0804A827  Unknown               Unknown  Unknown          B72E94D3  Unknown               Unknown  Unknown

fdgrib2 process finishes at commands on grib_get.f90


 call tokenize_ws(lines(1),tokens,ntok)

		   nb = index(tokens(1),'=')+1

		   ne = len_trim(tokens(1))

		   read(tokens(1)(nb:ne),*) longdate 

I am not an expert fortran programmer so I am not sure how to deal with this. Any help would be greatly appreciated.

Thanks in advance

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Warnings don't stop compilation. The warning doesn't make a lot of sense to me, but I would need to see the declaration of TOKENS to understand it better. I tried guessing as to what you might have and could not reproduce a problem.

The run-time error means that the contents of the string didn't meet the formatting requirements for whatever datatype LONGDATE is. Without seeing the source, as well as the contents of the character variable, I can't help further.

Retired 12/31/2016

Thanks Steve for answering.

I have also asked this question in StackOverflow forum. Please, take a look at the discussion there. Had some suggestion that led to teh same conclusion about LONGDATE. You can also find links to tar files with code and input data (first tar, second tar)

Thanks again and best regards


Leave a Comment

Please sign in to add a comment. Not a member? Join today