[ncl-talk] Reading GPM.DPR.V7 swath data and make Longitude_Vs_Height plot

Dipak Sahu dipakmath at gmail.com
Tue Jun 27 09:24:22 MDT 2017


Dear NCL users
    This email is continuation to my previous email. Here I am attaching
the details of the file structure (dump.2A.GPM.DPR.V7) for your reference.
The raw HDF file
("2A.GPM.DPR.V7-20170308.20140706-S080134-E093406.002002.V05A.HDF5")
is also uploaded at the ftp.cgd.ucar.edu location. Few more details of my
NCL version and computational resources are given below.

$ ncl -V
6.4.0
$ uname -a
Linux wind 3.10.0-327.18.2.el7.x86_64 #1 SMP Thu May 12 11:03:55 UTC 2016
x86_64 x86_64 x86_64 GNU/Linux.

Thanks for your help.
Dipak




On Mon, Jun 26, 2017 at 5:17 PM, Dipak Sahu <dipakmath at gmail.com> wrote:

> Dear NCL users
>         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:
> Latitude[ 7934 <nscan> x 24 <nrayHS> ]
> Longitude[ 7934 <nscan> x 24 <nrayHS> ]
> precipRate[ 7934 <nscan> x 24 <nrayHS> x 88 <nbinHS> ]
>
> 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.
>
> Here is my script Attached below:
>
> ****************************************************************
> begin
> ;----------------------------------------------------------------------
> ; open file:specify desired variable
> ;----------------------------------------------------------------------
>  dir = "../"
>  f = addfile(dir+file_name, "r")
>
> ;----------------------------------------------------------------------
> ; Access variable in group  "/Grid" ; Note group access is via => syntax
> ;----------------------------------------------------------------------
>     var_name = "precipRate"
>     grp      = f=>/HS/SLV
>     p        = grp->$var_name$
>
>   delete(grp)
>
>   printVarSummary(p)
>
>   data = p
>   grp = f=>/HS
>   lat = grp->Latitude
>   lon = grp->Longitude
>   delete(grp)
>    print("read lat/Lon")
>
>   data at long_name = "precp_rate"
>   data at _FillValue = -9999.0
>   data at units = "mm/hr"
>
> ;--- Extract Lat Lon in 1D -----
>    lat1d = ndtooned( lat )
>    lon1d = ndtooned( lon )
>
>   printVarSummary(lat)
>   printVarSummary(lon)
>   printVarSummary(lev)
>   printVarSummary(data)
>
>
>   dimx  = dimsizes(lat)
>   nscan  = dimx(0)
>   nscan  = dimx(0)
>   nray  = dimx(1)
>
>   do nlv = 0, nray-1
> ;----------------------------------------------------------------------
> ; create graphical resources
> ;----------------------------------------------------------------------
>   wtype          = "png"
>   wtype at wkWidth  = 1500     ; Set the pixel size of PNG image.
>   wtype at wkHeight = 1500
>   wks = gsn_open_wks(wtype, "gpmDPR-prcprate-LonHgt-"+nlv)
>
>   gsn_define_colormap(wks,"perc2_9lev") ; select color map
>
>   res=True
>   res at gsnMaximize             = True   ;make plot large
>   res at gsnPaperOrientation     = "portrait"    ;force portrait orientation
>   res at gsnSpreadColors         = True    ; use the entire color spectrum
>   res at cnFillOn                = True   ;enable contour fill
>   res at cnLinesOn               = False   ;turn off contour line
>   res at cnLineLabelsOn          = False    ;turn off contour line labels
>   res at cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
>   res at cnMinLevelValF   =  1 ;0.0               ; set min contour level
>   res at cnMaxLevelValF   =  30               ; set max contour level
>   res at cnLevelSpacingF  =  2              ; set contour spacing
>
>   res at lbLabelAutoStride       = True
>   res at lbOrientation           = "vertical" ;vertical labels
>
>   res at tiMainString    = file_name
>   res at tiXAxisString   = "nscan"
>   res at tiYAxisString   = "nbin"
>   res at gsnLeftStringFontHeightF  = 12 ; make font smaller
>   res at gsnRightStringFontHeightF = 12 ; make font smaller
>
>   res at trYReverse  = True    ; Flip the level axis
>
>   plot = gsn_csm_contour(wks,data(nbinHS|:, nrayHS|nlv, nscan|:),res)
>
>   end do
>
>   delete(plot)
>   delete(data)
>   delete(res)
>
> end
>
> Thanks
> Dipak
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170627/d7c79e08/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dump.2A.GPM.DPR.V7
Type: application/octet-stream
Size: 211494 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170627/d7c79e08/attachment-0001.obj 


More information about the ncl-talk mailing list