Re: BUG: gsn_open_wks

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon, 6 Apr 2009 09:00:07 -0600 (MDT)

Thanks Bruce, I just verified your bug and fixed it.

The issue was internally, a set of attributes was being copied from a
string variable to an object variable. The _FillValue was also being
copied, and this violates a rule that the _FillValue must be the same
type as the variable it is associated with.

I added a test to make sure the "_FillValue" doesn't get copied; it's
not needed anyway.

--Mary

On Fri, 27 Mar 2009, Lunde, Bruce N CIV NAVOCEANO, NP1 wrote:

> Hello,
>
> I encountered a sort of "bug" when passing
> arguments to gsn_open_wks().
>
> I was passing string variables as inputs to
> gsn_open_wks(), but NCL would "error out"
> when my string variables contained an
> attribute of "_FillValue = missing".
>
> I have not tracked down why my string variables
> obtained an attribute of "_FillValue = missing",
> but I was passing in a string value of "eps" and
> the error would occur in the gsn_code.ncl module
> within the routine gsn_open_ps() at the fifth
> executable line which reads
>
> wkres@$names(i)$ = type@$names(i)$
>
> and the error was
>
> fatal:Type Mismatch: The type of missing
> value could not be converted to type of
> variable (wkres)
>
> The way I used to get around this error was to
> put delete(wks_type@_FillValue) prior to my
> call to gsn_open_wks().
>
> You can mimic what happened with the following
> bit of code:
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> begin
> wks_type = "eps"
> wks_type@_FillValue = ""
> wks = gsn_open_wks(wks_type,"testing")
> end
>
> Thanks, Bruce
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Apr 06 2009 - 09:00:07 MDT

This archive was generated by hypermail 2.2.0 : Mon Apr 06 2009 - 10:23:30 MDT