Re: Lambert Conformal Projection for WRF data

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Jun 17 2010 - 09:57:28 MDT

Agnes,

Thanks for providing me with the image offline.

To get just bottom and right labels on your axis, you can set:

 res@tmXTOn = False ; Turn off top tickmarks and labels
 res@tmYLOn = False ; Turn off left tickmarks and labels

Your map is rotated because you are asking for a LambertConformal
projection, but you haven't set the two parallels and a meridian.

The resources for these are:

 res@mpLambertParallel1F = 33.0 ; two parallels
 res@mpLambertParallel2F = 45.0
 res@mpLambertMeridianF = -95.0 ; central meridian

You will need to use the correct values here, and since you have WRF data,
those are probably given on the file as global attributes TRUELAT1,
TRUELAT2, and STAND_LON (or CEN_LON).

As an example, if you opened your file with "f = addfile(....)", then you can set the above
resources with:

 res@mpLambertParallel1F = f@TRUELAT1
 res@mpLambertParallel2F = f@TRUELAT2
 res@mpLambertMeridianF = f@STAND_LON ; or f@CEN_LON

--Mary

On Jun 17, 2010, at 9:21 AM, Agnes Lim wrote:

> Hi
>
> I had plotted the WRF humidity variable for a particular level.
> However the figure is not what I wanted. (see attached figure)
> 1. There are 2 sets of latitude and longitude labeled. I only wanted 1
> set , specifically the bottom and right set labels.
> 2. The figure is 90 degree to my title. I wanted the plot to be rotated
> 90 degree counter clockwise.
>
> Could someone point out what I had did incorrectly?
>
> Thanks
> Agnes
>
> The following is my code segment for plotting.
> =================================================
> wks = gsn_open_wks("x11" ,"test") ; open a ps file
> res = True ; plot mods desired
> ; gsn_define_colormap(wks,"WhBlGrYeRe") ; select color map
> gsn_define_colormap(wks,"gui_default") ; select color map
> gsn_reverse_colormap(wks)
> res@gsnSpreadColors = True
> res@mpLandFillColor = -1 ; set land to be transperant
> res@mpOutlineOn = True
> res@mpOutlineBoundarySets = "AllBoundaries"
> res@mpLimitMode = "LatLon"
> res@mpProjection = "LambertConformal"
> res@mpEllipticalBoundary = False ; If you want elliptical
> res@cnFillOn = True
> res@cnLinesOn = False
> res@lbBoxLinesOn = True
> res@mpCenterLonF = -100
> res@mpMinLatF = 17 ; range to zoom in on
> res@mpMaxLatF = 40
> res@mpMinLonF = -125
> res@mpMaxLonF = -78
> res@tmXBLabelFontHeightF = 0.01 ; resize tick labels
> res@tmYLLabelFontHeightF = 0.01
> res@pmTickMarkDisplayMode = "Always"
> res@tiMainString = "Humidity Analysis Increments at approximately 300mb"
> res@lbLabelAutoStride = True
> res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
> ; res@cnLevelSelectionMode = "AutomaticLevels" ; set manual
> contour levels
> res@cnMinLevelValF = -2 ; set min contour level
> res@cnMaxLevelValF = 1 ; set max contour level
> res@cnLevelSpacingF = 0.1 ; set
> plot=gsn_csm_contour_map(wks,T_increment(34,:,:) ,res)
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jun 17 09:57:47 2010

This archive was generated by hypermail 2.1.8 : Thu Jun 24 2010 - 14:10:27 MDT