;*********************************************** ; plot_supercell_2.5km_wvel_xsec.ncl ; ; Version 1.0 ;*********************************************** 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" begin ;**************************************************************************** ; DO NOT EDIT ABOVE THIS LINE ;**************************************************************************** ; Read in data and store as follows: ; ; Output: ; w_2500m(lon, lat) ; 2D vertical velocity field at 2.5km altitude at 7200s (units m/s) ; ; Dimensions: ; lon: arbitrary ; lat: arbitrary ;---------------------------------------------------------------------------- ; wks = gsn_open_wks("pdf","neptune_supercell_2.5km_wvel_500m_res") filename_string = "neptune_supercell_2.5km_wvel_4km_res" wks = gsn_open_wks("png",filename_string) data_file = "/glade/scratch/menchaca/run_NEPTUNE/runFILES/SC3/4deg/neptune.163.r400.L40.latlon.nonhydro.SC3.nc" ; data_file = "/glade/scratch/menchaca/run_NEPTUNE/runFILES/SC3/2deg/neptune.163.r200.L40.latlon.nonhydro.SC3.nc" ; data_file = "/glade/scratch/menchaca/run_NEPTUNE/runFILES/SC3/1deg/neptune.163.r100.L40.latlon.nonhydro.SC3.nc" ; data_file = "/glade/scratch/menchaca/run_NEPTUNE/runFILES/SC3/05deg/neptune.163.r50.L40.latlon.nonhydro.SC3.nc" data = addfile(data_file,"r") ;**************************************************************************** ; DO NOT EDIT BELOW THIS LINE ;**************************************************************************** ;------------------------------------------------ ; Workspace ;------------------------------------------------ gsn_merge_colormaps(wks,"temp_diff_18lev","sunshine_9lev") ;------------------------------------------------ ; Plot resources [options] ;------------------------------------------------ plot = new(1,graphic) ; Resources: res = True res@gsnDraw = False res@gsnFrame = False res@vpKeepAspect = True res@vpWidthF = 0.5 res@vpHeightF = 0.6 res@gsnMaximize = True res@gsnPaperOrientation = "portrait" res@cnFillOn = True res@cnLinesOn = True res@cnLineLabelsOn = False res@lbLabelAutoStride = True res@cnInfoLabelOn = False res@trXMinF = -45.0 res@trXMaxF = 30.0 res@trYMinF = -45.0 res@trYMaxF = 45.0 res@tmXBLabelsOn = True res@tmXBOn = True res@tmXBMode = "Explicit" res@tmXBValues = (/-45,-30,-15,0,15,30/) res@tmXBLabels = (/"45W","30W","15W","0","15E","30E"/) res@tmXBMinorOn = True res@tmXBMinorValues = (/-40,-35,-25,-20,-10,-5,5,10,20,25/) res@tmXTLabelsOn = True res@tmXTOn = True res@tmYLLabelsOn = True res@tmYLOn = True res@tmYLMode = "Explicit" res@tmYLValues = (/-45,-30,-15,0,15,30,45/) res@tmYLLabels = (/"45S","30S","15S","0","15N","30N","45N"/) res@tmYLMinorOn = True res@tmYLMinorValues = (/-40,-35,-25,-20,-10,-5,5,10,20,25,35,40/) res@gsnSpreadColors = True res@gsnContourZeroLineThicknessF = 0.0 res@gsnContourNegLineDashPattern = 1 res@gsnSpreadColorStart = 7 res@gsnSpreadColorEnd = 19 res@cnLevelSelectionMode = "ManualLevels" res@cnLevelSpacingF = 1.0 res@cnMinLevelValF = -10.0 res@cnMaxLevelValF = 20.0 do i = 0,24 curr_time = i*5 res@gsnLeftString = "Time is " + curr_time + " mins" w_2500m = data->W2500m(i,:,:) plot(0) = gsn_csm_contour(wks, w_2500m(:,:), res) ;------------------------------------------------ ; Panel plot ;------------------------------------------------ pres = True pres@gsnPanelBottom = 0.1 pres@gsnPanelTop = 0.9 pres@gsnPanelYWhiteSpacePercent = 5 pres@gsnPanelXWhiteSpacePercent = 5 gsn_panel(wks, plot, (/1,1/), pres) ; frame(wks) end do cmd = "convert -delay 25 "+ filename_string+"*.png "+filename_string+".gif" system(cmd) cmd = "rm "+filename_string+"*.png" system(cmd) end