Re: missing contour line labels

From: Sylvia Murphy (murphys AT XXXXXX)
Date: Wed Nov 05 2003 - 10:47:59 MST


Hi paul,

i am at purdue and can not look at your script specifically,
but I should let you know that NCL's contour line label density is
frequently zero for many plots where you think there some be some.

this was recently fixed with the addition of some new resources. Check out
my contour line label example page at:

http://www.cgd.ucar.edu/csm/support/CSM_Graphics/contourLab.shtml

example 5 in particular demos these new resources.

cheers,

sm

On Wed, 5 Nov 2003, Paul Nutter wrote:

> Hi,
>
> This script draws pressure contours over a map on a native grid. Can
> anyone guess why it does not draw contour line labels?
>
> I've tried explicitly setting many resource attributes for contour line
> labels and drawing order... the script below is stripped to bare
> essentials but still does not draw line labels as it should by default.
>
> I don't need to attach 2D lat/lon attribute data to draw the contour map
> since "res@tfDoNDCOverlay = True" (it's not to be projected by NCL).
> Does that somehow create problems for contour line labels? The pmsl
> array is dimensioned pmsl(nx:ny) when read from NetCDF file.
>
> I'm running NCL version 4.2.0.a030
>
> Paul Nutter
> ***************************
>
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> begin
>
> datadir = "$HOME/data/RUC20/"
> ruc20 = addfile(datadir+"sgpallruc20isobX1.c1.20020616.000000.cdf","r")
>
> pmsl = ruc20->pressuremsl(0,:,:)
> lat2 = ruc20->latitude
> lon2 = ruc20->longitude
>
> adims = dimsizes(pmsl)
> nlon=adims(0)
> nlat=adims(1)
>
> res = True
>
> ; Resources for "native" grid
> res@tfDoNDCOverlay = True
> res@mpProjection = "LambertConformal"
> res@mpLimitMode = "Corners"
> res@mpLambertParallel1F = 25.0
> res@mpLambertParallel2F = 25.0
> res@mpLambertMeridianF = -95.0
> res@mpLeftCornerLatF = lat2(0,0)
> res@mpLeftCornerLonF = lon2(0,0)
> res@mpRightCornerLatF = lat2(nlon-1,nlat-1)
> res@mpRightCornerLonF = lon2(nlon-1,nlat-1)
>
> wks = gsn_open_wks ("x11", "RUC20_mslp")
> map = gsn_csm_contour_map(wks,pmsl(ny|:,nx|:),res)
>
> end
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk AT ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

******************************************************
Sylvia Murphy EML: murphys AT ucar.edu
NCAR CGD/CAS PHN: 303-497-1720
3080 Center Green Drive FAX: 303-497-1333
Boulder CO 80301

WEB: http://www.cgd.ucar.edu/csm/support/
     http://www.cgd.ucar.edu/csm/support/CSM_Graphics/
******************************************************

_______________________________________________
ncl-talk mailing list
ncl-talk AT ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Wed Nov 05 2003 - 11:20:08 MST