Ignore:
Timestamp:
Nov 14, 2011, 4:14:44 PM (13 years ago)
Author:
acolaitis
Message:

PYTHON.

Added new option: --yint, to switch the way vertical coordinates are treated when --vert z1,z2 is specified.

Without specifying --yint, a simple average of the field is done along the vertical coordinate:
mean(vert[z1,z2])

When specifying --yint, a trapezoidal integration of the field is performed along the vertical coordinate.
It is worth mentionning that this operation greatly depends on the "quality" of the z-axis data. By default, z-axis values
stored in the netcdf file for GCM is an approximation. We recommend using zrecast on the file to get trusty values of altitude.
This can be simply done by specifying -i 4 in the plot command (for gcm).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/myscript.py

    r380 r382  
    4343    parser.add_option('--lon',          action='append',dest='slon',   type="string",  default=None, help='slices along lon. 2 comma-separated values: averaging')
    4444    parser.add_option('--vert',         action='append',dest='svert',  type="string",  default=None, help='slices along vert. 2 comma-separated values: averaging')
     45    parser.add_option('--yint',         action='store_true',dest='yint',               default=False,help='change the function of --vert z1,z2 from MEAN to INTEGRATE along z')
    4546    parser.add_option('--time',         action='append',dest='stime',  type="string",  default=None, help='slices along time. 2 comma-separated values: averaging')
    4647    parser.add_option('--xmax',         action='store',dest='xmax',    type="float",   default=None, help='max value for x-axis in contour-plots [max(xaxis)]')
Note: See TracChangeset for help on using the changeset viewer.