[ncl-talk] Multiple Issues

David Brown dbrown at ucar.edu
Wed Nov 25 11:10:07 MST 2015


Hi Jinwoong,

After looking over your script and some experimentation, I have traced the
cause of the error messages to this line:

plot2   = gsn_csm_contour(wks,gsn_add_cyclic_point(prob(:,:,nmo)), res2)

This is explicitly adding a cyclic point to a non-global dataset (in your
case) leading directly to the errors.

Changing the line to

 plot2   = gsn_csm_contour(wks,prob(:,:,nmo), res2)

removes the errors. You might also want to experiment with setting
trGridType to "TriangularMesh" and cnFillMode to "RasterFill". It will
speed up the drawing. The "rasterfill" plot looks a bit different from the
"areafill" plot though (and honestly I am not sure why -- that would take
more investigation), so it might not be what you want.

 -dave



On Thu, Nov 19, 2015 at 4:45 PM, David Brown <dbrown at ucar.edu> wrote:

> OK thanks. I'll have a look.
>  -dave
>
> On Thu, Nov 19, 2015 at 4:27 PM, Jinwoong Yoo <jinwoongyoo at unm.edu> wrote:
>
>> Dear Dave,
>>
>>
>> I assume that you can access to my code in Yellowstone scratch directory
>> at /glade/scratch/jyoo/domain/mean/analysis/ncl_code.
>>
>> The code is named as envfactor_test.ncl.
>>
>> Thank you.
>>
>> Regards,
>>
>> Jinwoong
>>
>> ------------------------------
>> *From:* David Brown <dbrown at ucar.edu>
>> *Sent:* Thursday, November 19, 2015 4:21 PM
>> *To:* Jinwoong Yoo
>>
>> *Subject:* Re: [ncl-talk] Multiple Issues
>>
>> Can you send me your script and I will take a look?
>>  -dave
>>
>> On Thu, Nov 19, 2015 at 4:14 PM, Jinwoong Yoo <jinwoongyoo at unm.edu>
>> wrote:
>>
>>> Dear Dave,
>>>
>>>
>>> I am glad that I'm getting closer.
>>>
>>> Actually, the line, res2 at gsnAddCyclic = False , is existing already in
>>> my code.
>>>
>>> That's why I am troubled with the warnings. [image: 😊]
>>>
>>> Thank you.
>>>
>>>
>>> Regards,
>>>
>>>
>>> Jinwoong
>>>
>>>
>>> ------------------------------
>>> *From:* David Brown <dbrown at ucar.edu>
>>> *Sent:* Thursday, November 19, 2015 4:05 PM
>>>
>>> *To:* Jinwoong Yoo
>>> *Cc:* Alan Brammer; ncl-talk at ucar.edu
>>> *Subject:* Re: [ncl-talk] Multiple Issues
>>>
>>> Well your plot looks a lot better now.
>>>
>>> If you are using climo_1.ncl as a template, then notice that there are
>>> two contour plots drawn with one overlaid on the other. They use different
>>> resource variables: res and res2. I think you need to set gsnAddCyclic to
>>> False for both of these variables. In other words, add the line
>>>
>>> res2 at gsnAddCyclic = False
>>>
>>> in the appropriate location and hopefully the error messages will go
>>> away.
>>>  -dave
>>>
>>> On Thu, Nov 19, 2015 at 3:47 PM, Jinwoong Yoo <jinwoongyoo at unm.edu>
>>> wrote:
>>>
>>>> Dear Dave,
>>>>
>>>>
>>>> Inspired by your comment, "Perhaps an issue with a missing value not
>>>> being recognized properly?", I cleared missing values in the input
>>>> data (which was marked as "-nan").
>>>>
>>>> Then, I was able to remove the lines (see attached image).
>>>>
>>>> However, I am getting the warning messages still.
>>>>
>>>>
>>>> (0) gsn_add_cyclic: Warning: The range of your longitude data is not
>>>> 360.
>>>> (0) You may want to set the gsnAddCyclic resource to False to avoid a
>>>> (0) warning 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
>>>>
>>>>
>>>> Thank you very much.
>>>>
>>>>
>>>> Regards,
>>>>
>>>>
>>>> Jinwoong
>>>>
>>>>
>>>> ------------------------------
>>>> *From:* David Brown <dbrown at ucar.edu>
>>>> *Sent:* Thursday, November 19, 2015 3:13 PM
>>>> *To:* Jinwoong Yoo
>>>> *Cc:* Alan Brammer; ncl-talk at ucar.edu
>>>>
>>>> *Subject:* Re: [ncl-talk] Multiple Issues
>>>>
>>>> The unwanted lines in your plot all seem to be pointing towards a
>>>> single point. Perhaps an issue with a missing value not being recognized
>>>> properly?
>>>> It might help us diagnose the problem if you printed out summaries of
>>>> the lat, lon, and data variables.
>>>>  -dave
>>>>
>>>>
>>>> On Thu, Nov 19, 2015 at 1:35 PM, Jinwoong Yoo <jinwoongyoo at unm.edu>
>>>> wrote:
>>>>
>>>>> Thank you, Alan, for your comment.
>>>>>
>>>>>
>>>>> Regards,
>>>>>
>>>>>
>>>>> Jinwoong
>>>>>
>>>>>
>>>>> ------------------------------
>>>>> *From:* Alan Brammer <abrammer at albany.edu>
>>>>> *Sent:* Thursday, November 19, 2015 1:29 PM
>>>>> *To:* Jinwoong Yoo
>>>>> *Cc:* ncl-talk at ucar.edu
>>>>> *Subject:* Re: [ncl-talk] Multiple Issues
>>>>>
>>>>> Have you tried doing what the error suggests?
>>>>>
>>>>> (0) You may want to set the gsnAddCyclic resource to False to avoid a
>>>>> (0) warning message from the spline function.
>>>>>
>>>>>
>>>>> if your plotting resources are in a variable name res
>>>>>
>>>>> res at gsnAddCyclic  = False
>>>>>
>>>>>
>>>>> Alan.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On 19 Nov 2015, at 15:15, Jinwoong Yoo <jinwoongyoo at unm.edu> wrote:
>>>>>
>>>>> Dear NCL users,
>>>>>
>>>>> I am trying to plot an image following an example at
>>>>> https://www.ncl.ucar.edu/Applications/Images/climo_1_lg.png.
>>>>> <https://www.ncl.ucar.edu/Applications/Images/climo_1_lg.png>
>>>>>
>>>>> but I'm getting a few warnings and my result plot is not pretty enough
>>>>> (attached).
>>>>>
>>>>> Warning messages are as below:
>>>>>
>>>>> (0) gsn_add_cyclic: Warning: The range of your longitude data is not
>>>>> 360.
>>>>> (0) You may want to set the gsnAddCyclic resource to False to avoid a
>>>>> (0) warning 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
>>>>>
>>>>>
>>>>>
>>>>> <test_MPI.png>_______________________________________________
>>>>> ncl-talk mailing list
>>>>> ncl-talk at ucar.edu
>>>>> List instructions, subscriber options, unsubscribe:
>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> ncl-talk mailing list
>>>>> ncl-talk at ucar.edu
>>>>> 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/20151125/759cb687/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OutlookEmoji-?.png
Type: image/png
Size: 488 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151125/759cb687/attachment.png 


More information about the ncl-talk mailing list