[ncl-talk] Error in selecting box using coordinate subscripting

Rashed Mahmood rashidcomsis at gmail.com
Fri Jul 16 11:46:11 MDT 2021


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?
https://www.ncl.ucar.edu/Document/Functions/Contributed/lonPivot.shtml

Or regriding the data could be another option.





On Fri, Jul 16, 2021 at 8:55 AM samirpokhrel via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Dear NCL Users,
>
>
> 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
>
> -------
>
> Variable: temp
>
> Type: double
>
> Number of Dimensions: 2
>
> Dimensions and sizes: [YT_OCEAN | 410] x [XT_OCEAN | 720]
>
> Coordinates:
>
> YT_OCEAN: [-80.75..89.75]
>
> XT_OCEAN: [-279.75..79.75]
>
> ---------
>
> When I am trying to Select the region 120 E to 170W and 30N to 60N by
> using coordinate subscripting viz.
>
>
> temp_et = temp({30:60},{120:-170})
>
>
> It is giving error like
>
>
> fatal:NclOneDValGetRangeIndex: start coordinate index out of range, can't
> continue
>
> fatal:Could not obtain coordinate indexes, unable to perform subscript
>
>
> Thereafter I have performed the lonFlip function
>
>
> temp_new = lonFlip(temp)
>
> temp_et = temp_new({30:60},{120:-170})
>
>
> and the error is solved and the printVarSummary now looks like
>
>
> ---------------------------
>
> Variable: temp_et
>
> Type: double
>
> Number of Dimensions: 2
>
> Dimensions and sizes: [YT_OCEAN | 40] x [XT_OCEAN | 440]
>
> Coordinates:
>
> YT_OCEAN: [30.2501..59.75]
>
> XT_OCEAN: [119.75..-99.75]
>
> ----------------------------
>
>
> This is incorrect as my data is 0.5 degree resolution and X dimension
> should be 140 size rather than 440 size
>
>
> Please let me know where I am going wrong
>
>
> Thanking you in advance
>
>
> Regards
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210716/28f68956/attachment.html>


More information about the ncl-talk mailing list