ncl-metno home

shell scripts:


mlayersection.sh

Syntax

Example: Meridional temperature during spin-up

    The figures below were made by
  • first copying the file userdef.ncl from /home/arnem/lib/ncl-metno/
  • then, specifying the title to
    mytitle= "Spin-up, central meridional"
    
  • and modifying the contents of three lines to
    v1=   3.    ; Low  value for isopleths, disregarded when  nv  is 0 or 1
    v2=  20.    ; 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 lock the use of contours and color map (such a specification is essential to invoke when executing the multi-figure scripts mcontour.sh, mc-mask.sh) and mlayersection.sh)

Finally, the following command was issued:

mlayersection.sh hycom_031_h.nc hycom_031_TS.nc thknss temp lat 16 1 21

By executing this command, a set of ppm & gif images for a meridional temperature section are created, at longitude node no. 16, for time steps no. 1 through 21. Note that for spherical grids, values along the horizontal axis at the bottom correspond to coordinate values (here, °N). When these images are assembled as a gif animation, the result is:


mlayersection.sh: syntax

mlayersection.sh --help

        mlayersection.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 'mlayersection.sh' is given,
>>>  and at least specify
>>>   * color map (palette)
>>>  -otherwise, the series of files produced by  mlayersection.sh
>>>   will (usually) NOT have the same color map (see more information below)
>>>
>>> NOTE: This script assumes that the variable to depict has been
>>>  stored with dimensions in the order x  -y  -layer(-time)
>>>                                   or lon-lat-layer(-time)
>>>  (w/ Fortran style sequence of dimensions).
>>>
>>>
>>> Syntax:
>>> =======
>>>
>>>  mlayersection.sh <hfile> <varfile> <hname> <varname> <dimname> <node> <first> <last> (<step>)
>>> where
>>>    <hfile>     name of netCDF file w/thickness results
>>>    <varfile>   name of netCDF file w/requested variable
>>>                 you may use '.' if both variables are on the same file
>>>    <hname>     name of thickness variable
>>>    <varname>   name of variable to depict
>>>             NOTE! This script requires the existence of an
>>>                   attribute 'missing_value' to <varname>
>>>    <dimname>   name of crossection's horizontal dimension
>>>                 e.g.,  lat  for a lat-z (meridional) crossection
>>>    <node>      node of non-depicted dimension
>>>                 if <dimname> is  lat , this is the  lon  grid no.
>>>    <first>     first time step no.
>>>    <last>      last  time step no.
>>>    <step>      time step between consequtive frames
>>>                 (optional, set to  1  if not specified by user)
>>>    <delay>     frame delay in ms (optional, set to  10  if not specified by user)
>>>
>>>  The script will produce a gif animation.
>>>
>>>
>>> User specifications:
>>> ====================
>>>
>>>  By copying the default spec.s from
>>> /home/arnem/lib/ncl-metno/userdef.ncl
>>>  to the directory where the command 'mlayersection.sh' is given,
>>>  the user may specify
>>>   * title
>>>   * font
>>>   * zooming
>>>   * color map (palette)
>>>   * no. of colors
>>>   * plot size limits
>>>   (look up, or copy, this file to edit your own 'userdef' file).
>>>
>>>
>>> Example:
>>> ========
>>>
>>>  mlayersection.sh hycom_expt007.nc . thknss salin lat 30 47 49
>>>    will produce a lat-z crossection normal to longitude node no. 30,
>>>     of the variable 'salin' on the file 'hycom_expt007.nc',
>>>     w/ layers given by 'thknss' on the same file,
>>>     from timestep no. 47, 48 and 49
>>>
>>>
>>> Terminating.