[ncl-install] Problem unzipping/untarring NCL setup file

David Brown dbrown at ucar.edu
Wed Jan 30 13:38:56 MST 2013


Hi David,
Sorry you have been having so much trouble.  Dan Packman just explained that you can control your prompt. Note that following the first part of the prompt, Cygwin is by default giving you the current directory, the same thing you would find out by typing 'pwd'. When you 'cd ..' twice from your own home directory '/home/book' you get to the root directory of the Cygwin system, which in any Unix-like OS is designated '/'. The directories you are seeing in root are not NCARG specific directories. They are system directories that contain essential elements of the operating system. 
The directories that are contained in the NCL distribution are bin, include, lib, and man. If you see *all* these directories in your root directory then perhaps you have accidentally untarred the distribution into the root directory.  This is not great but it is not terrible either. You can fix it but it is something you can worry about later after you get things working.

Assuming you want to put the distribution into your home directory, you might want to create a top-level directory for that purpose.  Here is a possible route to accomplishing your task:  (anything followed by '#' is a comment only; you do not need to type it)

cd
ls       # check to see that the ncl_ncarg-6.1.0.CYGWIN_NT-6.1-WOW64_i686.tar.gz file is still in your home directory. 
          # It may simply end in .tar if you have already run gunzip on it.

mkdir ncarg  # or whatever you want to call it
cd ncarg

# if the extension of the file is still .gz do this:
gunzip -c  /cygwin/home/Book/ncl_ncarg-6.1.0.CYGWIN_NT-6.1-WOW64_i686.tar.gz | tar -xvf -  # uncompress and untar to the current directory

#otherwise
tar -xvf /cygwin/home/Book/ncl_ncarg-6.1.0.CYGWIN_NT-6.1-WOW64_i686.tar

ls # you should see directories bin, include, lib, and man.

# set the environment
export NCARG_ROOT=/home/book/ncarg
export PATH=$NCARG_ROOT/bin:$PATH

#Now you should be able to type
ncl
#and get the ncl prompt. This is just to prove that your installation worked.

You can install to /usr/local the same way. Note however that /usr/local is an absolute path from the root directory. 

-------

The Autograph routines are part of the NCARG library, which is called 'libncarg.a' Based on my instructions above it will be found in /home/book/ncarg/lib, which can also be referred to as ~/ncarg/lib.


The easiest way to build your program that uses Autograph is to compile it with 'ncargf90', something like:

ncargf90 myprogram.f -o myprogram 

The executable 'ncargf90' lives in the $NCARG_ROOT/bin (/home/book/ncarg/bin if you followed the example). It should be on your PATH.
 
Hope this helps.
 -dave






On Jan 30, 2013, at 12:30 PM, David Book wrote:

> Mary and Daniel . . .
> 
> To continue our discussion, I have two questions.
> 
> First question: Earlier I pointed out a peculiarity in my prompts. The prompt when I am in my home directory reads
> 
> Book at Book-Enigmatics ~ rather than Book
> 
> When I do a cd .. the prompt reads  Book at Book-Enigmatics /home 
> 
> When I do another cd .. the prompt reads Book at Book-Enigmatics /
> 
> This is the same as the prompt in my home directory, except that a slash has replaced the tilde.
> 
> If I do an ls -a command here, I see all the NCARG directories (tmp, home, etc, var, bin, and so on). The files that were zipped in that installation file that I downloaded have been installed in Book at Book-Enigmatics /
> rather than  my home directory Book at Book-Enigmatics ~  !  I think this explains why I was unable to gunzip the .gz file or untar the .tar file using the full pathname prescribed in the instructions, namely 
> 
> gunzip /cygwin/home/Book/ncl_ncarg-6.1.0.CYGWIN_NT-6.1-WOW64_i686.tar.gz
> 
> Although I tried to follow the instructions scrupulously, somehow I have managed to create an unorthodox directory structure. 
> 
> This probably also explains why I have been unable to carry out the next step in the instructions, "Set up your environment to run NCL." In my home directory (Book at Book-Enigmatics ~) tried to use nedit to insert export NCARG_ROOT=/usr/local and export PATH=/usr/local/bin:$PATH in my .bashrc file, but the system couldn't even find nedit (it can find it when I am in the second, "lower" directory Book at Book-Enigmatics / ).
> 
> I'm afraid I'm only going to have more trouble unless I fix this. I suspect I will have to reinstall CYGWIN and NCL. Is this correct?
> 
> 
> Second question: My reason for installing NCL in the first place (which necessitated first installing CYGWIN) was because I wanted to run an old program, written in Fortran 90, that uses Autograph to produce plots. I didn't want to rewrite my program and I thought that it would be easy to download the NCAR graphics package. (Boy, was I wrong!)
> 
> Bujt now that I have downloaded that package, I can't find any of the Autograph routines (AGSETF, EZXY,  etc.) in the libraries. Are they included? If not, how can I get the Autograph package, either in source form or binaries?
> 
> 
> David
> 
> 
> 
> David L. Book 
> President, Enigmatics, Inc. 
> 
> 
> From: "Mary Haley" <haley at ucar.edu>
> Sent: Tuesday, January 29, 2013 1:35 PM
> To: davidbook at enigmatics.com
> Subject: Re: [ncl-install] Problem unzipping/untarring NCL setup file
> 
> David,
> 
> You need to be careful about when you use "~/" and just "/".
> 
> If you use ~/ in front of a path, then it will automatically prepend your home directory to it, which is /home/Book
> 
> So, you *don't* want to do this:
> 
> > tar xvf ~/cygwin/home/Book at Enigmatics-Book/ncl_ncarg-6.1.0.CYGWIN_NT-6.1-WOW64_i686.tar
> 
> 
> This should work:
> 
> cd /usr/local
> tar -xvf /home/Book/ncl_ncarg-6.1.0.CYGWIN_NT-6.1-WOW64_i686.tar
> 
> or this:
> 
> cd /usr/local
> tar -xvf ~/ncl_ncarg-6.1.0.CYGWIN_NT-6.1-WOW64_i686.tar
> 
> Again, "~/" is just a substitution for your home directory, which appears to be "/home/Book/".
> 
> --Mary
> 
> On Jan 29, 2013, at 1:23 PM, David Book wrote:
> 
> > Daniel . . .
> > 
> > Thanks again. Here's what I did and what I got:
> > 
> > 
> > Book at Book-Enigmatics ~
> > $ cd /usr/local 
> > 
> > Book at Book-Enigmatics /usr/local
> > $ tar xvf ~/cygwin/home/Book at Enigmatics-Book/ncl_ncarg-6.1.0.CYGWIN_NT-6.1-WOW64_i686.tar
> > tar: /home/Book/cygwin/home/Book at Enigmatics-Book/ncl_ncarg-6.1.0.CYGWIN_NT-6.1-WOW64_i686.tar: Cannot open: No such file or directory
> > tar: Error is not recoverable: exiting now
> > 
> > Book at Book-Enigmatics /usr/local
> > $ tar xvf ~/cygwin/home/Book/ncl_ncarg-6.1.0.CYGWIN_NT-6.1-WOW64_i686.tar tar: /home/Book/cygwin/home/Book/ncl_ncarg-6.1.0.CYGWIN_NT-6.1-WOW64_i686.tar: Cannot open: No such file or directory
> > tar: Error is not recoverable: exiting now
> > 
> > 
> > David
> > 
> > 
> > David L. Book 
> > President, Enigmatics, Inc. 
> > 
> > 
> > From: "David Book" <davidbook at enigmatics.com>
> > Sent: Tuesday, January 29, 2013 12:02 PM
> > To: "Daniel Packman" <pack at ucar.edu>
> > Subject: Re: [ncl-install] Problem unzipping/untarring NCL setup file
> > 
> > Daniel . . .
> > 
> > Here's what I did and what I got:
> > 
> > $cd 
> > 
> > Book at Book-Enigmatics ~
> > $ pwd
> > /home/Book
> > 
> > Book at Book-Enigmatics ~
> > 
> > 
> > So the directory is named "Book," but the prompt says "Book at Book-Enigmatics ~" What does this mean? 
> > 
> > 
> > David
> > 
> > David L. Book 
> > President, Enigmatics, Inc. 
> > 
> > 
> > From: "Daniel Packman" <pack at ucar.edu>
> > Sent: Tuesday, January 29, 2013 10:30 AM
> > To: davidbook at enigmatics.com
> > Subject: Re: [ncl-install] Problem unzipping/untarring NCL setup file
> > 
> > 
> > It sounds like you need to sort out just what your home directory looks like
> > within cygwin. If you just do a "cd" with no arguments, you should be taken
> > to your home directory. If you then do a "pwd", the path to your home directory
> > should be echoed.
> > 
> > _______________________________________________
> > ncl-install mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-install
> 
> _______________________________________________
> ncl-install mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-install



More information about the ncl-install mailing list