<div dir="ltr">Not sure if this is really a bug as such. <div><br></div><div> You're longitude data does not exactly fall on the pivot point you request. (/.... -0.75,-0.25, 0.25, 0.75 .... /) . NCL is finding the nearest point through coordinate subscripting and as they are equally far from 0 it is choosing -0.25. <div><br></div><div>The line in question from the function is ` indP = ind(xlon.eq.xlon({pivotLon})) ; must be exact ` because it's not exact it will find the nearest location. Given two values the same distance away, NCL will pick the first one. </div><div><br></div><div>Redefining the longitude as you do is not the correct solution, your data will be offset 0.5degrees from the grid it was actually on. Instead change your pivot point 0.25 or a point that your longitude data includes. </div><div><br></div><div>Good luck, </div><div>Alan. </div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 12, 2015 at 8:40 AM, gibies george <span dir="ltr"><<a href="mailto:gibies@tropmet.res.in" target="_blank">gibies@tropmet.res.in</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br clear="all"><div><div><div dir="ltr"><div>Dear NCL support team,</div><div><br></div><div>Here I am reporting a probable bug in the lonPivot function. </div><div><br></div><div>Hope the following script and its output are self-explanatory.</div><div><br></div><div>Regards</div><div><br></div><div>Gibies</div><div><br></div><div>________________Script_________________</div><div><br></div><div><div>printVarSummary(hcst_sst)</div><div>hcst_sst=lonPivot(hcst_sst,0)</div><div>printVarSummary(hcst_sst)</div><div><b>lonnew=fspan(0.25,359.75,720)</b></div><div><b>hcst_sst&lon=lonnew</b></div><div>printVarSummary(hcst_sst)</div></div><div>_________________________Output________</div><div><br></div><div><br></div><div><div>Variable: hcst_sst</div><div>Type: float</div><div>Total Size: 273945600 bytes</div><div> 68486400 values</div><div>Number of Dimensions: 4</div><div>Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[year | 29] x [month | 8] x [lat | 410] x [lon | 720]</div><div>Coordinates: </div><div> year: [1981..2009]</div><div> month: [2..9]</div><div> lat: [-80.75..89.75]</div><div> lon: [-279.75..79.75]</div><div>Number Of Attributes: 1</div><div> _FillValue :<span style="white-space:pre-wrap">        </span>-1e+10</div><div><br></div><div>Variable: hcst_sst</div><div>Type: float</div><div>Total Size: 273945600 bytes</div><div> 68486400 values</div><div>Number of Dimensions: 4</div><div>Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[year | 29] x [month | 8] x [lat | 410] x [lon | 720]</div><div>Coordinates: </div><div> year: [1981..2009]</div><div> month: [2..9]</div><div> lat: [-80.75..89.75]</div><div> lon:<b> [-0.25..-0.75]</b></div><div>Number Of Attributes: 2</div><div> lonPivot :<span style="white-space:pre-wrap">        </span>reordered via lonPivot [NCL]: pivotLon=0</div><div> _FillValue :<span style="white-space:pre-wrap">        </span>-1e+10</div><div><br></div><div>Variable: hcst_sst</div><div>Type: float</div><div>Total Size: 273945600 bytes</div><div> 68486400 values</div><div>Number of Dimensions: 4</div><div>Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[year | 29] x [month | 8] x [lat | 410] x [lon | 720]</div><div>Coordinates: </div><div> year: [1981..2009]</div><div> month: [2..9]</div><div> lat: [-80.75..89.75]</div><div> lon: [0.25..359.75]</div><div>Number Of Attributes: 2</div><div> lonPivot :<span style="white-space:pre-wrap">        </span>reordered via lonPivot [NCL]: pivotLon=0</div><div> _FillValue :<span style="white-space:pre-wrap">        </span>-1e+10</div></div><div><br></div></div></div></div>
</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>