Writing to GrADS using Fortran

Mark gemark at GEORGE2.AS.NTU.EDU.TW
Thu Apr 21 02:21:27 EDT 2005


Hi Ed

In last email, I wrote the open file line as:
open(14,file='scatter.grd',form='unformatted',status='unknown',access='direc
t',recl=4*1)
Maybe the email editor had made something wrong.
The last declare in open file line is recl, you should change it,
from "recl=4*109" to "recl=4*1".
Many details in another email of this topics.
You can easily understand by reading those email.
Those nicely reply emails really help a lot!!!!!!

Mark


> Hi Mark, thanks for your reply, unfortunately I am not getting any
results.
>
> I change the fortran code to
>
>
open(14,file='scatter.grd',form='unformatted',status='new',access='direct',r
ecl=4*109)
> do itime=1, 109
>   write(14,rec=1+2*(itime-1))  IE(itime)
>   write(14,rec=2+2*(itime-1))  data1(3,itime+391)
> enddo
> close(14)
>
> with the following .ctl file
>
> DSET scatter.grd
> TITLE   HGT
> UNDEF   -99
> TDEF 109 LINEAR 1aug90 1mo
> XDEF 1 LINEAR 1 1
> YDEF 1 LINEAR 1 1
> ZDEF 1 LINEAR 1 1
>
> VARS 2
> IE 1 99 HT data
> data1 1 99 HT data
> ENDVARS
>
> when plotting the data, it only shows IE(1), all others IE(2 to 109) and
> data1(1 to 109) are still 0. Any ideas?
>
> Ed



More information about the gradsusr mailing list