<html><body>
<DIV>Hi Tom,</DIV>
<DIV>Your timing is good. I just posted a whole series of questions about how to use the fwrite function (yesterday). They should help you to do what you request. Also do a few searches in the archives for fwrite. The fwrite output is not a grib file per se, rather just a binary file, but it's a great way to store data for use later. You'll have to manually make a simple control file (.ctl) to read the fwrite output file (no index file required) but it's pretty straight forward. </DIV>
<DIV>--<BR>Thanks, <BR>Mark</DIV>
<DIV> </DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">-------------- Original message -------------- <BR><BR>> I have openned two grib files in GrADS, performed some means and would like <BR>> to write out the results to a new GRIB file. <BR>> <BR>> I have looked at using the Lats4d script, but it seems that it only works <BR>> with input files, not variables defined in GrADS. <BR>> <BR>> How can I write a defined variable out to a GRIB file in GrADS? <BR>> <BR>> Thanks, <BR>> -Tom </BLOCKQUOTE></body></html>