Reference from: http://bbs.lasg.ac.cn/bbs/thread-37043-1-1.html
1. Download
All the required documents can be downloaded here: Http://yunpan.cn/cQsvAEe3Axs2Z access password 2FA2
Download the file into the d:/anzhuang/directory, Cygwin.rar need to unzip, another NCL compressed files do not need to unzip
2. Installing cygwin/x
1) Click Setup.exe under the Cygwin folder
2) Click "Next" and "Choose installation Type" appears, please select "Install from Local Directory"
3) Click "Next", "Choose installation directory" appears, the default root Directory is "C:\cygwin", please change to "D:\Cygwin", other options do not move
4) Click "Next", "Select Local package Directory" appears, select "Cygwin folder after Cygwin decompression"
5) Click "Next", "Select Packages" appears, this is a very important step.
6) Click on the marked Red line, you can switch in the "Default" "Install" "Reinstall" "Uninstall" four installation status, Select "Install", and confirm in X11 "Xorg-cf-files" and " Xorg-server "is selected as" Install "status (that is, click Skip will show the version number. )
7) End of installation, click "Done"
8) Double-click on the "Cygwin" icon on the Windows desktop to launch a character terminal (term), create a user home directory (home directory)-"/home/administrator", and copy several profiles to the user directory
Attention:
A. Under Home/administrator in the installation directory, open the. BASHRC with Notepad,
B. Add the following line to the. BASHRC:
Export ps1= "\[email protected]\h:\ $PWD >"
C. After saving the file, enter the following command to make the setting effective: source. BASHRC
9) start x Server
From Windows Explorer, find "D:\cygwin\bin\startxwin.bat", right-click on it, select "Send To", "desktop Shortcut", and named "Startxwin", then just double-click this icon, you can start X Server and Xterm.
3. Install NCL
1) Double-click Startxwin (on the desktop)
2) in Xterm, type the following command (#后为命令说明) in turn:
Cd/usr/local # NCL installation directory
Tar xvfz/cygdrive/d/download/ncl_ncarg-5.1.0.cygwin_nt-5.1_i686.tar.gz # decompression NCL Software
Cd
3) Set the NCL environment variable
Edit the ". BASHRC" file in the user's home directory and add the following three lines:
Export ncarg_root=/usr/local
Export Path=/usr/local/bin: $PATH
Export display=:0.0
The description is as follows:
First line, set NCL environment variable
Second line, set the search path
Third row, setting the display environment
After saving the file, run the following command to make the setting effective: source. BASHRC
At this point, the NCL installation ends.
4.NCL Test
Example:
In the user's home directory, enter the following two commands in turn:
Cp/usr/local/lib/ncarg/nclex/xyplot/xy04n.ncl. #注意最后的点号
NCL Xy04n.ncl
Effect:
Using NCL under Windows (Cygwin simulated Linux environment)