About Fortrans program and a *.ctl in Linux systems
Jim Bao
z3bao at UWATERLOO.CA
Mon Jan 21 12:31:09 EST 2008
Hi,
Thanks, while use recl=4*33*17, it is working now; but while open
*.ctl, i meet some problem. Following is detail,
ga-> open /home/z3bao/dat1/dat2/test_a.ctl
Scanning description file: /home/z3bao/dat1/dat2/test_a.ctl
Open Error: Looking for ENDVARS statement
Instead, found:
--> The invalid description file record is:
--> endvars
Thanks
Zhenhao
The data file was not opened.
Quoting "M.Mahakur" <mmahakur at TROPMET.RES.IN>:
> Try with:
>
> recl=4*33*17 instead of 33*17 in your open(2,.... statement.
>
> Jim Bao wrote:
>
>> Dear GrADS Users,
>> I have a data, and want to use GrADS to make a figure. I know
>> the output has problem. But I don't know where is this problem.
>> Please you help me check it. Thanks a lot!
>> Here, attached two files, one is Fortran program in Linux system by
>> f77,
>> the other is *.ctl
>>
>> Best regards
>>
>> Zhenhao
>>
>> File-1
>> program rw
>> cccc
>> parameter (m=1, n1=33,n2=17)
>> real a(n1,n2,m)
>> open(2,file='/home/z3bao/dat1/dat2/read_test',
>> 1 form='unformatted',
>> + access='direct',recl=33*17)
>> open(1, file='/home/z3bao/dat1/dat2/olr_result',
>> 1 form='formatted')
>> do ii=1,m
>> do it=1,n2
>> do ib=1,n1
>> read(1,*) a(ib,it,ii)
>> write(6,*) a(ib,it,ii)
>> end do
>> end do
>> end do
>> cccc from January 1950 to Sep. 1995 totally 549
>> ii=1
>> cccc do ii=1,m
>> cccc do it=1,n2
>> ccccc do ib=1,n1
>> write(2,rec=1) ((a(ib,it,ii),ib=1,n1),it=1,n2)
>> cccccccc enddo
>> cccc enddo
>> cccc enddo
>> stop
>> end
>>
>> file-2
>> DSET ^/home/z3dat/dat1/dat2/read_test
>> TITLE Gridded Data
>> UNDEF -999.0
>> XDEF 33 linear 80 2.5
>> YDEF 17 linear 20 2.5
>> ZDEF 1 levels 700
>> TDEF 1 linear 00z01apr85 6hr
>> VARS 1
>> hgt 1 99 U component
>> endvars
>>
More information about the gradsusr
mailing list