Hi,
I'm having trouble getting my NCL-generated plots to look the same on
one computing system (NOAA's Zeus) as they do on another (NOAA ESRL's Jet).
Using the exactly same scripts (example below), the exact same
.hluresfile in my /home directory, and the same version of NCL (6.0.0),
some of my plots on Zeus remain stuck in "portrait" mode with a
transparent background, and on Jet, the plots are landscape and with a
solid white background (the latter is as desired).
I have also tried all of the known-to-me NCL methods
(gsnPaperOrientation, gsnMaximize, etc.) for hardwiring the image
orientation, but nothing changes no matter what I set them to.
Has anyone else come across these types of issues and know of a way to
fix them? I'm working with the computing folks on this too, but wanted
to see if the NCL community had any insight that might help.
Thank you!
Kelly Mahoney
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
;
; Open file and get variables.
;
fils = systemfunc("ls ./wrfout_d02_*")+".nc" ; fils is a variable
of type list (vs. one fil would be a variable of type file)
nfil = dimsizes(fils) ; create a count of
individual files instead of...
; concatonating
variable from all files all together
;km do nf=0,nfil-1
do nf=24,24
f=addfile(fils(nf),"r")
times = wrf_user_list_times(f) ; get time(s) in the file
;
; Get non-convective, convective
; Calculate total precipitation
;
rain_exp = wrf_user_getvar(f,"RAINNC",-1)
rain_con = wrf_user_getvar(f,"RAINC", -1)
rain_tot = (rain_exp + rain_con)
rain_tot@description = "Nov_29_2011 CTRL Run #3 4-km Precipitation
(mm) at time "+times(:)
wks =
gsn_open_wks("ps","Nov29_CTRL3_4km_D02_precip_mm_NPVU_colors"+nf) ;
Open graphics file.
gsn_define_colormap(wks,"BlAqGrYeOrReVi200")
gsnMaximize = True
gsnPaperOrientation = "landscape"
;
; Set up resource list that will be shared between the
; two wrf_contour calls.
;
res = True
res@gsnDraw = False
res@gsnFrame = False
res@cnLevelSelectionMode = "ExplicitLevels"
res@cnFillOn = True
res@cnLinesOn = False
res@lbLabelAutoStride = True
; Plotting options for Precipitation
opts_r = res
; Plotting options for Precipitation
opts_r = res
opts_r@UnitLabel = "mm"
opts_r@cnLevelSelectionMode = "ExplicitLevels"
opts_r@cnLevels = (/ .25, 2.5, 6.4, 12.7, 19.1, 25.4,
38., 51., 64., 76., 102., 127., 152., 203., 254. /)
opts_r@cnInfoLabelOn = False
opts_r@cnConstFLabelOn = False
opts_r@cnFillOn = True
opts_r@cnFillColors =
(/-1,35,20,4,86,57,70,104,123,140,155,168,177,190,201,-1/)
opts_r@cnSmoothingOn = True
opts_r@cnSmoothingDistanceF = .005
; Resources to control precipitation labelbar, which will be
; vertical.
opts_r@lbTitleString = "Total Precipitation"
opts_r@lbTitleDirection = "Down"
opts_r@lbTitleJust = "CenterRight"
opts_r@lbTitlePosition = "Right"
opts_r@lbTitleOffsetF = 0.07
opts_r@ValidTime = True
opts_r@TimeLabel = times(:)
opts_r@lbOrientation = "Vertical"
opts_r@pmLabelBarSide = "Right"
opts_r@pmLabelBarHeightF = 0.77
opts_r@pmLabelBarWidthF = 0.11
opts_r@pmLabelBarOrthogonalPosF = 0.03
opts_r@lbBoxMinorExtentF = 0.4
; Total Precipitation (color fill)
contour_tot = wrf_contour(f, wks, rain_tot(0,:,:), opts_r)
;
; Use the special wrf_map_overlays function to figure out
; the correct map projection and do the overlay.
;
; Set up two resource lists for wrf_map_overlays.
;
pltres = True
mpres = True
mpres@mpGeophysicalLineColor = "Black"
mpres@mpNationalLineColor = "Black"
mpres@mpUSStateLineColor = "Black"
mpres@mpGridLineColor = "Black"
mpres@mpLimbLineColor = "Black"
mpres@mpPerimLineColor = "Black"
plot = wrf_map_overlays(f,wks,(/contour_tot/),pltres,mpres)
end do
end
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Mar 2 08:57:04 2012
This archive was generated by hypermail 2.1.8 : Mon Mar 05 2012 - 14:12:07 MST