[ncl-talk] changing coordinates
Mary Haley
haley at ucar.edu
Tue Feb 3 08:58:57 MST 2015
Hi Sunmin,
[Thanks, Alan, for helping out here.]
Alan is correct that setting res at gsnAddCyclic = False should have normally
fixed the problem, but there may be other issues with your coordinate
arrays.
Did this problem get resolved when you set the above resource to False, or
are you still having issues? If you are still having issues, please include
all error messages, if any, and information about your variable
(printVarSummary, etc).
--Mary
On Thu, Jan 29, 2015 at 12:14 PM, Alan Brammer <abrammer at albany.edu> wrote:
> Having just tried to recreate this problem (tho I can't actually get half
> a plot at the moment). I got the below error repeatedly. Did you get
> this error? If so the 2nd line tells you exactly what to do.
>
> *(0) gsn_add_cyclic: Warning: The range of your longitude coordinate array
> is at least 360.*
> *(0) You may want to set gsnAddCyclic to False to avoid a warning*
> *(0) message from the spline function.*
> *warning:_NhlCreateSplineCoordApprox: Attempt to create spline
> approximation for X axis failed: consider adjusting trXTensionF value*
> *warning:IrTransInitialize: error creating spline approximation for
> trXCoordPoints; defaulting to linear*
> *warning:gsnAddCylic is not a valid resource in gsnapp_contour at this
> time*
> *fatal:ContourPlotDraw: coordinates are out of range for drawing over a
> map: standard AreaFill rendering method will not work;*
> * consider setting the resource trGridType to "TriangularMesh" if
> coordinates contain missing values*
>
>
>
>
>
>
> On Thu, Jan 29, 2015 at 2:06 PM, Alan Brammer <abrammer at albany.edu> wrote:
>
>> Sun,
>>
>> Sorry I didn't reply to your other thread. Hoped someone else would step
>> in.
>>
>> Did you try setting off res at gsnAddCyclic = False as I suggested in my
>> other reply?
>>
>> Your data already has the cyclic therefore ncl should not be told to try
>> and add it again.
>>
>>
>>
>> On Wed, Jan 28, 2015 at 11:37 PM, Sunmin Park <mireiyue at gmail.com> wrote:
>>
>>> Thank you Kyle
>>>
>>> I already used the function and when I print out the variable
>>> (printVarSummary), it changed from (0,360) to (-180,180)
>>> But when I plot them the figures only shows half (0,180E part).
>>>
>>> Sun-
>>>
>>>
>>> On Jan 28, 2015, at 8:36 PM, Kyle Griffin <ksgriffin2 at wisc.edu> wrote:
>>>
>>> Try the lonFlip function. It is designed to do this. While changing the
>>> coordinates is logical, you also must change the actual *data* as well to
>>> be similarly reordered. A simple
>>>
>>> extGmean = lonFlip(extGmean)
>>>
>>> should work.
>>>
>>> https://www.ncl.ucar.edu/Document/Functions/Contributed/lonFlip.shtml
>>>
>>>
>>> Kyle
>>>
>>> ----------------------------------------
>>> Kyle S. Griffin
>>> Department of Atmospheric and Oceanic Sciences
>>> University of Wisconsin - Madison
>>> Room 1421
>>> 1225 W Dayton St, Madison, WI 53706
>>> Email: ksgriffin2 at wisc.edu
>>>
>>> On Wed, Jan 28, 2015 at 8:39 PM, Sunmin Park <mireiyue at gmail.com> wrote:
>>>
>>>> Dear NCL users
>>>>
>>>> Following question from the previous email that was about problem
>>>> creating figure. As I looked at the original data they had different
>>>> coordinate.
>>>>
>>>> Is there way that we can change longitude [-180,180] to [0,360]? I am
>>>> trying to compare 4 data sets and one data set has [-180,180] and the
>>>> others have [0,360]. I changed [-180,180] to [0,3600 using
>>>>
>>>> extGmean!0 = "lat"
>>>> extGmean!1 = "lon"
>>>> lat = fspan(-85,85,85)
>>>> lon = fspan(0,360,72)
>>>> lat at longname = "latitude"
>>>> lat at units = "degrees_north"
>>>> lon at longname ="longitude"
>>>> lon at units = "degrees_east"
>>>> extGmean&lat = lat
>>>> extGmean&lon = lon
>>>>
>>>> but It give wrong plot, looks like changing west and east.
>>>> How I can fix problem?
>>>> Thank you for any comments and helps.
>>>>
>>>> Sun-
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>
> _______________________________________________
> 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/20150203/4e74ed9d/attachment.html
More information about the ncl-talk
mailing list