[ncl-talk] gsn_csm_streamline_scalar* functions

Alan Brammer abrammer at albany.edu
Thu Mar 5 18:58:19 MST 2015


Mary,

Having just finished my wild goose chase, here are the answers to your
questions.

** Long story short, streamlinePlotClass wasn't supported by gsn_panel. My
work around caused problems. Here's edited versions of gsn_panel so
streamlinePlotClass is supported.  **


The problem I was having with panelling was because I was drawing one plot
with lbLabelBarOn = True.  This was throwing off the dimensions and I think
is a known thing. No big deal I should just use gsnPanelLabelBar = True.
Well here was the problem, when panelling the supported
gsn_csm_streamline_map with stMonoLineColor = False, therefore with
coloured streamlines, gsn_panel says it's an unsupported type and will
ignore the label bar request.   Hence why I was forcing one of the plots to
have the label bar.  I don't like having to draw it myself.


So, because I wanted the ability to panel my new gsn_csm_streamline_scalar*
functions as well as the supported gsn_csm_streamline_map functions. I've
have gone through and edited gsn_panel_return and also had to add
"streamlinePlotClass" to get_plot_not_loglin().


Attached below are a simple script to first identify that gsn_panel will
ignore a labelbar request from the gsn_csm_streamline_map() then load my
edited versions and show that it now works.


Some simple data attached as well.



On Thu, Mar 5, 2015 at 10:10 AM, Mary Haley <haley at ucar.edu> wrote:

> Hi Alan,
>
> Thanks for the code.  Maybe I can get it into V6.3.0.
>
> When you say it doesn't panel, what exactly happens? Can you provide a
> sample test?
>
> --Mary
>
>
> On Wed, Mar 4, 2015 at 12:33 PM, Alan Brammer <abrammer at albany.edu> wrote:
>
>> I wanted this functionality so made an edited duplicate of the
>> gsn_csm_vector_scalar* functions.
>>
>> Have gone through a tested each function and everything seems to function
>> without bugs.  Didn't have to edit too much so there wasn't too much to
>> break.
>>
>> gsn_csm_streamline_scalar() doesn't panel as expected for me but this
>> also happens with me for gsn_csm_vector_scalar() so that's a problem for
>> another day.
>>
>>
>> I can edit documentation if desired, there is nothing unexpected though.
>>
>> If passed wind speed this will function identically to the regular
>> function with stMonoLineColor = False.  I think this functionality was
>> available through setting stScalarFieldData, but that didn't seem to match
>> up with the functionality elsewhere and I'm still not a overly familiar
>> with setvalues or getvalues.
>>
>>
>> Only tested in 6.2.{0,1}.  I seem to have lost my 6.1 version.
>>
>>
>>
>>
>> _______________________________________________
>> 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/20150305/50acd90e/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gsn_panel_return.ncl
Type: application/octet-stream
Size: 37570 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150305/50acd90e/attachment-0002.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: streamline_panel.ncl
Type: application/octet-stream
Size: 1863 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150305/50acd90e/attachment-0003.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: temp_out.nc
Type: application/x-netcdf
Size: 247080 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150305/50acd90e/attachment-0001.nc 


More information about the ncl-talk mailing list