Re: WRF subregion issue

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu, 14 Jun 2007 14:16:23 -0600

Hi Chris,

By setting tfDoNDCOverlay = True, you are telling NCL to not transform
the data to a specific projection. This results in slightly faster
plotting, but I believe it doesn't allow you to zoom in on a subregion
of your grid.

(This should be better explained on the NCL webpage.)

To get around this, set tfDoNDCOverlay = False, and attach the 2D
lats/lons to the data array as attributes:

arr_at_lat2d = x->XLAT(0,:,:)
arr_at_lon2d = x->XLON(0,:,:)

Zooming in should be no problem then.

Good luck,
Adam

Chris Misenis wrote:
> Hi NCL users,
>
> Not sure if my email went through yesterday. I didn't see it in the
> archives that was updated today, so I'll try again.
>
> I'm trying to zoom into a subregion of 12km data. I've managed to get
> the background map to zoom in, but not the data. I've attached a sample
> of the script we're using to help facilitate things. Any help at all
> would be appreciated.
>
> Thanks,
>
> Chris
>
> wks = gsn_open_wks("ps" ,fnames(nf)+"_HFX") ; ps,pdf,x11,ncgm,eps
> gsn_define_colormap(wks,
>
> "BlAqGrYeOrReVi200") ; select color map
>
> res = True ; plot mods desired
> ; res_at_gsnMaximize <mailto:res_at_gsnMaximize> = True
> ; uncomment to maximize size
> res_at_gsnSpreadColors <mailto:res_at_gsnSpreadColors> =
> True ; use full range of colormap
> res_at_gsnScalarContour <mailto:res_at_gsnScalarContour> =
> True ;the third field will be drawn as a separate contour field
> res_at_cnFillOn <mailto:res_at_cnFillOn> = True ;
> color plot desired
> res_at_cnLinesOn <mailto:res_at_cnLinesOn> = False ;
> turn off contour lines
> res_at_cnLineLabelsOn <mailto:res_at_cnLineLabelsOn> =
> False ; turn off contour labels
> res_at_vcRefMagnitudeF <mailto:res_at_vcRefMagnitudeF> =
> 4.0 ; define vector ref mag
> res_at_vcRefLengthF <mailto:res_at_vcRefLengthF> = 0.04
> ; define length of vec ref
> res_at_vcRefAnnoOrthogonalPosF <mailto:res_at_vcRefAnnoOrthogonalPosF> =
> -0.09 ; move ref vector
> res_at_vcRefAnnoParallelPosF <mailto:res_at_vcRefAnnoParallelPosF> = 1.0
> ; res_at_vcRefAnnoSide <mailto:res_at_vcRefAnnoSide> =
> "Right" ; where to place the vector reference annotation
> res_at_vcGlyphStyle <mailto:res_at_vcGlyphStyle> = "CurlyVector" ;
> seems doesn't work, check later
> ; res_at_tiXAxisString <mailto:res_at_tiXAxisString> = "Longitude"
> ; res_at_tiYAxisString <mailto:res_at_tiYAxisString> = "Latitude"
> res_at_lbOrientation <mailto:res_at_lbOrientation> = "Horizontal" ; Move
> labelbar
> ; res_at_cnLevelSelectionMode <mailto:res_at_cnLevelSelectionMode> =
> "ManualLevels"
> ; res_at_cnMinLevelValF <mailto:res_at_cnMinLevelValF> = 12.000
> ; res_at_cnMaxLevelValF <mailto:res_at_cnMaxLevelValF> = 48.000
> ; res_at_cnLevelSpacingF <mailto:res_at_cnLevelSpacingF> = 1.500
> ; vcres = True ; plot mods desired
> res_at_lbLabelStride <mailto:res_at_lbLabelStride> = 4 ; plot
> every other colar bar label
> ; res_at_lbLabelStrings <mailto:res_at_lbLabelStrings> = sprintf("%4.2f",levels)
> ; res_at_lbLabelStrings <mailto:res_at_lbLabelStrings> = ("0.040",\
> ; ,"0.080","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 = False
> res_at_mpLimitMode = "Corners"
> res_at_mpLeftCornerLatF = 28.31404
> res_at_mpLeftCornerLonF = -96.33899
> res_at_mpRightCornerLatF = 30.82828
> res_at_mpRightCornerLonF = -93.41504
> ;************************************************
> ; Turn on lat / lon labeling
> ;************************************************
> res_at_pmTickMarkDisplayMode <mailto:res_at_pmTickMarkDisplayMode> =
> "Always" ; turn on tickmarks
> res_at_tmXTOn <mailto:res_at_tmXTOn> = False ; turn off top labels
> res_at_tmYROn <mailto: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
> res_at_tiMainFuncCode <mailto:res_at_tiMainFuncCode> = "~"
> res_at_tiMainString <mailto:res_at_tiMainString> = times
> res_at_gsnLeftString <mailto:res_at_gsnLeftString> = x_at_description
> <mailto:x_at_description> +" "
> plot = gsn_csm_contour_map(wks,x(nt,:,:),res)
> dummy = systemfunc ("convert "+fnames(nf)+"_HFX.ps
> "+fnames(nf)+"_HFX.gif")
> end do
> end
>
>
>
> --
> Chris Misenis
> 919.513.4438
> M.S. Student, Atmospheric Science
> Air Quality Forecasting Lab
> North Carolina State University
> http://www.meas.ncsu.edu/aqforecasting
> http://www4.ncsu.edu/~camiseni <http://www4.ncsu.edu/%7Ecamiseni>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
--------------------------------------------------------------
Adam Phillips			             asphilli_at_ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
ESSL/CGD/CAS                               fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000	  http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jun 14 2007 - 14:16:23 MDT

This archive was generated by hypermail 2.2.0 : Fri Jun 15 2007 - 12:34:56 MDT