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" begin filename = "PSY3V3R1_1dAV_20110530_20110531_icemod_R20110608.nc" f = addfile (filename, "r") icethk = short2flt(f->iicethic) ; ( time_counter, y, x ) ; (1,1021,1442) lat2d = f->nav_lat ; (y,x) lon2d = f->nav_lon ;---Set all values equal to 0.0 to missing, for a different plot. icethk = where(icethk.eq.0,icethk@_FillValue,icethk) ;---Start the graphics wks = gsn_open_wks("png","ORCA025_icemod_3_panel") gsn_define_colormap(wks,"BlAqGrYeOrReVi200") ; change colormap ;---Set some resources res = True res@gsnMaximize = True ; Maximize size of plot res@gsnDraw = False ; Don't draw plot or advance frame; res@gsnFrame = False ; will do this in panel later. ;---This will position data correctly on map. res@sfYArray = lat2d res@sfXArray = lon2d res@cnFillOn = True res@cnLinesOn = False res@cnLevelSpacingF = 0.2 ; NCL is picking 0.4 res@lbLabelBarOn = False ; Will draw in panel. res@gsnAddCyclic = False ; Don't add longitude cyclic point res@mpDataSetName = "Earth..4" ; Database that contains the res@mpDataBaseVersion = "MediumRes" ; ice shelves. nt = 0 ; time index ;---Northern Hemisphere plot res@gsnPolar = "NH" ; The default res@mpMinLatF = 50 ; Specify minimum latitude plot_nh = gsn_csm_contour_map_polar(wks,icethk(nt,:,:),res) delete(res@mpMinLatF) ;---Southern Hemisphere plot res@gsnPolar = "SH" res@mpMaxLatF = -55 ; Specify maximum latitude plot_sh = gsn_csm_contour_map_polar(wks,icethk(nt,:,:),res) ;---Panel both plots on same page. pres = True pres@txString = filename pres@gsnMaximize = True pres@gsnPanelLabelBar = True ; Add a common labelbar pres@pmLabelBarWidthF = 0.8 ; Increase labelbar width gsn_panel(wks,(/plot_nh,plot_sh/),(/1,2/),pres) end