"I'm not sure exactly what pressure level I am
plotting but I think it is at 700mb"
Level 13 corresponds to 500hPa. That is why there are no positive
temperatures.
Why are you "not sure". You can always print out the levels or use
ncl_filedump -v lv_ISBL3 fnl_070720_12_00.grb | less
The levels are at the bottom. Subscripts are zero based.
--- The attached script uses NCL's coordinate subscripting http://www.ncl.ucar.edu/Document/Language/subscript_coord.shtml --- Also, you can download a mini-language reference manual [pdf] at http://www.ncl.ucar.edu/Document/Manuals/ Good luck James Fishbaugh wrote: > Hello, > > I am trying to plot temperature contours across the globe for July 20 > at 12Z and am getting strange results. The temperatures it is showing > are very cold, barely anything in the world above freezing, which I > know to be incorrect. I'm not sure exactly what pressure level I am > plotting but I think it is at 700mb (I have no idea what indices in > the array correspond to which pressure levels, if you know that I'd > really appreciate it). I found an old posting where someone was > plotting a similar field, and their comments said it was the 700mb > level. Anyway, I am stumped as to why everything is so cold and am > assuming I am plotting the data incorrectly. > > Below is my code, however you will most likely need the input data if > you are going to see the results I am seeing (or I can email a > screenshot if you'd prefer). I got it at > http://dss.ucar.edu/datasets/ds083.2/. Please help! > > James
load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
lev = 700
diri = "/project/cas/shea/"
fnam = "fnl_070720_12_00"
grb_file = addfile(diri+fnam+".grb","r")
x = grb_file->TMP_3_ISBL_10({lev},:,:) ; Read temp
x = x-273.15 ; convert to celsius
x_at_units = "C" ; update attribute
wks = gsn_open_wks("x11","T_"+fnam) ; Open a workstation
;gsn_define_colormap(wks,"rainbow") ; Define the colormap
gsn_define_colormap(wks,"BlAqGrYeOrReVi200") ; Define the colormap
res = True ; We are using resources
res_at_gsnMaximize = True ; Maximize size
res_at_gsnSpreadColors = True ; Use full range of colormap
res_at_cnFillOn = True ; Color plot desired
res_at_cnLinesOn = False ; Turn off contour lines
res_at_cnLineLabelsOn = False ; Turn off contour labels
; Change size and location of plot
;res_at_mpShapeMode = "FreeAspect" ; Use the free aspect shape mode
;res_at_vpYF = 0.90 ; Upper right location
;res_at_vpXF = 0.10 ; Lower left location
;res_at_vpWidthF = 0.70 ; Width of plot
;res_at_vpHeightF = 0.70 ; Height of plot
res_at_mpFillOn = False ; Turn off map fill
res_at_mpOutlineOn = True ; Turn on the outline of the map
res_at_mpGeophysicalLineThicknessF = 2.0 ; Increase thickness
res_at_tiMainString = lev+"hPa: "+fnam ; Establish a title
;res_at_gsnCenterString = lev+"hPa: "+fnam ; Establish a title
;res_at_mpDataBaseVersion = "MediumRes" ; Use medium resolution
res_at_lbOrientation = "vertical" ; Use a vertical label bar
plot = gsn_csm_contour_map_ce(wks, x, res) ; Plot the data
end
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jul 25 2007 - 08:45:27 MDT
This archive was generated by hypermail 2.2.0 : Thu Jul 26 2007 - 16:42:26 MDT