This paper describes a FORTRAN routine MAPS which draws a map of the world. Various angles and projections are possible and lines of latitude and longitude can be drawn if desired. It can be used with SMOG or SPROGS and is a conversion of the routine previously provided with the SCFOR package.
It is being documented here in an internal paper, pending the setting up of a graphics library, with its own documentation. Some details of access may, therefore, be altered later.
SUBROUTINE MAPS (MTYPE,PLAT,PLONG,RADT,RADS,RUT,RUS,RCPX,RCPY,MSHAPE,MGRID,NC)
=l Stereographic Zenithal =2 Orthographic Zenithal =3 Equidistant Zenithal =4 Equal area Zenithal =5 Gnomonic Zenithal =6 Simple Cylindrical (Plate Carree) =7 Mercator's Cylindrical =8 Lambert's Equal Area Cylindrical
Type (MTYPE) Maximum radius 1 170 2 90 3 170 4 170 5 85 6 90 7 85 8 90
The user should avoid the following names used by MAPS, as well as those used by the SPROGS, SMOG and FORTRAN Libraries. MAPS calls the following routines:
COORDS, DARCAB, DCOAST, DGRID, LOCEDG
It uses the following COMMON block:
COMAPS
:GRAFLIB.WORLDATAwhich is just over 16K floating point numbers long. This file must be quoted in a #DA parameter to the macro call and the user must include a Program Description Segment to associate the same stream with a FORTRAN unit number. For instance:
INPUT 3=DA2/UNFORMATTED/512In the complete example which follows, NC=6 and unit 6 is associated with DA2 in the program description (USE and INPUT are virtually equivalent).
Word 1 Integer number of records to follow= N Words 2 to N+1 Integer counts of longitude/latitude pairs in each record.Each subsequent record contains latitude and longitude pairs as floating point values (-ve for South and west). The coordinate pair (0.0,0.0) indicates a break in a connected coast-line. The maximum number of coordinate pairs allowed altogether is 8338. The maximum number of data records is 17. Note that the integers in the first record must be COMPRESSed - only one word each; ie the FORTRAN program which writes them must include COMPRESS INTEGER AND LOGICAL in the Program Description.
If the program shown below is in a file MAPTEST then the following SMOG call can be used to run it. The program draws each projection once:
SMOG *CRMAPTEST,OPT,LIB:GRAFLIB.MAPSEHI,#DA2:GRAFLIB.WORLDATA,JT170SECS,TI160SECS
LIST PROGRAM(MAPT) ABNORMAL FUNCTIONS COMPRESS INTEGER AND LOGICAL OUTPUT 98*LP0 OUTPUT 12=LP5 OUTPUT 13=LP6 USE 6=DA2/UNFORMATTED/512 END MASTER MAPTEST C C*** TEST OF NEW SHORELINE C USING MAXIMUM RADII, AND CIRCULAR SHAPE C CALL FRHCM CALL CINE CALL JLIMS(0,1023,1023,0,1,1) C C*** CIRCULAR BOUNDARY C MSHAPE=0 C C*** DRAW ALL TYPES OF MAP C DO 10 MTYPE=1,8 CALL MAPS(MTYPE,0.,0.,RAD(MTYPE),RAD(MTYPE),511.,511.,511.,511. *,MSHAPE,10,6) CALL ADVFLM 10 CONTINUE C C*** ENDPROGRAM C CALL ENDSPR STOP OK END