NCL installations at NSC


Directory list:

VersionDescription
6.1.0-beta NCL version 6.1.0.
6.1.2 NCL version 6.1.2.

Level of support

Tier 1 NSC has at least one application expert on staff with knowledge about this software, and we will try to help you with any problems. We have also ran some internal tests to make sure that the program is working as intended. NSC also commits to installing updates to this program as they become available.

Please see the page describing our software support categories for more information.
You can also contact support@nsc.liu.se for further information.

The NCAR Command Language (NCL), a product of the Computational & Information Systems Laboratory at the National Center for Atmospheric Research (NCAR) and sponsored by the National Science Foundation, is a free interpreted language designed specifically for scientific data processing and visualization.

The NCL installations at NSC are generally supported by Hamish Struthers (struthers@nsc.liu.se). See the NCL webpages for detailed documentation, examples, support and user forums.

How to run

Load the NCL module corresponding to the version you want to use, e.g

module load ncl/6.1.2

This will add the NCL commands to your search path and also set the environment variable $NCARG_ROOT.

Please try not run NCL on the login node! To run NCL interactively, allocate a compute node for interactive use and then run “ncl”. E.g

interactive -N1 --exclusive -t 00:30:00
module load ncl/6.1.2
ncl

If you want to run pre-written NCL scripts (e.g. foo.ncl):

ncl foo.ncl

Running NCL batch jobs

Assume that you have a NCL script saved in the file “parallel.ncl” that you want to run many times with different input (in this example we will use the inputs 1, 2, 3, … 32 which are input to the script using the “in” variable). i.e. single instance syntax:

ncl in=1 parallel.ncl

You could then use this batch script (saved as job1.sh):

#!/bin/bash
#
# Load the NCL module
module load ncl/6.1.0-beta-1

# Use 2 node, i.e. 32 cores, for 2 hours
#SBATCH -N 2 --exclusive
#SBATCH -t 02:00:00

variable=in

for i in $(seq 1 32);do
  srun -N1 -n1 --exclusive ncl "${variable}=${i}" parallel.ncl > parallel_${i}.log &
done
wait # needed to prevent the script from exiting before all NCL tasks are done

# End of script

To run this batch job, submit it using:

sbatch job1.sh

Please see the User Guide for more information on how to submit and check the result of your batch jobs.