[ncl-talk] changing the dimension
Dennis Shea
shea at ucar.edu
Fri Jun 17 11:34:56 MDT 2016
The contour plot routines expect (y_axis,x_axis) order
print(RF_fnl&nlev) ; look ... does this have a long_name or units
attribute?
work = RF_fnl(nlev|:,nscan|:,npix|:) ; convenience for illustration
printVarSummary(work) ; [nlev | 80] x [nscan |
9247] x [npix | 49]
np = ?? ; your choice
work2 = work(:,:,np)
printVarSummary(work2) ; [nlev | 80] x [nscan |
9247]
res at tmYLFormat = "f" ; No unnecessary zeroes
res at tiYAxisString = "level (km)" ; if not specified, long_name
will be used
plot = gsn_csm_contour(wks,work2, res)
You will still get index values along the x-axis (longitude axis)
---
You can plot the lat/lon at a specified 'npix' index usinig lat2d/lon2d
See: http://www.ncl.ucar.edu/Applications/narr.shtml
Example 6
It is not for satellite data but the principle is the same.
===
This is *not* a 'pure' zonal plot. Fot that you must interpolate to a user
specified grid.
Use ESMF regridding.
Good luck
On Fri, Jun 17, 2016 at 5:40 AM, Geeta Geeta <geetag54 at yahoo.com> wrote:
> I have swath data and I am extracting the rain rate from it This is 3
> dimensional.
>
> Variable: RF_fnl
> Type: double
> Total Size: 289985920 bytes
> 36248240 values
> Number of Dimensions: 3
> Dimensions and sizes: [nscan | 9247] x [npix | 49] x [nlev | 80]
> Coordinates:
> nlev: [20..0.25]
> Number Of Attributes: 3
> lat2d : <ARRAY of 453103 elements>
> lon2d : <ARRAY of 453103 elements>
> _FillValue : -9999
>
> The 3rd dim has 80 levels that corresponds to data from 20km to 0.25km at
> 250m resolution.
>
> In the vertical cross section (Ht vs Longitude Plot) plot for the region
> of interest (attatched).
> My problem s how do I convert these nlevels from 0-79 as shown in the X
> axis to 0.25 to 20 km.
>
> also how to change 0-120 on the Y axis to the longitude values
>
> -
>
>
> Geeta.
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160617/7440cbba/attachment.html
More information about the ncl-talk
mailing list