Contents 

CHAPTER 1: INTRODUCTION 

Ch1 Sec1.    OVERVIEW    1 

    Ch1 Sec1.1.    Ferret User's Group     2 

    Ch1 Sec1.2.    Ferret Home Page    2 

Ch1 Sec2.    GETTING STARTED    2 

    Ch1 Sec2.1.    Concepts    3 

    Ch1 Sec2.1.1.    Thinking like a Ferret:    4 

    Ch1 Sec2.2.    Unix command line switches     6 

    Ch1 Sec2.3.    Sample sessions    9 

    Ch1 Sec2.3.1.    Accessing a netCDFdata set     9 

    Ch1 Sec2.3.2.    Reading an ASCII data file     9 

    Ch1 Sec2.3.3.    Using viewports     10 

    Ch1 Sec2.3.4.    Using abstract variables     10 

    Ch1 Sec2.3.5.    Using transformations     11 

    Ch1 Sec2.3.6.    Using algebraic expressions     12 

    Ch1 Sec2.3.7.    Finding the 20-degree isotherm    12 

Ch1 Sec3.    COMMON COMMANDS    13 

Ch1 Sec4.    COMMAND SYNTAX    14 

Ch1 Sec5.    GO FILES    16 

    Ch1 Sec5.1.    Demonstration files     16 

    Ch1 Sec5.2.     GO tools    18 

    Ch1 Sec5.3.    Writing GO tools     23 

    Ch1 Sec5.3.1.    Documenting GO tools     24 

    Ch1 Sec5.3.2.    Preserving the Ferret state in GO tools     24 

    Ch1 Sec5.3.3.    Silent GO tools     24 

    Ch1 Sec5.3.4.    Arguments to GO tools     25 

    Ch1 Sec5.3.5.    Documentation and checking arguments to GO tools    26 

    Ch1 Sec5.3.6.    Flow Control in GO tools     27 

    Ch1 Sec5.3.7.    Debugging GO tools     27 

Ch1 Sec6.    SAMPLE DATA SETS    28 

Ch1 Sec7.    UNIX TOOLS    29 

Ch1 Sec8.    HELP    30 

    Ch1 Sec8.1.    Examples and demonstrations     30 

    Ch1 Sec8.2.    Help from within Ferret     31 

    Ch1 Sec8.3.    Web-based information    31 

CHAPTER 2: DATA SET BASICS 

Ch2 Sec1.    OVERVIEW    33 

Ch2 Sec2.    NETCDF DATA    34 

    Ch2 Sec2.1.    NetCDF data and strides    35 

    Ch2 Sec2.2.    NetCDF data attributes    36 

    Ch2 Sec2.3.    NetCDF Data with the bounds attribute    36 

    Ch2 Sec2.4.     Multi-file NetCDF data sets     38 

    Ch2 Sec2.5.    Non-standard NetCDF data sets    39 

    Ch2 Sec2.6.    NetCDF and non-standard calendars    40 

Ch2 Sec3.    TMAP-FORMATTED DATA    41 

Ch2 Sec4.    BINARY DATA    41 

    Ch2 Sec4.1.    FORTRAN-structured binary files     42 

    Ch2 Sec4.1.1.    Records of uniform length     42 

    Ch2 Sec4.1.2.    Records of non-uniform length     42 

    Ch2 Sec4.1.3.    Fortran binary files, variables on different grids.    43 

    Ch2 Sec4.2.    Stream binary files     44 

    Ch2 Sec4.2.1.    Simple stream files    44 

    Ch2 Sec4.2.2.    Mixed stream files    45 

    Ch2 Sec4.2.3.    Byte-swapped stream files    45 

Ch2 Sec5.    ASCII DATA    46 

    Ch2 Sec5.1.    Reading ASCII files     46 

    Ch2 Sec5.2.    Reading "DELIMITED" data files    50 

Ch2 Sec6.    TRICKS TO READING BINARY AND ASCII FILES    54 

Ch2 Sec7.    ACCESS TO REMOTE DATA SETS WITH DODS    55 

    Ch2 Sec7.1.    What is DODS?    55 

    Ch2 Sec7.2.    Accessing Remote Data Sets     56 

    Ch2 Sec7.3.    Debugging Access to Remote DODS Data Sets     56 

    Ch2 Sec7.4.    Security     57 

    Ch2 Sec7.5.    Sharing Data Sets via DODS     57 

    Ch2 Sec7.6.    DODS caching    57 

    Ch2 Sec7.7.    Proxy servers    58 

CHAPTER 3: VARIABLES AND EXPRESSIONS 

Ch3 Sec1.    Variables    59 

    Ch3 Sec1.1.    Variable syntax     59 

    Ch3 Sec1.2.    File variables     60 

    Ch3 Sec1.3.    Pseudo-variables    61 

    Ch3 Sec1.3.1.    Grids and axes of pseudo-variables    62 

    Ch3 Sec1.4.    User-defined variables     62 

    Ch3 Sec1.5.    Abstract variables    63 

    Ch3 Sec1.6.    Missing value flags    64 

    Ch3 Sec1.6.1.    Missing values in input files    64 

    Ch3 Sec1.6.2.    Missing values in user-defined variables    64 

    Ch3 Sec1.6.3.    Missingvalues in output NetCDF files    65 

    Ch3 Sec1.6.4.    Displaying the missing value flag    65 

    Ch3 Sec1.7.    Returning properties of variables    65 

    Ch3 Sec1.8.    Variable and dataset attributes    65 

    Ch3 Sec1.8.1.    SHOW ATTRIBUTE commands    67 

    Ch3 Sec1.8.2.    Attribute keywords    68 

    Ch3 Sec1.8.3.    Programmatic access to attributes    69 

    Ch3 Sec1.8.4.    Editing attributes    69 

    Ch3 Sec1.8.5.    Output attributes to NetCDF fies    71 

    Ch3 Sec1.8.6.    Output Variables to NetCDF files    72 

Ch3 Sec2.    EXPRESSIONS    73 

    Ch3 Sec2.1.    Operators     74 

    Ch3 Sec2.2.    Multi-dimensional expressions    75 

    Ch3 Sec2.3.    Functions     76 

    Ch3 Sec2.3.1.    MAX    78 

    Ch3 Sec2.3.2.    MIN    78 

    Ch3 Sec2.3.3.    INT    78 

    Ch3 Sec2.3.4.    ABS    79 

    Ch3 Sec2.3.5.    EXP    79 

    Ch3 Sec2.3.6.    LN    79 

    Ch3 Sec2.3.7.    LOG    79 

    Ch3 Sec2.3.8.    SIN    79 

    Ch3 Sec2.3.9.    COS    79 

    Ch3 Sec2.3.10.    TAN    79 

    Ch3 Sec2.3.11.    ASIN    80 

    Ch3 Sec2.3.12.    ACOS    80 

    Ch3 Sec2.3.13.    ATAN    80 

    Ch3 Sec2.3.14.    ATAN2    80 

    Ch3 Sec2.3.15.    MOD    80 

    Ch3 Sec2.3.16.    DAYS1900    80 

    Ch3 Sec2.3.17.    MISSING    81 

    Ch3 Sec2.3.18.    IGNORE0    81 

    Ch3 Sec2.3.19.    RANDU    81 

    Ch3 Sec2.3.20.    RANDN    81 

    Ch3 Sec2.3.21.    RHO_UN    81 

    Ch3 Sec2.3.22.    THETA_FO    82 

    Ch3 Sec2.3.23.    RESHAPE    82 

    Ch3 Sec2.3.24.    ZAXREPLACE    85 

    Ch3 Sec2.3.25.    XSEQUENCE, YSEQUENCE, ZSEQUENCE, TSEQUENCE    86 

    Ch3 Sec2.3.26.    FFTA    86 

    Ch3 Sec2.3.27.    FFTP    87 

    Ch3 Sec2.3.28.    SAMPLEI    88 

    Ch3 Sec2.3.29.    SAMPLEJ    89 

    Ch3 Sec2.3.30.    SAMPLEK    89 

    Ch3 Sec2.3.31.    SAMPLEL    90 

    Ch3 Sec2.3.32.    SAMPLEIJ    90 

    Ch3 Sec2.3.33.    SAMPLET_DATE    91 

    Ch3 Sec2.3.34.    SAMPLEXY    92 

    Ch3 Sec2.3.35.    SAMPLEXY_CLOSEST    93 

    Ch3 Sec2.3.36.    SAMPLEXY_CURV    94 

    Ch3 Sec2.3.37.    SCAT2GRIDGAUSS_XY    95 

    Ch3 Sec2.3.38.    SCAT2GRIDGAUSS_XZ    97 

    Ch3 Sec2.3.39.    SCAT2GRIDGAUSS_YZ    98 

    Ch3 Sec2.3.40.    SCAT2GRIDLAPLACE_XY    99 

    Ch3 Sec2.3.41.    SCAT2GRIDLAPLACE_XZ    101 

    Ch3 Sec2.3.42.    SCAT2GRIDLAPLACE_YZ    101 

    Ch3 Sec2.3.43.    SORTI    102 

    Ch3 Sec2.3.44.    SORTJ    103 

    Ch3 Sec2.3.45.    SORTK    103 

    Ch3 Sec2.3.46.    SORTL    103 

    Ch3 Sec2.3.47.    TAUTO_COR    104 

    Ch3 Sec2.3.48.    XAUTO_COR    104 

    Ch3 Sec2.3.49.    TAX_DATESTRING    105 

    Ch3 Sec2.3.50.    TAX_DAY    106 

    Ch3 Sec2.3.51.    TAX_DAYFRAC    107 

    Ch3 Sec2.3.52.    TAX_JDAY    108 

    Ch3 Sec2.3.53.    TAX_MONTH    109 

    Ch3 Sec2.3.54.    TAX_UNITS    110 

    Ch3 Sec2.3.55.    TAX_YEAR    110 

    Ch3 Sec2.3.56.    TAX_YEARFRAC    111 

    Ch3 Sec2.4.    Transformations    112 

    Ch3 Sec2.4.1.    General information about transformations     113 

    Ch3 Sec2.4.2.    Transformations applied to irregular regions     114 

    Ch3 Sec2.4.3.    General information about smoothing transformations     115 

    Ch3 Sec2.4.4.    @DIN—definite integral     116 

    Ch3 Sec2.4.5.    @IIN—indefinite integral    117 

    Ch3 Sec2.4.6.    @AVE—average     118 

    Ch3 Sec2.4.7.    VAR—weighted variance     119 

    Ch3 Sec2.4.8.    MIN—minimum     120 

    Ch3 Sec2.4.9.    @MAX—maximum    120 

    Ch3 Sec2.4.10.    @SHF:n—shift     120 

    Ch3 Sec2.4.11.    @SBX:n—boxcar smoother     120 

    Ch3 Sec2.4.12.    @SBN:n—binomial smoother     121 

    Ch3 Sec2.4.13.    @SHN:n—Hanning smoother     121 

    Ch3 Sec2.4.14.    @SPZ:n—Parzen smoother     122 

    Ch3 Sec2.4.15.    @SWL:n—Welch smoother     122 

    Ch3 Sec2.4.16.    @DDC—centered derivative     122 

    Ch3 Sec2.4.17.    @DDF—forward derivative     122 

    Ch3 Sec2.4.18.    @DDB—backward derivative     123 

    Ch3 Sec2.4.19.    @NGD—number of good points     123 

    Ch3 Sec2.4.20.    @NBD—number of bad points     123 

    Ch3 Sec2.4.21.    @SUM—unweighted sum     123 

    Ch3 Sec2.4.22.    @RSUM—running unweighted sum     124 

    Ch3 Sec2.4.23.    @FAV:n—averaging filler     124 

    Ch3 Sec2.4.24.    @FLN:n—linear interpolation filler     124 

    Ch3 Sec2.4.25.    @FNR—nearest neighbor filler     125 

    Ch3 Sec2.4.26.    @LOC—location of     125 

    Ch3 Sec2.4.27.    @WEQ—weighted equal; integration kernel      125 

    Ch3 Sec2.4.28.    @ITP—interpolate     128 

    Ch3 Sec2.4.29.    @CDA—closest distance above    129 

    Ch3 Sec2.4.30.    @CDB—closest distance below    129 

    Ch3 Sec2.4.31.    @CIA—closest index above    130 

    Ch3 Sec2.4.32.    @CIB—closest index below    131 

    Ch3 Sec2.5.    IF-THEN logic ("masking")     133 

    Ch3 Sec2.6.    Lists of constants ("constant arrays")    133 

Ch3 Sec3.    EMBEDDED EXPRESSIONS    135 

    Ch3 Sec3.1.    Special calculations using embedded expressions     136 

Ch3 Sec4.    DEFINING NEW VARIABLES    143 

    Ch3 Sec4.1.    Global, local, and default variable definitions     143 

Ch3 Sec5.    DEBUGGING COMPLEX HIERARCHIES OF EXPRESSIONS    144 

CHAPTER 4: GRIDS AND REGIONS 

Ch4 Sec1.    OVERVIEW    145 

Ch4 Sec2.    GRIDS    145 

    Ch4 Sec2.1.    Defining grids     145 

    Ch4 Sec2.2.    Time axes and calendars    146 

    Ch4 Sec2.3.    Dynamic grids and axes     148 

    Ch4 Sec2.3.1.    Dynamic grids     148 

    Ch4 Sec2.3.2.    Dynamic axes     151 

    Ch4 Sec2.3.3.    Dynamic pseudo-variables     152 

    Ch4 Sec2.4.    Regridding     153 

    Ch4 Sec2.4.1.    Regridding transformations     154 

    Ch4 Sec2.5.    Modulo regridding     159 

    Ch4 Sec2.5.1.    Modulo regridding statistics     162 

Ch4 Sec3.    REGIONS    162 

    Ch4 Sec3.1.    Latitude     163 

    Ch4 Sec3.2.    Longitude     164 

    Ch4 Sec3.3.    Depth     164 

    Ch4 Sec3.4.    Time     164 

    Ch4 Sec3.5.    Delta     165 

    Ch4 Sec3.6.    @ notation     165 

    Ch4 Sec3.7.    Modulo axes     167 

    Ch4 Sec3.7.1.    Subspan Modulo Axes    168 

    Ch4 Sec3.8.    Region Conflicts    171 

Ch4 Sec4.    Ferret Program Limits    171 

CHAPTER 5: ANIMATIONS AND GIF IMAGES 

Ch5 Sec1.    OVERVIEW    175 

    Ch5 Sec1.1.    Animating on the fly    175 

    Ch5 Sec1.2.    Note on using whirlgif to make a movie    175 

Ch5 Sec2.    CREATING AN HDF MOVIE    176 

Ch5 Sec3.    DISPLAYING AN HDF MOVIE    177 

Ch5 Sec4.    ADVANCED MOVIE-MAKING    177 

    Ch5 Sec4.1.    REPEAT command     177 

    Ch5 Sec4.1.1.    Initializing the color table     179 

    Ch5 Sec4.1.2.    Making movies in batch mode     179 

Ch5 Sec5.    CREATING GIF IMAGES    180 

Ch5 Sec6.    CREATING MPEG ANIMATIONS    180 

CHAPTER 6: CUSTOMIZING PLOTS 

Ch6 Sec1.    OVERVIEW    183 

Ch6 Sec2.    GRAPHICAL OUTPUT    184 

    Ch6 Sec2.1.    Ferret graphical output controls    184 

    Ch6 Sec2.2.    PPLUS graphical output commands    185 

Ch6 Sec3.    AXES    185 

    Ch6 Sec3.1.    Ferret axis formatting    186 

    Ch6 Sec3.2.    PPLUS axis commands     186 

    Ch6 Sec3.3.    Overlaying symbols on a time axis    189 

Ch6 Sec4.    LABELS    191 

    Ch6 Sec4.1.    Adding labels     191 

    Ch6 Sec4.2.    Listing labels     193 

    Ch6 Sec4.3.    Removing movable labels     194 

    Ch6 Sec4.4.    Axis labels and title     194 

    Ch6 Sec4.5.    Ferret label controls     195 

    Ch6 Sec4.6.    PPLUS label commands     195 

    Ch6 Sec4.7.    Positioning labels relative to other plot elements    197 

    Ch6 Sec4.8.    Positioning labels using the mouse pointer     198 

    Ch6 Sec4.9.    Labeling details with arrows and text     199 

Ch6 Sec5.    COLOR    199 

    Ch6 Sec5.1.    Text and line colors    200 

    Ch6 Sec5.1.1.    Ferret color controls for lines     200 

    Ch6 Sec5.1.2.    PPLUS text and line color commands     201 

    Ch6 Sec5.2.    Shade and fill colors     203 

    Ch6 Sec5.2.1.    Ferret shade and fill color controls     205 

    Ch6 Sec5.2.2.    PPLUS shade color commands     206 

Ch6 Sec6.    FONTS    207 

    Ch6 Sec6.1.    Ferret font and text color     207 

    Ch6 Sec6.2.    PPLUS font and text color commands     207 

Ch6 Sec7.    PLOT LAYOUT    209 

    Ch6 Sec7.1.    Ferret layout controls     209 

    Ch6 Sec7.1.1.    Viewports     209 

    Ch6 Sec7.1.2.    Pre-defined viewports     210 

    Ch6 Sec7.1.3.    Advanced usage of viewports     211 

    Ch6 Sec7.1.4.    Viewport Symbols    211 

    Ch6 Sec7.2.    PPLUS layout commands     211 

    Ch6 Sec7.3.    Controlling the white space around plots     212 

Ch6 Sec8.    CONTOURING    213 

    Ch6 Sec8.1.    Ferret contour controls     213 

    Ch6 Sec8.1.1.    /LEVELS qualifier     213 

    Ch6 Sec8.1.2.    /PEN, /SIZE, /SIGDIG, /SPACING qualifiers    216 

    Ch6 Sec8.2.    PPLUS contour commands     217 

Ch6 Sec9.     Special symbols    219 

Ch6 Sec10.    Map Projections and Curvilinear Coordinates    222 

    Ch6 Sec10.1.    Three-argument (curvilinear) version of SHADE, FILL, CONTOUR, and  VECTOR    222 

    Ch6 Sec10.2.    Gridded data sets on curvilinear coordinates    224 

    Ch6 Sec10.3.    Layered (sigma) coordinates    224 

    Ch6 Sec10.4.    Map Projections    225 

    Ch6 Sec10.4.1.    Using Map Projection scripts    225 

    Ch6 Sec10.4.2.    Overlays with Map Projections    226 

    Ch6 Sec10.4.3.    Map Projection scripts    227 

CHAPTER 7: HANDLING STRING DATA: STRING VARIABLES AND "SYMBOLS" 

Ch7 Sec1.    String variables    229 

    Ch7 Sec1.1.    String arrays    229 

Ch7 Sec2.    String functions    230 

    Ch7 Sec2.1.    STRCMP(string1, string2)     230 

    Ch7 Sec2.2.    STRLEN(string1)     230 

    Ch7 Sec2.3.    UPCASE(string1)     231 

    Ch7 Sec2.4.    DNCASE(string1)     231 

    Ch7 Sec2.5.    STRINDEX(string1, substring)     231 

    Ch7 Sec2.6.    STRRINDEX(string1, substring)     231 

    Ch7 Sec2.7.    SUBSTRING(string1, offset, len)     231 

    Ch7 Sec2.8.    STRCAT(string1, str2)     232 

    Ch7 Sec2.9.    STRFLOAT(string1)     232 

    Ch7 Sec2.10.    LABWID(string, charsize)    232 

    Ch7 Sec2.11.    SPAWN command    233 

    Ch7 Sec2.12.    Algebraic operations with string  variables.    233 

    Ch7 Sec2.12.1.    Logical operators with strings    233 

    Ch7 Sec2.12.2.    Shift transformation of string arrays    234 

    Ch7 Sec2.12.3.    Strings in IF-THEN-ELSE    234 

    Ch7 Sec2.12.4.    String concatenation with "+":       234 

    Ch7 Sec2.12.5.    Strings as Function arguments    235 

    Ch7 Sec2.12.6.    Regridding string arrays    235 

    Ch7 Sec2.13.    NetCDF input and output of string data    236 

Ch7 Sec3.    Symbol commanDS    236 

Ch7 Sec4.    AUTOMATICALLY GENERATED SYMBOLS    237 

Ch7 Sec5.    USE WITH EMBEDDED EXPRESSIONS    238 

Ch7 Sec6.    ORDER OF STRING SUBSTITUTIONS    238 

Ch7 Sec7.    CUSTOMIZING THE POSITION AND STYLE OF PLOT LABELS    239 

Ch7 Sec8.    USING SYMBOLS IN COMMAND FILES    239 

Ch7 Sec9.    PLOT+ STRING EDITING TOOLS    240 

Ch7 Sec10.    SYMBOL EDITING    240 

Ch7 Sec11.    SPECIAL SYMBOLS    242 

CHAPTER 8: WORKING WITH SPECIAL DATA SETS 

Ch8 Sec1.    WHAT IS NON-GRIDDED DATA?    243 

Ch8 Sec2.    POINT DATA    243 

    Ch8 Sec2.1.    Getting point data into Ferret    244 

    Ch8 Sec2.2.    How point data is structured in Ferret    244 

    Ch8 Sec2.2.1.    Working with dates    245 

    Ch8 Sec2.3.    Subsampling gridded fields onto point locations and times    245 

    Ch8 Sec2.4.    Defining gridded variables from point data    246 

    Ch8 Sec2.5.    Visualization techniques for point data    246 

Ch8 Sec3.    VERTICAL PROFILES    247 

    Ch8 Sec3.1.    How collections of profiles are structured in Ferret    247 

    Ch8 Sec3.2.    Getting profile data into Ferret    248 

    Ch8 Sec3.3.    Defining vertical sections from profiles    249 

    Ch8 Sec3.4.    Visualization and analysis techniques for profile sections    250 

    Ch8 Sec3.5.    Subsampling gridded fields onto profile coordinates    250 

Ch8 Sec4.    COLLECTIONS OF TIME SERIES    250 

Ch8 Sec5.    COLLECTIONS OF 2-DIMENSIONAL GRIDS    251 

Ch8 Sec6.    LAGRANGIAN DATA    251 

    Ch8 Sec6.1.    Visualization techniques for Lagrangian data    251 

Ch8 Sec7.    SIGMA COORDINATE DATA    251 

    Ch8 Sec7.1.    Visualization techniques for sigma coordinate data    252 

    Ch8 Sec7.2.    Analysis techniques for sigma coordinate data    252 

Ch8 Sec8.    CURVILINEAR COORDINATE DATA    252 

    Ch8 Sec8.1.    Visualization techniques for curvilinear coordinate data    254 

    Ch8 Sec8.2.    Analysis techniques for curvilinear coordinate data    255 

Ch8 Sec9.    POLYGONAL DATA    255 

    Ch8 Sec9.1.    Visualization techniques for polygonal data    255 

    Ch8 Sec9.2.    Analysis techniques for polygonal data    255 

CHAPTER 9: COMPUTING ENVIRONMENT 

Ch9 Sec1.    SETTING UP TO RUN FERRET    257 

Ch9 Sec2.    FILES AND ENVIRONMENT VARIABLES USED BY FERRET    258 

Ch9 Sec3.    MEMORY USE    259 

Ch9 Sec4.    HARD COPY AND METAFILE TRANSLATION    260 

    Ch9 Sec4.1.    Hard copy: postscript output     260 

    Ch9 Sec4.2.    Metafile translation     262 

    Ch9 Sec4.3.    Hard Copy: gif files    263 

Ch9 Sec5.    OUTPUT FILE NAMING    263 

Ch9 Sec6.    INPUT FILE NAMING    264 

    Ch9 Sec6.1.    Relative version numbers     264 

CHAPTER 10: CONVERTING TO NETCDF 

Ch10 Sec1.    OVERVIEW    267 

Ch10 Sec2.    SIMPLE CONVERSIONS USING FERRET    267 

Ch10 Sec3.    WRITING A CONVERSION PROGRAM    269 

    Ch10 Sec3.1.    Creating a CDL file with Ferret     270 

    Ch10 Sec3.2.    The CDL file     270 

    Ch10 Sec3.2.1.    Dimensions     271 

    Ch10 Sec3.2.2.    Variables     271 

    Ch10 Sec3.2.3.    Data     273 

    Ch10 Sec3.3.    Standardized NetCDF attributes     275 

    Ch10 Sec3.4.    Directing data to a CDF file     276 

    Ch10 Sec3.5.    Advanced NetCDF procedures     278 

    Ch10 Sec3.5.1.    Staggered grid     279 

    Ch10 Sec3.5.2.    Hyperslabs     279 

    Ch10 Sec3.5.3.    Unevenly spaced coordinates     280 

    Ch10 Sec3.5.4.    Evenly spaced coordinates (long axes)     281 

    Ch10 Sec3.5.5.    "Modulo" axes     281 

    Ch10 Sec3.5.6.    Reversed-coordinate axes    282 

    Ch10 Sec3.5.7.    Converting time word data to numerical data     282 

    Ch10 Sec3.6.    Example CDL file     282 

Ch10 Sec4.    CREATING A MULTI-FILE NETCDF DATA SET    289 

    Ch10 Sec4.1.    Tools for making descriptor files    291 

    Ch10 Sec4.2.    Example descriptor file    291 

CHAPTER 11: WRITING EXTERNAL FUNCTIONS 

Ch11 Sec1.    OVERVIEW    293 

Ch11 Sec2.    GETTING STARTED    293 

    Ch11 Sec2.1.    Getting example/development code    294 

Ch11 Sec3.    QUICK START EXAMPLE    294 

    Ch11 Sec3.1.    The times2bad20 function    294 

Ch11 Sec4.    ANATOMY OF AN EXTERNAL FUNCTION    295 

    Ch11 Sec4.1.    The ~_init subroutine (required)    296 

    Ch11 Sec4.2.    The ~_compute subroutine (required)    297 

    Ch11 Sec4.3.    The ~_work_size subroutine
(required when work arrays are defined)    298 

    Ch11 Sec4.4.    The ~_result_limits subroutine
(required if result has a custom or abstract axis)    299 

    Ch11 Sec4.5.    The ~_custom_axes subroutine
(required if result has a custom axis)    299 

Ch11 Sec5.    NOTES AND SUGGESTIONS    301 

    Ch11 Sec5.1.    Inheriting axes    301 

    Ch11 Sec5.2.    Loop indices    302 

    Ch11 Sec5.3.    Reduced axes    304 

    Ch11 Sec5.4.    String Arguments    305 

Ch11 Sec6.    UTILITY FUNCTIONS    306 

    Ch11 Sec6.1.    EF_Util.cmn    306 

    Ch11 Sec6.2.    Available utility functions    307 

    Ch11 Sec6.2.1.    ef_set_desc(id, desc)    308 

    Ch11 Sec6.2.2.    ef_set_num_args(id, num)    308 

    Ch11 Sec6.2.3.    ef_set_axis_inheritance(id, Xsrc, Ysrc, Zsrc, Tsrc)    308 

    Ch11 Sec6.2.4.    ef_set_piecemeal_ok(id, Xyn, Yyn, Zyn, Tyn)    309 

    Ch11 Sec6.2.5.    ef_set_arg_name(id, arg, name)    309 

    Ch11 Sec6.2.6.    ef_set_arg_desc(id, arg, desc)    309 

    Ch11 Sec6.2.7.    ef_set_arg_unit(id, arg, unit)    309 

    Ch11 Sec6.2.8.    ef_set_arg_type(id, arg, type)    310 

    Ch11 Sec6.2.9.    ef_set_axis_extend(id, arg, axis, lo_amt, hi_amt)    310 

    Ch11 Sec6.2.10.    ef_set_axis_influence(id, arg, Xyn, Yyn, Zyn, Tyn)    310 

    Ch11 Sec6.2.11.    ef_set_axis_reduction(id, Xred, Yred, Zred, Tred)    311 

    Ch11 Sec6.2.12.    ef_set_axis_limits(id, axis, lo, hi)    311 

    Ch11 Sec6.2.13.    ef_set_custom_axis(id, axis, lo, hi, delta, unit, modulo)    311 

    Ch11 Sec6.2.14.    ef_set_num_work_arrays(id, nwork)    312 

    Ch11 Sec6.2.15.    ef_set_work_array_dims(id, iarray, xlo, ylo, zlo, tlo, xhi, yhi, zhi, thi)    312 

    Ch11 Sec6.2.16.    ef_get_res_subscripts(id, res_lo_ss, res_hi_ss, res_incr)    312 

    Ch11 Sec6.2.17.    ef_get_arg_info(id, iarg, arg_name, arg_title, arg_units)    313 

    Ch11 Sec6.2.18.    ef_get_arg_string(id, iarg, text)    313 

    Ch11 Sec6.2.19.    ef_get_one_arg_string(id, iarg, text)    313 

    Ch11 Sec6.2.20.    ef_get_axis_info(id, iarg, axname, ax_units, backward, modulo, regular)    314 

    Ch11 Sec6.2.21.    ef_get_axis_dates(id, iarg, taxis, numtimes, datebuf)    314 

    Ch11 Sec6.2.22.    ef_get_axis_calendar(id, iarg, calname, yrdays, nmonths, days_in_month)    314 

    Ch11 Sec6.2.23.    ef_get_arg_subscripts(id, arg_lo_ss, arg_hi_ss, arg_incr)    315 

    Ch11 Sec6.2.24.    ef_get_arg_ss_extremes(id, num_args, ss_min, ss_max)    316 

    Ch11 Sec6.2.25.    ef_get_bad_flags(id, bad_flag, bad_flag_result)    316 

    Ch11 Sec6.2.26.    ef_get_coordinates(id, arg, axis, lo, hi, coords)    317 

    Ch11 Sec6.2.27.    ef_get_box_size(id, arg, axis, lo, hi, size)    318 

    Ch11 Sec6.2.28.    ef_get_box_limits(id, arg, axis, lo, hi, lo_lims, hi_lims)    319 

    Ch11 Sec6.2.29.    ef_get_one_val(id, arg, value)    319 

    Ch11 Sec6.2.30.    ef_get_string_arg_element(id, arg, i,j,k,l, str_arg,   slen, text)    320 

    Ch11 Sec6.2.31.    ef_get_string_arg_element_len (id, arg, str_arg, i,j,k,l,   slen)    320 

    Ch11 Sec6.2.32.    ef_get_string_arg_max_len (id, arg, str_arg, slen)    320 

    Ch11 Sec6.2.33.    ef_version_test (version)    321 

    Ch11 Sec6.2.34.    ef_bail_out(id, text)    321 

PART II: COMMANDS REFERENCE 

Ref Sec1.    ALIAS    323 

Ref Sec2.    CANCEL    323 

    Ref Sec2.1.    CANCEL ALIAS     323 

    Ref Sec2.2.    CANCEL ATTRIBUTE    323 

    Ref Sec2.3.    CANCEL AXIS     324 

    Ref Sec2.4.    CANCEL MEMORY    327 

    Ref Sec2.5.    CANCEL MOVIE     328 

    Ref Sec2.6.    CANCEL SYMBOL    328 

    Ref Sec2.7.    CANCEL REGION    328 

    Ref Sec2.8.    CANCEL VIEWPORT     329 

    Ref Sec2.9.    CANCEL WINDOW    330 

Ref Sec3.    CONTOUR    330 

Ref Sec4.    DEFINE    337 

    Ref Sec4.1.    DEFINE ALIAS     337 

    Ref Sec4.2.    DEFINE ATTRIBUTE    337 

    Ref Sec4.3.    DEFINE AXIS    338 

    Ref Sec4.4.    DEFINE GRID    346 

    Ref Sec4.5.    DEFINE REGION    348 

    Ref Sec4.6.    DEFINE SYMBOL    349 

    Ref Sec4.7.    DEFINE VARIABLE    350 

    Ref Sec4.8.    DEFINE VIEWPORT    353 

Ref Sec5.    ELIF    356 

Ref Sec6.    ELSE    356 

Ref Sec7.    ENDIF    356 

Ref Sec8.    EXIT    356 

Ref Sec9.    FILE    357 

Ref Sec10.    FILL    358 

Ref Sec11.    FRAME    358 

Ref Sec12.    GO    359 

Ref Sec13.    HELP    359 

Ref Sec14.    IF    360 

    Ref Sec14.1.    IF-THEN-ELSE conditional execution    360 

    Ref Sec14.2.    IF-THEN-ELSE logic for masking     362 

Ref Sec15.    LABEL    363 

Ref Sec16.    LET    363 

Ref Sec17.    LIST    364 

Ref Sec18.    LOAD    369 

Ref Sec19.    MESSAGE    370 

Ref Sec20.    PALETTE    371 

Ref Sec21.    PATTERN    372 

Ref Sec22.    PAUSE    373 

Ref Sec23.    PLOT    373 

Ref Sec24.    POLYGON    380 

Ref Sec25.    PPLUS    387 

Ref Sec26.    QUERY    388 

Ref Sec27.    QUIT    388 

Ref Sec28.    REPEAT    388 

Ref Sec29.    SAVE    392 

Ref Sec30.    SAY    395 

Ref Sec31.    SET    395 

    Ref Sec31.1.    SET ATTRIBUTE     395 

    Ref Sec31.2.    SET AXIS     396 

    Ref Sec31.3.    SET DATA_SET    398 

    Ref Sec31.4.    SET EXPRESSION     406 

    Ref Sec31.5.    SET GRID    406 

    Ref Sec31.6.    SET LIST    407 

    Ref Sec31.7.    SET MEMORY    409 

    Ref Sec31.8.    SET MODE    410 

    Ref Sec31.8.1.    SET MODE ASCII_FONT     411 

    Ref Sec31.8.2.    SET MODE CALENDAR     411 

    Ref Sec31.8.3.    SET MODE DEPTH_LABEL     412 

    Ref Sec31.8.4.    SET MODE DESPERATE     412 

    Ref Sec31.8.5.    SET MODE DIAGNOSTIC     413 

    Ref Sec31.8.6.    SET MODE GRATICULE    413 

    Ref Sec31.8.7.    SET MODE IGNORE_ERROR     414 

    Ref Sec31.8.8.    SET MODE INTERPOLATE     414 

    Ref Sec31.8.9.    SET MODE LABELS    415 

    Ref Sec31.8.10.    SET MODE LOGO    415 

    Ref Sec31.8.11.    SET MODE JOURNAL     415 

    Ref Sec31.8.12.    SET MODE LATIT_LABEL     415 

    Ref Sec31.8.13.    SET MODE LONG_LABEL     416 

    Ref Sec31.8.14.    SET MODE METAFILE     417 

    Ref Sec31.8.15.    SET MODE PPLLIST     417 

    Ref Sec31.8.16.     SET MODE REFRESH     417 

    Ref Sec31.8.17.    SET MODE SEGMENTS     418 

    Ref Sec31.8.18.    SET MODE STUPID     418 

    Ref Sec31.8.19.    SET MODE UPCASE_OUTPUT    418 

    Ref Sec31.8.20.    SET MODE VERIFY     419 

    Ref Sec31.8.21.    SET MODE WAIT     419 

    Ref Sec31.9.    SET MOVIE    420 

    Ref Sec31.10.    SET REGION    421 

    Ref Sec31.11.    SET VARIABLE    422 

    Ref Sec31.11.1.    SET VARIABLE/BAD=    422 

    Ref Sec31.11.2.    SET VARIABLE/GRID=     423 

    Ref Sec31.11.3.    SET VARIABLE/TITLE=    423 

    Ref Sec31.11.4.    SET VARIABLE/OFFSET=    424 

    Ref Sec31.11.5.    SET VARIABLE/SCALE=    424 

    Ref Sec31.12.    SET VIEWPORT     424 

    Ref Sec31.13.    SET WINDOW    425 

Ref Sec32.    SHADE    427 

Ref Sec33.    SHOW    432 

    Ref Sec33.1.    SHOW ALIAS     432 

    Ref Sec33.2.    SHOW ATTRIBUTE    432 

    Ref Sec33.3.    SHOW AXIS    433 

    Ref Sec33.4.    SHOW COMMANDS     434 

    Ref Sec33.5.    SHOW DATA_SET    434 

    Ref Sec33.6.    SHOW EXPRESSION     436 

    Ref Sec33.7.    SHOW FUNCTION    436 

    Ref Sec33.8.    SHOW GRID    438 

    Ref Sec33.9.    SHOW LIST     439 

    Ref Sec33.10.    SHOW MEMORY    439 

    Ref Sec33.11.    SHOW MODE     440 

    Ref Sec33.12.    SHOW MOVIE     441 

    Ref Sec33.13.    SHOW QUERIES    441 

    Ref Sec33.14.    SHOW REGION     441 

    Ref Sec33.15.    SHOW SYMBOL    441 

    Ref Sec33.16.    SHOW TRANSFORM     442 

    Ref Sec33.17.    SHOW VARIABLES    442 

    Ref Sec33.18.    SHOW VIEWPORT     443 

    Ref Sec33.19.    SHOW WINDOWS     443 

Ref Sec34.    SPAWN    444 

Ref Sec35.    STATISTICS    444 

Ref Sec36.    UNALIAS    445 

Ref Sec37.    USE    445 

Ref Sec38.    USER    445 

    Ref Sec38.1.    Objective analysis     446 

    Ref Sec38.2.    Scattered sampling     446 

Ref Sec39.    VECTOR    447 

Ref Sec40.    WHERE    453 

Ref Sec41.    WIRE    453 

GLOSSARY 

APPENDIX A: EXTERNAL FUNCTIONS 

Appendix A Sec1.    COMPRESSI    461 

Appendix A Sec2.    COMPRESSJ    462 

Appendix A Sec3.    COMPRESSK    462 

Appendix A Sec4.    COMPRESSL    462 

Appendix A Sec5.    COMPRESSI_BY    463 

Appendix A Sec6.    COMPRESSJ_BY    463 

Appendix A Sec7.    COMPRESSK_BY    464 

Appendix A Sec8.    COMPRESSL_BY    464 

Appendix A Sec9.    CONVOLVEI    465 

Appendix A Sec10.    curv_to_rect_map    465 

Appendix A Sec11.    curv_to_rect    467 

Appendix A Sec12.    rect_to_curv    468 

Appendix A Sec13.    DATE1900    469 

Appendix A Sec14.    DAYS1900TOYMDHMS    470 

Appendix A Sec15.    ELEMENT_INDEX    470 

Appendix A Sec16.    ELEMENT_INDEX_STRING    471 

Appendix A Sec17.    EOF_SPACE    472 

Appendix A Sec18.    EOF_STAT    473 

Appendix A Sec19.    EOF_TFUNC    474 

Appendix A Sec20.    FINDHI    475 

Appendix A Sec21.    FINDLO    476 

Appendix A Sec22.    FFT_IM    476 

Appendix A Sec23.    FFT_RE    477 

Appendix A Sec24.    FFT_INVERSE    478 

Appendix A Sec25.    IS_ELEMENT_OF    478 

Appendix A Sec26.    IS_ELEMENT_OF_STR    479 

Appendix A Sec27.    Lanczos     479 

Appendix A Sec28.    LSL_LOWPASS    480 

Appendix A Sec29.    MINUTES24    481 

Appendix A Sec30.    WRITEV5D    482 

Appendix A Sec31.    XCAT    483 

Appendix A Sec32.    YCAT    484 

Appendix A Sec33.    ZCAT    484 

Appendix A Sec34.    TCAT    484 

Appendix A Sec35.    ZAXREPLACE_AVG    485 

Appendix A Sec36.    ZAXREPLACE_BIN    486 

APPENDIX B: PPLUS USERS GUIDE 

Appendix B Sec1    Introduction    487 

Appendix B Sec2    GETTING STARTED    488 

    Appendix B Sec2.1    VAX/VMS    488 

    Appendix B Sec2.2    Required Definitions    488 

    Appendix B Sec2.2.1    Optional Definitions    489 

Appendix B Sec3    COMMAND FORMAT    489 

    Appendix B Sec3.1    THE COMMANDS    489 

Appendix B Sec4    COMMAND SYNOPSIS    490 

    Appendix B Sec4.1    FILES    490 

    Appendix B Sec4.1.1     Data Files    490 

    Appendix B Sec4.1.2     Other Data Entry    491 

    Appendix B Sec4.1.3    PPLUS Output Files     491 

    Appendix B Sec4.1.4     PPLUS Command Files    491 

    Appendix B Sec4.2    AXIS    491 

    Appendix B Sec4.2.1    X- And Y-axis    491 

    Appendix B Sec4.2.2    Time Axis    492 

    Appendix B Sec4.3     LABELS    493 

    Appendix B Sec4.4    COMMAND PROCEDURES    493 

    Appendix B Sec4.5    COLOR AND FONTS    494 

    Appendix B Sec4.6     PLOT APPEARANCE     494 

    Appendix B Sec4.7     PLOT GENERATION    494 

    Appendix B Sec4.8    DATA MANIPULATION    495 

    Appendix B Sec4.9    HELP    495 

Appendix B Sec5    BEGINNERS GUIDE    496 

    Appendix B Sec5.1    FORMAT    496 

    Appendix B Sec5.2    5.2  VARS    496 

    Appendix B Sec5.3    SKP AND RD    497 

    Appendix B Sec5.4    PLOT AND CONTOUR    498 

    Appendix B Sec5.5     EXAMPLES    498 

    Appendix B Sec5.5.1    Unformatted Data, X-Y Plot    498 

    Appendix B Sec5.5.2    Pre-gridded Data, Contour Plot    499 

    Appendix B Sec5.5.3    Ungridded Data, Contour Plot    500 

    Appendix B Sec5.5.4    Time Series Plot    500 

Appendix B Sec6    ROUTING PLOT FILES    501 

    Appendix B Sec6.1    VAX/VMS    501 

    Appendix B Sec6.1.1    Plot Files And Mom    501 

    Appendix B Sec6.1.2    Plotting Devices    502 

    Appendix B Sec6.1.3    Examples    503 

Appendix B Sec7    PPLUS COMMAND FILES    503 

    Appendix B Sec7.1    INTRODUCTION    503 

    Appendix B Sec7.2    SYMBOL SUBSTITUTION    504 

    Appendix B Sec7.3    GENERAL GLOBAL SYMBOLS    505 

    Appendix B Sec7.4    EPIC GLOBAL SYMBOLS    506 

    Appendix B Sec7.5    COMMAND FILE LOGIC    507 

    Appendix B Sec7.6    ARITHMETIC    508 

    Appendix B Sec7.7    SYMBOL ARRAYS    508 

    Appendix B Sec7.8    SPECIAL FUNCTIONS    509 

    Appendix B Sec7.8.1    $EDIT    509 

    Appendix B Sec7.8.2    $EXTRACT    510 

    Appendix B Sec7.8.3    $INTEGER    511 

    Appendix B Sec7.8.4    $LENGTH    511 

    Appendix B Sec7.8.5     $LOCATE    512 

    Appendix B Sec7.8.6    $ELEMENT    512 

    Appendix B Sec7.9    LABELS    513 

    Appendix B Sec7.9.1    AXIS LABELING    513 

    Appendix B Sec7.9.2    EMBEDDED STRING COMMANDS    514 

    Appendix B Sec7.9.3    Pen Selection    516 

    Appendix B Sec7.9.4    Character Slant    516 

    Appendix B Sec7.9.5    Subscripting, Superscripting And Back Spacing    516 

    Appendix B Sec7.10      DATA FORMATS    516 

    Appendix B Sec7.10.1    SEQUENTIAL FORMATS    516 

    Appendix B Sec7.10.2    BIBO FORMAT    517 

    Appendix B Sec7.10.3    EPIC FORMAT    517 

    Appendix B Sec7.10.4    DSF FORMAT    518 

    Appendix B Sec7.11    ADVANCED COMMANDS    520 

    Appendix B Sec7.11.1    %OPNPLT/qualifier    520 

    Appendix B Sec7.11.2    %CLSPLT/qualifiers    520 

    Appendix B Sec7.11.3    %PLTLIN,n    521 

    Appendix B Sec7.11.4    %LABEL/qualifier,x,y,ipos,ang,chsiz,label    521 

    Appendix B Sec7.11.5    %RANGE,min,max,ntic    522 

    Appendix B Sec7.11.6    %XAXIS/qualifier,xlow,xhigh,xtic,y[,nmstc][,lint][,xunit][,ipos][,csize][,frmt]     522 

    Appendix B Sec7.11.7    %YAXIS/qualifier,ylow,yhigh,ytic,x[,nmstc][,lint] [,yunit][,ipos][,csize][,frmt]     523 

Appendix B Sec8    PLOT5, PPLUS DIFFERENCES    525 

Appendix B Sec9    COMMAND DESCRIPTION    525 

    Appendix B Sec9.1    @file_name/qualifier arg1 arg2 arg3 ...    525 

    Appendix B Sec9.2    AUTO,ON/OFF     526 

    Appendix B Sec9.3    AUTOLAB,ON/OFF     526 

    Appendix B Sec9.4    AXATIC,ATICX,ATICY    527 

    Appendix B Sec9.5    AXLABP,LABX,LABY    527 

    Appendix B Sec9.6    AXLEN,XLEN,YLEN    527 

    Appendix B Sec9.7    AXLINT,LINTX,LINTY    527 

    Appendix B Sec9.8    AXLSZE,HGTX,HGTY    527 

    Appendix B Sec9.9    AXNMTC,NMTCX,NMTCY    527 

    Appendix B Sec9.10    AXNSIG,NSIGX,NSIGY    527 

    Appendix B Sec9.11    AXSET,TOP,BOT,LEFT,RIGHT    528 

    Appendix B Sec9.12    AXTYPE,TYPEX,TYPEY    528 

    Appendix B Sec9.13    BAUD,IB    528 

    Appendix B Sec9.14    BOX,ON/OFF    528 

    Appendix B Sec9.15    C    528 

    Appendix B Sec9.16    CLSPLT     528 

    Appendix B Sec9.17    CONPRE,prefix    528 

    Appendix B Sec9.18    CONPST,postfix    529 

    Appendix B Sec9.19    CONSET,HGT,NSIG,NARC,DASHLN,SPACLN,CAY,NRNG,DSLAB    529 

    Appendix B Sec9.20    CROSS,ICODE    530 

    Appendix B Sec9.21    DATPT,type,mark    530 

    Appendix B Sec9.22    DEBUG on/off    531 

    Appendix B Sec9.23    DEC symbol    531 

    Appendix B Sec9.24    DELETE symbol    531 

    Appendix B Sec9.25    DFLTFNT,font    531 

    Appendix B Sec9.26    DIR,arg    531 

    Appendix B Sec9.27    ECHO,on/off    531 

    Appendix B Sec9.28    ENGLISH    532 

    Appendix B Sec9.29    ENTER    532 

    Appendix B Sec9.30    EVAR/qualifier,x-var,y-var    532 

    Appendix B Sec9.31    GET,file_name    534 

    Appendix B Sec9.32    GRID[,LINEAR]    534 

    Appendix B Sec9.33    HELP,arg    534 

    Appendix B Sec9.34    HLABS,n,height    534 

    Appendix B Sec9.35    HLP,arg    534 

    Appendix B Sec9.36    F expression THEN    535 

    Appendix B Sec9.37    INC sym    535 

    Appendix B Sec9.38    LABS/qualifier,n,X,Y,JST,label    535 

    Appendix B Sec9.39    LABSET,HLAB1,HXLAB,HYLAB,HLABS    536 

    Appendix B Sec