Re: Error in gsn_code.ncl

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri Mar 18 2011 - 13:53:07 MDT

Hi Vanesa,

This is an older bug that was fixed in 5.2.1 I think.

What's happening is you must be loading gsn_code.ncl twice, and there are three functions (I think) that we forgot to put an "undef" in front of so they are undefined.

The fix is to load gsn_code.ncl only once, or to edit this file and add:

undef("is_cairo_ps")

before:

function is_cairo_ps(wtype)

You may have to do this for a couple of other functions.

--Mary

On Mar 18, 2011, at 12:07 PM, Vanesa Bdm wrote:

> Hello everybody, when I run the scripts I realized I have this error:
>
>
> Copyright (C) 1995-2010 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 5.2.0
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
> fatal:syntax error: line 3118 in file /usr/local/ncarg/lib/ncarg/nclscripts/csm/gsn_code.ncl before or near is_cairo_ps
> function is_cairo_ps
> -------------------^
>
> fatal:Function identifier is defined
> fatal:syntax error: line 3119 in file /usr/local/ncarg/lib/ncarg/nclscripts/csm/gsn_code.ncl before or near local
> local
> ----^
>
> What is this?
> This function in gsn_code.ncl is:
>
> ;***********************************************************************;
> ; Function to determine if a cairo PS is being requested. ;
> ;***********************************************************************;
> function is_cairo_ps(wtype)
> local lwtype, cpsenv
> begin
> lwtype = lower_case(wtype)
> cpsenv = getenv("NCARG_CAIRO_PS")
> if(lwtype.eq."newps".or.(lwtype.eq."ps".and..not.ismissing(cpsenv))) then
> return(True)
> else
> return(False)
> end if
> end
> Regards
>
> _______________________________________________
> 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 Fri Mar 18 13:53:13 2011

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2011 - 16:15:59 MDT