The CSF2 has been replaced by the CSF3 - please use that system! This documentation may be out of date. Please read the CSF3 documentation instead. To display this old CSF2 page click here. |
NCL
Overview
NCL (NCAR Command Language) is a free interpreted language designed specifically for scientific data processing and visualization. It is often used with WRF to present results of weather model simulations (although it is not exclusively for use with WRF!)
Version 6.4.0, and 6.2.0 are installed on the CSF. These are binary installations so NCL can be used on any node.
This version contains experimental OpenMP (multicore) features in contouring routines. Please see the release notes for details. If using multiple cores, ensure your jobscript is correct (example jobscripts are given below).
NCAR Graphics is a Fortran and C based software package for scentific visualization and is included in this installation.
Restrictions on use
There are no restictions on accessing this software on the CSF.
Please see the NCL citation instructions for how to cite use of the software in your publications.
Set up procedure
To access the software you must first load one of the modulefiles:
module load apps/binapps/ncl/6.4.0 module load apps/binapps/ncl/6.2.0
Running the application
Please do not run NCL on the login node. Jobs should be submitted to the compute nodes via batch or can be run interactively via qrsh
.
Serial batch job submission
Make sure you have the modulefile loaded then create a batch submission script, for example:
#!/bin/bash #$ -S /bin/bash #$ -cwd # Job will run from the current directory #$ -V # Job will inherit current environment settings #$ -l short # Optional: assumes max 1 hour runtime # There are dedicated nodes for 'short jobs' ncl my_script.ncl
Submit the jobscript using:
qsub scriptname
where scriptname is the name of your jobscript.
Parallel batch job submission
Make sure you have the modulefile loaded then create a batch submission script, for example:
#!/bin/bash #$ -S /bin/bash #$ -cwd # Job will run from the current directory #$ -V # Job will inherit current environment settings #$ -l short # Optional: assumes max 1 hour runtime # There are dedicated nodes for 'short jobs' #$ -pe smp.pe 8 # EG: use 8 cores (max allowed is 16) # Ensure we use the requested number of cores export OMP_NUM_THREADS=$NSLOTS ncl my_script.ncl
Submit the jobscript using:
qsub scriptname
where scriptname is the name of your jobscript.
Interactive Use via qrsh
To run NCL interactively you must schedule an interactive session using qrsh
as follows:
qrsh -l inter -l short # # Wait for a new prompt on a backend node (e.g., int00) # We are now on the backend node... module load apps/binapps/ncl/6.2.0 ncl my_script.ncl
A Simple Example
Two example NCL scripts are available for you to run. These are based on the coastlines example provided by NCAR. You do not need to download anything from NCAR to run these examples.
Batch Example – PDF Output
Run the following commands on the login node:
module load apps/binapps/ncl/6.2.0 cp $NCL_EXAMPLES/*.ncl ~/scratch cd ~/scratch
You now have two .ncl
files in your scratch area: coast_2_pdf.ncl
and coast_2_x11.ncl
.
Run the following command to submit a batch job without writing a jobscript (the -b y
flag means the ncl
command is a binary (executable) rather than the more usual jobscript file.
qsub -b y -cwd -V -l short ncl coast_2_pdf.ncl
Run qstat
to check on the job. When there is no output from qstat
the job has finished and you should have a file named coast.pdf
in your scratch directory.
View the output file:
evince coast.pdf
Interactive Example – X11 Output
Ensure you have logged in to the CSF with X11 forwarding enabled.
Run the following on the CSF login node to start an interactive session on a backend node:
qrsh -l inter -l short # # Wait for new prompt. Try again later if asked. module load apps/binapps/ncl/6.2.0 cp $NCL_EXAMPLES/*.ncl ~/scratch cd ~/scratch ncl coast_2_x11.ncl # # A window should pop-up with an image of a map Ctrl-C to exit
Further info
Updates
None.