;***********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*** regcm_ctr_slp= addfile("/media/Data/REGCM_SST/atm_files/2001/control/daymean/CTR-ATM-2001-mslp-7-daymean.nc","r") regcm_sens_slp_plus= addfile("/media/Data/REGCM_SST/atm_files/2001/sens+2/daymean/CTR-ATM-2001-mslp-7-daymean.nc","r") regcm_ctr_u = addfile("/home/denizbozkurt/Desktop/DATA/REGCM_SST/2001/daymean/CTR-SRF-2001-uas-7-daymean.nc","r") regcm_ctr_v = addfile("/home/denizbozkurt/Desktop/DATA/REGCM_SST/2001/daymean/CTR-SRF-2001-vas-7-daymean.nc","r") regcm_sens_u_plus = addfile("/home/denizbozkurt/Desktop/DATA/REGCM_SST/sens+2/2001/daymean/CTR-SRF-2001-uas-7-daymean.nc","r") regcm_sens_v_plus = addfile("/home/denizbozkurt/Desktop/DATA/REGCM_SST/sens+2/2001/daymean/CTR-SRF-2001-vas-7-daymean.nc","r") regcm_domain = addfile("/home/denizbozkurt/Desktop/DATA/REGCM_SST/CTR_DOMAIN000.nc","r") ;***select domain*** latsouth = -58 latnorth = -4 lonwest = -122 loneast = -48 ;***select variables*** selday=18 regcm_ctr_slp_day = regcm_ctr_slp->mslp(time|selday,iy|:,jx|:) regcm_sens_slp_plus_day = regcm_sens_slp_plus->mslp(time|selday,iy|:,jx|:) regcm_sens_slp_plus_diff = regcm_sens_slp_plus_day - regcm_ctr_slp_day regcm_ctr_u_day = regcm_ctr_u->uas(time|selday,iy|:,jx|:) regcm_ctr_v_day = regcm_ctr_v->vas(time|selday,iy|:,jx|:) regcm_sens_u_plus_day = regcm_sens_u_plus->uas(time|selday,iy|:,jx|:) regcm_sens_v_plus_day = regcm_sens_v_plus->vas(time|selday,iy|:,jx|:) regcm_sens_u_plus_diff = regcm_sens_u_plus_day - regcm_ctr_u_day regcm_sens_v_plus_diff = regcm_sens_v_plus_day - regcm_ctr_v_day ;***lat&lon*** lat2d=regcm_domain->xlat(iy|:,jx|:) lon2d=regcm_domain->xlon(iy|:,jx|:) nlat = dimsizes(lat2d(:,0)) nlon = dimsizes(lon2d(0,:)) wks=gsn_open_wks("ps","synoptic_slp_wind_diff_NCL-5.2.1") gsn_define_colormap (wks,"BlueDarkRed18") cnres = True cnres@gsnDraw = False cnres@gsnFrame = False cnres@cnFillOn = True cnres@cnLinesOn = False cnres@cnLineLabelsOn = False cnres@cnInfoLabelOn = False cnres@cnLevelSelectionMode = "ExplicitLevels" cnres@cnLevels = (/-5,-4.5,-4,-3.5,-3,-2.5,-2,-1.5,-1,-0.5,0,0.5,1,1.5,2,2.5,3,3.5,4,4.5,5/) cnres@gsnSpreadColors = True ; Not needed in NCL V6.1.0 and later cnres@gsnRightString = "" ;---Labelbar resources, you will probably need to change these cnres@lbOrientation = "Vertical" cnres@lbLabelAutoStride = True ; Not needed in NCL V6.1.0 and later cnres@lbLabelStride = 2 ; probably not needed. cnres@lbTitleOn = True cnres@lbTitleString = "hPa" cnres@lbTitlePosition = "Bottom" cnres@lbTitleFontHeightF= .011 cnres@lbTitleDirection = "Across" cnres@pmLabelBarWidthF = 0.065 cnres@pmLabelBarHeightF = 0.7 cnres@pmLabelBarParallelPosF = -0.02 cnres@pmLabelBarOrthogonalPosF = 0.02 cnres@lbLabelFontHeightF = 0.012 cnres@tmXBLabelFontHeightF = 0.014 cnres@tmYLLabelFontHeightF = 0.014 ;cnres@gsnCenterStringFontHeightF = 0.024 cnres@gsnLeftString = "" cnres@tmXTOn = False cnres@tmYROn = False cnres@tiMainString = "" cnres@tiMainFontHeightF = 0.016 cnres@gsnAddCyclic = False cnres@mpFillOn = False cnres@mpPerimOn = True cnres@mpDataBaseVersion = "MediumRes" cnres@pmTickMarkDisplayMode = "Always" ;cnres@mpMinLatF = latsouth ;cnres@mpMaxLatF = latnorth ;cnres@mpMinLonF = lonwest ;cnres@mpMaxLonF = loneast cnres@mpLimitMode = "Corners" cnres@mpLeftCornerLatF = lat2d(0,0) cnres@mpLeftCornerLonF = lon2d(0,0) cnres@mpRightCornerLatF = lat2d(nlon-1,nlat-1) cnres@mpRightCornerLonF = lon2d(nlon-1,nlat-1) prj = regcm_domain@projection clon = regcm_domain@longitude_of_projection_origin clat = regcm_domain@latitude_of_projection_origin cnres@mpProjection = "Mercator" cnres@mpCenterLonF = clon cnres@mpCenterLatF = clat vcres = True vcres@gsnDraw = False vcres@gsnFrame = False vcres@vcRefMagnitudeF = 3.0 vcres@vcRefLengthF = 0.03 vcres@vcGlyphStyle = "CurlyVector" vcres@vcMinDistanceF = 0.025 vcres@vcLineArrowColor = "Black" vcres@vcLineArrowThicknessF = 1.0 vcres@vcRefAnnoOrthogonalPosF = -1.0 vcres@vcVectorDrawOrder = "Postdraw" vcres@tfDoNDCOverlay = True contour_map_plot=gsn_csm_contour_map(wks,regcm_sens_slp_plus_diff,cnres) vector_plot=gsn_csm_vector(wks,regcm_sens_u_plus_diff,regcm_sens_v_plus_diff,vcres) ;box ypts = (/ -30,-30,-38,-38,-30/) xpts = (/ -74,-70,-70,-74,-74/) resl = True resl@gsLineColor = "black" resl@gsLineThicknessF = 2.0 resl@gsLineLabelString = "" dum = new(4,graphic) do i = 0 , 3 dum(i)=gsn_add_polyline(wks,contour_map_plot,xpts(i:i+1),ypts(i:i+1),resl) end do overlay(contour_map_plot,vector_plot) draw(contour_map_plot) frame(wks) end