<div dir="ltr"><div class="gmail_default" style="font-size:small">You need to be more specific about what the problem is.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">
Are you getting an error/warning, or a bad NetCDF file, or something else?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If you are getting an error/warning, please include the exact message.</div>
<div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">
<br></div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Aug 23, 2014 at 7:21 PM, Li Qi <span dir="ltr">&lt;<a href="mailto:liqi123sh@qq.com" target="_blank">liqi123sh@qq.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Dear all, </div><div><br></div><div>I&#39;d like to create a netCDF file with the selected variables read off WRF output data, but I can&#39;t make it.</div>
<div><br></div><div>Here&#39;s my code:</div><div><br></div><div><div>  load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;</div><div>  load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl&quot;</div>
<div><br></div><div>begin</div><div><span style="white-space:pre-wrap">        </span>in = addfile(&quot;<a href="http://wrfout_d03_2011-06-13_18_00_00.nc" target="_blank">wrfout_d03_2011-06-13_18_00_00.nc</a>&quot;,&quot;r&quot;)</div>
<div><span style="white-space:pre-wrap">        </span>out = addfile(&quot;<a href="http://eth850_1.nc" target="_blank">eth850_1.nc</a>&quot;,&quot;c&quot;)</div><div>  </div><div>; First get the variables we will need  </div><div>
<br></div><div>  it = 1</div><div>  lat = wrf_user_getvar(in,&quot;lat&quot;,it) ; Equivalent PotentialTtemperature [K] </div><div>  lon = wrf_user_getvar(in, &quot;lon&quot;,it) ; total pressure</div><div>  </div><div><br>
</div><div>  eth = wrf_user_getvar(in,&quot;eth&quot;,it) ; Equivalent PotentialTtemperature [K] </div><div>  p = wrf_user_getvar(in, &quot;pressure&quot;,it) ; total pressure</div><div><br></div><div>  ; Horizontally interpolate to pressure coordinates (&quot;p&quot;)</div>
<div>  pressure = 850.   ; 850 hPa</div><div>  eth_plane = wrf_user_intrp3d(eth,p,&quot;h&quot;,pressure,0.,False) </div><div><br></div><div><br></div><div>  </div><div><span style="white-space:pre-wrap">        </span>out-&gt;lon = lon</div>
<div><span style="white-space:pre-wrap">        </span>out-&gt;lat = lat</div><div><span style="white-space:pre-wrap">        </span>out-&gt;eth850 = eth_plane</div><div><span style="white-space:pre-wrap">        </span></div><div>end<span style="line-height:0px">‍</span></div>
</div><div><br></div><div><br></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>