Page tree

On this page

Overview

NCL stands for NCAR Command Language. It is a free interpreted language designed specifically for scientific data processing and visualization. It has robust file input and output. It can read in netCDF 3/4, GRIB 1/2, HDF 4/5, HDF-EOS 2/5, shapefile, ASCII and binary data. The graphics are world class and highly customizable.

More information: https://www.ncl.ucar.edu/

Usage

Login to Gadi with X11 (X-Windows) forwarding. Add the -Y option for Linux/Mac/Unix to your SSH command to request SSH to forward the X11 connection to your local computer. For Windows, we recommend to use MobaXterm (http://mobaxterm.mobatek.net) as it automatically uses X11 forwarding.

You can check the versions installed in Gadi with a module query:

$ module avail ncl

We normally recommend using the latest version available and always recommend to specify the version number with the module command:

$ module load ncl/6.6.2

For more details on using modules see our modules help guide at https://opus.nci.org.au/display/Help/Environment+Modules.

This will set the environment variable NCARG_ROOT and add the NCL binaries to your path.

If a module is available for NCARG, it will also set the environment variable NCARG_ROOT, but to a different directory.

Link to NCAR Graphics Libraries

This version of NCL contains the NCAR Graphics libraries. The NCAR graphics libraries have been created with the GNU Fortran compiler, gfortran. You can link to these libraries using the Intel compiler, but you need to help your compiler by linking in some additional system libraries. Try putting -lgfortran at the end of the compile line in the following way:

# Load module, always specify version number.
$ module load intel-compiler/2021.2.0

$ ifort fortran_program.f -O -L/usr/lib64 -lncarg -lncarg_gks -lncarg_c -lXpm -lX11 -lXext -lgfortran

This version of NCL is OpenDAP enabled.

Run NCL

Start an interactive PBS job with the following command on Gadi. It requests 1 CPU core, 2 GiB memory, and 8 GiB local disk on a compute node on Gadi from the normal queue for its exclusive access for 30 minutes against the project a00. It also requests the system to enter the working directory once the job is started. To change the number of CPU cores, memory, or jobfs required, simply modify the appropriate PBS resource requests in the qsub command below according to the information available at https://opus.nci.org.au/display/Help/Queue+Structure. Note that if your application does not work in parallel, setting the number of CPU cores to 1 and changing the memory and jobfs accordingly is required to prevent the compute resource waste.

Also note that you must include -l storage=scratch/ab12+gdata/yz98 to the qsub command below if the job needs access to /scratch/ab12/ and /g/data/yz98/. Details on https://opus.nci.org.au/display/Help/PBS+Directives+Explained.

$ qsub -I -X -P a00 -q normal -l ncpus=1,mem=2GB,jobfs=8GB,walltime=00:30:00,wd

When the interactive job starts on Gadi, execute the followings commands:

# Load module, always specify version number.
$ module load ncl/6.6.2

# Run NCL application
$ ncl [Options and/or Args] <ncl_file.ncl>

For more information about ncl command's Options and Args, and documentation: https://www.ncl.ucar.edu/Document/