;************************************************* ; demonstrates the plotting of magnetic variables ;************************************************ load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" load "/home/tgcm/ncl/web_ex/func_lib/hao_contrib.ncl" load "/home/tgcm/ncl/web_ex/func_lib/axis.ncl" ;************************************************ begin ;************************************************ ; before the data can be plotted, there is a ; sequence of things that have to be done to it: ;************************************************ in = addfile("/chewy/d/murphys/files/smarch_migsdi_c_1.nc","r") x = mag2latlon(in->PHIM3D) ut = in->ut ; required for local time axis t2plt = 3 ; index of time to plot l2plt = 13 ;************************************************ ; create plot ;************************************************ wks = gsn_open_wks("ps" ,"ce") ; open a ps file gsn_define_colormap(wks,"BlWhRe") res = True ; plot mods desired title = "PHIM3D ("+x@units+") UT = "+ut(t2plt)+" zplev= "+x&lev(l2plt) res@tiMainString = title res@cnFillOn = True ; add color res@gsnSpreadColors = True ; use full range of color map res@lbLabelAutoStride = True ; nice lb labels res@mpFillOn = False ; turn off map fill ; these resources must exist when plotting on magnetic coordinates res@mpOutlineOn = False res@mpFillOn = False res@gsnAddCyclic = False ; turn on magnetic local time axis. In ce plots a mag lt axis is on the ; bottom replacing the longitude axis. res = set_lt_axis_ceplot(ut(t2plt),True,res) plot = gsn_csm_contour_map_ce(wks,x(t2plt,l2plt,:,:), res) end