Re: How to Extract and plot wind vectors in a box

From: Ragi A.R <ar.ragi_at_nyahnyahspammersnyahnyah>
Date: Mon Apr 09 2012 - 10:29:04 MDT

Sir,

It worked well. Thanks a lot for that.

I had a few questions left.

1). I asked it in first mail itself, I want to know is it possible to plot
the* (u,v) *vector for the domain *8N; 76E-77E* and *18N; 73E-74E* ( (Now
the plot is in the domain *8 -18N; 73E-77E *but* *i want the plot (u,v) in
the domain which I showed in the attached *doc1.pdf*...which a tilted
domain or can say not a rectangular domain....ie when it is *8N* the
longitude varies from *76E-77E* and at* **18N *the longitude varies
from* 73E-74E
*I want the vector plot inside the domain including the four corners). Is
there any direct way for that other than masking?

2). Is it possible to save this *u and v* values after staggering in bin
format *(u.csv and v.csv* so that i can open it in Fortran)

*-- *
***Regards,*
*A.R.Ragi*
 *Research Scholar
*
*Centre for Atmospheric Sciences
IIT Delhi, Hauz Khas
New Delhi, India.
*
**

On Mon, Apr 9, 2012 at 20:36, Dennis Shea <shea@ucar.edu> wrote:

> [1] Sending a 18MB attachment is not allowed. That clogs up all people
> who subscribe to ncl-talk. If your site does not allow ftp, please
> find a suitable replacement on your end. eg via the WWW
>
> Fortunately for you , the administrator made and exception
> this time.
>
> [2] The reason why the plot "the vectors are not as expected" is that
> you did not tell the graphics routines the geographic coordinates
> of the data to be plotted.
>
> Attached is a slightly modified script.
>
>
>
> On 4/8/12 11:58 PM, Ragi A.R wrote:
>
>> Sir,
>> ftp has been blocked here for security purpose. The file size is 18.7MB
>> so am attaching it here. The met_em file is WRF input file after
>> Pre-processing (after WPS run).
>>
>> The NCL Version am using is:6.0.0
>> The type of system: x86_64 GNU/Linux
>> /-- /
>> ///Regards,/
>> /A.R.Ragi/
>> /Research Scholar
>> /
>> /Centre for Atmospheric Sciences
>> IIT Delhi, Hauz Khas
>> New Delhi, India.
>> /
>> //
>>
>>
>>
>>
>> On Sun, Apr 8, 2012 at 20:29, Dennis Shea <shea@ucar.edu
>> <mailto:shea@ucar.edu>> wrote:
>>
>> Before proceeding: you did not answer the question that was asked.
>>
>> Is the file you are reading generated by the WRF model?
>>
>> If so, Please ftp the file to
>>
>> ftp ftp.cgd.ucar.edu <http://ftp.cgd.ucar.edu>
>>
>> anonymous
>> <use your email address for the password>
>> cd incoming
>> put met_em.d01.2009-04-01_00:00:**00__.nc <http://00.nc>
>>
>> quit
>>
>> Send email to ncl-talk (you must subscribe first) with the following
>> information:
>>
>> Send an email after you have successfully completed the transfer.
>>
>> The version of NCL you are running (ncl -V).
>> The type of system you are on (uname -a).
>>
>>
>> On 4/8/12 1:22 AM, Ragi A.R wrote:
>>
>> Sir,
>>
>> I tried removing that line but still am getting the same plot /.
>>
>>
>> -- /
>> ///Regards,/
>> /A.R.Ragi/
>> /Research Scholar
>> /
>> /Centre for Atmospheric Sciences
>> IIT Delhi, Hauz Khas
>> New Delhi, India.
>> /
>> //
>>
>>
>>
>>
>> On Sat, Apr 7, 2012 at 19:11, Dennis Shea <shea@ucar.edu
>> <mailto:shea@ucar.edu>
>> <mailto:shea@ucar.edu <mailto:shea@ucar.edu>>> wrote:
>>
>> You have used a graphical option (resource)
>>
>>
>> res@vcMinDistanceF = 0.025 ; thin out vectors
>>
>> that does exactly what the the comment states ...
>> it 'thins' the vectors.
>>
>> Comment or eliminate that line
>>
>> ;res@vcMinDistanceF = 0.025
>>
>>
>> On 4/7/12 2:01 AM, Ragi A.R wrote:
>>
>>
>>
>>
>>
>> Dear NCL users,
>>
>> I have a*.nc* file (*met_em_files* after WPS) which have U
>> (wind) and V
>>
>> (Wind) values for the domain 7N-20N; 70E-80E and which is
>> staggered. I
>> want to extract and unstagger them (only u and v) and
>> then plot
>> (u,v)
>> vector for the domain */8N; 76E-77E/* and *18N; 73E-74E*
>> (domain
>> attached /doc1.pdf/).
>>
>>
>> The below is my approach (I modified the domain from
>> 73E-77E and
>> 78N-18N).
>>
>> But the issues are:
>> 1). The vectors are not as expected. I have values at
>> all grid
>> points
>> but only few vectors r there.
>> 2). Not able to generate the box I wanted (as
>> highlighted in
>> doc1.pdf).
>> 3). I wanted to plot the (u,v) vector at the four
>> corners of the
>> box.
>>
>> Can anyone suggest a solution to this?
>>
>>
>> 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/wrf/WRFUserARW.ncl"
>> load
>> "$NCARG_ROOT/lib/ncarg/____**nclscripts/wrf/WRF_____**
>> contributed.ncl"
>>
>> begin
>>
>> a =
>> addfile("met_em.d01.2009-04-__**__01_00:00:00.nc <http://00.nc>
>>
>> <http://00.nc> <http://00.nc>","r")
>>
>>
>>
>>
>> uu = wrf_user_getvar(a, "UU", 0)
>> ua = uu(1,:,:)
>> u = wrf_user_unstagger(ua,ua@____**stagger)
>>
>>
>>
>> vv = wrf_user_getvar(a, "VV", 0)
>> va = vv(1,:,:)
>> v = wrf_user_unstagger(va,va@____**stagger)
>>
>>
>>
>>
>> wks = gsn_open_wks("ps", "uv_plot") ; open ps file
>> gsn_define_colormap(wks,"gui__**___default") ;
>>
>> choose
>>
>> colormap
>>
>> res = True ;
>> plot mods
>> desired
>> res@gsnMaximize = True ;
>> maximize
>> size
>> res@gsnSpreadColors = True ;
>> use full
>> colormap
>> res@gsnSpreadColorEnd = -2
>> res@lbOrientation = "vertical" ;
>> vertical
>> label bar
>> res@mpFillOn = True ; no
>> map fill
>> res@vcRefMagnitudeF = 5 ; make
>> vectors
>> larger
>> res@vcRefLengthF = 0.025 ;
>> ref vec
>> length
>> res@vcMinDistanceF = 0.025 ;
>> thin out
>> vectors
>> res@vcGlyphStyle = "CurlyVector" ;
>> choose
>> wind barbs
>> res@vcLabelsOn = True
>> res@vcMonoLineArrowColor = False ;
>> color
>> barbs by scalar
>>
>> minlat = 8
>> maxlat = 18
>> minlon = 73
>> maxlon = 77
>>
>> res@mpMinLatF = minlat
>> res@mpMaxLatF = maxlat
>> res@mpMinLonF = minlon
>> res@mpMaxLonF = maxlon
>> res@mpOutlineBoundarySets = "National"
>> res@pmTickMarkDisplayMode = "Always"
>> res@mpFillOn = False ; turn
>> off map fill
>> res@mpOutlineDrawOrder = "PostDraw"
>>
>> plot=gsn_csm_vector_map_ce(___**_wks,u,v,res)
>>
>>
>>
>>
>> end
>>
>>
>> /-- /
>> ///Regards,/
>> /A.R.Ragi/
>> /Research Scholar
>> /
>> /Centre for Atmospheric Sciences
>>
>> IIT Delhi, Hauz Khas
>> New Delhi, India.
>> /
>> //
>>
>>
>>
>>
>>
>> ______________________________**_____________________
>>
>>
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/____**mailman/listinfo/ncl-talk<http://mailman.ucar.edu/____mailman/listinfo/ncl-talk>
>> <http://mailman.ucar.edu/__**mailman/listinfo/ncl-talk<http://mailman.ucar.edu/__mailman/listinfo/ncl-talk>
>> >
>> <http://mailman.ucar.edu/__**mailman/listinfo/ncl-talk<http://mailman.ucar.edu/__mailman/listinfo/ncl-talk>
>> <http://mailman.ucar.edu/**mailman/listinfo/ncl-talk<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 Mon Apr 9 10:29:39 2012

This archive was generated by hypermail 2.1.8 : Mon Apr 09 2012 - 13:43:03 MDT