;************************************************ ; pop2lat_1.ncl ;************************************************ ; ; These files are loaded by default in NCL V6.2.0 and newer ; 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" ; ; This file still needs to be loaded manually load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/popRemap.ncl" ;************************************************ begin in = addfile("iceh_mavg.0014-02.nc","r") ice = in->hi ;************************************************ ; convert pop to a 1x1 degree grid ;************************************************ remap = PopLatLon(ice,"gx1v3","1x1d","bilin","da","010808") ;************************************************ ; create plots ;************************************************ wks = gsn_open_wks("png","pop2lat") ; send graphics to PNG file cmap = read_colormap_file("WhBlGrYeRe") ; read colormap data res = True res@gsnPolar = "NH" ; choose hemisphere res@cnFillOn = True ; turn on color res@cnFillPalette = cmap(0:95,:) ; set color map res@cnLinesOn = False ; no contour lines res@mpLandFillColor = "grey" ; color of land res@mpMinLatF = 50 ; adjust map limit res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels res@cnMinLevelValF = 0. ; set min contour level res@cnMaxLevelValF = 5. ; set max contour level res@cnLevelSpacingF = 0.5 ; set contour spacing res@tiMainString = "gx1v3 to 1x1d" ; because this is ice data, which has a gap in the tropics, we need to ; explicitly pass the range of the data to plot. Since we are coloring ; the vectors, this range should also match the MinLatF above, since the ; range for the colors is chosen over the full data passed, and not the ; map limits. plot = gsn_csm_contour_map_polar(wks,remap(0,{50:90},:),res) end