; Black and White contour plot for RegCM3 ; May 15, 2004 - M. Snyder and N. Diffenbaugh ; User must edit pathnames below based on local NCL installation load "/usr/local/ncarg/scripts/gsn_code.ncl" load "/usr/local/ncarg/scripts/gsn_csm.ncl" load "/usr/local/ncarg/scripts/contributed.ncl" load "/usr/local/ncarg/scripts/shea_util.ncl" begin diri = "/vol1/msnyder/RegCM3/oct6/RegCM/Cal_Ncep_opt/" fili = "ATM1960AVG.nc" diri1 = "/vol1/msnyder/RegCM3/oct6/RegCM/Cal_Ncep_opt/" fili1 = "HEAD_OUT.nc" f = addfile(diri+fili,"r") f1 = addfile(diri1+fili1,"r") ; Read in variables ts = f->TK(0,0,:,:) lat2d = f1->XLAT(0,:,:) lon2d = f1->XLON(0,:,:) ; Get dimensions from variable dimvar = dimsizes(ts) jlat = dimvar(0) ilon = dimvar(1) wks = gsn_open_wks ("ps", "cn_bw") ; open workstation res = True ; plot mods desired res@cnRasterModeOn = False res@cnLinesOn = True ; no contour lines res@cnLineLabelsOn = True ; no contour labels; res@cnInfoLabelOn = True ; no contour info label res@cnLineLabelPlacementMode = "constant" ; no lines through labels res@mpGridAndLimbOn = True ; lat/lon lines on res@mpGridSpacingF = 10.0 ; lat/lon lines every 10 deg res@mpGridLineDashPattern = 2 ; lat/lon lines as dashed res@pmTickMarkDisplayMode = "Always" ; turn on tickmarks res@tiMainString = "RegCM3: cn_bw_plot" res@tiMainFontHeightF = 0.020 ; smaller title res@gsnAddCyclic = False ; regional data ; !!!!! any plot of data that is on a native grid, must use the "corners" ; method of zooming in on map. res@mpLimitMode = "Corners" ; choose range of map res@mpLeftCornerLatF = lat2d(0,0) res@mpLeftCornerLonF = lon2d(0,0) res@mpRightCornerLatF = lat2d(jlat-1,ilon-1) res@mpRightCornerLonF = lon2d(jlat-1,ilon-1) ; The following 4 pieces of information are REQUIRED to properly display ; data on a native lambert conformal grid. This data should be specified ; somewhere in the model itself. res@mpProjection = "LambertConformal" res@mpLambertParallel1F = 30. res@mpLambertParallel2F = 60. res@mpLambertMeridianF = -121.5 ; usually, when data is placed onto a map, it is TRANSFORMED to the specified ; projection. Since this model is already on a native lambert conformal grid, ; we want to turn OFF the tranformation. res@tfDoNDCOverlay = True ; Turn on State borders res@mpPerimOn = True res@mpOutlineBoundarySets = "GeophysicalAndUSStates" res@mpFillOn = True plot = gsn_csm_contour_map(wks,ts,res) ; Draw contours over a map. end