write/internal file/attempt to read/write past end of record

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
youngstor
Posts: 29
Joined: Mon Mar 01, 2010 2:11 pm
Location: Georgia

write/internal file/attempt to read/write past end of record

#1 Unread post by youngstor »

Hi ROMS,

Can someone please help me take a look at the error msg, and tell me what was wrong?

I am supplying monthly climatology and forcing to ROMS, and 'ocean_time' is equal to:

Code: Select all

ocean_time =

    15
    45
    75
   105
   135
   165
   195
   225
   255
   285
   315
   345
All the other time variables (such as swf_time, sms_time ) are the same with 'ocean_time'.

I am getting the following error when I run the model:

Code: Select all

    GET_NGFLD   - salinity northern boundary condition,      t =    45 00:00:00
                   (Rec=0002, Index=1, File: ccs-szone-bry.nc)
                   (Tmin=         15.0000 Tmax=        345.0000)
                   (Min =  3.31278028E+01 Max =  3.46712075E+01)

  GRID  STEP   Day HH:MM:SS  KINETIC_ENRG   POTEN_ENRG    TOTAL_ENRG    NET_VOLUME

   1   17280    15 00:00:00  8.766720E-05  1.506506E+04  1.506506E+04  3.900355E+13
PGFIO-F-219/formatted write/internal file/attempt to read/write past end of record.
 In source file output.f90, at line number 90
--------------------------------------------------------------------------
mpirun has exited due to process rank 0 with PID 7170 on
node node17 exiting without calling "finalize". This may
have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).
I truly appreciate your help!

Thanks,
Xiufeng

User avatar
kate
Posts: 4090
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: write/internal file/attempt to read/write past end of re

#2 Unread post by kate »

The model has happily read your boundary conditions and has started the timestepping loop. It is failing in output.f90. It was even so kind as to tell you the line number. You should go to your build directory and look at line 90 of output.f90. Mine has:

Code: Select all

WRITE (HIS(ng)%name,10) TRIM(HIS(ng)%base), ifile
This could be consistent with your error, which is about writing past the end of a record. What is the HISNAME in your ocean.in?

youngstor
Posts: 29
Joined: Mon Mar 01, 2010 2:11 pm
Location: Georgia

Re: write/internal file/attempt to read/write past end of re

#3 Unread post by youngstor »

Hi Kate,

I have the same thing at line 90 of output.f90:

Code: Select all

              WRITE (HISname(ng),10) HISbase(ng)(1:lstr-3),ifile
Here is my HISNAME in ocean.in:

Code: Select all

     HISNAME == /nas/xyang44/coawst/Projects/test_indv_grd_full_run/output/test_ca_his_level1.nc 


Is it because it is too long? Is there is length limit for file names in ocean.in?

Thanks,
Xiufeng


kate wrote:The model has happily read your boundary conditions and has started the timestepping loop. It is failing in output.f90. It was even so kind as to tell you the line number. You should go to your build directory and look at line 90 of output.f90. Mine has:

Code: Select all

WRITE (HIS(ng)%name,10) TRIM(HIS(ng)%base), ifile
This could be consistent with your error, which is about writing past the end of a record. What is the HISNAME in your ocean.in?

youngstor
Posts: 29
Joined: Mon Mar 01, 2010 2:11 pm
Location: Georgia

Re: write/internal file/attempt to read/write past end of re

#4 Unread post by youngstor »

Hi Kate,

I made the HISNAME shorter, and the model was able to run OK. Apparently the HISNAME is not supposed to be too long. But I am still very curious what's the length limit? I don't see anywhere this is mentioned in wikiroms.

Thanks,
Xiufeng
kate wrote:The model has happily read your boundary conditions and has started the timestepping loop. It is failing in output.f90. It was even so kind as to tell you the line number. You should go to your build directory and look at line 90 of output.f90. Mine has:

Code: Select all

WRITE (HIS(ng)%name,10) TRIM(HIS(ng)%base), ifile
This could be consistent with your error, which is about writing past the end of a record. What is the HISNAME in your ocean.in?

User avatar
kate
Posts: 4090
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: write/internal file/attempt to read/write past end of re

#5 Unread post by kate »

I think the length changed between ROMS versions. The latest has 256 characters for all file names (in inp_par.F):

Code: Select all

character (len=256), intent(in) :: Fname(100)

youngstor
Posts: 29
Joined: Mon Mar 01, 2010 2:11 pm
Location: Georgia

Re: write/internal file/attempt to read/write past end of re

#6 Unread post by youngstor »

In the version I use, 'inp_par.F' has:
character (len=160) :: fname, line
so my previous HISNAME is still shorter than the limit. Somehow I got the feeling that 'ocean.in' file has a length limit for each line ?

kate wrote:I think the length changed between ROMS versions. The latest has 256 characters for all file names (in inp_par.F):

Code: Select all

character (len=256), intent(in) :: Fname(100)

User avatar
kate
Posts: 4090
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: write/internal file/attempt to read/write past end of re

#7 Unread post by kate »

The place to look is function decode_line in inp_par.F:

Code: Select all

character (len=*), intent(in) :: line_text
character (len=256), dimension(200), intent(inout) :: Cval

Post Reply