;======================================================================= ; name: ; NHpolar_tas_mon.ncl ; ; category: ; NCL script ; ; description: ; This script plots monthly scalar data on the polar sterographic ; projection. ; ; author: ; m.yoshimori ;======================================================================= begin ; specify file names pathin = "../monthly/" fin = "t2m_y1959-y2021.nc" ; input file name (netCDF) fout = "NHpolar_tas_mon" ; output file name (png/eps) ; open file in = addfile(pathin+fin,"r") ; read data tmp = in->var167 ; check the reading printVarSummary(tmp) ; change unit from (K) to (degC) tmp = tmp - 273.15 ; extract data for 1979-1993 & 2007-2021 m0 = (1979-1959)*12 m1 = m0 + 12*15 - 1 m2 = (2007-1959)*12 m3 = m2 + 12*15 - 1 tmpmon0 = clmMonTLL(tmp(m0:m1,:,:)) ; 1979-1993 tmpmon1 = clmMonTLL(tmp(m2:m3,:,:)) ; 2007-2021 ; difference tmpmon0 = tmpmon1 - tmpmon0 ;----- ; plot ;----- wks = gsn_open_wks("png",fout) ; open a file ; color table ; gsn_define_colormap(wks,"temp_19lev") ; choose a color map gsn_define_colormap(wks,"temp_diff_18lev") ; choose a color map ; create a plot array plot = new(12,graphic) ;-------------- ; plot map only ;-------------- mpres = True mpres@gsnDraw = False mpres@gsnFrame = False mpres@mpFillOn = False mpres@gsnPolar = "NH" mpres@mpMinLatF = 60. mpres@mpMaxLatF = 90. mpres@tiMainString = "" mpres@gsnLeftString = "" mpres@gsnCenterString = "" mpres@gsnRightString = "" ; fontsize of the main title mpres@tiMainFontHeightF = 0.04 mpres@tiMainOffsetYF = -0.001 ; fontsize of the subtitles mpres@txFontHeightF = 0.028 ; fontsize of tickmark labels mpres@tmXBLabelFontHeightF = 0.018 mpres@tmYLLabelFontHeightF = 0.018 ;--------------- ; draw each plot ;--------------- ; basic settings res = True ; plot mods desire res@gsnDraw = False ; draw plot res@gsnFrame = False ; advance frome res@cnFillOn = True ; turn on color fill res@cnLinesOn = False ; turn off contour lines res@cnInfoLabelOn = False ; turn off info label res@cnLineLabelsOn = False ; turn off contour labels ; color bar res@lbLabelBarOn = False ; turn off contour labels ; contour levels ; res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels ; res@cnMinLevelValF = -5 ; set min contour level ; res@cnMaxLevelValF = 5 ; set max contour level ; res@cnLevelSpacingF = 1 ; set contour spacing res@cnLevelSelectionMode = "ExplicitLevels" ; set explicit contour levels res@cnLevels = (/-5, -4, -3, -2, -1, 1, 2, 3, 4, 5/) ; title res@tiMainString = "" res@gsnLeftString = "" res@gsnCenterString = "" res@gsnRightString = "" ; change these depending on color or B&W plot res@gsnSpreadColors = True ; spread out color table ; res@gsnContourZeroLineThicknessF = 0 mpres@tiMainString = "(a) Jan." plot(0) = gsn_csm_map_polar(wks,mpres) map0 = gsn_csm_contour(wks,gsn_add_cyclic_point(tmpmon0(0,:,:)),res) overlay(plot(0),map0) mpres@tiMainString = "(b) Feb." plot(1) = gsn_csm_map_polar(wks,mpres) map1 = gsn_csm_contour(wks,gsn_add_cyclic_point(tmpmon0(1,:,:)),res) overlay(plot(1),map1) mpres@tiMainString = "(c) Mar." plot(2) = gsn_csm_map_polar(wks,mpres) map2 = gsn_csm_contour(wks,gsn_add_cyclic_point(tmpmon0(2,:,:)),res) overlay(plot(2),map2) mpres@tiMainString = "(d) Apr." plot(3) = gsn_csm_map_polar(wks,mpres) map3 = gsn_csm_contour(wks,gsn_add_cyclic_point(tmpmon0(3,:,:)),res) overlay(plot(3),map3) mpres@tiMainString = "(e) May" plot(4) = gsn_csm_map_polar(wks,mpres) map4 = gsn_csm_contour(wks,gsn_add_cyclic_point(tmpmon0(4,:,:)),res) overlay(plot(4),map4) mpres@tiMainString = "(f) Jun." plot(5) = gsn_csm_map_polar(wks,mpres) map5 = gsn_csm_contour(wks,gsn_add_cyclic_point(tmpmon0(5,:,:)),res) overlay(plot(5),map5) mpres@tiMainString = "(g) Jul." plot(6) = gsn_csm_map_polar(wks,mpres) map6 = gsn_csm_contour(wks,gsn_add_cyclic_point(tmpmon0(6,:,:)),res) overlay(plot(6),map6) mpres@tiMainString = "(h) Aug." plot(7) = gsn_csm_map_polar(wks,mpres) map7 = gsn_csm_contour(wks,gsn_add_cyclic_point(tmpmon0(7,:,:)),res) overlay(plot(7),map7) mpres@tiMainString = "(i) Sep." plot(8) = gsn_csm_map_polar(wks,mpres) map8 = gsn_csm_contour(wks,gsn_add_cyclic_point(tmpmon0(8,:,:)),res) overlay(plot(8),map8) mpres@tiMainString = "(j) Oct." plot(9) = gsn_csm_map_polar(wks,mpres) map9 = gsn_csm_contour(wks,gsn_add_cyclic_point(tmpmon0(9,:,:)),res) overlay(plot(9),map9) mpres@tiMainString = "(k) Nov." plot(10) = gsn_csm_map_polar(wks,mpres) map10 = gsn_csm_contour(wks,gsn_add_cyclic_point(tmpmon0(10,:,:)),res) overlay(plot(10),map10) mpres@tiMainString = "(l) Dec." plot(11) = gsn_csm_map_polar(wks,mpres) map11 = gsn_csm_contour(wks,gsn_add_cyclic_point(tmpmon0(11,:,:)),res) overlay(plot(11),map11) ;------ ; panel ;------ resP = True resP@gsnFrame = False ; don't advance panel plot resP@gsnPanelLabelBar = True ; add common colorbar resP@lbBoxEndCapStyle = "TriangleBothEnds" ; triangle edges resP@pmLabelBarWidthF = 0.8 ; label bar width resP@pmLabelBarOrthogonalPosF = -0.02 ; shift up-down resP@lbLabelStride = 1 ; label interval ; title resP@txFontHeightF = 0.02 resP@txString = "Surface air temperature change" ; title ; color bar title resP@lbTitleOn = True resP@lbTitleString = "(K)" resP@lbTitleFontHeightF = 0.016 resP@lbTitlePosition = "Right" resP@lbTitleDirection = "Across" gsn_panel(wks,plot,(/3,4/),resP) ; now draw as one plot frame(wks) end