<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3268" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2><FONT face=宋体>pay attention to the following 2
rows</FONT></FONT></DIV>
<DIV><FONT face=宋体
size=2>***************************************************</FONT> </DIV>
<DIV><FONT face=Arial size=2>10 read(8,9000,end=90)
iyear,imonth,stid,rlat,rlon,rval,rval2</FONT></DIV>
<DIV><FONT face=Arial size=2> 9000
format(i4,1x,i1,1x,i2,1x,f9.5,1x,f9.5,1x,f7.2,1x,f7.2)</FONT></DIV>
<DIV><FONT face=Arial
size=2>************************************************************************</FONT></DIV>
<DIV><FONT face=Arial size=2>you use "i2" to read integer into character
type variable "stid" , try the format "A8" and make some other
corresponding corrections to your codes if necessary!</FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 9pt 宋体">----- Original Message ----- </DIV>
<DIV style="BACKGROUND: #e4e4e4; FONT: 9pt 宋体; font-color: black"><B>From:</B>
<A title=koletsis@METEO.NOA.GR href="mailto:koletsis@METEO.NOA.GR">Ioannis
Koletsis</A> </DIV>
<DIV style="FONT: 9pt 宋体"><B>To:</B> <A title=GRADSUSR@LIST.CINECA.IT
href="mailto:GRADSUSR@LIST.CINECA.IT">GRADSUSR@LIST.CINECA.IT</A> </DIV>
<DIV style="FONT: 9pt 宋体"><B>Sent:</B> Wednesday, April 16, 2008 5:26 PM</DIV>
<DIV style="FONT: 9pt 宋体"><B>Subject:</B> Station data-Stnmap problem</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>Dear grads users,</FONT></DIV>
<DIV><FONT face=Arial size=2>following the example for the file of
rain (<A
href="http://www.iges.org/grads/gadoc/gadocindex.html">http://www.iges.org/grads/gadoc/gadocindex.html</A>),
I created the following program for 2 variables u and v </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>character*8 stid</FONT></DIV>
<DIV><FONT face=Arial size=2> open
(8,name='clear_data.txt')</FONT></DIV>
<DIV><FONT face=Arial size=2> open
(10,name='data.dat',form='unformatted',access='direct',</FONT></DIV>
<DIV><FONT face=Arial size=2> + recl=4)</FONT><FONT
face=Arial size=2><BR> 10 read(8,9000,end=90)
iyear,imonth,stid,rlat,rlon,rval,rval2</FONT></DIV>
<DIV><FONT face=Arial size=2> 9000
format(i4,1x,i1,1x,i2,1x,f9.5,1x,f9.5,1x,f7.2,1x,f7.2)</FONT></DIV>
<DIV><FONT face=Arial size=2> if
(iflag.eq.0) then</FONT></DIV>
<DIV><FONT face=Arial
size=2>
iflag=1</FONT></DIV>
<DIV><FONT face=Arial
size=2>
iyrold=iyear</FONT></DIV>
<DIV><FONT face=Arial
size=2>
imnold=imonth</FONT></DIV>
<DIV><FONT face=Arial size=2>
endif</FONT><FONT face=Arial size=2><BR>
if (iyrold.ne.iyear.or.imnold.ne.imonth) then</DIV>
<DIV> nlev=0</DIV>
<DIV> write(10)
stid,rlat,rlon,tim,nlev,nflag,nflag2</DIV>
<DIV> endif</DIV>
<DIV> iyrold=iyear</DIV>
<DIV>
imnold=imonth<BR> tim=0.0</DIV>
<DIV> nlev=1</DIV>
<DIV> nflag=1</DIV>
<DIV> nflag2=1</DIV>
<DIV> write(10)
stid,rlat,rlon,tim,nlev,nflag,nflag2</DIV>
<DIV> write(10) rval,rval2</DIV>
<DIV> goto
10<BR> 90 continue</DIV>
<DIV> nlev=0</DIV>
<DIV> write(10)
stid,rlat,rlon,tim,nlev,nflag,nflag2</DIV>
<DIV> stop</DIV>
<DIV> end</DIV>
<DIV> </DIV>
<DIV>The compilation was completed successfully and a fortran_pr.e file was
created. Afterwards running the file a data. dat file was created, also.</DIV>
<DIV>Then using the following station_data.ctl file</DIV>
<DIV> </DIV>
<DIV>DSET ^data.dat</DIV>
<DIV>DTYPE station </DIV>
<DIV>STNMAP station_data.map</DIV>
<DIV>UNDEF -99999</DIV>
<DIV>TITLE Station Data Sample</DIV>
<DIV>TDEF 1 linear 06z27jul2003 12hr</DIV>
<DIV>VARS 2<BR>u 0 99 surface u-wind</DIV>
<DIV>v 0 99 surface v-wind </DIV>
<DIV>ENDVARS<BR></DIV>
<DIV>I execute the command stnmap -i station_data.ctl, I received the
following </DIV>
<DIV> </DIV>
<DIV>Name of binary data set: data.dat</DIV>
<DIV>Number of times in the data set: 1</DIV>
<DIV>Number of surface variables: 2</DIV>
<DIV>Number of level dependent variables: 0</DIV>
<DIV> </DIV>
<DIV>Starting scan of station data binary file.</DIV>
<DIV>Binary data file open: data.dat</DIV>
<DIV>Processing time=1</DIV>
<DIV>Invalid station hdr found in station binary file</DIV>
<DIV>Possible causes: Invalid level count in hdr</DIV>
<DIV>Descriptor file mismatch</DIV>
<DIV>File not station data</DIV>
<DIV>Invalid relative time</DIV>
<DIV>levs=-1073751116 flag=0 time=32.625</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>
<DIV><FONT face=Arial size=2>Do you have an idea for what is
wrong?</FONT></DIV>
<DIV><FONT face=Arial size=2>Thanks in advance......</DIV></FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><BR> </DIV></FONT><FONT face=Arial size=2></FONT>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>-----------------------------------------------------------
<BR>Ioannis Koletsis<BR>National Observatory of Athens<BR>Institute for
Environmental Research<BR>Lofos
Koufou<BR>15236-Penteli<BR>Athens-Greece<BR>Tel: (+30) 210 8109140<BR>e-mail:
<A
href="mailto:koletsis@meteo.noa.gr">koletsis@meteo.noa.gr</A><BR>
<A
href="mailto:ikoletsis@gmail.com">ikoletsis@gmail.com</A><BR>-----------------------------------------------------------
</FONT></DIV></BLOCKQUOTE></BODY></HTML>