I was wondering what the needed steps were to be able to compare 12-km
resolved output to 4-km resolved output when the lat/lons of the two domains
are different (i.e. nesting). I have conducted a two-way nested simulation
and would like to be able to zoom into the 12-km output to able to match (as
closely as possible) the dimensions of the 4-km plot. I would assume it
would have something to do with the res_at_mpMaxLonF, etc. commands, but I'm
not entirely sure. Here's a copy of the script we're using:
;*************************************************
; WRF: color over LC map with lat/lon labels
;************************************************
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/WRF_contributed.ncl"
begin
;************************************************
; open file and read in data
;************************************************
fnames = systemfunc ("ls wrfout_d01_2000-08-2*_*00:00")
nfiles = dimsizes(fnames)
do nf = 0, nfiles-1
f = addfile (fnames(nf)+".nc", "r")
;************************************************
; Read character variable Times; Convert to string for plots
; Read vertical coordinate for plot labels
;************************************************
times = chartostring(f->Times) ; built-in function
znu = f->ZNU(0,:) ; (Time, bottom_top)
;************************************************
; Read perturbation geopotential at all times and levels
;************************************************
; x = f->PH ; (Time, bottom_top, south_north, west_east)
x = f->o3 ; (Time, bottom_top, south_north, west_east)
u = f->U ;
v = f->V ;
; printVarSummary(times)
print(x_at_description)
; printVarSummary(znu)
; printVarSummary(v)
;************************************************
; create plots
;************************************************
wks = gsn_open_wks("ps" ,fnames(nf)+"_o3") ; ps,pdf,x11,ncgm,eps
gsn_define_colormap(wks,"BlAqGrYeOrReVi200") ; select color map
res = True ; plot mods desired
; res_at_gsnMaximize = True ; uncomment to maximize size
res_at_gsnSpreadColors = True ; use full range of colormap
res_at_gsnScalarContour = True ;the third field will be
drawn as a separate contour field
res_at_cnFillOn = True ; color plot desired
res_at_cnLinesOn = False ; turn off contour lines
res_at_cnLineLabelsOn = False ; turn off contour labels
res_at_vcRefMagnitudeF = 4.0 ; define vector ref mag
res_at_vcRefLengthF = 0.04 ; define length of vec ref
res_at_vcRefAnnoOrthogonalPosF = -0.09 ; move ref vector
res_at_vcRefAnnoParallelPosF = 1.0
; res_at_vcRefAnnoSide = "Right" ; where to place the vector
reference annotation
res_at_vcGlyphStyle = "CurlyVector" ; seems doesn't work, check
later
res_at_tiXAxisString = "Longitude"
res_at_tiYAxisString = "Latitude"
res_at_lbOrientation = "Horizontal" ; Move labelbar
res_at_cnLevelSelectionMode = "ManualLevels"
res_at_cnMinLevelValF = 0.000
res_at_cnMaxLevelValF = 0.120
res_at_cnLevelSpacingF = 0.005
; vcres = True ; plot mods desired
res_at_lbLabelStride = 4 ; plot every other colar bar label
; res_at_lbLabelStrings = sprintf("%4.2f",levels)
; res_at_lbLabelStrings = (/"0.020","0.040",\
; "0.060","0.080","0.100","0.120"/)
;************************************************
; Use WRF_contributed procedure to set map resources
;************************************************
WRF_map_c(f, res, 0) ; reads info from file
;************************************************
; set True for native projection (faster)
;************************************************
res_at_tfDoNDCOverlay = True
;************************************************
; Turn on lat / lon labeling
;************************************************
res_at_pmTickMarkDisplayMode = "Always" ; turn on tickmarks
res_at_tmXTOn = False ; turn off top labels
res_at_tmYROn = False ; turn off right labels
;************************************************
; Loop over all times and levels ( uncomment )
; Demo: one arbitrarily closen time and level
;************************************************
dimx = dimsizes(x) ; dimensions of x
ntim = dimx(0) ; number of time steps
klev = dimx(1) ; number of "bottom_top"
levels
nt = ntim/2 ; arbitrary time
kl = 0 ; " level
nt = 0
;;do nt=0,ntim-1 ; uncomment for loop
;; do ll=0,klev-1
res_at_tiMainFuncCode = "~"
res_at_tiMainString = times
res_at_gsnLeftString = x_at_description +" z="+znu(kl)
plot = gsn_csm_contour_map(wks,x(nt,kl,:,:),res)
; plot =
gsn_csm_vector_scalar_map(wks,u(nt,kl,0:87:4,0:87:4),v(nt,kl,0:87:4,0:87:4),x(nt,kl,0:87:4,0:87:4),res)
;; end do
;;end do
dummy = systemfunc ("convert "+fnames(nf)+"_o3.ps "+fnames(nf)+"_o3.gif")
end do
end
Thanks for your help in advance,
Chris
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Apr 12 2007 - 13:31:40 MDT
This archive was generated by hypermail 2.2.0 : Sat Apr 21 2007 - 12:15:57 MDT