<div dir="ltr"><div><div><div><div><div><div>Dear NCL users<br></div> Here I was just tried to plot the Longitude_Vs_Height figure for precipitation rate from the GPM DPR radar data sets "2A.GPM.DPR.V7-20170308.20140706-S080134-E093406.002002.V05A.HDF5". This is a HDF5 data format, and here the variables formats are like below:<br></div>Latitude[ 7934 <nscan> x 24 <nrayHS> ]<br></div>Longitude[ 7934 <nscan> x 24 <nrayHS> ]<br>precipRate[ 7934 <nscan> x 24 <nrayHS> x 88 <nbinHS> ]<br><br></div>I just success to plot the nscan_Vs_nbinHS for "precipRate". But, I am wondering how to plot a Longitude_Vs_Height plot at any point within the satellite swath? Your help is appreciated.<br><br></div>Here is my script Attached below:<br><br>****************************************************************<br></div>begin<br><div>;----------------------------------------------------------------------<br>; open file:specify desired variable<br>;----------------------------------------------------------------------<br> dir = "../"<br> f = addfile(dir+file_name, "r")<br> <br>;----------------------------------------------------------------------<br>; Access variable in group "/Grid" ; Note group access is via => syntax<br>;----------------------------------------------------------------------<br> var_name = "precipRate"<br> grp = f=>/HS/SLV<br> p = grp->$var_name$<br> <br> delete(grp)<br> <br> printVarSummary(p)<br> <br> data = p<br> grp = f=>/HS<br> lat = grp->Latitude<br> lon = grp->Longitude<br> delete(grp)<br> print("read lat/Lon")<br> <br> data@long_name = "precp_rate"<br> data@_FillValue = -9999.0<br> data@units = "mm/hr"<br> <br>;--- Extract Lat Lon in 1D -----<br> lat1d = ndtooned( lat )<br> lon1d = ndtooned( lon )<br> <br> printVarSummary(lat)<br> printVarSummary(lon)<br> printVarSummary(lev)<br> printVarSummary(data)<br> <br> <br> dimx = dimsizes(lat)<br> nscan = dimx(0)<br> nscan = dimx(0)<br> nray = dimx(1)<br> <br> do nlv = 0, nray-1<br>;----------------------------------------------------------------------<br>; create graphical resources<br>;----------------------------------------------------------------------<br> wtype = "png"<br> wtype@wkWidth = 1500 ; Set the pixel size of PNG image.<br> wtype@wkHeight = 1500<br> wks = gsn_open_wks(wtype, "gpmDPR-prcprate-LonHgt-"+nlv)<br> <br> gsn_define_colormap(wks,"perc2_9lev") ; select color map<br> <br> res=True<br> res@gsnMaximize = True ;make plot large<br> res@gsnPaperOrientation = "portrait" ;force portrait orientation<br> res@gsnSpreadColors = True ; use the entire color spectrum<br> res@cnFillOn = True ;enable contour fill<br> res@cnLinesOn = False ;turn off contour line<br> res@cnLineLabelsOn = False ;turn off contour line labels<br> res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels<br> res@cnMinLevelValF = 1 ;0.0 ; set min contour level<br> res@cnMaxLevelValF = 30 ; set max contour level<br> res@cnLevelSpacingF = 2 ; set contour spacing<br> <br> res@lbLabelAutoStride = True<br> res@lbOrientation = "vertical" ;vertical labels<br> <br> res@tiMainString = file_name<br> res@tiXAxisString = "nscan"<br> res@tiYAxisString = "nbin"<br> res@gsnLeftStringFontHeightF = 12 ; make font smaller<br> res@gsnRightStringFontHeightF = 12 ; make font smaller<br> <br> res@trYReverse = True ; Flip the level axis<br> <br> plot = gsn_csm_contour(wks,data(nbinHS|:, nrayHS|nlv, nscan|:),res)<br> <br> end do<br> <br> delete(plot)<br> delete(data)<br> delete(res)<br> <br>end<br><div><div><br clear="all"><div><div><div><div><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div>Thanks<br></div><div>Dipak<br></div></div></div></div></div></div></div></div></div>
</div></div></div></div></div></div></div></div>