[ncarg-talk] Basic Plotting, from tutorial

Anthony Larosa larosaant94 at gmail.com
Wed Aug 10 18:27:25 MDT 2016


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncarg-talk/attachments/20160810/68084f04/attachment.html 


More information about the ncarg-talk mailing list