;; -*- mode: emacs-lisp; coding: emacs-mule; -*-; -*- mode: ncl;-*- ;*************************************************************************** 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" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl" ;********************************************************* ana=addfile("geoschem_co2_mjo.fltd.15-91.winter.nc","r") mjo=ana->mjo monthly_avg=ana->monthly_average alt=ana->altitude lat=ana->latitude lon=ana->longitude pressure=ana->pressure count=ana->count phase=ana->phase month=ana->month delete(ana) lat1= fspan(-90,90,91) lon1= fspan(-180,177.5,144) lat1@units = "degrees_north" lon1@units = "degrees_east" lat_trop=lat(25:65) ;mjo_trop=mjo(:,25:65,:,:)*1000000 mjo_trop=mjo*1000000 mjo_trop!1 = "lat" mjo_trop!2 = "lon" lat@longname = "latitude" lat@units = "degrees_north" lon@longname ="longitude" lon@units = "degrees_east" mjo_trop&lat = lat1 mjo_trop&lon = lon1 ;do i=0,46 i=0 ;************************************************ ; create plot ;************************************************ wks = gsn_open_wks("eps","CO2_level_NH"+sprinti("%0.1i",i)) gsn_define_colormap(wks,"BlWhRe") plot = new(8,graphic) res = True ; plot mods desired ; res@tiMainString = "Northern Hemisphere" ; plot title res@gsnCenterString = "CO2(ppmv)" ; center title ; res@cnFillPalette = colors res@cnFillOn = True ; turns on the color res@mpFillOn = False ; turns off continent gray res@cnLinesOn = False ; turn off contour lines res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels res@cnMinLevelValF = -0.7 ; set min contour level res@cnMaxLevelValF = 0.7 ; set max contour level res@cnLevelSpacingF = 0.1 ; interval res@gsnPolar = "NH" ; specify the hemisphere res@mpMinLatF = 0 ; specify min lat ; note: since ice data is stored on a reduced grid with a data gap in ; latitude from -35 to +35 degrees, it is necessary to provide gsun ; with a sub-set of the data. Otherwise, an error will occur and the ; plot will not be correct. res@lbTitleString = " CO2(ppmv)" ; title string res@lbTitlePosition = "Right" ; title position res@lbTitleFontHeightF= .025 ; make title smaller res@lbTitleDirection = "Across" ; title direction res@gsnStringFontHeightF = 0.025 ; plot = gsn_csm_contour_map_polar(wks,mjo_trop(0,:,:,0),res) res@gsnLeftString = "Phase 1" ; change left string plot(0) = gsn_csm_contour_map_polar(wks,mjo_trop(i,:,:,0),res) res@gsnLeftString = "Phase 5" ; change left string plot(1) = gsn_csm_contour_map_polar(wks,mjo_trop(i,:,:,4),res) res@gsnLeftString = "Phase 2" ; change left string plot(2) = gsn_csm_contour_map_polar(wks,mjo_trop(i,:,:,1),res) res@gsnLeftString = "Phase 6" ; change left string plot(3) = gsn_csm_contour_map_polar(wks,mjo_trop(i,:,:,5),res) res@gsnLeftString = "Phase 3" ; change left string plot(4) = gsn_csm_contour_map_polar(wks,mjo_trop(i,:,:,2),res) res@gsnLeftString = "Phase 7" ; change left string plot(5) = gsn_csm_contour_map_polar(wks,mjo_trop(i,:,:,6),res) res@gsnLeftString = "Phase 4" ; change left string plot(6) = gsn_csm_contour_map_polar(wks,mjo_trop(i,:,:,3),res) res@gsnLeftString = "Phase 8" ; change left string plot(7) = gsn_csm_contour_map_polar(wks,mjo_trop(i,:,:,7),res) ;wks = gsn_open_wks("png","polar") ; send graphics to PNG file ; res = True ; plot mods desired ; res@gsnPolar = "NH" ; specify the hemisphere ; plot = gsn_csm_contour_map_polar(wks,mjo_trop(0,:,:,0),res) ; create the plot ;************************************************ ; create panel ;************************************************ resP = True ; modify the panel plot resP@gsnPanelLabelBar = False ; add common colorbar resP@gsnPanelFigureStrings = (/"a)","b)","c)","d)","e)","f)","g)","h)"/) ; add strings to panel gsn_panel(wks,plot,(/4,2/),resP) delete(wks) ;end do