Re: skewt_func()

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Feb 15 2012 - 13:03:21 MST

Hi Paul,

I think this has to do with some weird parent/child stuff going on internally with the workstations.

When you call gsn_open_wks, it creates a "default parent" for the workstations, of which I think only one can exist.

Hence, when you call the "create" block to create an image workstation, the "defaultapp" that you are trying to use
is invalid. I think Dave would have to explain this.

  Maybe this would work inside of plot_contour:

begin
  appid = NhlAppGetDefaultParentId()
  wks2 = create "name" imageWorkstationClass appid
    …
  end create
end

--Mary

On Feb 14, 2012, at 10:30 AM, Paul Scorer wrote:

> Greetings,
>
> [Maybe this is one for Dennis Shea: his name is all over the code :-) ]
>
> I have an interesting issue with skewt_func() (admittedly slightly
> modified)
>
> I hope the code outline below is enough to specify the problem.
>
>
> procedure sounding(...)
> begin
> wks = gsn_open_wks(...)
> skewt_bkgd = skewT_BackGround(wks, opts)
> draw(skewt_bkgd)
> skewt_data = skewT_PlotData(wks, skewt_bkgd, ...)
> frame(wks)
> end
>
> procedure plot_contour(...)
> begin
> create "name" imageWorkstationClass defaultapp
> ; wkHeight, Width, etc
> end create
> ...
> end
>
> If the above are called thus
>
> begin
> ...
> sounding(...)
> plot_contour(...)
> ...
> end
>
> then it bombs with
> fatal:_NclCreateHLUObjOp: Parent value is not an hlu object or is undefined
>
> Line number indicated is that of "end create". I get the same behaviour
> with xWorkStationClass (Both "sounding" & "plot_contour" use the same
> WorkStationClass).
>
> However, if called like this
>
> begin
> ...
> plot_contour(...)
> sounding(...)
> end
>
> Everything is OK (for both .png and X11)!
>
> Clearly the fix is obvious, but it would be nice to make the code fully
> bulletproof.
>
> Any ideas?
>
> Thanks
>
> PaulS
>
>
>
> _______________________________________________
> 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
Received on Wed Feb 15 13:03:31 2012

This archive was generated by hypermail 2.1.8 : Fri Feb 17 2012 - 08:50:10 MST