<div dir="ltr"><div class="gmail_default" style="font-size:small">Cathy,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I think it's easier to just use regular gsn commands. But, yes, if you have a really long animation, or maybe each plot is using a really larger variable, then "setvalues" may be the better way to go.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Whenever you call gsn_csm_contour_map with a new data variable, the plot has to get created from scratch, and the lat/lon data has to be transformed to the map projection. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">When you use "setvalues" to only change the data, then, if I understand it correctly, the data doesn't have to be transformed again, and hence the plot can be created faster.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 19, 2014 at 3:50 PM, Cathy Smith (NOAA Affiliate) <span dir="ltr"><<a href="mailto:cathy.smith@noaa.gov" target="_blank">cathy.smith@noaa.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Mary<br>
That worked when I tried it. Thanks.<br>
<br>
Would I be better off using the regular gsn commands to create
animations or is set values what one should use if I am trying to
make animations that don't take too long to create?<br>
<br>
Cathy<div><div class="h5"><br>
<br>
<br>
<div>On 11/19/14 3:30 PM, Mary Haley wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-size:small">Hi Cathy,</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">None of the
"gsnXXXXX" resources are recognized by setvalues or getvalues,
because the gsnXXXX resources are ones that the gsn_xxxx
scripts recognize, and not one that the core NCL language
recognizes.</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">If you need
to plot the data with the cyclic point added, but still be
able to use setvalues in the way that this example does, then
you can try the unadvertised gsn_add_cyclic_point function
which is what "gsnAddCyclic" uses "under the hood".</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">So, for
example, instead of:</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default">
<div class="gmail_default" style="font-size:small"><font face="courier new, monospace"> t = t(0,:,:)</font></div>
<div style="font-size:small"><br>
</div>
<div style="font-size:small">use this:</div>
<div style="font-size:small"><br>
</div>
<div>
<div><font face="courier new, monospace"> t =
gsn_add_cyclic_point(a->t(0,:,:))
; Read first time step </font></div>
</div>
<div style="font-size:small"><br>
</div>
<div style="font-size:small">and instead of:</div>
</div>
<div class="gmail_default" style="font-size:small">
<pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"> setvalues plot@data
"sfDataArray" : (/a->t(i,:,:)/)
end setvalues</pre>
<pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><font face="arial, helvetica, sans-serif">use:</font></pre>
<pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><pre style="word-wrap:break-word;white-space:pre-wrap"> setvalues plot@data
"sfDataArray" : (/gsn_add_cyclic_point(a->t(i,:,:))/)
end setvalues</pre><pre style="word-wrap:break-word;white-space:pre-wrap"><font face="arial, helvetica, sans-serif">--Mary</font></pre><pre style="word-wrap:break-word;white-space:pre-wrap"></pre></pre>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Nov 19, 2014 at 12:44 PM, Cathy
Smith (NOAA Affiliate) <span dir="ltr"><<a href="mailto:cathy.smith@noaa.gov" target="_blank">cathy.smith@noaa.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi-<br>
I followed this example<br>
<br>
<a href="https://www.ncl.ucar.edu/Applications/Scripts/animate_1.ncl" target="_blank">https://www.ncl.ucar.edu/Applications/Scripts/animate_1.ncl</a><br>
<br>
to generate animations. If I set<br>
<br>
res@gsnAddCyclic = True<br>
<br>
for the first plot, it is plotted correctly. But, subsequent
plots all<br>
plotted incorrectly as it appears that set values didn't
recognize the<br>
cyclic True setting.<br>
(The array values were stretched to fill the 1 longitude
longer data<br>
array). We could verify this was the case as when we
manually created an<br>
extra longitude for the data array after the first plot,
then it worked.<br>
<br>
Can set values be made to use use the gsnAddCycle setting
that exists?<br>
Or, is there another way that doesn't involve manually
adding the extra<br>
longitude?<br>
<br>
Let me know if more info is needed. In this case, I was
using V6.1.2<br>
<br>
Cathy Smith<br>
<br>
<br>
<br>
<br>
----------------------------------------------<br>
NOAA/ESRL PSD and CU CIRES<br>
<a href="tel:303-497-6263" value="+13034976263" target="_blank">303-497-6263</a><br>
<a href="http://www.esrl.noaa.gov/psd/people/cathy.smith/" target="_blank">http://www.esrl.noaa.gov/psd/people/cathy.smith/</a><br>
Emails about data/webpages may get quicker responses from
emailing<br>
<a href="mailto:esrl.psd.data@noaa.gov" target="_blank">esrl.psd.data@noaa.gov</a><br>
_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div></div><pre cols="72"><span class="HOEnZb"><font color="#888888">--
----------------------------------------------
NOAA/ESRL PSD and CU CIRES
</font></span><span class=""><a href="tel:303-497-6263" value="+13034976263" target="_blank">303-497-6263</a>
<a href="http://www.esrl.noaa.gov/psd/people/cathy.smith/" target="_blank">http://www.esrl.noaa.gov/psd/people/cathy.smith/</a>
Emails about data/webpages may get quicker responses from emailing
<a href="mailto:esrl.psd.data@noaa.gov" target="_blank">esrl.psd.data@noaa.gov</a></span></pre>
</div>
</blockquote></div><br></div>