[ncl-talk] lonPivot

gibies george gibiesgeorge at gmail.com
Fri Feb 13 03:44:25 MST 2015


Thank Alan for you guidance.



*Gibies George,**Senior Research Fellow (**CSIR)**,*














*Climate and Global Modelling Division,Indian Institute of Tropical
Meteorology,Dr. Homi Bhabha Road, NCL (P. O.), Pashan,Pune 411008,
India.Office Teleph  : +912025904423Office mail
 : gibies at tropmet.res.in
<gibies at tropmet.res.in>________________Vettikuzhiyil HouseEzhakkaranadu
SouthPuthencruz-682308, Kochi, India.Mobile number :  +919028523910,
+919420407392, +919881707796Personal mail : gibiesgeorge at gmail.com
<gibiesgeorge at gmail.com>http://sites.google.com/site/gibiesge/
<http://sites.google.com/site/gibiesge/>*


*_______________________________________________________"Please do not
print this e-mail unless you really need. Because every 3000 pages cost a
tree. *
*Save Trees, Save mother Earth."*

On 12 February 2015 at 20:47, Alan Brammer <abrammer at albany.edu> wrote:

> Not sure if this is really a bug as such.
>
>  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.
>
> 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.
>
> 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.
>
> Good luck,
> Alan.
>
> On Thu, Feb 12, 2015 at 8:40 AM, gibies george <gibies at tropmet.res.in>
> wrote:
>
>>
>> Dear NCL support team,
>>
>> Here I am reporting a probable bug in the lonPivot function.
>>
>> Hope the following script and its output are self-explanatory.
>>
>> Regards
>>
>> Gibies
>>
>> ________________Script_________________
>>
>> printVarSummary(hcst_sst)
>> hcst_sst=lonPivot(hcst_sst,0)
>> printVarSummary(hcst_sst)
>> *lonnew=fspan(0.25,359.75,720)*
>> *hcst_sst&lon=lonnew*
>> printVarSummary(hcst_sst)
>> _________________________Output________
>>
>>
>> Variable: hcst_sst
>> Type: float
>> Total Size: 273945600 bytes
>>             68486400 values
>> Number of Dimensions: 4
>> Dimensions and sizes: [year | 29] x [month | 8] x [lat | 410] x [lon |
>> 720]
>> Coordinates:
>>             year: [1981..2009]
>>             month: [2..9]
>>             lat: [-80.75..89.75]
>>             lon: [-279.75..79.75]
>> Number Of Attributes: 1
>>   _FillValue : -1e+10
>>
>> Variable: hcst_sst
>> Type: float
>> Total Size: 273945600 bytes
>>             68486400 values
>> Number of Dimensions: 4
>> Dimensions and sizes: [year | 29] x [month | 8] x [lat | 410] x [lon |
>> 720]
>> Coordinates:
>>             year: [1981..2009]
>>             month: [2..9]
>>             lat: [-80.75..89.75]
>>             lon:* [-0.25..-0.75]*
>> Number Of Attributes: 2
>>   lonPivot : reordered via lonPivot [NCL]: pivotLon=0
>>   _FillValue : -1e+10
>>
>> Variable: hcst_sst
>> Type: float
>> Total Size: 273945600 bytes
>>             68486400 values
>> Number of Dimensions: 4
>> Dimensions and sizes: [year | 29] x [month | 8] x [lat | 410] x [lon |
>> 720]
>> Coordinates:
>>             year: [1981..2009]
>>             month: [2..9]
>>             lat: [-80.75..89.75]
>>             lon: [0.25..359.75]
>> Number Of Attributes: 2
>>   lonPivot : reordered via lonPivot [NCL]: pivotLon=0
>>   _FillValue : -1e+10
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150213/f85bc4a5/attachment.html 


More information about the ncl-talk mailing list