Re: plot cross-section using wrf_user_intrp3d

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Jun 22 2011 - 09:01:02 MDT

Dear Sha Feng,

I'm forwarding your question to wrfhelp@ucar.edu.

--Mary

On Jun 22, 2011, at 7:29 AM, Sha Feng wrote:

> Hi ncl-talkers,
>
> I tried to plot a vertical cross-section of z-wind component using wrf_user_intrp3d but the it shows constants at given vertical levels.
>
> Part of the codes are presented as follows; the dimensions and sizes of w & z is [bottom_top | 34] x [south_north | 201] x [west_east | 201] .
>
> ;-----------------------------------------------------------------------
> lat1 = 5; north_degrees
> lat2 = 29
> lon1 = 129; east_degrees
> lon2 = 134
>
> f = addfile(FILE, "r")
> w = wrf_user_getvar(f, "wa", 0)
> z = wrf_user_getvar(f, "z", 0)
> lat = wrf_user_getvar(f, "lat", 0)
> lon = wrf_user_getvar(f, "lon", 0)
>
> lat1d = lat(:,0)
> lon1d = lon(0,:)
>
> ilat = ind(lat1d .ge. lat1 .and. lat1d .le. lat2)
> minilat = min(ilat)
> maxilat = max(ilat)
>
> ilon = ind(lon1d .ge. lon1 .and. lon1d .le. lon2)
> minilon = min(ilon)
> maxilon = max(ilon)
>
> print(minilon); 27
> print(maxilon); 200
> print(minilat); 0
> print(maxilat); 200
>
> opts = True
> plane = (/minilat, minilon,maxilat, maxilon/)
> print(plane)
> ; (0) 0
> ; (1) 27
> ; (2) 200
> ; (3) 200
>
> w_plane = wrf_user_intrp3d(w, z, "v", plane, 0., opts)
> printVarSummary(w_plane)
> ; Variable: w_plane
> ; Type: float
> ; Total Size: 105600 bytes
> ; 26400 values
> ; Number of Dimensions: 2
> ; Dimensions and sizes: [Vertical | 100] x [Horizontal | 264]
> ; Coordinates:
> ; Number Of Attributes: 4
> ; _FillValue : 9.96921e+36
> ; units : m s-1
> ; description : z-wind component
> ; Orientation : Cross-Sesion: (0,27) to (0,27)
>
> wks = gsn_open_wks(pltype, pltname)
> plot = wrf_contour(f, wks, w_plane, False)
> ;-----------------------------------------------------------------------
>
> Could anyone help me to fix this plot? Plus, Why the dimensions and sizes of w_plane is [Vertical | 100] x [Horizontal | 264]?
>
> Any help will be appreciated,
>
> Sha
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jun 22 09:01:18 2011

This archive was generated by hypermail 2.1.8 : Thu Jun 23 2011 - 13:23:47 MDT