;************************************************* ; resize_6.ncl ;************************************************ load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" ;************************************************ begin ;************************************************ ; read in netCDF file ;************************************************ a = addfile("uv300.nc","r") u = a->U(1,:,:) ; read July zonal winds v = a->V(1,:,:) ;************************************************ ; create plots ;************************************************ wks = gsn_open_wks("ps","resize") ; open a ps file gsn_define_colormap(wks,"BlAqGrYeOrReVi200") ; choose colormap res = True res@cnFillOn = True ; turn on color res@gsnSpreadColors = True ; spread out color table res@cnLinesOn = False ; turn off contour lines res@cnLevelSelectionMode = "ManualLevels" ; manually set contour levels res@cnMinLevelValF = -10. res@cnMaxLevelValF = 45. res@cnLevelSpacingF = 5. ; set paper height and width to appropriate values a4_height = 29.7 a4_width = 23.0 cm_per_inch = 2.54 res@gsnMaximize = True ; must include w/ Paper Orientation res@gsnPaperWidth = a4_width/cm_per_inch res@gsnPaperHeight = a4_height/cm_per_inch plot = gsn_csm_contour_map_ce(wks,u,res) end