Dear all
See the plot I draw in the attachment, the map is bigger than my data.
How could I set the map to fit my data exactly? Also the color map is
the one I usually used for my WRF post-processing, why it didn't show
well in this case? I mean I could only see blue in the map.
see my script:
note that the latitude and longitude information is in a seperate CMAQ
output file(GRIDCRO2D_20010828.nc)
begin
print("begin")
var =
(/"RN","RC","RADYNI","RBNDYI","RSTOMI","HFX","QFX","MOLI","WSPD10","WDIR10"/)
years = (/2001,2002,2051,2052/)
lat_long =
addfile("/gpfs_share/jhuang5/CMAQ_runs/inp_PNNL/met/GRIDCRO2D_20010828.nc","r")
do iyr = 0,dimsizes(years)-1
year = years(iyr:iyr)
f =
addfile("METCRO2D_"+year+"JJA.extracted.nc.aver.nc","r")
do v = 0,dimsizes(var)-1
x = f->$var(v)$
printVarSummary(x)
; printVarSummary(lat_long->LAT)
x_at_lat2d=lat_long->LAT(0,0,:,:)
x_at_lon2d=lat_long->LON(0,0,:,:)
printVarSummary(x)
print(x!0)
print(x!1)
print(x!2)
print(x!3)
x_at_coordinates= "XLONG XLAT"
; print(dimsizes(x&COL))
; print(dimsizes(x&ROW))
wks = gsn_open_wks("ps" ,year+"JJA.aver"+var(v:v))
;
gsn_define_colormap(wks,"BlAqGrYeOrReVi200") ;
select color map
res = True ; plot mods desired
res_at_cnFillOn = True ; color plot
desired
res_at_cnLinesOn = False ; turn off
contour lines
res_at_cnLineLabelsOn = False ; turn
off contour labels
res_at_tiXAxisString = "Longitude"
res_at_tiYAxisString = "Latitude"
res_at_lbOrientation = "Vertical" ; Move labelbar
res_at_mpMinLonF = min(x_at_lon2d)
res_at_mpMaxLonF = max(x_at_lon2d)
res_at_mpMinLatF = min(x_at_lat2d)
res_at_mpMaxLatF = max(x_at_lat2d)
;************************************************
; Turn on lat / lon labeling
;************************************************
res_at_pmTickMarkDisplayMode = "Always" ; turn
on tickmarks
res_at_tmXTOn = False ; turn off top labels
res_at_tmYROn = False ; turn off right labels
res_at_tiMainFuncCode = "~"
plot = gsn_csm_contour_map(wks,x(0,0,:,:),res)
system ("convert "+year+"JJA.aver"+var(v:v)+".ps
"+year+"JJA.aver"+var(v:v)+".jpg")
system ("rm "+year+"JJA.aver"+var(v:v)+".ps")
end do
end do ; iyr
end
Thanks
Xiaoming
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.2.0 : Mon Jan 07 2008 - 11:19:46 MST