ncl-metno home

shell scripts:


Dcontour.sh

Syntax

Example 1: Temperature trend

Displayed below are differences in upper layer temperature from time step 126 to time step 120 (positive where the temperature at time step 126 are largest). The results from both time steps are read from the same file, and the figure was made by issuing the command:

Dcontour.sh 4dmap hycom_031_TS.nc . temp . 1 . 126 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 contents of four lines changed to

v1= -1.0  ; Low  value for isopleths, disregarded when  nv  is 0 or 1
v2=  7.5  ; 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.

Dcontour.sh: syntax

Dcontour.sh --help

       Dcontour.sh  /  ncl-metno 1.2

>>>
>>>
>>> Syntax:
>>> =======
>>>
>>> -> for 2D fields:
>>>  Dcontour.sh <option> <file1> <file2> <var1> <var2>
>>> -> for 3D fields:
>>>  Dcontour.sh <option> <file1> <file2> <var1> <var2> [<d3node1> <d3node2>]
>>> -> for 4D fields:
>>>  Dcontour.sh <option> <file1> <file2> <var1> <var2> [<d3node1> <d3node2> (<d4node1> <d4node2>)]
>>>
>>> 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 - [234]D fields, lon & lat are 2d fields
>>>                  ...[234]d[mM]ap will be displayed on a geogr. map
>>>    <file1>     name of netcdf file w/<var1>
>>>    <file2>     name of netcdf file w/<var2>,
>>>                 you may type '.' if <file1> & <file2> are the same
>>>    <var1>      name of requested variable on <file1> (case sensitive)
>>>    <var2>      name of requested variable on <file2> (case sensitive)
>>>                 you may type '.' if <var1> & <var2> are the same
>>>    <d3node1>, <d3node2>
>>>                node no.s of third dimension for <var1> and <var2>,
                    respectively
>>>                you may type '.' for <d3node2> if <d3node1>
>>>                 and <d3node2> are the same
>>>                if <option> is one of 2d, 2dmap and a fourth
>>>                  argument is present, or if <d3node1> is negative,
>>>                  this will be interpreted as a flag that will cause
>>>                  the ncl script to remain (see examples below)
>>>    <d4node1>, <d4node2>
>>>                node no.s of fourth dimension for <var1> and <var2>,
                    respectively
>>>                you may type '.' for <d4node2> if <d4node1>
>>>                 and <d4node2> are the same
>>>
>>>  Special case:
>>>   If <option> is one of [234]dMap, the name of the 2d longitude and
>>>    latitude variable may be specified on the command line, e.g. for 3D fields:
>>>   Dcontour.sh <option> <lonname> <latname> <file1> <file2> <var1> <var2> [<d3node1> <d3node2>]
>>>    (Alternatively, if these names are not 'lon' or 'lat', 'userdef.ncl' may
>>>     be edited when option is one of [234]dMap.)
>>>
>>>  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 'Dcontour.sh' is given,
>>>  the user may specify
>>>   * title
>>>   * font
>>>   * zooming
>>>   * color map (palette)
>>>   * no. of colors
>>>   * plot size limits
>>>   for geographical maps:
>>>   * names of longitude & latitude variables
>>>   * map projection (lon-lat grids only)
>>>   * coastline detail level
>>>   (look up, or copy, this file to edit your own 'userdef' file).
>>>
>>>
>>> Examples:
>>> =========
>>>
>>>  Dcontour.sh 4dmap hydro1.nc hydro2.nc temp T 1 1 10 10
>>>    will produce a depiction on a lon-lat grid w/ a map,
>>>     of the difference at the first vertical level and
>>>     the tenth time step of the variables 'temp' and 'T',
>>>     between these fields on 'hydro1.nc' and 'hydro2.nc'
>>>     (positive where  hydro1.nc->temp .gt. hydro2.nc->T;
>>>     when the third and fourth dimensions for both variables
>>>     are vertical level and time, respectively
>>>  Dcontour.sh 4dmap hydro1.nc . salt . 4 3 10 .
>>>    will produce a depiction on a lon-lat grid w/ a map,
>>>     of the difference at the tenth time step on 'hydro1.nc'
>>>     between 'salt' at the fourth and third vertical level
>>>     (positive where  salt(,,4,) .gt. salt(,,3,);
>>>     when the third and fourth dimensions are vertical level
>>>     and time, respectively
>>>
>>>
>>> Terminating.