;************************************************* ; NCL Graphics: title_2.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(0,:,8) ;************************************************ ; create plot ;************************************************ wks = gsn_open_wks("ps","title") res = True ; plot mods desired ; for this title effect, we use the function code "~" and the captical C to ; indicate a carriage return in the string. Additionally, the function code ; plus the capital Z indicates to resize the text. the 75 means 75% of ; normal. ; note that the default function in NCL is actually a colon ":", but since ; this is a common character used in strings, we have changed the default ; to a "~" in our .hluresfile. res@tiMainString = "This is the main title with a ~C~ carriage return~C~ and spaces for centering ~C~ ~Z75~ and font height changes" plot=gsn_csm_xy(wks,u&lat,u,res) ; create xy plot end