Re: Create a Rotated Mercator Map

From: Adam Phillips (asphilli AT XXXXXX)
Date: Thu Oct 21 2004 - 09:06:08 MDT


Hi Addy,

Here is a very short script that draws a mercator projection map, shifted 45
degrees east, with the tick marks on. (Thanks to Sylvia for showing me how to
turn the tick marks on.)

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"

a = addfile("test.nc","r")
array = a->PSL(0,:,:)

wks = gsn_open_wks("x11","test")
res = True
res@mpProjection = "Mercator" ; choose projection
res@mpGridAndLimbOn = True ; turn on lat/lon lines
res@mpGridLatSpacingF = 20. ; spacing for lat lines
res@mpGridLonSpacingF = 30. ; spacing for lon lines
res@mpFillOn = True
res@mpCenterLonF = 225. ; Center the plot at 225E longitude
res@pmTickMarkDisplayMode = "Always" ;Needed to turn on tick marks for
                                        ;mercator projections
plot = gsn_csm_contour_map(wks,array,res)
end

Let us know if this isn't what you were looking for.

Adam
                                        
>Delivered-To: asphilli AT ucar.edu
>Delivered-To: ncl-talk AT ucar.edu
>Date: Thu, 21 Oct 2004 11:45:26 +0800
>From: Addy Fu <addyfu AT hko.gov.hk>
>User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2)
Gecko/20040804 Netscape/7.2 (ax)
>X-Accept-Language: zh-hk, en-us, en, zh-tw, zh
>MIME-Version: 1.0
>To: ncl-talk AT ucar.edu
>Content-Transfer-Encoding: 7bit
>Cc: Addy Fu <addyfu AT hko.gov.hk>
>Subject: Create a Rotated Mercator Map
>X-BeenThere: ncl-talk AT ucar.edu
>X-Mailman-Version: 2.1.1
>List-Id: NCAR Command Language User Group <ncl-talk.ucar.edu>
>List-Unsubscribe: <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>,
<mailto:ncl-talk-request AT ucar.edu?subject=unsubscribe>
>List-Post: <mailto:ncl-talk AT ucar.edu>
>List-Help: <mailto:ncl-talk-request AT ucar.edu?subject=help>
>List-Subscribe: <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>,
<mailto:ncl-talk-request AT ucar.edu?subject=subscribe>
>X-Spam-Status: No, hits=-5.2 required=5.0 tests=BAYES_00,USER_AGENT_MOZILLA_UA
version=2.55
>X-Spam-Level:
>X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
>
>Dear Everyone,
>
>I am trying to plot a map in Mercator projection with a rotation of 45
>degree clockwisely.
>
>It will be great if any of you can guide me to produce such map with
>tick mark. I tried to use mpCenterRotF but failed to generate a Mercator
>map.
>
>Thanks a lot for all your help.
>
>Best regards,
>Addy
>_______________________________________________
>ncl-talk mailing list
>ncl-talk AT ucar.edu
>http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-------------------------------------------------------------
Adam Phillips email: asphilli AT ucar.edu
Climate and Global Dynamics Division tel: (303) 497-1726
National Center for Atmospheric Research fax: (303) 497-1333
P.O. Box 3000
Boulder, CO 80307-3000 http://www.cgd.ucar.edu/~asphilli

_______________________________________________
ncl-talk mailing list
ncl-talk AT ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Thu Oct 21 2004 - 09:29:41 MDT