Writing to GrADS using Fortran
Mark
gemark at GEORGE2.AS.NTU.EDU.TW
Mon Apr 18 10:45:40 EDT 2005
Hi Ed
As your ctl file shows the 2 kinds of data you want to plot,
I think your fortran code should look like this:
open(14,file='scatter.grd',form='unformatted',status='unknown',access='direc
t',recl=4*1)
c
~~~~~~~~~~~~~
c
or status='new',
do itime=1,109
write(14,rec=1+2*(itime-1)) f1(itime)
write(14,rec=2+2*(itime-1)) f2(itime)
enddo
close(14)
Maybe you can try it. I wish this code can help you some.
Mark
> Hello
>
> I am trying to write two different time series into a .grd file so I can
> view them and for example do a scatter plot of the two time series in
Grads
>
> within the Fortran program, I do:
>
> open(14,file='scatter.grd',form='unformatted',access='direct',recl=4*109)
> write(14,rec=1)(IE(itime),itime=1,109)
> write(14,rec=2)(data1(3,it),it=392,500)
> close(14)
>
> but in Grads this just opens two time series, length 54 that take
> alternating values from one of my initial time vectors- in this case,
> IE(itime)
>
> My ctl file is:
> 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
> f1 1 99 HT data
> f2 1 99 HT data
> ENDVARS
>
> Any help is very much appreciated
>
> Ed
More information about the gradsusr
mailing list