<div dir="ltr"><div>Likely, the file is in a different directory than the NCL script.<br></div>By degault, NCL look in the current directory. This means the directory with the NCL sctipt<br><div><br>ncl 1> data = addfile("<a href="http://precip.mon.mean.nc">precip.mon.mean.nc</a>","r") ; addfile looks in the current directory<br>ncl 2> a = data->precip<br>ncl 3> printVarSummary(a)<br><br>Variable: a<br>Type: float<br>Total Size: 14598144 bytes<br> 3649536 values<br>Number of Dimensions: 3<br>Dimensions and sizes: [time | 352] x [lat | 72] x [lon | 144]<br>Coordinates: <br> time: [101902..112585]<br> lat: [88.75..-88.75]<br> lon: [1.25..358.75]<br>Number Of Attributes: 15<br> long_name : Average Monthly Rate of Precipitation<br> valid_range : ( 0, 50 )<br> units : mm/day<br></div><div> [SNIP]<br></div><div> _FillValue : -9.96921e+36<br>===============================================<br><br></div><div>You can be explicit<br><br></div><div>diri = "./" ; directory containing the input file<br></div><div> ; diri = "/dir/where/file/is/located/"<br></div><div>fili = "<a href="http://precip.mon.mean.nc">precip.mon.mean.nc</a>"<br></div><div>pthi = diri+fil ; input path<br><br></div><div>data = addfile( pthi, "r")<br></div><div>a = data->precip<br><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 6, 2016 at 4:02 PM, 475114511 <span dir="ltr"><<a href="mailto:475114511@qq.com" target="_blank">475114511@qq.com</a>></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>I met a problem when I read a nc file,</div><div>The first pic is my script,I didn't find any problems.</div><div>Can anyone tell me how to fix this ?</div><div>Thanks so much!</div><div><br></div><div><img src="cid:9DEA16DB@D799F221.99434758"><img src="cid:D8DE40E3@A540CD03.99434758" style="line-height:1.5"></div><br>______________________________<wbr>_________________<br>
ncl-install mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-install" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-install</a><br>
<br></blockquote></div><br></div>