load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" begin min_lat = 2.0 max_lat = 14.5 min_lon = 8.0 max_lon = 16.25 wks = gsn_open_wks("x11","attach") ; open an X11 window ; ; Set some resources for the base map plot. res = True ; Generic stuff. res@gsnMaximize = True res@gsnFrame = False res@gsnDraw = False ; Map stuff res@mpDataBaseVersion ="MediumRes" res@mpFillOn = False res@mpMinLatF = min_lat res@mpMaxLatF = max_lat res@mpMinLonF = min_lon res@mpMaxLonF = max_lon map1 = gsn_csm_map_ce(wks,res) ; Set up second, smaller map mpres = True mpres@gsnFrame = False mpres@gsnDraw = False ; Tickmark stuff mpres@pmTickMarkDisplayMode = "Always" mpres@tmXBLabelFontHeightF = 0.01 ; Map stuff mpres@mpDataBaseVersion ="MediumRes" mpres@mpOutlineOn = True mpres@mpMinLatF = -35.0 mpres@mpMaxLatF = 35.0 mpres@mpMinLonF = -20.0 mpres@mpMaxLonF = 50.0 ; Width/height mpres@vpHeightF = 0.2 ; Make this second map smaller. mpres@vpWidthF = 0.2 map2 = gsn_csm_map_ce(wks,mpres) ; Set up some resources to indicate where this small map will be ; attached to big map. amres = True amres@amParallelPosF = -0.4 ; -0.5 is the left edge of the plot. amres@amOrthogonalPosF = -0.45 ; -0.5 is the top edge of the plot. amres@amJust = "TopLeft" map_anno = gsn_add_annotation(map1, map2, amres) ; Attach map to map. draw(map1) ; This will draw map1 and map2 frame(wks) end