[ncl-talk] NCL bug using set values
Cathy Smith (NOAA Affiliate)
cathy.smith at noaa.gov
Wed Nov 19 15:50:00 MST 2014
Mary
That worked when I tried it. Thanks.
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?
Cathy
On 11/19/14 3:30 PM, Mary Haley wrote:
> Hi Cathy,
>
> 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.
>
> 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".
>
> So, for example, instead of:
>
> t = t(0,:,:)
>
> use this:
>
> t = gsn_add_cyclic_point(a->t(0,:,:)) ; Read first time step
>
> and instead of:
> setvalues plot at data
> "sfDataArray" : (/a->t(i,:,:)/)
> end setvalues
> use:
> setvalues plot at data
> "sfDataArray" : (/gsn_add_cyclic_point(a->t(i,:,:))/)
> end setvalues
> --Mary
>
> On Wed, Nov 19, 2014 at 12:44 PM, Cathy Smith (NOAA Affiliate)
> <cathy.smith at noaa.gov <mailto:cathy.smith at noaa.gov>> wrote:
>
> Hi-
> I followed this example
>
> https://www.ncl.ucar.edu/Applications/Scripts/animate_1.ncl
>
> to generate animations. If I set
>
> res at gsnAddCyclic = True
>
> for the first plot, it is plotted correctly. But, subsequent plots all
> plotted incorrectly as it appears that set values didn't recognize the
> cyclic True setting.
> (The array values were stretched to fill the 1 longitude longer data
> array). We could verify this was the case as when we manually
> created an
> extra longitude for the data array after the first plot, then it
> worked.
>
> Can set values be made to use use the gsnAddCycle setting that exists?
> Or, is there another way that doesn't involve manually adding the
> extra
> longitude?
>
> Let me know if more info is needed. In this case, I was using V6.1.2
>
> Cathy Smith
>
>
>
>
> ----------------------------------------------
> NOAA/ESRL PSD and CU CIRES
> 303-497-6263 <tel:303-497-6263>
> http://www.esrl.noaa.gov/psd/people/cathy.smith/
> Emails about data/webpages may get quicker responses from emailing
> esrl.psd.data at noaa.gov <mailto:esrl.psd.data at noaa.gov>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
--
----------------------------------------------
NOAA/ESRL PSD and CU CIRES
303-497-6263
http://www.esrl.noaa.gov/psd/people/cathy.smith/
Emails about data/webpages may get quicker responses from emailing
esrl.psd.data at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141119/be83f52e/attachment.html
More information about the ncl-talk
mailing list