;************************************************* ;1990-2000 yillari arasi aralik-ocak-subat ortalama istasyon yagis degerlerinin gridlenmesi ;************************************************ ;gerekli kutuphanelerin cagrilmasi 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" ;yagis verilerinin ve istasyon enlem boylam degerlerinin oldugu dosyanin cagrilmasi begin stationfile="prec.txt" ; ; -1 means read all rows into a one-dimensional variable, ; ATTENTION, DO NOT READ STRINGS. ; dummy = asciiread(stationfile,-1,"float") ncol = 4 ; number of columns is 6 npts = dimsizes(dummy)/ncol ; get number of points stationdata = onedtond(dummy,(/npts,ncol/)) ; npts x ncol z1 = stationdata(:,1) ; station numbers to appear on the map y = stationdata(:,2) ; latitude values x = stationdata(:,3) ; longitude values nxo=30 nyo=30 xmin=25.50 ymin=35.50 xmax=45.50 ymax=42.50 xc=(xmax-xmin)/(nxo-1) yc=(ymax-ymin)/(nyo-1) xo=xmin+ispan(0,nxo-1,1)*xc yo=ymin+ispan(0,nyo-1,1)*yc zo1=natgrids(x,y,z1,xo,yo) zo1!0="lon" zo1!1="lat" zo1&lon = xo zo1&lat = yo wks = gsn_open_wks("eps","precp") gsn_define_colormap (wks,"gsdtol") setvalues wks "wkColorMap" : "gsltod" "wkForegroundColor" : (/0.,0.,0./) "wkBackgroundColor" : (/1.,1.,1./) end setvalues res = True res@gsnMaximize = True res@sfXCStartV = xmin ; Define where contour plot res@sfXCEndV = xmax ; should lie on the map plot. res@sfYCStartV = ymin res@sfYCEndV = ymax res@gsnDraw = False res@gsnFrame = False res@mpProjection = "Mercator" res@mpDataBaseVersion = "MediumRes" res@mpLimitMode = "LatLon" res@mpMinLonF =xmin res@mpMaxLonF = xmax res@mpMinLatF = ymin res@mpMaxLatF = ymax ;res@tmXBLabelsOn = False ;res@tmXBOn = False res@mpPerimOn = False res@gsnScale = True res@cnFillOn = True res@gsnSpreadColors = True ;res@tfDoNDCOverlay = True res@gsnAddCyclic = False res@pmTickMarkDisplayMode = "Always" ;res@mpGridLineDashPattern = 2 res@lbLabelAutoStride = True res@mpOutlineOn = True res@mpOutlineBoundarySets = "Geophysical" res@mpOutlineSpecifiers = "Turkey" res@mpGeophysicalLineThicknessF = 0.5 res@mpNationalLineThicknessF = 0.5 res@mpFillOn = True res@mpFillAreaSpecifiers = (/"Water","Land"/) res@mpSpecifiedFillColors = (/"white","white"/) res@mpAreaMaskingOn = True res@mpMaskAreaSpecifiers = "Turkey" res@mpGridAndLimbOn = False res@mpGridMaskMode = "MaskMaskArea" res@mpFillDrawOrder = "PostDraw" ;Mask edilmis bolge haric diger yerleri fill yap res@cnLineDrawOrder = "Draw" res@cnLabelDrawOrder = "PostDraw" res@mpOutlineDrawOrder = "PostDraw" res@cnSmoothingOn = True res@cnLevelSelectionMode = "ManualLevels" res@cnMinLevelValF = 10 res@cnMaxLevelValF = 160 res@cnLevelSpacingF = 15 res@cnLinesOn = True ; no contour lines res@cnLineLabelsOn = False ; no contour labels res@cnInfoLabelOn = False plot=gsn_csm_contour_map(wks,zo1(lat|:,lon|:),res) ;plot=ShadeGtContour(plot,0.2,17) ;plot=ShadeGtContour(plot,0.3,7) txres = True ;txres@txFontHeightF = 0.007 ;text = gsn_add_text(wks,plot,sprintf("%4.3f",z1),x,y,txres) ;nstrs = dimsizes(text) draw(plot) ;txres@txFontHeightF = 0.009 ;gsn_text(wks,plot,"Western",31.5,44,txres) ;gsn_text(wks,plot,"Black Sea",31.5,43,txres) ;gsn_text(wks,plot,"Eastern",38.5,44,txres) ;gsn_text(wks,plot,"Black Sea",38.5,43,txres) ;gsn_text(wks,plot,"(3)",31.5,42,txres) ;gsn_text(wks,plot,"(4)",38.5,42,txres) ;gsn_text(wks,plot,"Eastern",32,35.5,txres) ;gsn_text(wks,plot,"Mediterranean",32,34.5,txres) ;gsn_text(wks,plot,"Sea",32,33.5,txres) ;gsn_text(wks,plot,"(2)",32,32.5,txres) ;gsn_text(wks,plot,"Central",18.5,36,txres) ;gsn_text(wks,plot,"Mediterranean",18.5,35,txres) ;gsn_text(wks,plot,"Sea",18.5,34,txres) ;gsn_text(wks,plot,"(5)",18.5,33,txres) ;txres@txAngleF = 290 ;gsn_text(wks,plot,"Caspian Sea",50,42,txres) ;txres@txAngleF = 0 ;gsn_text(wks,plot,"Aegean",25,39.5,txres) ;gsn_text(wks,plot,"Sea",25,38.5,txres) ;gsn_text(wks,plot,"(1)",25,37.5,txres) ;txres@txAngleF = 0 ;txres@txFontHeightF = 0.015 frame(wks) end