{"id":1589,"date":"2014-06-12T10:34:52","date_gmt":"2014-06-12T10:34:52","guid":{"rendered":"http:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/?page_id=1589"},"modified":"2017-07-31T07:46:39","modified_gmt":"2017-07-31T07:46:39","slug":"ncl","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/ncl\/","title":{"rendered":"NCL"},"content":{"rendered":"<h2>Overview<\/h2>\n<p><a href=\"http:\/\/ncl.ucar.edu\/\">NCL<\/a> (NCAR Command Language) is a free interpreted language designed specifically for scientific data processing and visualization. It is often used with <a href=\"\/csf-apps\/software\/applications\/wrf\">WRF<\/a> to present results of weather model simulations (although it is not exclusively for use with WRF!)<\/p>\n<p>Version 6.4.0, and 6.2.0 are installed on the CSF. These are binary installations so\u00a0NCL can be used on any node.<\/p>\n<p>This version contains experimental OpenMP (multicore) features in contouring routines. Please see the <a href=\"https:\/\/www.ncl.ucar.edu\/current_release.shtml\">release notes<\/a> for details. If using multiple cores, ensure your jobscript is correct (example jobscripts are given below).<\/p>\n<p><a href=\"http:\/\/www.ncarg.ucar.edu\/\">NCAR Graphics<\/a> is a Fortran and C based software package for scentific visualization and is included in this installation.<\/p>\n<h2>Restrictions on use<\/h2>\n<p>There are no restictions on accessing this software on the CSF.<\/p>\n<p>Please see the <a href=\"http:\/\/ncl.ucar.edu\/citation.shtml\">NCL citation instructions<\/a> for how to cite use of the software in your publications.<\/p>\n<h2>Set up procedure<\/h2>\n<p>To access the software you must first load one of the modulefiles:<\/p>\n<pre>module load apps\/binapps\/ncl\/6.4.0\r\nmodule load apps\/binapps\/ncl\/6.2.0\r\n<\/pre>\n<h2>Running the application<\/h2>\n<p>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 <code>qrsh<\/code>.<\/p>\n<h3>Serial batch job submission<\/h3>\n<p>Make sure you have the modulefile loaded then create a batch submission script, for example:<\/p>\n<pre>#!\/bin\/bash\r\n#$ -S \/bin\/bash\r\n#$ -cwd             # Job will run from the current directory\r\n#$ -V               # Job will inherit current environment settings\r\n#$ -l short         # Optional: assumes max 1 hour runtime\r\n                    # There are dedicated nodes for 'short jobs'\r\n\r\nncl my_script.ncl\r\n\r\n<\/pre>\n<p>Submit the jobscript using:<\/p>\n<pre>qsub <em>scriptname<\/em><\/pre>\n<p>where <em>scriptname<\/em> is the name of your jobscript.<\/p>\n<h3>Parallel batch job submission<\/h3>\n<p>Make sure you have the modulefile loaded then create a batch submission script, for example:<\/p>\n<pre>#!\/bin\/bash\r\n#$ -S \/bin\/bash\r\n#$ -cwd             # Job will run from the current directory\r\n#$ -V               # Job will inherit current environment settings\r\n#$ -l short         # Optional: assumes max 1 hour runtime\r\n                    # There are dedicated nodes for 'short jobs'\r\n#$ -pe smp.pe  8    # EG: use 8 cores (max allowed is 16)\r\n\r\n# Ensure we use the requested number of cores\r\nexport OMP_NUM_THREADS=$NSLOTS\r\n\r\nncl my_script.ncl\r\n\r\n<\/pre>\n<p>Submit the jobscript using:<\/p>\n<pre>qsub <em>scriptname<\/em><\/pre>\n<p>where <em>scriptname<\/em> is the name of your jobscript.<\/p>\n<h3>Interactive Use via qrsh<\/h3>\n<p>To run NCL interactively you must schedule an interactive session using <code>qrsh<\/code> as follows:<\/p>\n<pre>qrsh -l inter -l short\r\n  #\r\n  # Wait for a new prompt on a backend node (e.g., int00)\r\n\r\n# We are now on the backend node...\r\nmodule load apps\/binapps\/ncl\/6.2.0\r\nncl my_script.ncl\r\n<\/pre>\n<h2>A Simple Example<\/h2>\n<p>Two example NCL scripts are available for you to run. These are based on the <a href=\"https:\/\/www.ncl.ucar.edu\/Applications\/coast.shtml\">coastlines example<\/a> provided by NCAR. You do not need to download anything from NCAR to run these examples.<\/p>\n<h3>Batch Example &#8211; PDF Output<\/h3>\n<p>Run the following commands on the login node:<\/p>\n<pre>module load apps\/binapps\/ncl\/6.2.0\r\ncp $NCL_EXAMPLES\/*.ncl ~\/scratch\r\ncd ~\/scratch\r\n<\/pre>\n<p>You now have two <code>.ncl<\/code> files in your scratch area: <code>coast_2_pdf.ncl<\/code> and <code>coast_2_x11.ncl<\/code>.<\/p>\n<p>Run the following command to submit a batch job without writing a jobscript (the <code>-b y<\/code> flag means the <code>ncl<\/code> command is a binary (executable) rather than the more usual jobscript file.<\/p>\n<pre>qsub -b y -cwd -V -l short ncl coast_2_pdf.ncl\r\n<\/pre>\n<p>Run <code>qstat<\/code> to check on the job. When there is no output from <code>qstat<\/code> the job has finished and you should have a file named <code>coast.pdf<\/code> in your scratch directory.<\/p>\n<p>View the output file:<\/p>\n<pre>evince coast.pdf\r\n<\/pre>\n<h3>Interactive Example &#8211; X11 Output<\/h3>\n<p>Ensure you have logged in to the CSF with <a href=\"\/csf2\/getting-started-on-the-csf\/using-an-app-with-a-gui-x11-and-qrsh\/\">X11 forwarding<\/a> enabled.<\/p>\n<p>Run the following on the CSF login node to start an interactive session on a backend node:<\/p>\n<pre>qrsh -l inter -l short\r\n  #\r\n  # Wait for new prompt. Try again later if asked.\r\n\r\nmodule load apps\/binapps\/ncl\/6.2.0\r\ncp $NCL_EXAMPLES\/*.ncl ~\/scratch\r\ncd ~\/scratch\r\nncl coast_2_x11.ncl\r\n  #\r\n  # A window should pop-up with an image of a map\r\n\r\nCtrl-C to exit\r\n<\/pre>\n<h2>Further info<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.ncl.ucar.edu\/\">NCL website<\/a><\/li>\n<\/ul>\n<h2>Updates<\/h2>\n<p>None.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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\u00a0NCL can be used on any node. This version contains experimental OpenMP (multicore) features in contouring routines. Please see the release notes.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/ncl\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":31,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1589","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/1589","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/comments?post=1589"}],"version-history":[{"count":5,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/1589\/revisions"}],"predecessor-version":[{"id":4095,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/1589\/revisions\/4095"}],"up":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/31"}],"wp:attachment":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/media?parent=1589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}