<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Andrew,<BR> <BR>Thanks for your reply, I used this script as you led, but unfortunately these two commands gor error: outfile='my_ascii_file.txt'<br>'!/bin/rm -f 'outfile<BR> <BR>the grads said for first command:<BR> <BR> invalid expression<BR>syntax error: expected operand or '<'<BR> <BR>and for the second command said:<BR>cannot remove '-f'<BR>cannot remove 'outfile'<BR>not such a file or directory.<BR> <BR>could you please tell me where is my problem, because by other commands in the follow script I saw the data in the display window but I cannot have them in a text file<BR>Regards,<BR>T.<BR> <BR>'open /data/grib/model/model.ctl'<br>'set x 1 72'<br>outfile='my_ascii_file.txt'<br>'!/bin/rm -f 'outfile<br>'set gxout print'<br>'set prnopts %g, 72 0'<br>'d ts-273.15'<br>i=1<br>while (1)<br> line = sublin(result,i)<br> if (line = ''); break; endif<br> if (i>1)<br> rc = write(outfile,line,append)<br> endif<br> i=i+1<br>endwhile<BR> <BR> <BR> <BR><br> <BR><div>> From: gradsusr-request@gradsusr.org<br>> Subject: gradsusr Digest, Vol 56, Issue 40<br>> To: gradsusr@gradsusr.org<br>> Date: Wed, 22 Oct 2014 12:00:01 -0400<br>> <br>> Send gradsusr mailing list submissions to<br>>         gradsusr@gradsusr.org<br>> <br>> To subscribe or unsubscribe via the World Wide Web, visit<br>>         http://gradsusr.org/mailman/listinfo/gradsusr<br>> or, via email, send a message with subject or body 'help' to<br>>         gradsusr-request@gradsusr.org<br>> <br>> You can reach the person managing the list at<br>>         gradsusr-owner@gradsusr.org<br>> <br>> When replying, please edit your Subject line so it is more specific<br>> than "Re: Contents of gradsusr digest..."<br>> <br>> <br>> Today's Topics:<br>> <br>> 1. Re: Convert .dat file to netcdf (Andrew Friedman)<br>> <br>> <br>> ----------------------------------------------------------------------<br>> <br>> Message: 1<br>> Date: Wed, 22 Oct 2014 14:15:28 +0200<br>> From: Andrew Friedman <andfried@gmail.com><br>> Subject: Re: [gradsusr] Convert .dat file to netcdf<br>> To: GrADS Users Forum <gradsusr@gradsusr.org><br>> Message-ID: <31C71C86-50FA-43BE-AAD8-9F1BD3484D33@gmail.com><br>> Content-Type: text/plain; charset=windows-1256<br>> <br>> Hi T. Haghroosta,<br>> <br>> You can save to a .csv file using the instructions for ASCII data:<br>> http://www.iges.org/grads/gadoc/ascii.html<br>> The instructions are related to the OpenGrADS recipe for saving to a text file:<br>> http://cookbooks.opengrads.org/index.php?title=Recipe-002:_Saving_GrADS_variable_data_to_a_text_file<br>> <br>> Andrew<br>> <br>> On Oct 21, 2014, at 8:43 AM, T. haghroosta <haghroosta@hotmail.com> wrote:<br>> <br>> > Dear All,<br>> > <br>> > Is there any way to convert a .dat file from WRF to a netcdf or .mat (matlab file) or .csv file?<br>> > <br>> > I am looking forward to hearing from side of you.<br>> > <br>> > Ragards.<br>> > T.<br>> </div>                                            </div></body>
</html>