I was trying to run a FORTRAN script related to LODCA model under Linux Red Hat. I have compiled the code (attached) without problems, but when executing I got this error message:
bash-3.00$ pgf90 -o Read2006jan-feb Read2006jan-feb.f
bash-3.00$ ./Read2006jan-feb
k========= 1
PGFIO-F-209/unformatted read/unit=10/‘OLD’ specified for file which
does not exist. In source file Read2006jan-feb.f, at line number 68
I would greatly appreciate any advice about how to solve this error.
Thanking you very much for your cooperation,
my email carlos.ruizvasquez@gmail.com
el codigo es el siguiente:
in FORTRAN:
program read0
parameter (l=720,m=301,nx=381,ny=125,hbad0=-9999.0,
$ hbad=9999.0,nt=1)
real u(l,m), v(l,m), upac(nx,ny), vpac(nx,ny)
character10 NDATE
character17 NAME
character*19 NAMEP2
c ouverture de fichier de sortie data
open(unit=12,
A file=‘2006/u.381125x117f’,
A form=‘FORMATTED’,
A status=‘unknown’)
open(unit=13,
A file=‘2006/v.381125x117f’,
A form=‘FORMATTED’,
A status=‘unknown’)
c ouverture de fichier de sortie dat2
open(unit=24,
A file=‘2006/datex117’,
A form=‘FORMATTED’,
A status=‘old’)
do k=1,nt
print *,‘k=========’,k
READ(24,‘(A10)’) NDATE
777 format(‘A10’)
c if (k.le.362) then
c NAME=‘2005/’//NDATE(3:10)//‘.d’
c OPEN(unit=10, FILE=NAME, form=‘UNFORMATTED’,status=‘old’)
c endif
if (k.gt.362) then
NAMEP2=‘2006/’//NDATE(1:8)//‘.NRT’
OPEN(unit=10, FILE=NAMEP2, form=‘UNFORMATTED’,status=‘old’)
endif
read(10) ((u(i,j),i=1,l),j=1,m)
read(10) ((v(i,j),i=1,l),j=1,m)
close(10)
c - extract Pacific
c 221 pour 110E; 601 pour 300E
c 89 pour 31S; 213 pour 31N
do i=221,601
do j=89,213
upac(i-220,j-88)=u(i,j)
vpac(i-220,j-88)=v(i,j)
enddo
enddo
print *,‘upac(100,62)====’,upac(100,62)
write(12,) upac
write(13,) vpac
enddo
end