<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Andre<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Attached is a ZIP container with the MAP and DAT files computed from your FORTRAN and using the stnmap application. i.e.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>gfortran &#8211;o makestations makestations.f<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>stnmap &#8211;I grads.ctl<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>It works for the GrADS Windows application.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Since your DAT file differs from the one I created, I wonder if you are running this on a big endian system?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Other than that, I cannot think of a reason why your FORTRAN compiled version would create a different DAT file.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>John Huddleston<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Cooperative Institute for Research in the Atmosphere<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> gradsusr-bounces@gradsusr.org [mailto:gradsusr-bounces@gradsusr.org] <b>On Behalf Of </b>Andre Pattantyus<br><b>Sent:</b> Sunday, June 19, 2011 9:39 AM<br><b>To:</b> gradsusr@gradsusr.org<br><b>Subject:</b> [gradsusr] stnmap error<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Attached is the station data I am trying to use to convert to grads format. It looks like the script to turn into grads binary is a problem or the options sequential needs to be something else in the .ctl file, but what should it be?<br><br>This is the fortran script to convert data:<br><br>&nbsp;&nbsp; CHARACTER*8 STID <br>&nbsp;&nbsp;&nbsp; REAL&nbsp; TD, TT,RH,WSP,WDIR,PP<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OPEN (8,file='stns_new.txt')&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OPEN (10,file='stn.dat',FORM='UNFORMATTED'<br>&nbsp;&nbsp;&nbsp;&nbsp; + ,status='unknown')<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IFLAG = 0 <br><br>10&nbsp;&nbsp;&nbsp;&nbsp; READ (8,9000,END=90) ITIME, STID, RLAT, RLON, TT,Td,rh,WSP, <br>&nbsp;&nbsp;&nbsp;&nbsp; +&nbsp;&nbsp; wdir, pp<br><br>9000&nbsp;&nbsp; FORMAT( I2, 1X, A4, 1X, F7.4,1X,F8.3,1X, <br>&nbsp;&nbsp;&nbsp;&nbsp; + F4.1,1X,F5.1,1X,F3.0,1x,F4.1,1X,F3.0,1X,F4.1)<br>!<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF (IFLAG.EQ.0) THEN<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IFLAG = 1 <br>!&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IYROLD = IYEAR<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ITIMEOLD = ITIME<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ENDIF <br><br>!&nbsp;&nbsp;&nbsp; print*,IYEAR,IMONTH,STID,RLAT,RLON,RVAL,TD,UU,VV<br>!&nbsp; If new time group, write time group terminator. <br>!&nbsp; Assuming no empty time groups. <br>!<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF (ITIMEOLD.NE.ITIME) THEN <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NLEV = 0 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WRITE (10) STID,RLAT,RLON,TIM,NLEV,NFLAG <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ENDIF <br>!&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IYROLD = IYEAR <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ITIMEOLD = ITIME<br>!&nbsp; Write this report <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TIM = 0.0 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NLEV = 1 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NFLAG = 1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WRITE (10) STID,RLAT,RLON,TIM,NLEV,NFLAG <br><br>!print*,ITIME,STID,RLAT,RLON,TT,TD,UU,VV<br>!&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print*,STID,RLAT,RLON,TIM,NLEV,NFLAG<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WRITE (10) TT,TD,RH,WSP,WDIR,PP<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print*, TT ,TD, RH,WSP, WDIR, PP<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GO TO 10<br>!&nbsp; On end of file write last time group terminator. <br>90&nbsp;&nbsp;&nbsp;&nbsp; CONTINUE <br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NLEV = 0 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WRITE (10) STID,RLAT,RLON,TIM,NLEV,NFLAG <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print*,STID,RLAT,RLON,TIM,NLEV,NFLAG<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STOP<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br><br>Here is the .ctl file:<br clear=all><br>DSET&nbsp;&nbsp; ^stn.dat<br>DTYPE&nbsp; station<br>STNMAP station.map<br>OPTIONS sequential<br>UNDEF&nbsp; -999.00<br>TITLE&nbsp; Station Data Sample<br>TDEF&nbsp; 24 linear 07Z30Nov2007 60mn<br>VARS 6<br>ts&nbsp;&nbsp;&nbsp; 0 99&nbsp; Surface Temperature<br>td&nbsp;&nbsp;&nbsp; 0 99&nbsp; Surface Dewpoint Temperature<br>rh&nbsp;&nbsp;&nbsp; 0 99&nbsp; Relative Humidity<br>wsp&nbsp;&nbsp; 0 99&nbsp; Wind speed<br>wdir&nbsp; 0 99&nbsp; wind dir<br>pp&nbsp;&nbsp;&nbsp; 0 99&nbsp; accumulated precipitation<br>ENDVARS<br><br><br>-- <br>Andre Pattantyus, Graduate Student Research Assistant<br>Marine and Environmental Systems, Florida Institute of Technology<br>150 W. University Blvd, Melbourne, FL 32901<br><br>Phone: (321) 674-8330 | Fax: (321) 674-7212 | Email: <a href="mailto:apattantyus2008@fit.edu">apattantyus2008@fit.edu</a><o:p></o:p></p></div></body></html>