Hi, Every one, I tried to make plots with the script in ncl webpage
using the similar NARR .nc data (air.199001.nc), to see what I have got (see
attachment). I have tried soil temperature, soil moisture, surface heat
flux, geopotential height , and so on, the similar things happen to
NARR. There must be something wrong with the script (acturally I didn't do
any modification compared with the one in the NCL webpage except for the
file) or some reason I haven't considered about when processing NARR
data. Any suggestions?
You're very appreciated for any help.
Yan
The script I use:
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/csm/contributed.ncl"
begin
;*******************************************
; open file and read in data
;*******************************************
diri = "./" ; input directory
f = addfile (diri+"air.199001.nc", "r")
; convert short=>float
x = short2flt( f->air(10,:,:,:) ) ; (time=10,lev,lat,lon)
lat2d = f->lat ; coordinates
lon2d = f->lon
dimlc = dimsizes(lat2d) ; dimension sizes
nlat = dimlc(0)
mlon = dimlc(1)
;*************create plots*******************
wks = gsn_open_wks ("ps", "narr") ; open workstation
gsn_define_colormap (wks,"gui_default") ; choose color map
res = True ; plot mods desired
for original grid
res_at_cnFillOn = True ; color fill
res_at_cnLinesOn = False ; no contour lines
res_at_gsnSpreadColors = True ; use total colormap
res_at_gsnSpreadColorStart = 4
res_at_gsnSpreadColorEnd = -1
res_at_mpGridAndLimbOn = True
res_at_pmTickMarkDisplayMode = "Always" ; turn on tickmarks
res_at_tmXTOn = False
res_at_gsnAddCyclic = False ; regional data
res_at_mpLimitMode = "Corners" ; choose range of map
res_at_mpLeftCornerLatF = lat2d(0,0)
res_at_mpLeftCornerLonF = lon2d(0,0)
res_at_mpRightCornerLatF = lat2d(nlat-1,mlon-1)
res_at_mpRightCornerLonF = lon2d(nlat-1,mlon-1)
res_at_tfDoNDCOverlay = True ; direct plot
res_at_mpProjection = "LambertConformal"
res_at_mpLambertParallel1F =
f->Lambert_Conformal_at_standard_parallel(0) ; lat2d_at_mpLambertParallel1F
res_at_mpLambertParallel2F = f->Lambert_Conformal_at_standard_parallel(1)
res_at_mpLambertMeridianF =
f->Lambert_Conformal_at_longitude_of_central_meridian
res_at_gsnCenterString = "T@"+x&level(3) + "hPa" ; draw center subtitle
res_at_gsnLeftString = "Original grid" ; draw left subtitle
plot = gsn_csm_contour_map(wks,x(3,:,:),res) ; Draw original
grid on map
end
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.2.0 : Wed Jul 01 2009 - 06:11:45 MDT