;***********Load the ncl internal libraries*********; 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" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl" begin ;***GET DATA and SELECT VARIABLES*** regcm_domain = addfile("/home/denizbozkurt/Desktop/DATA/REGCM_SST/CTR_DOMAIN000.nc","r") regcm_topo = regcm_domain->topo(iy|:,jx|:) lat2d=regcm_domain->xlat(iy|:,jx|:) lon2d=regcm_domain->xlon(iy|:,jx|:) landuse = regcm_domain->landuse(iy|:,jx|:) nlat = dimsizes(lat2d(:,0)) nlon = dimsizes(lon2d(0,:)) ;***MASK OCEAN and INLAND WATER*** regcm_topo_mask = mask(regcm_topo,(landuse.ne.14.and.landuse.ne.15),True) wks=gsn_open_wks("ps","regcm_domain") gsn_define_colormap (wks,"OceanLakeLandSnow") ;***RESOURCES*** res = True ; plot mods desired res@cnFillOn = True ; color fill res@cnLinesOn = False res@cnLineLabelsOn = False ; no contour labels res@cnInfoLabelOn = False ; no contour info label res@mpFillOn = False res@gsnRightString = "" res@cnLevelSelectionMode = "ManualLevels" res@cnMinLevelValF = 0 res@cnMaxLevelValF = 4800 res@cnLevelSpacingF = 200 res@gsnSpreadColors = True res@gsnSpreadColorStart = 10 res@tmXBLabelFontHeightF = 0.012 res@tmYLLabelFontHeightF = 0.012 res@gsnCenterStringFontHeightF = 0.02 res@gsnMaximize = True res@gsnLeftString = "" res@tmXTOn = False res@tmYROn = False res@tiMainString = "" res@tiMainFontHeightF = 0.012 ; smaller title res@gsnAddCyclic = False ; regional data res@mpPerimOn = True res@mpDataBaseVersion = "MediumRes" res@pmTickMarkDisplayMode = "Always" ; turn on tickmarks res@mpGridAndLimbOn = True res@mpGridSpacingF = 5.0 res@mpGridLineDashPattern = 2 ; lat/lon lines as dashed res@pmTickMarkDisplayMode = "Always" ; turn on tickmarks res@mpOutlineBoundarySets = "AllBoundaries"; Country borders res@cnFillOn = True res@cnMissingValFillColor = "skyblue1" res@gsnCenterString = "" res@tfDoNDCOverlay = True ;***ZOOMING IN ON TOPOGRAPHY*** res@mpLimitMode = "Corners" ; choose range of map res@mpLeftCornerLatF = lat2d(0,0) res@mpLeftCornerLonF = lon2d(0,0) res@mpRightCornerLatF = lat2d(nlat-1,nlon-1) res@mpRightCornerLonF = lon2d(nlat-1,nlon-1) prj = regcm_domain@projection clon = regcm_domain@longitude_of_projection_origin clat = regcm_domain@latitude_of_projection_origin res@mpProjection = "Mercator" res@mpCenterLonF = clon res@mpCenterLatF = clat ;***LABEL BAR*** res@pmLabelBarWidthF = 0.55 res@pmLabelBarHeightF = 0.055 res@lbLabelAlignment = "InteriorEdges" res@lbTitleOn = True ; turn on title res@lbTitleString = "m" ; title string res@lbTitlePosition = "Right" ; title position res@lbTitleFontHeightF= .015 ; make title smaller res@lbTitleDirection = "Across" res@lbLabelFontHeightF = 0.015 plot=gsn_csm_contour_map(wks,regcm_topo_mask,res) end