<!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=&#23435;&#20307;>pay attention to the following 2 
rows</FONT></FONT></DIV>
<DIV><FONT face=&#23435;&#20307; 
size=2>***************************************************</FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>10&nbsp;&nbsp;&nbsp; read(8,9000,end=90) 
iyear,imonth,stid,rlat,rlon,rval,rval2</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;9000&nbsp; 
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&nbsp;character 
type&nbsp;variable "stid"&nbsp;, try the format "A8"&nbsp; 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 &#23435;&#20307;">----- Original Message ----- </DIV>
  <DIV style="BACKGROUND: #e4e4e4; FONT: 9pt &#23435;&#20307;; 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 &#23435;&#20307;"><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 &#23435;&#20307;"><B>Sent:</B> Wednesday, April 16, 2008 5:26 PM</DIV>
  <DIV style="FONT: 9pt &#23435;&#20307;"><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&nbsp;(<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&nbsp;</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>character*8 stid</FONT></DIV>
  <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open 
  (8,name='clear_data.txt')</FONT></DIV>
  <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open 
  (10,name='data.dat',form='unformatted',access='direct',</FONT></DIV>
  <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp; + recl=4)</FONT><FONT 
  face=Arial size=2><BR>&nbsp;10&nbsp;&nbsp;&nbsp; read(8,9000,end=90) 
  iyear,imonth,stid,rlat,rlon,rval,rval2</FONT></DIV>
  <DIV><FONT face=Arial size=2>&nbsp;9000&nbsp; 
  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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if 
  (iflag.eq.0) then</FONT></DIV>
  <DIV><FONT face=Arial 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  iflag=1</FONT></DIV>
  <DIV><FONT face=Arial 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  iyrold=iyear</FONT></DIV>
  <DIV><FONT face=Arial 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  imnold=imonth</FONT></DIV>
  <DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  endif</FONT><FONT face=Arial size=2><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  if (iyrold.ne.iyear.or.imnold.ne.imonth) then</DIV>
  <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nlev=0</DIV>
  <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; write(10) 
  stid,rlat,rlon,tim,nlev,nflag,nflag2</DIV>
  <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; endif</DIV>
  <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; iyrold=iyear</DIV>
  <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  imnold=imonth<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tim=0.0</DIV>
  <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nlev=1</DIV>
  <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nflag=1</DIV>
  <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nflag2=1</DIV>
  <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; write(10) 
  stid,rlat,rlon,tim,nlev,nflag,nflag2</DIV>
  <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; write(10) rval,rval2</DIV>
  <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; goto 
  10<BR>&nbsp;90&nbsp;&nbsp;&nbsp; continue</DIV>
  <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nlev=0</DIV>
  <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; write(10) 
  stid,rlat,rlon,tim,nlev,nflag,nflag2</DIV>
  <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stop</DIV>
  <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end</DIV>
  <DIV>&nbsp;</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>&nbsp;</DIV>
  <DIV>DSET&nbsp;&nbsp; ^data.dat</DIV>
  <DIV>DTYPE&nbsp; station </DIV>
  <DIV>STNMAP station_data.map</DIV>
  <DIV>UNDEF&nbsp;&nbsp; -99999</DIV>
  <DIV>TITLE&nbsp; Station Data Sample</DIV>
  <DIV>TDEF&nbsp;&nbsp; 1 linear 06z27jul2003 12hr</DIV>
  <DIV>VARS 2<BR>u&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; 99&nbsp; surface u-wind</DIV>
  <DIV>v&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; 99&nbsp; surface v-wind&nbsp; </DIV>
  <DIV>ENDVARS<BR></DIV>
  <DIV>I execute the command stnmap -i station_data.ctl, I received the 
  following </DIV>
  <DIV>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
  <DIV>&nbsp;</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>&nbsp;</DIV>
  <DIV>&nbsp;</DIV>
  <DIV><BR>&nbsp;</DIV></FONT><FONT face=Arial size=2></FONT>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial 
  size=2>-----------------------------------------------------------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  <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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  <A 
  href="mailto:ikoletsis@gmail.com">ikoletsis@gmail.com</A><BR>-----------------------------------------------------------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  </FONT></DIV></BLOCKQUOTE></BODY></HTML>