[ncl-talk] plot orientation
Bill Ladwig
ladwig at ucar.edu
Fri Dec 16 14:38:22 MST 2016
Hi Michael,
For LambertConformal, you also need to specify the mpLambertMeridianF,
mpLambertParallel1F, and mpLambertParallel2F (which can be the same as
mpLambertParallel1F). For the netcdf data coming directly out of the WRF
model for HRRR runs, I believe these are the settings:
mpLambertMeridianF = -97.5
mpLambertParallel1F = 38.5
mpLambertParallel2F = 38.5
I'm not sure if they re-grid the data after it comes out of WRF when they
write the Grib files in post-processing, but I'd guess it's the same map
projection parameters. But, you should double check this with your actual
data and set the appropriate values.
Hope this helps,
Bill
On Fri, Dec 16, 2016 at 1:19 PM, Michael Buban - NOAA Affiliate <
michael.buban at noaa.gov> wrote:
> Hello,
>
> I'm trying to plot a simple HRRR dataset with a Lambert Conformal grid,
> however the plots always come out rotated by 90 degrees. How do I get the
> plot to have LAT up/down and LON left/right? I've extensive searched
> online and none of the proposed fixed have any effect. Here is my script.
>
> _________________________
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>
> begin
>
>
> a = addfile("hrrr.t12z.wrfsfcf01.grib2","r")
>
>
> qv = a->DPT_P0_L103_GLC0(:,:) ;
>
> tk = a->TMP_P0_L103_GLC0(:,:) ;
>
>
> lat = a->gridlat_0(:,:)
>
> lon = a->gridlon_0(:,:)
>
>
> tk at lat2d = lat
>
> tk at lon2d = lon
>
>
> qv at lat2d = lat
>
> qv at lon2d = lon
>
>
> printVarSummary(lat)
>
> printVarSummary(lon)
>
>
> ny = 82
>
> nx = 71
>
>
>
> wks = gsn_open_wks("X11","gsn_contour") ; open a ps file
>
>
> ;*****************************
>
> ; create first plot
>
> ;*****************************
>
> resn = True ; create vector resource array
>
> resn at cnFillOn = True ; color fill
>
> resn at cnLinesOn = False ; no contour lines
>
>
> resn at gsnLeftString = "" ; no titles
>
> resn at gsnRightString = ""
>
> resn at tiXAxisString = ""
>
> resn at tiYAxisString = ""
>
>
> resn at gsnDraw = False ; don't draw
>
> resn at gsnFrame = False ; don't advance frame
>
>
> resn at vpWidthF = 0.8 ; change the aspect ratio
>
> resn at vpHeightF = 0.8
>
>
> resn at mpDataBaseVersion = "MediumRes"
>
> resn at pmTickMarkDisplayMode = "Always"
>
>
> resn at gsnAddCyclic = False ; regional data
>
>
> resn at mpProjection = "LambertConformal"
>
>
> resn at mpLimitMode = "Corners" ; choose region of map
>
> resn at mpLeftCornerLatF = lat(0,0)
>
> resn at mpLeftCornerLonF = lon(0,0)
>
> resn at mpRightCornerLatF = lat(ny-1,nx-1)
>
> resn at mpRightCornerLonF = lon(ny-1,nx-1)
>
>
>
> resn at cnLevelSelectionMode = "ManualLevels" ; manually set the
> contour levels
>
> resn at cnMinLevelValF = 260.0
>
> resn at cnMaxLevelValF = 288.0
>
> resn at cnLevelSpacingF = 1.0
>
>
> ; resn at gsnPaperOrientation = "Portrait"
>
>
> resn at pmLegendDisplayMode = "Never"
>
> resn at tiMainOn = False
>
>
> plot1 = gsn_csm_contour_map(wks,tk,resn)
>
>
>
> draw(plot1)
>
> frame(wks)
>
> end
>
>
> ____________________________________
>
>
> I've tried setting resn at gsnPaperOrientation to "Portrait" and
> "Landscape", and gsnMaximize to "True" and "False" with no change in
> results.
>
>
> Any help would be appreciated.
>
>
> Thanks,
>
>
> Mike
>
>
>
> _____________________________________
> Michael S. Buban, Ph.D.
> Research Associate
> NOAA/ARL Atmospheric Turbulence and Diffusion Division
> and Oak Ridge Associated Universities
> 456 South Illinois Avenue
> Oak Ridge TN 37830
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161216/a9f842a7/attachment.html
More information about the ncl-talk
mailing list