[ncl-talk] changing coordinates

Alan Brammer abrammer at albany.edu
Thu Jan 29 12:14:36 MST 2015


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
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150129/212337d5/attachment.html 


More information about the ncl-talk mailing list