shea_util.ncl error

From: Tao Zhang <tao.zhang_at_nyahnyahspammersnyahnyah>
Date: Mon Oct 21 2013 - 10:28:28 MDT

Dear NCL-Talk,

  I have a NCL code which works before in big_endian machine.

  Now I can not run it in little_endian machine. The key sentences and error message are listed below.

  After I use the option"

setfileoption ("bin", "ReadByteOrder", "BigEndian") ; for big_endian
data created in old machine only"

  I have no problem in reading the data.

  Thus, I think "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl" may
be updated in new version of NCL
and it does not work any more for my NCL code.

  Do you know how to fix it?

  Thanks,
  Tao

1) key sentences of test1.ncl
-------------------------------------------
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"

begin
      print("timestart:" + systemfunc("date"))

;---read in Nino3 SSTA (access='direct')
      path =
"/nas/tzhang/CCSM3_T85/Asymmetry/data/n3sst-gisst-1950.01-1999.12.dat"
      nrec = 0
      dims = (/600/)
      setfileoption ("bin", "ReadByteOrder", "BigEndian") ; for
big_endian data created in old machine only
      obs = fbindirread(path,nrec,dims,"float")
      obs = dim_rmvmean(obs)

         print("obs = "+dimsizes(obs))

      iopt = 0
      jave = 5
      pct = 0.1

         jave = 11
;
         sdof1 = specx_anal(obs,iopt,jave,pct)

      type = "ps"
      type@wkColorModel = "cmyk"
      wks = gsn_open_wks(type,"test1")
    ............

         res@xyLineThicknessF = 5.
         res@xyLineColor = "black"
         res@xyExplicitLegendLabels = (/" Observation "/)
         res@pmLegendParallelPosF = 0.85 ; move units right
         plot1 = gsn_csm_xy(wks,sdof1@frq,sdof1@spcx,res)
         draw(wks)

         xres = True
         xres@txFontHeightF = 0.022

         frame(wks)
end

;

2) Error message:
;===================================================================================

------------------------
/Users/tzhang/Disk/Asymmetry/CMIP5/File_reviseJC> ncl test1.ncl
  Copyright (C) 1995-2013 - All Rights Reserved
  University Corporation for Atmospheric Research
  NCAR Command Language Version 6.1.2
  The use of this software is governed by a License Agreement.
  See http://www.ncl.ucar.edu/ for more details.
fatal:syntax error: line 3232 in file
$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n
   copy_VarCoords(x, advect)
---------------------------^

fatal:syntax error: possibly an undefined procedure
fatal:Syntax Error in block, block not executed
fatal:error at line 3255 in file
$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl

fatal:syntax error: line 3364 in file
$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n
   copy_VarCoords(X, Xdp)
------------------------^

fatal:syntax error: possibly an undefined procedure
fatal:Syntax Error in block, block not executed
fatal:error at line 3400 in file
$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl

fatal:syntax error: line 3478 in file
$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n
   copy_VarCoords(t, theta)
--------------------------^

fatal:syntax error: possibly an undefined procedure
fatal:Syntax Error in block, block not executed
fatal:error at line 3482 in file
$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl

fatal:syntax error: line 3573 in file
$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n
   copy_VarCoords(t,s)
---------------------^

fatal:syntax error: possibly an undefined procedure
fatal:Syntax Error in block, block not executed
fatal:error at line 3576 in file
$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl

fatal:syntax error: line 3666 in file
$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n
   copy_VarCoords(t, theta)
--------------------------^

fatal:syntax error: possibly an undefined procedure
fatal:syntax error: line 3706 in file
$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl before or near \n
   copy_VarCoords(t,pv)
----------------------^

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Oct 21 10:28:45 2013

This archive was generated by hypermail 2.1.8 : Tue Oct 22 2013 - 10:35:27 MDT