First, installation1. Installation under Linux
For a friend with server resources, it should be easier to install NCL. The latter eliminates the Linux environment to build the process, directly download the precompiled binary files, after decompression, properly configured environment variables can be used.
STEP1: Download NCL https://www.earthsystemgrid.org/dataset/ncl.630.html
STEP2: Upload to server, create installation directory mkdir ncl-6.3.0
Decompression TAR-ZVXF ncl_ncarg-6.3.0.linux*.gz
STEP3: Setting Environment variables
Export ncarg_root=/usr/local/ncl-6.3.0
Export path= $NCARG _root/bin: $PATH
2. Install via Cygwin under Windows
NCL has a poor experience in Windows, and in general it is not recommended to install NCL in Cygwin. But because of some special business needs, many people still face installation problems. Since there are already more mature tutorials, I will not do repetitive work here.
NCL Official Guide: http://www.ncl.ucar.edu/Download/cygwin.shtml
Power Forum sysop moderator's invincible sticker: http://bbs.lasg.ac.cn/bbs/thread-37043-1-1.html
3. Virtual machine installation under Windows
Windows virtual machine installation NCL is a good choice, and installing virtual machine software VMware will soon be able to install an Ubuntu. VMware has the ability to share host network connections via virtual network cards, as well as to create public folders and good places to store data. File transfer is also very satisfying, directly dragged into it. Given the generally good computer performance, this method is worth trying. The focus is to properly configure the virtual machine hardware resources, so that the host and virtual machines can run smoothly.
second, the Operation
There are two ways to run NCL, one is an interactive operating environment, and the other is run through NCL scripts.
1. Interactive Operation
Enter NCL directly in the command-line window, when the screen says first print the copyright information and then the NCL 0>, then you can enter a variety of commands, NCL's interactive running environment experience is very poor, barely can do script testing. In general, you run it by writing NCL scripts.
2. Run NCL script
NCL Scripting is a plain text document that is used to end with. NCL, and you can edit it by opening it with a favorite text editor. Once the script is written, use NCL Youscript.ncl in the command-line window to run it, or you can run the NCL script in bulk by writing scripts such as Bash,csh,ksh. Sometimes it is good practice to redirect standard output to a log file.
third, the choice of the editor
工欲善其事, its prerequisite, a good editor can play a multiplier role in programming people. Given the long-established habits of some people, it's not a good idea to brag about the power of an editor. However, it should be noted that syntax highlighting, auto-completion, indentation, folding functions can be said to be the basic configuration of the editor. If the editor you are using does not yet have these basic features, then you need to see how to add support for NCL syntax to your editor. For example, Linux is commonly used under the VIM, there are some very NCL plug-ins, then the use of these features of the people, to see it.
NCL website Editor's enhanced page: http://www.ncl.ucar.edu/Applications/editor.shtml
With Vim as an example, for our meteorologists, the knowledge of vim is not deep, the strength of this software can not be used for our use, the software is not enough, we are all at the moment to endure. To get to the point, how to add NCL grammar support to vim?
1, Https://github.com/xiexinyls/vim on GitHub Download this package, thank the author!
2. Unzip it into your home directory. Vim Directory
3. Add two lines to your home directory by opening the. vimrc file
1 2 |
filetype plugin indent on syntax on |
Just a few steps, download and then open the NCL file to see?
Have to admit that code readability has increased significantly, the best thing is that when you hit dim_a and press CTRL + N, the completion window appears, no longer have to remember the trivial function name and source properties.
Let's take a look at the power of the vim configuration, still using: Set NU or: Set Nonu to open and close line numbers? In fact, you don't need to be so hard, in your. VIMRC continue to add a sentence
1 |
nnoremap <F2> :set nonumber!<CR> |
Then try pressing the F2 key and you'll find that opening and closing the line number becomes the simplest thing, in fact, by configuring VIM, we can make vim a very efficient development tool, more content, Google, you will find.
It says so much vim, here I still want to continue the propaganda under the sublime editor, because this editor is really pleasing. Through the installation of LASG, chief teacher developed the NCL Grammar plugin, this editor will become an efficient development of NCL tool.
Specific installation instructions, see my this post HTTP://114.212.53.27/MYSITE/25
By installing the SFTP plugin, you can directly edit the files on the server without worrying about the network and the threat of downtime.
Iv. useful Open source packages
For domestic users, especially some of the users transferred from Grads, how to draw the Yangtze River and the Yellow River in NCL will often become a problem for them. Let's try the Open source NCL library that Daniel developed.
Geodiag: Chief Teacher (LASG) developed the NCL map package, contains many useful features, added the South China Sea Small map (Diaoyu you understand), while the McMahon Line has been amended, patriotic people have adopted this map package, Thank chief teacher for the contribution of NCL promotion (chief teacher recently developed a good thing-packman).
Geodiag's instructions see: http://lasg-model.github.io/geodiag/documentation.html
Add a river, just this sentence: [email protected] = True
South Sea Small Map: [email protected] = True
Mask for China Region: [email protected] = True
Everything becomes simple and natural, try it quickly!
Image:
Kmlncl: The current popularity of Google Earth, so that most of the software has increased support for KML files, of course, NCL is no exception. By installing the KMLNCL library, we can easily write our own contour lines, Ploygon, Ploymaker, etc. into the KML file.
Not much to say, look at their website: http://consideragainthat.org/kmlncl/index.html
NCL Series III: Install, run, editor and open source packages