Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29262 Discussions

iforrtl: severe (67): input statement requires too much data, unit 60

xyoby
Beginner
2,534 Views
Hi Support

The following lines is part of my program.

c-----------------------------------------------------------------------
c
c ..avhrr mcsst observations
c
else if (obs_typ(1:5) .eq. 'mcsst') then
file_name = 'report.mcsst.' // file_dtg
len = len_trim (file_name)
open (45, file=file_name(1:len), status='unknown',
* form='formatted')
write (45, '('' ****** Reading MCSST Data ******'')')
write (45, '('' file date time group: '', a)') file_dtg
write (45, '('' data directory path: '', a)')
* data_dir(1:len_dir)
file_name = data_dir(1:len_dir) // '/mcsst/' //
* file_dtg // '.mcsst'
len = len_trim (file_name)
inquire (file=file_name(1:len), exist=exist)
if (exist) then

open (UNIT, file=file_name(1:len), status='old',
* form='unformatted', convert='big_endian')

write(*,*) ' EXIST FILE...', len
read (UNIT) n_obs, n_lvl, n_vrsn
write(*,*) 'AFTER...'

write (45, '('' number mcsst obs: '', i10)') n_obs
write (45, '('' max number levels: '', i10)') n_lvl
write (45, '('' file version number: '', i10)') n_vrsn
if (n_obs .gt. 0) then
call rd_mcsst (UNIT, n_obs, n_vrsn)
endif
close (UNIT)
else
write (err_msg, '(''file "'', a, ''" does not exist'')')
* file_name(1:len)
call error_exit ('OCN_OBS', err_msg)
endif
c-----------------------------------------------------------------------

The problem occur after the line where is included the next sentece:

write(*,*) "EXIST FILE", len

I read a file when i run the program. I didnt have this problem two month ago with the same file, how ever now this is the error message:


forrtl: severe (67): input statement requires too much data, unit 60, file /home
/xyoby/data/feroe/mcsst/2002012400.mcsst
Image PC Routine Line Source
ocn_obs.out 080A15D6 Unknown Unknown Unknown
ocn_obs.out 080A0435 Unknown Unknown Unknown

Help me please

Thanks you

Xyoby


0 Kudos
4 Replies
Steven_L_Intel1
Employee
2,534 Views

The error is happening on the READ which follows the WRITE you mention. It is complaining that the total size of the variables you have asked to read exceed the size of the record. It could be that the file is corrupt or that it is not in the form expected.

Do an "od -t x4" on the data file to see what the first few 32-bit chunks are. I would expect to see something like:

0C000000 data data data 0C000000

0 Kudos
xyoby
Beginner
2,534 Views
Hi.

I did "od -t x4" on the two different data file, with one of them it works well and with other no.

the firts data file (correct file) show:
linux:/home/xyoby/data/feroe/mcsst # od -t x4 2002080300.mcsst | head
0000000 0c000000 e0d80400 01000000 01000000
0000020 0c000000 80631300 00000000 00000000
0000040 00000000 00000000 00000000 00000000
*
0161140 02000000 00000000 00000000 02000000
0161160 00000000 00000000 00000000 00000000
*
0161240 00000000 00000000 02000000 02000000
0161260 02000000 00000000 00000000 00000000
0161300 00000000 00000000 00000000 00000000

and the other file (wrong file):
linux:/home/xyoby/data/feroe/mcsst # od -t x4 2002040300.mcsst | head
0000000 08000000 63340500 01000000 08000000
0000020 8cd11400 00000000 00000000 00000000
0000040 00000000 00000000 00000000 00000000
*
0136300 00000000 00000000 05000000 05000000
0136320 00000000 00000000 05000000 00000000
0136340 00000000 00000000 00000000 00000000
*
0136420 00000000 05000000 00000000 00000000
0136440 00000000 05000000 05000000 05000000

I believe the error is something about expiration of programs. It could be this??, because it worked well and now nothing?

thanks for your help
0 Kudos
xyoby
Beginner
2,534 Views
Hi.

I did "od -t x4" on the two different data file, with one of them it works well and with other no.

the firts data file (correct file) show:
linux:/home/xyoby/data/feroe/mcsst # od -t x4 2002080300.mcsst | head
0000000 0c000000 e0d80400 01000000 01000000
0000020 0c000000 80631300 00000000 00000000
0000040 00000000 00000000 00000000 00000000
*
0161140 02000000 00000000 00000000 02000000
0161160 00000000 00000000 00000000 00000000
*
0161240 00000000 00000000 02000000 02000000
0161260 02000000 00000000 00000000 00000000
0161300 00000000 00000000 00000000 00000000

and the other file (wrong file):
linux:/home/xyoby/data/feroe/mcsst # od -t x4 2002040300.mcsst | head
0000000 08000000 63340500 01000000 08000000
0000020 8cd11400 00000000 00000000 00000000
0000040 00000000 00000000 00000000 00000000
*
0136300 00000000 00000000 05000000 05000000
0136320 00000000 00000000 05000000 00000000
0136340 00000000 00000000 00000000 00000000
*
0136420 00000000 05000000 00000000 00000000
0136440 00000000 05000000 05000000 05000000

I believe the error is something about expiration of programs. It could be this??, because it worked well and now nothing?

thanks for your help
0 Kudos
Steven_L_Intel1
Employee
2,534 Views
The wrong file has only two values in the first record (record length of 8) and the good file has three (length 12). It has nothing to do with the program - your data file is bad (or at least does not match what the program wants.) I believe you are mistaken to think that it worked before.
0 Kudos
Reply