Geography Imaging for MAP

The present file gives general informations about the package gi_map and describes the installation and usage procedures.

CONTENTS


Rights

The gi_map package is using commercial data provided with the Digital Chart of the World (DCW) package. Before using gi_map, you must purchase the DCW CD (provided with a licence) which gives you the legal right to use the subset of data included in the gi_map package.

The CD and the package, containing the freeware gi_map and the subset of data, are available at MAP PO for can.$ 50 .


General information

The package gi_map is a set of vectorial data in latitude-longitude coordinates (for more information about the data source, please read dcwcd.doc; while reading it, please keep in mind that data delivered with the gi_map package form only a subset of the data included in the DCW CD) provided with an image making Fortran77 program using NCAR Graphic drawing subroutines.

This gi_map package has been designed at RPN especially to support graphics need of the MAP scientists working on the "MAP hi-resolution domain". Several geographical projections are available, such as polar stereographic, Mercator, etc.

Among available data, city and airport names, geographical and political contours, rivers and lakes can be displayed over a certain region and superposed over meteorological fields to give landmarks. Also available, synoptic and surface stations coordinates (such as provided by MDC) could be used to compare station data to model output.

Here are some examples of output made with gi_map.exe (These gif images have been obtained through the grab command of XV over a metafile displayed by idt.)

A view of rivers, lakes, glacial and political limit covering Switzerland.
To see the setting files used to output this picture: dcw_settings, InputFileList

Zoom over Switzerland

A close zoom over BRIG a city along Swiss-Italian border (MAP episode number 2) with some supplementary surface stations shown in red (hand made compilation, i.e. with some cutoff errors on latitude longitude coor.).
To see the setting files used to output this picture: dcw_settings, InputFileList

Zoom over Brig


Extract the archive file

The package gi_map is delivered in a zipped archive file. The complete uncompressed archive is 40 Mb, be sure you have enough disk space before decompression.

To uncompress the package and extract the archive, use the following inline command:

	gunzip gi_map.tar.gz
	tar xvf gi_map.tar

This will create a directory named gi_map under which the files (and directory) listed below are included.

dcw_advertise.html this file
gi_map.f Main program that reads files from Digital Chart of the World (DCW) and output the graphic with NCAR Graphics primitives
Tables/ Directory under which selected Digital Chart of the World (DCW) data, covering the MAP hi-res data domain, are present.
dcw_settings Example of the namelist content used to customize the output of gi_map.f
InputFileList Example of the "input file list" content used to customize the output of gi_map.f
desc_tables List of all data file names, included in Tables/, with their corresponding (very) short description.
dcwcd.doc Complementary information about DCW data

Make the executable (Compiling)

The NCAR Graphics library MUST be available.
To make the executable, use the simple inline command:

			ncargf77 -o gi_map.exe gi_map.f

This will create the executable file: gi_map.exe


Usage and Settings

Before running gi_map.exe you might want to adjust parameters for your own case study. These parameters are set in 2 files (versions with default parameters are included in the package), dcw_settings and InputFileList.


The File: dcw_settings

The file dcw_settings contains a namelist describing the general settings used by gi_map.exe. The variables that could be adjusted are:

tables_path: Absolute or Relative path name under which are located the DCW data files.
Default value is set to ./Tables/ where the archive put the files but you may want to change the location for a bigger disk since this package is relatively big.
inputfilelist: "Input file list" file name (see below). In that file, all the file names, corresponding to the kind of object you want to display, are listed.
Default value is set to InputFileList
viewport: Window size and location (in Latitude and Longitude decimal coord.) as
West, East, South, North
Default is set to the MAXIMUM according to the DCW data included and corresponds to the MAP hi-res data domain 2., 19., 38., 50. including 'Sardinia'.
mapproj: Geographical Projection.
Possible values: LC (Lambert Conformal), ST (Stereographic), OR (Orthographic), LE (Lambert Equal area), GN (Gnomonic), AE (Azimuthal Equidistant), CE (Cylindrical Equidistant, i.e. latitude-longitude), ME (Mercator), MO (Mollweide-type).
Default is set to ME (MERCATOR).
mappar: Geographical Projection parameters: plat (-90 to 90.), plon (-180. to 180.), rota.
The center of the projection (not the center of the map) is located at plat,plon . And rota is the angle (in degrees, counterclockwise) between the y-axis of the viewport and the north direction at the origin.
These definitions are not valid for the LC projection.
For more details please refer to NCAR graphics EZMAP Tutorial.
Default is set to 0., 0., 0.
lalogrd: Latitude and longitude lines: spacing (decimal degrees), precision (0.001 to 10.)
Please note that this option cause some glitches when using a spacing less than one degree.
Default is set to 0., 0. (i.e. no line)
bgcolor: Background color set as RED, GREEN, BLUE (RGB) factors.
Default is set to white: 1., 1., 1.
The 3 numbers correspond to the RGB factors ranging in: 0. to 1.
For Gray Scale, the RGB factors must be the same, with the extremes: '1.,1.,1.' for White and '0.,0.,0.' for Black.
fgcolor1-9: Foreground color number 1 to number 9 set as RGB factors.
See Defaults in the example file below.
csiz_big: Character size (NCAR "viewport" units) used for big characters.
Default is set to 0.0015
NCAR "viewport" units range in: 0.0 - 1.0, where 1.0 is as big as the viewport.
csiz_sma: Character size (NCAR "viewport" units) used for small characters.
Default is set to 0.0007

Example of the dcw_settings file:

 &dcw_set
  tables_path = "./Tables/"
  inputfilelist = "InputFileList"
  viewport = 2.0, 19.0, 38.0, 50.0
  mapproj  = "ST"
  mappar   = 90.,  0., 10.
  bgcolor  = 1.,   1.,   1.
  fgcolor1 = 0.,   0.,   0.
  fgcolor2 = 1.,   0.,   0.
  fgcolor3 = 0.,   1.,   0.
  fgcolor4 = 0.,   0.,   1.
  fgcolor5 = 0.6,  0.095,0.95
  fgcolor6 = 0.5,  0.5,  0.97
  fgcolor7 = 0.9,  0.5,  0.1
  fgcolor8 = 0.3,  0.3,  0.3
  fgcolor9 = 0.984,0.690,0.31
  csiz_big = 0.0095
  csiz_sma = 0.0065
 &end

The "Input File List" file

The input file list specifies all the DCW data file names corresponding to the class of objects (like rivers, lakes, sea shore, political contours, city names...) you want to display. To know which kind of object corresponds to a specific file name, look in desc_tables or in DCW_TABLES.

The input file list structure is FORMAT(A23, 2X, I5, 2X, I1, 2X, I1):

1st line: nb of "classes" (of DCW data file names) listed in the file
1st column: (23 char) full name of the DCW data file
2nd column: (integer of 5 char): number of lines of data in the DCW data file (total number of lines in the file minus 1; use UNIX command wc -l to get it)
3rd column: (integer of 1 char): color attribute (1 to 9) under which you want the class to be displayed (corresponds with the fgcolor1-9 of dcw_settings)
4th column: (integer of 1 char): Switch for kind (type) of data contained in the DCW data file and size used to display it;
0-big character (.llt files)
1-small character (.llt files)
these 2 character size are user defined in dcw_settings
>1 -line size (.llp files) (2 (smallest) to 9 (biggest) line size).

When editing the input file list file, you must respect the specified format.

e.g.:

ppp01.llt                04996  1  0


It will display "populated places shown by dot" (file: ppp01.llt)
The file has 4996 lines of data (you can obtain it with: wc -l ppp01.llt, minus 1)
We chose the color 1 (black by default)
It is a character type of information (.llt) that we want in size csiz_big (number 0, user's choice).

The description of the class of object (or file content) corresponding to each DCW data file name is in the file: desc_tables. Since some object type files are huge, some of them have been split into many subfiles corresponding to a square box of 5 by 5 deg. Theses files have a supplementary name extension corresponding to the latlon S-W coor. of the box. (e.g.: .35n015e) Be sure you include all those sub-files in the InputFileList when you want these objects displayed.


Running gi_map.exe

When you run gi_map.exe (simply execute the command line: gi_map.exe)

REMARK:


Add station names from MAP database

You could add surface station names, from the MAP database, to the geographical map in a few steps:

  1. Go to the MAP database
  2. Select MAP surface stations
  3. In Available fields select:
  4. Select the appropriate property of the stations to restrict the number of selected stations (the map could easily be overloaded).
  5. Select Output to: ASCII-Table with Separator: SPACE
  6. Execute Query
  7. To save: File -> Save As (save as Text)
    The file must be saved under the directory containing all the other data files used by gi_map (by default, these files are under the directory: Tables/).
  8. Edit the file you just saved
    Change the header
    Before the first station name, there must be only one line containing only those 3 left aligned capital letters: MAP
    e.g., the result of the query:
    "STATIONNAME" "LATITUDE" "LONGITUDE"
    "AIGLE" 46.33 6.908
    "ALTDORF" 46.86 8.63
    "CHUR-EMS" 46.86 9.529
    

    should become:

    MAP
    "AIGLE" 46.33 6.908
    "ALTDORF" 46.86 8.63
    "CHUR-EMS" 46.86 9.529
    
  9. Include this file name in the "Input File List" file as other data files.

Questions and Comments

For questions and comments (bugs and others), please send an e-mail
(subject gi_map.f, info request, or gi_map.f, comments) to:
Stephane.Chamberland@ec.gc.ca