<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">https://www.ncl.ucar.edu/Document/Functions/Contributed/lonPivot.shtml</a></div><div> </div><div>Or regriding the data could be another option. <br></div><div><br></div><div><br></div><div><br></div><div><br></div></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">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">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" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>