[ncarg-talk] Basic Plotting, from tutorial

David Brown dbrown at ucar.edu
Wed Aug 10 18:41:52 MDT 2016


gsn_csm_xy is in the script file
$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl
You should be able to grep for it:
grep gsn_csm_xy $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl

You should find a bunch of references starting with something like:

; Function : gsn_csm_xy                                                 ;

undef("gsn_csm_xy")

function gsn_csm_xy(wks:graphic,x:numeric,y:numeric,resources:logical)

      gsnp_write_debug_info(x,y,new(1,float),"gsn_csm_xy",res2,2)

.... etc.

Is NCARG_ROOT set properly?
Let us know what you find.
 -dave


On Wed, Aug 10, 2016 at 6:27 PM, Anthony Larosa <larosaant94 at gmail.com> wrote:
> Good day,
>
> New user, so this will be trivial for most, regardless I am stuck.
>
> Version: 6.3.0
>
> All the NCL stuff is located in : /usr/local/ncl-6.3.0/...
>
>
> I am trying the basics of plotting, I understand what is happening but I am
> clearly missing something.
>
> ----
> Script (basicxyplot.ncl):
>
> ;
> ; "uv300.nc data file is in $NCARG_ROOT/lib/ncarg/data/cdf
> ;
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>
> begin
>   filename = "uv300.nc"
>   a = addfile(filename,"r")
>
>   u = a->U(0,:,:)                   ; read first time step
>
>   wks = gsn_open_wks("x11","xy")
>
>   res = True
>   res at gsnMaximize = True
>
>   plot = gsn_csm_xy(wks,u&lat,u(:,5),res)
> end
>
>
> ----
> When I try: $ncl basicxyplot.ncl it returns:
> ---
> fatal:Undefined identifier: (gsn_csm_xy) is undefined, can't continue
> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 11 in file
> xyplot.ncl
> --
>
> So the function gsn_csm_xy isn't defined anywhere...great so I go ahead and
> download that simple script and put it in my home directory..
> -------
> Script(gsn_csm_xy.ncl)
>
> ;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> ;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>
>     function gsn_csm_xy (
>         wks [1] : graphic,
>         x       : numeric,
>         y       : numeric,
>         res [1] : logical
>     )
>
>     return_val [1] :  graphic
>
> --------
>
> Still the error, why?
>
> _______________________________________________
> ncarg-talk mailing list
> ncarg-talk at ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
>


More information about the ncarg-talk mailing list