; Julia 4/11/2013: this script loads in the yearly data files and extracts the daily data from these files and then assigns these values in a probability density function. The pdf of the model and observatio are then compared to produce a perkins skill score at each grid point. These are then plotted on a contour. ;---------------INPUTS------------------------------------- domain = "d01" ; -------- now extract the vairables we need ;get a landmask and some other stuff from a wrfout file ; load a wrfout file to get land-mask info out f = addfile("/home/lsl/Downloads/DATA/wrfout_2015/Processed/wrfout_" + domain + ".nc","r") landmask = wrf_user_getvar(f,"LANDMASK",0) dsizes_array = dimsizes(landmask) nlat = dsizes_array(0) nlon = dsizes_array(1) ; also get some map info for later on truelat1 = f@TRUELAT1 truelat2 = f@TRUELAT2 cen_lon = f@CEN_LON cen_lat = f@CEN_LAT wrf_lat2d = f->XLAT(0,:,:) wrf_lon2d = f->XLONG(0,:,:) ;*******Draw Panel Plots************ type= "png" wks_ppt = gsn_open_wks(type,"./PLOT_TEST/pkss_ppt_test_" + domain) gsn_define_colormap(wks_ppt,"BlGrYeOrReVi200") res = True res@gsnAddCyclic = False ; data not cyclic res@gsnMaskLambertConformal = True ; turn on Lambert masking res@mpProjection = "LambertConformal" res@mpLambertParallel1F = truelat1 res@mpLambertParallel2F = truelat2 res@mpLambertMeridianF = cen_lon res@mpOutlineDrawOrder = "PostDraw" ; force map tp be drawn 1st res@mpGridLineDashPattern = 2 ; lat/lon lines as dashed res@mpPerimOn = True res@mpPerimDrawOrder = "PostDraw" res@mpOutlineOn = True res@mpGridAndLimbOn = True res@mpGridSpacingF = 10. res@pmTickMarkDisplayMode = "Always" res@tmXTLabelsOn = False res@tmYRLabelsOn = False res@mpOutlineBoundarySets = "National" res@mpGeophysicalLineThicknessF = 1.5 res@mpDataBaseVersion = "MediumRes" res@mpDataSetName = "Earth..4" res@mpOutlineSpecifiers = (/"China:states"/) res@mpFillOn = True ;;some more basic plot aspects res@cnFillPalette = "BlGrYeOrReVi200" res@cnLinesOn = False ; no lines on contour plot res@cnFillOn = True ; fill map with color res@cnLineLabelsOn = False ; no line label res@mpGridLatSpacingF = 10 ; grid line spacing on plot res@mpGridLonSpacingF = 10 res@pmTickMarkDisplayMode = "Always" ; display tick marks res@tmXTLabelsOn = False ; turn off tick-marks labels at top of plot res@tmYRLabelsOn = False ; trun off tick-marks labels at right of plot res@tmXTOn = False ; turn off top tick marks res@tmYROn = False; turn off right tick marks res@tmXBOn = False res@tmXTOn = False res@mpMinLatF = min(wrf_lat2d) res@mpMaxLatF = max(wrf_lat2d) res@mpMinLonF = min(wrf_lon2d) res@mpMaxLonF = max(wrf_lon2d) ; define label bar properties res@lbLabelBarOn = False ; Turn off label bar for individual plot, NOTE: set this to true if you are trying to figure out the scale ; set colorbar manually res@cnLevelSelectionMode = "ManualLevels" res@cnMinLevelValF = -0.850 res@cnMaxLevelValF = 0.850 res@cnLevelSpacingF = 0.025 dumpmatrix = generate_2d_array(20,20,-1.0,0.834,0,(/nlat,nlon/)) printMinMax(dumpmatrix,0) dumpmatrix@lat2d = wrf_lat2d dumpmatrix@lon2d = wrf_lon2d plot1 = gsn_csm_contour_map(wks_ppt,dumpmatrix,res)