-
Notifications
You must be signed in to change notification settings - Fork 4
/
tvmap_region.pro
144 lines (134 loc) · 4.09 KB
/
tvmap_region.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
; $Id$
;-----------------------------------------------------------------------
;+
; NAME:
; TVMAP_REGION
;
; PURPOSE:
; Wrapper routine for TVMAP and CTM_OVERLAY.
; Sets up a nice Lambert conformal
; projection of Europe, North America, or other.
;
; CATEGORY:
;
; CALLING SEQUENCE:
; TVMAP_REGION, Data, XArr, YArr [, TrackD, TrackX, TrackY]
; [Keywords]
;
; INPUTS:
; The inputs are exactly the same as TVMAP and CTM_OVERLAY.
; The program will invoke TVMAP if there are three input
; parameters and CTM_OVERLAY if there are 6. The only
; difference is the REGION keyword.
;
; KEYWORD PARAMETERS:
; REGION : string specififying plot region.
; Options: CONUS, EUROPE, NAMERICA, JAPAN, AFRICA
; _EXTRA : All keywords are passed through to TVMAP or CTM_OVERLAY
;
; OUTPUTS:
;
; SUBROUTINES:
;
; REQUIREMENTS:
;
; NOTES:
;
; EXAMPLE:
;
; MODIFICATION HISTORY:
; cdh, 10 Mar 2009: VERSION 1.00
;
;-
; Copyright (C) 2009, Christopher Holmes, Harvard University
; This software is provided as is without any warranty whatsoever.
; It may be freely used, copied or distributed for non-commercial
; purposes. This copyright notice must be kept with any copy of
; this software. If this software shall be used commercially or
; sold as part of a larger package, please contact the author.
; Bugs and comments should be directed to [email protected]
; with subject "IDL routine tvmap_europe"
;-----------------------------------------------------------------------
pro tvmap_region, Data, XArr, YArr, $
TrackD, TrackX, TrackY, $
Region=Region, $
Isotropic=Isotropic, $
Lambert=Lambert, $
Orthographic=Orthographic, $
NoGXLabels=NoGXLabels, $
NoGYLabels=NoGYLabels, $
_Extra=_Extra
; Regional plotting limits
case strlowcase( Region ) of
'japan':begin
Limit = [35, 122, 47, 135, 35, 145, 30, 135]
MParam = [37, 135, 0]
Isotropic = 1L
Orthographic = 0L
Lambert = 1L
NoGXLabels = 1L
NoGYLabels = 1L
end
'europe':begin
Limit = [40, -15, 75, 20, 40, 40, 30, 20]
MParam = [57, 12, 0]
Isotropic = 1L
Orthographic = 0L
Lambert = 1L
NoGXLabels = 1L
NoGYLabels = 1L
end
'namerica':begin
Limit = [40, -140, 85, -142, 40, -50, 10, -100]
MParam = [45, -97, 0]
Isotropic = 1L
Orthographic = 0L
Lambert = 1L
NoGXLabels = 1L
NoGYLabels = 1L
end
'conus':begin
Limit = [40, -130, 45, -142, 40, -65, 24, -100]
MParam = [37, -97, 0]
Isotropic = 1L
Orthographic = 0L
Lambert = 1L
NoGXLabels = 1L
NoGYLabels = 1L
end
'canada': begin
Limit = [50,150,90,250,50,350,50,250]
MParam = [90,250,0]
Isotropic = 1L
Orthographic = 1L
Lambert = 0L
NoGXLabels = 0L
NoGYLabels = 1L
end
'africa': begin
Limit = [0,-20,40,20,0,55,-40,20]
MParam = [0,17.5,0]
Isotropic = 1L
Orthographic = 0L
Lambert = 1L
NoGXLabels = 1L
NoGYLabels = 1L
end
'':
endcase
; If there are 6 arguments, use CTM_OVERLAY, otherwise TVMAP
if (n_params() eq 6) then begin
ctm_overlay, Data, XArr, Yarr, $
TrackD, TrackX, TrackY, $
Limit=Limit, MParam=Mparam, Lambert=Lambert, $
Isotropic=Isotropic, Orthographic=Orthographic, $
NoGXLabels=NoGXLabels, NoGYLabels=NoGYLabels, $
_Extra=_Extra
endif else begin
tvmap, Data, XArr, Yarr, $
Limit=Limit, MParam=Mparam, Lambert=Lambert, $
Isotropic=Isotropic, Orthographic=Orthographic, $
NoGXLabels=NoGXLabels, NoGYLabels=NoGYLabels, $
_Extra=_Extra
endelse
end