ncl-metno home

shell scripts:


transport.sh

Syntax

Example 1: Volume transport in layer 18

First the file userdef.ncl was copied from /home/arnem/lib/ncl-metno/ , with the contents of four lines changed to

vsz= 0.06  ; Size (length) of reference vector
vsp=  4.   ; Speed         of reference vector
vd = 0.02   ; Distance between vectors
curly_on= 1 ;

in order to modify the sizes of the vectors. The figure below was then made by issuing the command:

transport.sh 4dmap hycom_031_uv.nc hycom_031_h.nc u v thknss 18 120

Example 2: As example 1, but with more contours

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 same changes as in Example 1 above, and additional changes of three other lines to

v1=  0.4  ; Low  value for isopleths, disregarded when  nv  is 0 or 1
v2=  7.2  ; High value for isopleths, disregarded when  nv  is 0 or 1
nv= 17    ; No. of isopleths, there will be  nv+1  colors

in order to specify the use of contours and colors.

transport.sh: syntax

transport.sh --help

        transport.sh  /  ncl-metno 1.2

>>>
>>>
>>> NOTE: The user is **STRONGLY** recommended to copy
>>> /home/arnem/lib/ncl-metno/userdef.ncl
>>>  to the directory where the command 'transport.sh' is given,
>>>  and at least consider altering
>>>   * vector spec.
>>>  -otherwise, lengths of vector will be scaled as ocean currents
>>>   rather than a transport quantity
>>>
>>>
>>> Syntax:
>>> =======
>>>
>>>  transport.sh <option> <uvfile> <varfile> <u> <v> <var> [<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
>>>    <uvfile>    name of the netcdf file w/ <u> and <v>
>>>    <varfile>   name of the netcdf file w/ <var>
>>>                 you may type '.' if <uvfile> & <varfile> are the same
>>>    <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)
>>>             NOTE! special case: if <v> is set to  1 ,
>>>                                 speed is contoured
>>>    <var>       name of variable to base filled contours on
>>>                 on the netcdf file (case sensitive)
>>>             NOTE! This script requires the same dimensions for
>>>                   <u>, <v> and <var>, i.e., they must all be
>>>                   2d, or 2dmap, etc.
>>>    <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.
>>>
>>> NOTE! Unless a user spec. file exists, this script will give
>>>       rise to unreasonably long or short vectors if variable
>>>       values are of a different order than 1.
>>>
>>>
>>> User specifications:
>>> ====================
>>>
>>>  By copying the default spec.s from
>>> /home/arnem/lib/ncl-metno/userdef.ncl
>>>  to the directory where the command 'contour.sh' is given,
>>>  the user may specify
>>>   * title
>>>   * font
>>>   * zooming
>>>   * vector spec.s (size, distance, curly/regular vectors)
>>>   * color map (palette)
>>>   * no. of colors
>>>   * 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:
>>> =========
>>>
>>>  transport.sh 2dmap uv.nc topography.nc ubaro_mean vbaro_mean depth
>>>    will produce transport vectors on top of filled contours
>>>     for the volume transport, on a lon-lat grid w/ a map,
>>>     based on variables 'ubaro', vbaro' on the file 'uv.nc',
>>>     and 'depth' on the file 'topography.nc'
>>>  transport.sh 4dmap hydrography.nc . u v temp 1 10
>>>    will produce transport vectors on top of filled contours
>>>     for temperature transport, 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', 'v' and 'var' on the file 'hydrography.nc'
>>>  transport.sh 4dmap hydrography.nc . u v 1 1 10
>>>    special case (variable to contour is set to '1'): will
>>>     produce velocity vectors on top of filled contours for
>>>     the current speed, for the first node in the third dimension
>>>     and the tenth node in the fourth dimension, on a lon-lat
>>>     grid w/ a map, based on variables 'u' and 'v' on the file
>>>     'hydrography.nc'
>>>
>>>
>>> Terminating.