<div dir="ltr">Hello,<div><br></div><div>I am trying to bring in my GrADS script to python for a complete process automation, but am struggling.   </div><div><br></div><div><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">The GrADS script looks something like this:</p><pre style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:12px;vertical-align:baseline;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;word-wrap:normal;color:rgb(51,51,51);line-height:18px;background-color:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;color:rgb(34,34,34);white-space:inherit">&#39;open /TestContrl.ctl&#39;
&#39;define precip = rain&#39;
&#39;display precip&#39;
&#39;set sdfwrite <a href="http://20150311.nc">20150311.nc</a>&#39;
&#39;sdfwrite precip&#39;
</code></pre><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">The big question, how do I do that in Python? This is what I have so far:</p><pre style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:12px;vertical-align:baseline;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;word-wrap:normal;color:rgb(51,51,51);line-height:18px;background-color:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;color:rgb(34,34,34);white-space:inherit">import grads
from pylab import title
from grads.gacore import GaCore
ga=GaCore(Bin=&#39;grads&#39;)
ga.open(&#39;Control.ctl&#39;)
ga(&quot;d rain&quot;)
</code></pre><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">But from here I have only found how to export a .png, display contours of the data, but have not discovered a call for exporting to NetCDF.  Is this possible?</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">Any guidance would be greatly appreciated.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">Thanks,</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">Justin</p></div></div>