Re: plotting wind between two values

From: ahmed lasheen <ahmed4kernel_at_nyahnyahspammersnyahnyah>
Date: Sun Apr 22 2012 - 03:10:48 MDT

Yes,this is what I am looking for exactly .

thank you very much .

On Sun, Apr 22, 2012 at 9:29 AM, Andrea N. Hahmann <ahah@dtu.dk> wrote:

> Dear Ahmed
>
> How about masking the data before you plot it?
> Something like
>
> u = a->U(1,:,:)
> v = a->V(1,:,:)
> wspd = sqrt(u*u+v*v)
> u=mask(u,wspd.gt.5.,True)
> v=mask(v,wspd.gt.5.,True)
>
> All winds above 5 m/s will be masked and thus not visible on your plot.
>
> Maybe this is what you were after?
> Regards, Andrea
>
> Andrea N. Hahmann Senior Scientist DTU Wind Energy
>
> Technical University of Denmark
> Department of Wind Energy Risų Campus Frederiksborgvej 399 Building 118 4000
> Roskilde Direct +45 46775471 Mobile +45 2133 0550 ahah@risoe.dtu.dk
> www.dtu.dk
>
> As of January 1, 2012, the Wind Energy Division, Risų National Laboratory
> for Sustainable Energy is now DTU Wind Energy/Department of Wind Energy.
> Our address remains the same: DTU Risų Campus, Frederiksborgvej 399, 4000
> Roskilde, Denmark.Learn more about DTU Wind Energy on
> www.vindenergi.dtu.dk.
>
>
>
>
>
> From: ahmed lasheen <ahmed4kernel@gmail.com>
> Date: Sat, 21 Apr 2012 00:39:26 +0200
> To: Mary Haley <haley@ucar.edu>
> Cc: ncl forum <ncl-talk@ucar.edu>
> Subject: Re: plotting wind between two values
>
> I have attached the script (it is taken form example vector_3.ncl)
> and I have also attached the data file (and It is also on the NCL website).
> thanks in advance
>
> On Sat, Apr 21, 2012 at 12:20 AM, Mary Haley <haley@ucar.edu> wrote:
>
>> I will have to defer you to Dave Brown then. With the weekend coming up,
>> we may not get an answer to you before Monday.
>>
>> It will help if you can provide a script and some data for Dave. See our
>> ftp information at:
>>
>> http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP
>>
>> --Mary
>>
>>
>> On Apr 20, 2012, at 11:56 AM, ahmed lasheen wrote:
>>
>> > thnaks for your reply
>> > I try it ,but it didnot work ,still all vectors of all magnitudes are
>> rendered
>> >
>> > On Fri, Apr 20, 2012 at 7:34 PM, Mary Haley <haley@ucar.edu> wrote:
>> > These vector levels do not represent absolute begin and end values of
>> the vectors you want to see. They simply represent what vector levels to
>> span through the full range of your data.
>> >
>> > Maybe what you need to set are vcMinMagnitudeF and vcMaxMagnitudeF.
>> >
>> > --Mary
>> >
>> >
>> > On Apr 20, 2012, at 3:26 AM, ahmed lasheen wrote:
>> >
>> > > Hello
>> > > My question is that i am trying to plot the wind values just between
>> two values(e.g between 0 and 5 m/s)
>> > > so that I used
>> > > vcres@vcMinLevelValF = 0 ; m/s
>> > > vcres@vcMaxLevelValF =5; m/s
>> > > But it didn't work(all wind of all values are plotted not only the
>> wind between these two values)
>> > > I expect to see wind plotted only in some region which satisfy this
>> criteria.
>> > >
>> > > thanks in advance
>> > >
>> > > On Fri, Apr 20, 2012 at 12:03 AM, Mary Haley <haley@ucar.edu> wrote:
>> > > You need to be more specifc about what doesn't work. Do you mean the
>> plot is incorrect? Are you getting an error when you run the script?
>> > >
>> > > You could try adding a spacing, just in case:
>> > >
>> > > vcres@vcLevelSpacingF = 1
>> > >
>> > >
>> > > On Apr 18, 2012, at 10:12 AM, ahmed lasheen wrote:
>> > >
>> > > > Hello
>> > > > I am trying to plot wind between two values using the resources
>> > > > vcres@vcLevelSelectionMode ="ManualLevels"
>> > > > vcres@vcMinLevelValF = 0
>> > > > vcres@vcMaxLevelValF =5
>> > > > but it doesnot work
>> > > > any suggestion?
>> > > > the script , I download it from the NCL website and i just add the
>> previous three line to it .
>> > > >
>> ----------------------------------------------------------------------
>> > > > ; vector_3.ncl
>> > > > ;
>> > > > ; Concepts illustrated:
>> > > > ; - Drawing a black-and-white vector plot over a cylindrical
>> equidistant map
>> > > > ; - Adding a time stamp to a plot
>> > > > ; - Thinning vectors using a minimum distance resource
>> > > > ; - Moving the vector reference annotation to the top right of
>> the plot
>> > > >
>> ;----------------------------------------------------------------------
>> > > > 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/csm/shea_util.ncl"
>> > > > ;************************************************
>> > > > begin
>> > > > ;************************************************
>> > > > ; read in netCDF file
>> > > > ;************************************************
>> > > > a = addfile("uv300.nc","r")
>> > > > ;************************************************
>> > > > ; read in zonal [u] and meridional [v] winds (July)
>> > > > ;************************************************
>> > > > u = a->U(1,:,:)
>> > > > v = a->V(1,:,:)
>> > > > ;************************************************
>> > > > ; create plot
>> > > > ;************************************************
>> > > > wks = gsn_open_wks("x11","vector") ; open a ps file
>> > > >
>> > > > vcres = True ; plot mods
>> desired
>> > > > vcres@gsnFrame = False ; so we can
>> draw time stamp
>> > > > vcres@vcRefAnnoOrthogonalPosF = -1.0 ; move ref
>> vector up
>> > > > vcres@vcRefMagnitudeF = 10.0 ; define vector
>> ref mag
>> > > > vcres@vcRefLengthF = 0.045 ; define length
>> of vec ref
>> > > > vcres@vcGlyphStyle = "CurlyVector" ; turn on curly
>> vectors
>> > > > vcres@vcMinDistanceF = 0.017
>> > > >
>> > > > vcres@vcLevelSelectionMode ="ManualLevels"
>> > > > vcres@vcMinLevelValF = 0 ; m/s
>> > > > vcres@vcMaxLevelValF =5; m/s
>> > > >
>> > > > vector = gsn_csm_vector_map_ce(wks,u,v,vcres)
>> > > > ;************************************************
>> > > > ; add time stamp to plot
>> > > > ;************************************************
>> > > > infoTimeStamp(wks,0.025,"uv300.nc") ; arguments are
>> workstation
>> > > > ; size of text desired,
>> and
>> > > > ; right string.
>> > > > frame (wks)
>> > > > end
>> > > >
>> > > > thanks in advance
>> > > > --
>> > > > ===============
>> > > > Ahmed Lasheen
>> > > > Junior researcher at Cairo Numerical Weather Prediction Center
>> (CNWPC)
>> > > > Egyptian Meteorological Authority(EMA)
>> > > > Cairo,Egypt
>> > > > ===============
>> > > >
>> > > > _______________________________________________
>> > > > ncl-talk mailing list
>> > > > List instructions, subscriber options, unsubscribe:
>> > > > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>> > >
>> > >
>> > >
>> > >
>> > > --
>> > > ===============
>> > > Ahmed Lasheen
>> > > Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
>> > > Egyptian Meteorological Authority(EMA)
>> > > Cairo,Egypt
>> > > ===============
>> > >
>> > > _______________________________________________
>> > > ncl-talk mailing list
>> > > List instructions, subscriber options, unsubscribe:
>> > > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>> >
>> >
>> >
>> >
>> > --
>> > ===============
>> > Ahmed Lasheen
>> > Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
>> > Egyptian Meteorological Authority(EMA)
>> > Cairo,Egypt
>> > ===============
>> >
>> > _______________________________________________
>> > ncl-talk mailing list
>> > List instructions, subscriber options, unsubscribe:
>> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
>
> --
> ===============
> Ahmed Lasheen
> Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
> Egyptian Meteorological Authority(EMA)
> Cairo,Egypt
> ===============
>
>

-- 
===============
Ahmed Lasheen
Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
Egyptian Meteorological Authority(EMA)
Cairo,Egypt
===============

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Apr 22 03:11:43 2012

This archive was generated by hypermail 2.1.8 : Mon Apr 30 2012 - 09:21:12 MDT