<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi, Teddy --&nbsp;<div>The ncks -A command merges files with different variables having identical grids.&nbsp;Concatenating files with netcdf operators (i.e., extending the time steps) is something different. The NCO docs describe how to do this, I am working on a merge of their docs to add to the sdfwrite docs to make it easier for GrADS users, but haven't finished testing it out to make sure it works. It is a bit more involved, since you have to change the time dimension to a 'record' dimension, so that it can be extended. You have to use ncecat followed by ncpdq followed by ncwa and then ncrcat.&nbsp;</div><div><br></div><div>I will think about how to add an option to 'sdfwrite' to set a dimension to be a record dimension; this will save some trouble when concatenating files. In the newer versions of the netcdf library you can have more than one record dimension.</div><div><br></div><div>--Jennifer</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><div><div>On Sep 3, 2010, at 1:17 PM, Teddy Allen wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: arial, helvetica, sans-serif; font-size: 12pt; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Is this procedure similar to combining files found in NCO? Or, is it&nbsp;only a way to combine multiple variables into&nbsp;one file without extending the time steps?</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">does this make sense?</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">thanks,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">teddy<br>&nbsp;</div><p><a href="http://www.teddyallen.com/" rel="nofollow" target="_blank">http://www.teddyallen.com</a></p><p>"To move quickly, go alone. To move far, go<span class="Apple-converted-space">&nbsp;</span><font color="#ff0000"><em><strong>together</strong></em></font>."</p><p>African Proverb</p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: arial, helvetica, sans-serif; font-size: 12pt; "><br><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold; ">From:</span></b><span class="Apple-converted-space">&nbsp;</span>Jennifer Adams &lt;<a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a>&gt;<br><b><span style="font-weight: bold; ">To:</span></b><span class="Apple-converted-space">&nbsp;</span>GrADS Users Forum &lt;<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>&gt;<br><b><span style="font-weight: bold; ">Sent:</span></b><span class="Apple-converted-space">&nbsp;</span>Fri, September 3, 2010 12:59:48 PM<br><b><span style="font-weight: bold; ">Subject:</span></b><span class="Apple-converted-space">&nbsp;</span>Re: [gradsusr] multiple variables in one netCDF<br></font><br>The netcdf operator 'ncks' can do this with a simple one-line command:&nbsp;<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">ncks -h -A file1.nc file2.nc</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">The -h option does not modify the global attribute 'history', the -A options means the variables in file1 are appended to file2. There is no need for me to write a whole lot of code in GrADS to do this when it is so easy with ncks.&nbsp;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">--Jennifer</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On Sep 2, 2010, at 8:35 PM,<span class="Apple-converted-space">&nbsp;</span><a href="mailto:Don.VanDyke@noaa.gov" rel="nofollow" target="_blank" ymailto="mailto:Don.VanDyke@noaa.gov">Don.VanDyke@noaa.gov</a><span class="Apple-converted-space">&nbsp;</span>wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Hello,<br><br>Is there a way to write multiple variables to one netCDF file through GrADS instead of having to do separate files? &nbsp;I've tried the obvious way of simply issuing two sdfwrite commands to the same file, but it didn't work. &nbsp;The second variable just overwrote the first. &nbsp;Thanks for any help given!<br><br>Don Van Dyke<br>NWS Tallahassee, FL<br>_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org" rel="nofollow" target="_blank" ymailto="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br><a href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a><br></div></blockquote></div><br><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-style-span" style="widows: 2; text-transform: none; text-indent: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: separate; font: normal normal normal 12px/normal Helvetica; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; word-wrap: break-word; "><span class="Apple-style-span" style="widows: 2; text-transform: none; text-indent: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: separate; font: normal normal normal 12px/normal Helvetica; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px; "><span class="Apple-style-span" style="widows: 2; text-transform: none; text-indent: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: separate; font: normal normal normal 12px/normal Helvetica; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">--</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Jennifer M. Adams</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">IGES/COLA</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">4041 Powder Mill Road, Suite 302</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Calverton, MD 20705</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="mailto:jma@cola.iges.org" rel="nofollow" target="_blank" ymailto="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></div></span></div><br></div></div></div></div><br>_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br><a href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a><br></div></span></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></div></span> </div><br></div></body></html>