Re: Ask for help

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Tue Jan 15 2013 - 14:14:06 MST

"command not found" sounds like its the ncl command itself that is not found, in which case $NCARG_ROOT/bin is not in your path and/or ncl has not been installed on your system.

On Jan 15, 2013, at 1:48 PM, "Jiang, Lifen" <lfjiang@ou.edu> wrote:

> Hello,
>
> I followed the two examples to read my ASCII file (float; 2 dimension, lat and lon; but don't know how many rows and columns; file name is "carbonbio.txt"). However, it showed "command not found" when I run either of the below script files.
>
> Please help me to check what is the problem with scripts.
>
> Thank you for your time!
>
>
> Lifen
>
>
>
> File1:
>
> latlon2d = asciiread("carbonbio.txt",(/2,nlat,nlon/),"float") ;
> lat2d = latlon2d(0,:,:) ;
> lon2d = latlon2d(1,:,:) ;
> printVarSummary(latlon2d) ; Print information about file only.
> print(latlon2d) ; Print data, one value per line
>
>
>
> File2:
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>
> filename = "carbonbio.txt"
>
> ; Calculate the number of columns.
> ncols = numAsciiCol(filename)
>
> ; Given the # of columns, we can use readAsciiTable to read this file.
> data = readAsciiTable(filename,ncols,"float",0)
>
> nrows = dimsizes(data(:,0)) ; calculate # of rows
>
> print("'" + filename + "' has " + nrows + " rows and " + ncols + \
> " columns of data.")
> _______________________________________________
> 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 Tue Jan 15 14:14:20 2013

This archive was generated by hypermail 2.1.8 : Sat Jan 19 2013 - 10:23:16 MST