NCL Home > Documentation > Functions > System tools

get_ncl_version

Returns the current NCL version.

Prototype

	function get_ncl_version (
	)

	return_val [1] :  string

Return value

Returns a singly dimensioned string containing the version of NCL being used.

Description

This function returns the version number of NCL being used.

Examples

Example 1

Return and print the current NCL version:

  nclv  = get_ncl_version()  ; string
  print(nclv)                ; Or, just print(get_ncl_version())
A string similar to the following is returned:

6.4.0

Example 2

Use NCL's string functions to extract various parts of the version string.

  nclv  = get_ncl_version()  ; string
  major_version = str_get_field(nclv,1,".")
  minor_version = str_get_field(nclv,2,".")
  print("major version = " + major_version)
  print("minor version = " + minor_version) 
Output (if NCL verison is 6.4.0):

     major version = 6
     minor version = 4