Re: Paper orientation

From: Dave Allured <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Fri Jan 07 2011 - 19:45:54 MST

James,

I had to debug almost the same thing recently. Attached is a
current working script for similar data. It uses Lambert projection
and 2-D coordinate arrays, like your script. It is set up to
display North America in the familiar landscape mode, north is up.
You might try plugging your data into this script for a start.

I notice the following differences. I am not sure which if any of
these matter. My guess is it's the first one.

1. Lambert may require special resources mpLambertParallel1F,
mpLambertParallel2F, mpLambertMeridianF. These should have a direct
effect on the orientation.

2. You are using mpCenterLonF, mpCenterLatF; my test does not.

3. My test uses resource sfXArray, sfYArray to pass the required
2-D coordinate arrays to the plot function. This is method 5 on the
following page. Are you using this or method 2 to specify your 2-D
coordinates?

   http://www.ncl.ucar.edu/Document/Graphics/overlays_on_map.shtml

Debug suggestion: Set your map limit resources with hard coded lat
and lon numbers, not variables, for debugging only. This will
eliminate a possible hidden problem with unreasonable numbers.

--Dave

On 1/7/2011 1:33 PM, James Correia wrote:
> Hi-
> I am plotting wrf data from a grib file using gsn_csm_contour_map
> and setting these resources:
> rmap = True
> rmap@gsnAddCyclic = False ; regional data: not cyclic
> rmap@mpProjection = "LambertConformal"
> rmap@mpLimitMode = "Corners"
> rmap@mpCenterLonF = -97.
> rmap@mpCenterLatF = 38.5
> rmap@cnInfoLabelOn = False
> rmap@mpLeftCornerLatF = lat2d(0,0)
> rmap@mpLeftCornerLonF = lon2d(0,0)
> rmap@mpRightCornerLatF = lat2d(692,862)
> rmap@mpRightCornerLonF = lon2d(692,862)
>
> rmap@mpOutlineDrawOrder = "PostDraw" ; draw continental
> outline last
> rmap@mpFillDrawOrder = "PreDraw"
> rmap@mpOutlineBoundarySets = "GeophysicalAndUSStates" ; state
> boundaries
> rmap@mpFillOn = False ; turn off map fill
> rmap@cnFillOn = True ; turn on color
> rmap@cnLinesOn = False ; turn on color
> rmap@gsnSpreadColors = True ; use full range of colormap
> rmap@cnLevelSelectionMode = "ExplicitLevels" ; set explicit
> contour levels
> rmap@cnLevels = (/ .254,1.,2.,4.,6.,8.,10./)
> rmap@gsnMaximize = True
> rmap@gsnPaperOrientation = "Landscape"
>
> The resulting plot comes out Landscape oriented, but the map plot is
> still at a 90 degree angle to the orientation. Nothing changes when
> I turn off gsnMaximize. So I must be doing something wrong. Any ideas?
>
> James Correia Jr.
> OU CIMMS Research Associate
> SPC HWT Liaison

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Fri Jan 7 19:46:16 2011

This archive was generated by hypermail 2.1.8 : Thu Jan 13 2011 - 09:24:21 MST