Hi,
I want to plot temperature fields from the Remo model, which has a rotated grid.
When I use the rotaded lat/lon (which is both a 1-dimensional array) I can
easily plot the output, but of course the overlayed map is not identical to the
grid location. Thus I tried to plot with the real lat/lon arrays (which are
2-dimensional). Here I have the problem that the map is not placed correctly.
Of course, I could plot it succesfully with the map-projections. But here the
output shows areas with missing values, as the viewing area is not identical
with the grid.
Thanks for your help!!!
Wolfgang
P.S.:Here is my script:
;************************************************
; commonly loaded
;************************************************
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 netCDF file: read in selected variables
;************************************************
ie=109
je=121
fil="grid.nc"
g=addfile(fil,"read")
lat2d=g->var614(0,:,:)
lon2d=g->var615(0,:,:)
dir="/pf/m/m222104/Remo/daten/"
fil="e001500m1900-2000_167.nc"
f=addfile(dir+fil,"read")
T_surface=new((/je,ie/),"float")
T_surface(:,:)=f->var167(100,0,:,:)
;************************************************
; open graphic wkstation
;**********************************************
type = "ncgm"
wks = gsn_open_wks(type,"T_surface")
setvalues wks ;Color table
"wkColorMap" : "rainbow+white+gray"
"wkBackgroundColor" : (/1.,1.,1./)
"wkForegroundColor" : (/0.,0.,0./)
end setvalues
plot=new(1,graphic) ; dimensionen+graphic-variable
a4_height=29.7
a4_width=21.0
cm_per_inch=2.54
resm = True ; options desired
resm_at_gsnDraw =True ; zeichnet nicht Plot
resm_at_gsnFrame =True ; kein Frame
resm_at_gsnMaximize =False ; maximize size of plot
resm_at_gsnPaperWidth =a4_width/cm_per_inch
resm_at_gsnPaperHeight =a4_height/cm_per_inch
resm_at_gsnPaperMargin =0.5/cm_per_inch
resm_at_gsnPaperOrientation ="Portrait"
resm_at_mpProjection = "LambertConformal";"stereographic"
resm_at_mpLimitMode ="corners"
resm_at_mpLeftCornerLatF = lat2d(0,0)
resm_at_mpLeftCornerLonF = lon2d(0,0)
resm_at_mpRightCornerLatF = lat2d(je-1,ie-1)
resm_at_mpRightCornerLonF = lon2d(je-1,ie-1)
;resm_at_mpRelativeCenterLon = True ; set a center lon
;resm_at_mpCenterLonF = -162.;clon ; center lon
;resm_at_mpRelativeCenterLat = True ; set a center lat
;resm_at_mpCenterLatF = 39.25;clat ; center lat
resm_at_tfDoNDCOverlay = True
resm_at_mpDataBaseVersion = "Ncarg4_1"
resm_at_mpDataSetName = "Earth..2"
resm_at_mpOutlineBoundarySets = "National"
resm_at_mpGeophysicalLineColor = "Black"
resm_at_mpGridAndLimbOn = False
resm_at_mpLabelsOn = False
resm_at_mpFillOn = False
resm_at_pmTickMarkDisplayMode = "Never" ;zeichnet die, never zeichnet nichts
resm_at_cnFillOn = True ;Fill daten
resm_at_cnRasterModeOn =True
resm_at_cnLinesOn = False
resm_at_cnLineLabelsOn = False
resm_at_cnInfoLabelOn = False
resm_at_gsnSpreadColors = True ;Automatic=True
; resm_at_gsnSpreadColorStart = 0
; resm_at_gsnSpreadColorEnd = 32
resm_at_lbLabelBarOn = True
resm_at_lbOrientation = "vertical"
resm_at_lbLabelFontHeightF = .01
resm_at_cnLevelSelectionMode ="AutomaticLevels" ; ManualLevels; AutomaticLevels;
ManualLevels
; resm_at_cnLevels =(/1,2,4,6,8,10,15,25/)
; resm_at_cnFillColors =(/-1,79,95,112,166,178,193,36,27/)
; resm_at_tiYAxisString="CH02D"
; resm_at_tiYAxisFont=21 ;Font zu tiYaxis
; resm_at_tiYAxisFontHeightF=0.025
resm_at_txFont=21 ;Font zu gsnCenterSTring
resm_at_txFontHeightF=0.018
resm_at_gsnCenterString="Monthly Mean Surface Temperature @ JAN 2050"
plot(0)=gsn_csm_contour_map(wks,T_surface(:,:),resm)
end
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Feb 12 2008 - 04:08:37 MST
This archive was generated by hypermail 2.2.0 : Tue Feb 12 2008 - 14:45:27 MST