ncl-metno home

shell scripts:


vector.sh

Syntax

Example 1:
Mixed layer currents

The figure below was made by issuing the command:

vector.sh 3dmap hycom_031_uv.nc umix vmix 1

Example 2:
As example 1, but zooming in

The next figure was made by issuing the same command as in Example 1, after the file userdef.ncl was copied from /home/arnem/lib/ncl-metno/ , with the contents of four lines changed to

x1= nx-50  ; Leftmost  grid point to depict, for dimension  x  or  lon
x2= nx     ; Rightmost grid point to depict
y1= ny-40  ; Lowermost grid point to depict, for dimension  y  or  lat
y2= ny     ; Uppermost grid point to depict

in order to zoom in on a sub-domain.

Example 3:
As example 2, but with a modified specification for displaying vectors

The figure below was made by issuing the same command as in Example 1 and 2, after the file userdef.ncl was copied from /home/arnem/lib/ncl-metno/ , with the same changes as in Example 2 above, and additional changes of four other lines to

vsz= 0.05   ; Size (length) of reference vector
vsp= 0.02   ; Speed         of reference vector
vd = 0.04   ; Distance between vectors
curly_on= 1 ; =1: Use curly vectors, otherwise, use standard vectors

This causes fewer and shorter vectors to be displayed, when compared to Example 2:

vector.sh: syntax

vector.sh --help

        vector.sh  /  ncl-metno 1.2

>>>
>>>
>>> Syntax:
>>> =======
>>>
>>>  vector.sh <option> <file> <u> <v> [<d3node> (<d4node>)]
>>> where
>>>    <option>    specifies dimensions and geo- or nongeo-grid
>>>                 implemented:
>>>                  [234]d    - [234]D fields
>>>                  [234]dmap - [234]D fields, dims. are lon & lat
>>>                  ...[234]dmap will be displayed on a geogr. map
>>>    <file>      name of the netcdf file
>>>    <u>         name of variable w/ velocity in the x-direction
>>>                 on the netcdf file (case sensitive)
>>>    <v>         name of variable w/ velocity in the y-direction
>>>                 on the netcdf file (case sensitive)
>>>    <d3node>  node no. of third dimension
>>>                if <option> is one of 2d, 2dmap and a fourth
>>>                  argument is present, or if <d3node> is negative,
>>>                  this will be interpreted as a flag that will cause
>>>                  the ncl script to remain (see examples below)
>>>    <d4node>  node no. of fourth dimension
>>>
>>>  The script will produce an eps-file and a png-file.
>>>
>>>
>>> User specifications:
>>> ====================
>>>
>>>  By copying the default spec.s from
>>> /home/arnem/lib/ncl-metno/userdef.ncl
>>>  to the directory where the command 'vector.sh' is given,
>>>  the user may specify
>>>   * title
>>>   * font
>>>   * zooming
>>>   * vector spec.s (size, distance, curly/regular vectors)
>>>   * plot size limits
>>>   for geographical maps:
>>>   * names of longitude & latitude variables
>>>   * map projection
>>>   * coastline detail level
>>>   (look up, or copy, this file to edit your own 'userdef' file).
>>>
>>>
>>> Examples:
>>> =========
>>>
>>>  vector.sh 4dmap hydrography.nc u v 1 10
>>>    will produce vectors on a lon-lat grid w/ a map, for
>>>     the first node in the third dimension (usually the top
>>>     vertical level) and the tenth node in the fourth
>>>     dimension (usually time step no. 10), based on
>>>     variables 'u' and 'v' on the file 'hydrography.nc'
>>>  vector.sh 3d surface.nc u-vel v-vel -1
>>>    will produce vectors on a x-y grid of the first node
>>>     in the third dimension, based on variables 'u-vel' and
>>>     'v-vel' on the file 'surface.nc'; and the ncl-script
>>>      will be retained
>>>  vector.sh 2dmap topography.nc ubaro vbaro a
>>>    will produce vectors on a lon-lat grid w/ a map,
>>>    based on variables 'ubaro' and vbaro' on the file
>>>    'topography.nc'; and the ncl-script will be retained
>>>
>>>
>>> Terminating.