<html><head></head><body><div class="ydpd5b25f43yahoo-style-wrap" style="font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 13px;"><span><span style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small;">Hello, </span><div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small;">I am using MM5 ouput and I want to plot terrain, wind vector and SST in a map. </div><div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small;">I have tried with a mask, res_base but nothing works. Can any one help me??</div><div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small;"><br></div><div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small;">code:</div><div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small;"><span><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" </div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" </div><div><br></div><div>begin</div><div><span style="white-space: pre-wrap;"> </span>f1=addfile("data.nc","r")</div><div><br></div><div><span style="white-space: pre-wrap;"> </span>lat=f1->latitcrs</div><div><span style="white-space: pre-wrap;"> </span>lon=f1->longicrs</div><div><span style="white-space: pre-wrap;"> </span>dims=dimsizes(lat)</div><div><span style="white-space: pre-wrap;"> </span>lat2d=(/lat/)</div><div><span style="white-space: pre-wrap;"> </span>lat2d@units = "degreeN"</div><div><span style="white-space: pre-wrap;"> </span>lon2d=(/lon/)</div><div><span style="white-space: pre-wrap;"> </span>lon2d@units = "degreeE"</div><div><br></div><div><span style="white-space: pre-wrap;"> </span>ter=f1->terrain</div><div><span style="white-space: pre-wrap;"> </span>ter@lat2d=lat2d</div><div><span style="white-space: pre-wrap;"> </span>ter@lon2d=lon2d</div><div><br></div><div><span style="white-space: pre-wrap;"> </span>u=f1->u10</div><div><span style="white-space: pre-wrap;"> </span>v=f1->v10</div><div><span style="white-space: pre-wrap;"> </span>u@lat2d=lat2d</div><div><span style="white-space: pre-wrap;"> </span>u@lon2d=lon2d</div><div><span style="white-space: pre-wrap;"> </span>v@lat2d=lat2d</div><div><span style="white-space: pre-wrap;"> </span>v@lon2d=lon2d</div><div><span style="white-space: pre-wrap;"> </span>med=ter</div><div><br></div><div> ts = f1->tseasfc(24,:,:)</div><div> ts = (ts*1)</div><div> ts@lat2d=lat2d</div><div> ts@lon2d=lon2d</div><div><br></div><div>;******************************************************************************<span style="white-space: pre-wrap;"> </span></div><div><span style="white-space: pre-wrap;"> </span>wks = gsn_open_wks("eps","terrain_sst") ; open a workstation</div><div>;******************************************************************************</div><div><br></div><div> res = True </div><div> res@gsnDraw = False</div><div> res@gsnFrame = False</div><div> res@mpProjection = "Mercator" </div><div> res@cnLinesOn = False</div><div> res@cnFillOn = True ; color plot desired</div><div> res@mpOutlineDrawOrder = "PostDraw"</div><div> res@mpFillDrawOrder = "Predraw"</div><div> res@gsnSpreadColors = True</div><div> res@cnLevelSelectionMode =<span style="white-space: pre-wrap;"> </span>"ManualLevels"</div><div> res@lbLabelAutoStride = True </div><div> res@cnLineLabelsOn = False ; turn off contour lines</div><div> res@cnFillDrawOrder = "Predraw"</div><div> res@mpDataBaseVersion = "HighRes" ; </div><div> </div><div> res@mpProjection = "Mercator" </div><div> res@mpDataBaseVersion = "HighRes"</div><div> res@mpLimitMode = "Corners" ; choose range of map</div><div> res@mpLeftCornerLatF = lat2d(0,0)</div><div> res@mpLeftCornerLonF = lon2d(0,0)</div><div> res@mpRightCornerLatF = lat2d(dims(0)-1,dims(1)-1)</div><div> res@mpRightCornerLonF = lon2d(dims(0)-1,dims(1)-1)</div><div><br></div><div>; res@tfDoNDCOverlay = True</div><div><br></div><div> res@mpGeophysicalLineColor = "black" ; color of continental outlines</div><div> res@mpPerimOn = True ; draw box around map</div><div> res@mpGridLineDashPattern = 2 ; lat/lon lines as dashed</div><div> res@mpOutlineBoundarySets = "GeophysicalAndUSStates" ; add state boundaries</div><div> res@mpUSStateLineColor = "black" ; make them red</div><div> res@mpOutlineOn = True</div><div> res@mpDataBaseVersion = "MediumRes"</div><div> res@mpDataSetName = "Earth..4"</div><div> res@mpOutlineBoundarySets = "National"</div><div> res@mpGeophysicalLineColor = "black" ; color of cont. outlines</div><div> res@mpGeophysicalLineThicknessF = 3 ; thickness of outlines</div><div> res@mpNationalLineThicknessF = 3 ; interior boundaries </div><div> </div><div>;**********************************************************</div><div> ter_res = res </div><div>;***********************Terrain****************************</div><div> ter_res@cnMinLevelValF<span style="white-space: pre-wrap;"> </span>=<span style="white-space: pre-wrap;"> </span>0</div><div> ter_res@cnMaxLevelValF<span style="white-space: pre-wrap;"> </span>=<span style="white-space: pre-wrap;"> </span>3000</div><div> ter_res@cnLevelSpacingF = 250 </div><div> ter_res@cnFillPalette = "OceanLakeLandSnow" ; choose colormap</div><div> ter_res@mpFillOn = False </div><div>;**************************SST*****************************</div><div> res_base = res</div><div> res_base@cnFillOn = True ; turn on color fill</div><div> res_base@cnLinesOn = False ; turn off contour lines</div><div> res_base@lbLabelStride = 1 ; every 4th label</div><div><br></div><div> res_base@lbLabelAutoStride = True </div><div> res_base@cnLevelSelectionMode =<span style="white-space: pre-wrap;"> </span>"ManualLevels"</div><div> res_base@cnMinLevelValF<span style="white-space: pre-wrap;"> </span>=<span style="white-space: pre-wrap;"> </span>296</div><div> res_base@cnMaxLevelValF<span style="white-space: pre-wrap;"> </span>=<span style="white-space: pre-wrap;"> </span>303</div><div> res_base@cnLevelSpacingF = 1 </div><div> res_base@cnLineLabelsOn = False ; turn off contour lines</div><div> </div><div> res_base@tiMainString = "Draw land ON TOP of contours" ; title</div><div> res_base@cnFillDrawOrder = "Predraw" ; draw contours firs </div><div><br></div><div>;**************Create the two plots************************</div><div><br></div><div> ter_plot = gsn_csm_contour_map(wks,ter,ter_res)</div><div> sst_plot = gsn_csm_contour(wks,ts,res_base)</div><div><br></div><div>;*************Overlay the sst plot on the terrain plot*****</div><div> overlay(sst_plot,ter_plot)</div><div><br></div><div>;---Drawing the terrain plot will also draw dbz plot</div><div> draw(ter_plot)</div><div> frame(wks)</div><div><br></div><div> </div><div>;---Remove the dbz plot from terrain plot so we can re-overlay it on a new plot</div><div> NhlRemoveOverlay(ter_plot,sst_plot,False)</div><div><br></div><div>;---Recreate the terrain plot with a fully opaque labelbar</div><div> ter_res@lbOverrideFillOpacity = True ; don't apply opacity to labelbar colors</div><div> ; (NCL V6.4.0 and later)</div><div> ter_plot = gsn_csm_contour_map(wks,ts,ter_res)</div><div> </div><div>;--Re-overlay the dbz plot on the new terrain plot.</div><div> overlay(ter_plot,sst_plot)</div><div><br></div><div>;---Drawing the terrain plot will also draw dbz plot</div><div> draw(ter_plot)</div><div> frame(wks)</div><div><br></div><div> maximize_output(wks,True)</div><div><br></div><div>end</div></span><br></div></span></div></body></html>