<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Lyndon:<br>
<br>
As suggested earlier, you should just use a script to do this, e.g.,
in awk:<br>
<br>
awk 'BEGIN{FS="/"}{print $1, $2, $3, $4}' infile.dat >
outfile.dat<br>
<br>
Jim<br>
<div class="moz-cite-prefix">On 5/28/13 7:24 AM, Lyndon Mark
Olaguera wrote:<br>
</div>
<blockquote
cite="mid:CA+V+8dXMnytoN3xUyqr0ULjchxu5JENLaLPQDa71EiLybvQ_ZQ@mail.gmail.com"
type="cite">
<div dir="ltr">I just want to get rid of the back slash..Wen i
tried it fortran it only gives me an error..
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Tue, May 28, 2013 at 10:52 PM,
Sestak, Michael L CIV 63134 <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:michael.l.sestak@navy.mil" target="_blank">michael.l.sestak@navy.mil</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">The read
function in the grads scripting language will open a text
file, then you have to parse your dates using substr.<br>
<br>
But, all that can be done in fortran, and CSV usually means
comma separated values, not columns.<br>
<br>
So, I'm not sure what you really want to do.<br>
<br>
Michael Sestak<br>
Fleet Numerical Meteorology and Oceanography Center<br>
Monterey, CA<br>
<br>
Message: 1<br>
Date: Tue, 28 May 2013 11:26:24 +0800<br>
From: Lyndon Mark Olaguera <<a moz-do-not-send="true"
href="mailto:olagueralyndonmark429@gmail.com">olagueralyndonmark429@gmail.com</a>><br>
Subject: [gradsusr] Open text file and output as a csv
format in GRADS<br>
To: GrADS Users Forum <<a moz-do-not-send="true"
href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>><br>
Message-ID:<br>
<CA+V+8dWb8qXJt37XMU=K-51hNC=<a
moz-do-not-send="true"
href="mailto:NmuQ3fx27ApOXoPLopF%2Bmgw@mail.gmail.com">NmuQ3fx27ApOXoPLopF+mgw@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<div class="HOEnZb">
<div class="h5"><br>
Hi all,<br>
I have station data in a text file and I want to read it
using grads and output as a csv file.<br>
The problem is the dates are separated by a backslash...<br>
here's a sample format:<br>
<br>
The text file contains the following data.<br>
<br>
yy/mm/dd/hh pressure rain<br>
TEMPERATURE wind speed<br>
2012/08/06/00 10000 2.5<br>
300 45<br>
...<br>
...<br>
...<br>
....<br>
<br>
<br>
I want to oputput this in a csv format such that the the
years, months, days, and hours are in separated in
columns...<br>
like:<br>
<br>
yy mm dd hh rain<br>
temperature wind speed<br>
<br>
<br>
<br>
I can't do it in fortran so i guess its easier to do
this in GRADs..<br>
<br>
<br>
thanks for any help.<br>
Lyndon<br>
<br>
</div>
</div>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a moz-do-not-send="true"
href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a moz-do-not-send="true"
href="http://gradsusr.org/mailman/listinfo/gradsusr"
target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gradsusr mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>
<a class="moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
</blockquote>
<br>
</body>
</html>