Verifying a NARR grid value

From: Jamie Lahowetz <jlahowe2_at_nyahnyahspammersnyahnyah>
Date: Wed, 10 Sep 2008 23:23:50 -0500

I'm looking for a way to verify that my algorithm is getting the right grid
points.
Is there a way to display the grid and the number that that grid represents?
Right now, The point I try to mark is not showing up and I used the same
scheme as before, any ideas?
Also, can I show the exact value that is represented by a grid position?
Thanks for any help.

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"

;############################

begin

    fili =
"/home/jlahowet/THOR/test2/narr/u-v_comp/narr-a_221_20080522_2100_000.grb"
    f = addfile (fili, "r")

;############################
; Print
;############################

    names = getfilevarnames(f)
    print(names)

    atts = getfilevaratts(f,names(0))
    dims = getfilevardims(f,names(0))
    print(atts)
    print(dims)

;############################
; Variables
;############################

    upt = f->USTM_221_HTGY
    vpt = f->VSTM_221_HTGY
    lat2d = f->gridlat_221
    lon2d = f->gridlon_221

    upt_at_lat2d = lat2d
    upt_at_lon2d = lon2d
    vpt_at_lat2d = lat2d
    vpt_at_lon2d = lon2d

;############################

    wks = gsn_open_wks("x11","lcnative")
    gsn_define_colormap(wks,"gui_default")

;############################
; Resources
;############################

    res = True
    res_at_tiMainString = "Native Lambert Conformal"

    res_at_mpLimitMode = "Corners"
    res_at_mpLeftCornerLatF = 36.0
    res_at_mpLeftCornerLonF = -103.0
    res_at_mpRightCornerLatF = 43.0
    res_at_mpRightCornerLonF = -96.0

    res_at_mpProjection = "LAMBERTCONFORMAL"
    res_at_mpLambertParallel1F = lon2d_at_Latin1
    res_at_mpLambertParallel2F = lon2d_at_Latin2
    res_at_mpLambertMeridianF = lat2d_at_Lov

; print(lon2d_at_Latin1)
; print(lon2d_at_Latin2)
; print(lon2d_at_Lov)

    res_at_pmTickMarkDisplayMode = "Always"
    res_at_mpFillOn = False
    res_at_mpOutlineDrawOrder = "PostDraw"
    res_at_mpOutlineBoundarySets = "GeophysicalAndUSStates"
    res_at_mpGridAndLimbOn = True

    res_at_tfDoNDCOverlay = False

    res_at_cnFillOn = True
    res_at_cnLinesOn = False
    res_at_gsnSpreadColors = True
    res_at_gsnAddCyclic = False
    res_at_gsnFrame = False
    res_at_gsnDraw = False

;############################

    ;plot = gsn_csm_contour_map(wks,upt,res)
    plot = gsn_csm_contour_map(wks,vpt,res)

;############################
; Plot marker
;############################

    ;x = 39.60
    ;y = -101.01
    x = 98
    y = 56
    polyres = True
    polyres_at_gsMarkerIndex = 16
    polyres_at_gsMarkerSizeF = 10.0
    polyres_at_gsMarkerColor = (/"white"/)
    draw(plot)
    gsn_polymarker(wks,plot,x,y,polyres)
    frame(wks)

end

-- 
Jamie Ryan Lahowetz
University of Nebraska - Lincoln
Graduate Student - Geosciences
402.304.0766
jlahowe2_at_bigred.unl.edu

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Sep 10 2008 - 22:23:50 MDT

This archive was generated by hypermail 2.2.0 : Fri Sep 12 2008 - 21:42:04 MDT