drawcoast documentation



General Remarks.

The following list describes the parameters that must be provided in the script for the plotting to run correctly. The items are described in the order thy should appear in. Occasionally, some items must be omitted in case they are not needed, e.g. no partition file is needed if solid_file is not set to 1.

Descriptions of the items in the script

  1. icartmap (integer)
    Flag to indicate if a map projection is desired. If set to a non-zero value, the parameters defining the projection should be present in the next 6 lines. icartmap takes the following values:
    1. 0 no map projection
    2. 1 a map projection is desired, and the continental outlines are those of NCAR.
    3. 2 same as 1, except that the continents are colored with whatever color is in index color 2.
    4. -1 a map projection is desired, but the continental outline is that of xcoast. The environment variable XCOASTDATA should point to the place where the file is located. Currently mine is pointing to "/u1/coasts/coast0.lines".
    5. -2 a map projection is desired, the xcoast continents are used, and an isobath is drawn (as for the Abyssal Basin of the Eastern Mediterranean). The environment variable ISOBATH must point to the isobath data file. My file is located in "/d2/mohamed/rmed/xcoast.isobath".
    6. < -2 For integers less than -2, only the isobaths are drawn.
  2. JPRJ (character)
    Defines the type of projection (e.g. ME for mercator, OR for orthographic). Check the NCAR manual for the list of projections available.
  3. PLAT, PLONG, ROTA (real)
    The latitude, longitude and rotation angle of the projection. Their meaning depends on the type of projection used.
  4. JLTS (character)
    Decide on the extent of the map to be drawn. JLTS can take the following values:
    1. MA the maximum visible portion of the map is drawn.
    2. CO the data on line 8 specify corner locations
    3. AN the data on line 8 specify angles from center of projection.
  5. P1, P2, P3, P4 (real)
    The meanining of the above paremeters changes depending on the type of projection (JPRJ) and area definition (JLTS). For JPRJ=ME and JLTS = CO, P1 and P2 are the latitudes and longitudes of the lower left corner of the map; P3 and P4 are the latitudes and longitude of the upper right corner.
  6. JGRD (real)
    Increments in degrees in case a lon-lat grid is desired. Has never really worked for some reason. I set it to 0.
  7. XOFF, YOFF (real)
    Indicate the offset of the grid upon projecting lat-lon to x-y space. These parameters are now obsolete.
  8. lft, rgt, bot, top (real)
    Position of the map on the plotter frame. These numbers must be between 0.0 and 1.0.
    1. lft: distance from left border to left edge of the plot, suggested (0.05)
    2. rgt: distance from left border to right edge of the plot, suggested (0.95)
    3. bot: distance from bottom border to bottom edge of the plot, suggested (0.05)
    4. top: distance from bottom border to top edge of the plot, suggested (0.95)
  9. lonlat (logical)
    if true, the grid information is already in longitude and latitude coordinates.
  10. draw_elements (logical)
    If true the border of the elements are drawn. This is useful to locate the number of the elements with interesting (usually troubling) features.
  11. draw_continents (logical)
    flag to draw continents.
    1. True : Continents are drawn.
    2. False : Continents are not drawn (like for the sector).
  12. full_mesh (logical)
    flag to draw full spectral element mesh or just borders.
    1. True : Draws the full mesh including interior lines.
    2. False : Draws the elemental partition only.
    It must be to true if element_number is set to true, otherwise the plot will be cluttered.
  13. element_number (logical)
    decides whether to draw element number in each element.
    1. T: the number of each element is written.
    2. F: No number is written.
  14. iso_elements (logical)
    1. T: the spectral truncation is the same in the x and y directions.
    2. F: the spectral expansions in x and y are different. This is useful to draw the vertical sections spectrally.
  15. solid_fill, ncl (integer)
    Parameters to color the elements. if solid_fill is not zero, the elements are colored according to the value chosen for solid_fill. If solid_fill is
    1. 1: it colors a partition of the grid (prepared for parallel processing). The colors indicate which elements belong to the same processor. In case a partition is drawn, the name of the partition should be listed right after naming the grid file.
    2. 2: it colors the elements according to the average grid spacing within each element. The ncl parameters must be greater than 1 and indicate the number of colors. It must be followed by the ncl limits of each color. for example if ncl = 4, there should be 4 reals in the following lines indicating the cut-offs of the colors, e.g. 10.e3 30.e3 50.e3 100.e3. The first color indicates elements with grid spacing less than 10 km, the second indicates elements between 10 and 30 km, etc...
  16. tick_marks (integer)
    flag to draw the tick-marks and write the labels on the x and y axes. No tick-marks or labels are drawn if tick_marks is set to 0.
  17. grid_file (character)
    In the case of a spectral element data, the file should contain the spectral grid. Otherwise, if contouring x-y data, set it to structured_grid.
  18. iread (integer)
    Decide whether to read-in another grid file before drawing it. if iread is not 0, another file is read, otherwise it is terminated. This is useful to draw grids that have not been assembled yet. If iread is not zero, go back to line 16 and enter the name of another grid. This is repeated until iread is zero.
  19. idraw_star (integer)
    Decide whether to draw individual points, indicated by a star, on the map. if idraw_star is not equal to zero, another point is drawn whose coordinate are listed in the following line. The process is repeated until idraw_star is 0.
  20. longitude, latitude (real)
    longitude and latitudes of the points to draw on the map.

Examples

Here are a few sample grids:
  1. Picture and script of a rectangular grid with collocation points drawn.
  2. Picture and script of a North Atlantic grid without collocation , plus element numbers.
  3. Picture and script of a North Atlantic grid with shaded continents.
  4. Picture and script of a North Atlantic grid with Orthographic projection, shaded continents, and full spectral element mesh.
  5. Picture and script of a North Atlantic grid with Mercator projection, shaded continents, and colored according to average grid spacing. Must set the environment variable:" setenv COLORBAR_FILE colorbar.spac ". The file colorbar.spac controls the layout of the color palette.
  6. Picture and script of a North Atlantic grid colored by the parallel partition number.