<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Thanks Adam and Rashed,<br></div><div><br data-mce-bogus="1"></div><div>    Its confusing, As LonPivot is just re-arranging the the order of Longitude start and end point, but the basic range is similar to that of the models original grid (i.e -279 to 80).</div><div>Is it not possible to arrange the longitudes in the way its easy i.e  positive means east and negative means west longitudes. <br data-mce-bogus="1"></div><div>Is re-gridding data the only solution?<br data-mce-bogus="1"></div><div><br></div><div>regards<br data-mce-bogus="1"></div><div>Samir<br data-mce-bogus="1"></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>From: </b>"Adam Phillips" <asphilli@ucar.edu><br><b>To: </b>"samirpokhrel" <samir@tropmet.res.in><br><b>Cc: </b>"ncl-talk" <ncl-talk@ucar.edu><br><b>Sent: </b>Friday, July 16, 2021 11:21:32 PM<br><b>Subject: </b>Re: [ncl-talk] Error in selecting box using coordinate subscripting<br></div><div><br></div><div data-marker="__QUOTED_TEXT__"><div dir="ltr">Rashed is right, lonPivot is definitely one way to get around this issue. Another possibility is to just specify the area like this:<div>temp_et = temp({30:60},{-240:-170})<br></div><div>Hope that helps!</div><div>Adam</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 16, 2021 at 11:46 AM Rashed Mahmood via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank" rel="nofollow noopener noreferrer">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb( 204 , 204 , 204 );padding-left:1ex"><div dir="ltr"><div>lonFlip assumes that the central longitude is either Greenwich meridian (0) or 180 which is not the case in your data. Maybe "lonPivot" could do the job? <br></div><div><a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/lonPivot.shtml" target="_blank" rel="nofollow noopener noreferrer">https://www.ncl.ucar.edu/Document/Functions/Contributed/lonPivot.shtml</a><br data-mce-bogus="1"></div><div> </div><div>Or regriding the data could be another option. <br></div><br><br><br><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 16, 2021 at 8:55 AM samirpokhrel via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank" rel="nofollow noopener noreferrer">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb( 204 , 204 , 204 );padding-left:1ex"><div><div style="font-family:'arial' , 'helvetica' , sans-serif;font-size:12pt;color:rgb( 0 , 0 , 0 )"><div><p style="margin:0px;line-height:100%">Dear NCL Users,</p><p style="margin:0px;line-height:100%"><br></p><p style="margin:0px;line-height:100%">I am having problem while selecting a specific region within model output global data. Model data Longitudes varies from -279.75 to 79.75. The printVarSummary of the model data is as follows</p><p style="margin:0px;line-height:100%">-------</p><p style="margin:0px;line-height:100%">Variable: temp</p><p style="margin:0px;line-height:100%">Type: double</p><p style="margin:0px;line-height:100%">Number of Dimensions: 2</p><p style="margin:0px;line-height:100%">Dimensions and sizes: [YT_OCEAN | 410] x [XT_OCEAN | 720]</p><p style="margin:0px;line-height:100%">Coordinates:</p><p style="margin:0px;line-height:100%">YT_OCEAN: [-80.75..89.75]</p><p style="margin:0px;line-height:100%">XT_OCEAN: [-279.75..79.75]</p><p style="margin:0px;line-height:100%">---------</p><p style="margin:0px;line-height:100%">When I am trying to Select the region 120 E to 170W and 30N to 60N by using coordinate subscripting viz.</p><p style="margin:0px;line-height:100%"><br></p><p style="margin:0px;line-height:100%">temp_et = temp({30:60},{120:-170})</p><p style="margin:0px;line-height:100%"><br></p><p style="margin:0px;line-height:100%">It is giving error like</p><p style="margin:0px;line-height:100%"><br></p><p style="margin:0px;line-height:100%">fatal:NclOneDValGetRangeIndex: start coordinate index out of range, can't continue</p><p style="margin:0px;line-height:100%">fatal:Could not obtain coordinate indexes, unable to perform subscript</p><p style="margin:0px;line-height:100%"><br></p><p style="margin:0px;line-height:100%">Thereafter I have performed the lonFlip function</p><p style="margin:0px;line-height:100%"><br></p><p style="margin:0px;line-height:100%">temp_new = lonFlip(temp)</p><p style="margin:0px;line-height:100%">temp_et = temp_new({30:60},{120:-170})</p><p style="margin:0px;line-height:100%"><br></p><p style="margin:0px;line-height:100%">and the error is solved and the printVarSummary now looks like</p><p style="margin:0px;line-height:100%"><br></p><p style="margin:0px;line-height:100%">---------------------------</p><p style="margin:0px;line-height:100%">Variable: temp_et</p><p style="margin:0px;line-height:100%">Type: double</p><p style="margin:0px;line-height:100%">Number of Dimensions: 2</p><p style="margin:0px;line-height:100%">Dimensions and sizes: [YT_OCEAN | 40] x [XT_OCEAN | 440]</p><p style="margin:0px;line-height:100%">Coordinates:</p><p style="margin:0px;line-height:100%">YT_OCEAN: [30.2501..59.75]</p><p style="margin:0px;line-height:100%">XT_OCEAN: [119.75..-99.75]</p><p style="margin:0px;line-height:100%">----------------------------</p><p style="margin:0px;line-height:100%"><br></p><p style="margin:0px;line-height:100%">This is incorrect as my data is 0.5 degree resolution and X dimension should be 140 size rather than 440 size</p><p style="margin:0px;line-height:100%"><br></p><p style="margin:0px;line-height:100%">Please let me know where I am going wrong</p><p style="margin:0px;line-height:100%"><br></p><p style="margin:0px;line-height:100%">Thanking you in advance</p><p style="margin:0px;line-height:100%"><br></p><p style="margin:0px;line-height:100%">Regards</p></div></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank" rel="nofollow noopener noreferrer">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer nofollow noopener noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br data-mce-bogus="1"></blockquote></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank" rel="nofollow noopener noreferrer">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer nofollow noopener noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br data-mce-bogus="1"></blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><font color="#888888">Adam Phillips <br></font></div><font color="#888888">Associate Scientist,  </font><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></div></div><div><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank" rel="nofollow noopener noreferrer">www.cgd.ucar.edu/staff/asphilli/</a>   </font><font color="#888888">303-497-1726 </font></div><font color="#888888"></font><div><div><font color="#888888"><br></font><div><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank" rel="nofollow noopener noreferrer"></a></font><br data-mce-bogus="1"></div></div></div></div></div></div></div></div></div></div></div><br></div></div></body></html>