ask a question when using "reshape"

From: <yjin7_at_nyahnyahspammersnyahnyah>
Date: Tue Mar 25 2014 - 15:23:04 MDT

Hi Everyone,

When I try to transform a 3D matrix to 4D matrix, I plan to use "reshape". But even for a very short test script it always give me the wrong message.

The test script is from the website https://www.ncl.ucar.edu/Document/Functions/Built-in/reshape.shtml

;************

;test for reshape
;*****
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/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
;******
begin
x= random_uniform(-100,100,(/10,20,30/))
x2d = reshape(x,(/200,30/))
print(x2d)

end
;****************

the error message is :
********************
Copyright (C) 1995-2011 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 6.0.0-beta
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
fatal:Undefined identifier: (reshape) is undefined, can't continue
fatal:Execute: Error occurred at or near line 10
***********************************

?

---
Yan Jin
Climate Dynamics Ph.D Program
Department of Atmospheric,Oceanic and Earth Sciences
George Mason University
Fairfax, Virginia 22030

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Mar 25 15:23:21 2014

This archive was generated by hypermail 2.1.8 : Mon Mar 31 2014 - 11:47:09 MDT