;***************************************************** ; native_1.ncl ;***************************************************** load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" ;***************************************************** begin ;*************************************** ; Input topo data from MC2 model ;*************************************** f1 = "topo.bin" topo = fbindirread(f1,0,(/293,343/),"float") topo@units = "m" topo@long_name = "topography" ;*************************************** ; Input lat lon data ;*************************************** f2 = "latlon.bin" lat = fbindirread(f2,0,(/293,343/),"float") lon = fbindirread(f2,1,(/293,343/),"float") ;*************************************** ; Create plot ;*************************************** wks = gsn_open_wks ("ps", "native") gsn_define_colormap (wks,"WhViBlGrYeOrReWh") ; choose colormap res = True ; plot mods desired res@cnFillOn = True ; turn on color res@cnLinesOn = False ; no contour lines res@gsnSpreadColors = True ; use full color map res@lbLabelAutoStride = True ; every other label res@cnLevelSelectionMode = "ManualLevels" ; manual levels res@cnMinLevelValF = 0. res@cnMaxLevelValF = 3000. res@cnLevelSpacingF = 300. res@pmTickMarkDisplayMode = "Always" ; turn on tick marks res@tiMainString = "Native Stereographic Example" res@gsnAddCyclic = False ; regional data ; the following resources are REQUIRED to plot this projection correctly res@mpProjection = "Stereographic" ; projection res@mpLimitMode = "Corners" ; method to zoom res@mpLeftCornerLatF = lat(0,0) res@mpLeftCornerLonF = lon(0,0) res@mpRightCornerLatF = lat(293-1,343-1) res@mpRightCornerLonF = lon(293-1,343-1) res@mpRelativeCenterLon = True ; set a center lon res@mpCenterLonF = lon(147,172) ; center lon res@mpRelativeCenterLat = True ; set a center lat res@mpCenterLatF = 90. ; center lat res@tfDoNDCOverlay = True ; do not transform data plot = gsn_csm_contour_map (wks,topo,res) end