[ncl-talk] About Hodograph

isakhar sakhar isakhar isakhar.inside13 at gmail.com
Wed Nov 18 21:49:11 MST 2015


Dear Mr. Adam

By reading tutorial page, I finally find the mistake. In my script, I use
only a single value. So now, I change to double value: plane =  (/  0,100 ,
10,100  /)  and change False to True in vertical position (u,v), I can get
now the different wind speed in 10 meter, 30 meter, 50 meter, and so on.

Thank you very much Mr.Adam
God bless you always.

Soares

On Wed, Nov 18, 2015 at 8:39 PM, Adam Phillips <asphilli at ucar.edu> wrote:

> Hi Soares,
> Looking at the wrf_user_intrp3d documentation:
> https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_intrp3d.shtml
>
> and assuming your height array has units of meters, it looks to me like
> your input plane array should just contain a single value:
> plane = 30 (when interpolating to 30m). The documentation states that you
> should include more than one value if you are doing a cross-section, which
> you are not.
>
> Also, as you are interpolating to a horizontal level I think you should
> specify a "h" instead of a "v".
>
> So, try changing this:
> u_plane  = wrf_user_intrp3d( u,height,"v",plane,0.,False)
> v_plane  = wrf_user_intrp3d( v,height,"v",plane,0.,False)
> to this:
> u_plane  = wrf_user_intrp3d( u,height,"h",30,0.,False)
> v_plane  = wrf_user_intrp3d( v,height,"h",30,0.,False)
>
> Note that there is also a WRF online tutorial page describing this
> function here:
>
> http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/NCL_functions.htm#intrp3d
>
> If you have any further issues with wrf_user_intrp3d or any other wrf
> function in NCL please email wrfhelp at ucar.edu.
> Adam
>
>
> On Tue, Nov 17, 2015 at 8:55 PM, isakhar sakhar isakhar <
> isakhar.inside13 at gmail.com> wrote:
>
>> Dear Mr. Adam
>>
>> So far I am using the script (in attachment) to find wind direction and
>> wind speed in 10 meter height. But when I tried to find wind speed in 30
>> meter, 50 meter or 100 meter, I get the same result as 10 meter height.
>>
>>
>>
>>
>> ---------------------------------------------------------------------------------------------------------------------------------------
>>     plane = (/ 0., 10./)            ; height levels to plot - in meter
>>
>>          ; Interpolate U,V to 0 Meters
>>               u_plane  = wrf_user_intrp3d( u,height,"v",plane,0.,False)
>>               v_plane  = wrf_user_intrp3d( v,height,"v",plane,0.,False)
>>
>>           ; Calculate Wind Speed from Vectors
>>               spd = (u_plane*u_plane + v_plane*v_plane)^(0.5)
>>               windspd0(it)=spd(x,y)
>>
>>           ; Wind direction at 10 Meters
>>                r2d = 45.0/atan(1.0)                   ; conversion factor
>> (radians to degrees)
>>                dir = atan2(u_plane,v_plane) * r2d + 180
>>                dir0(it) = dir(x,y)
>>
>>           ; Wind Speed
>>           spd at description = "Wind Speed"
>>           spd at units = "m/s"
>>           u_plane at units = "m/s"
>>
>> -------------------------------------------------------------------------------------------------------------------------------------
>>
>>
>>
>>
>> I tried to change height level in function plane = (/ 0., 10./) to (/ 0.,
>> 30./) or (/ 0., 50./), or (/ 0., 100./) but I still get the same wind speed.
>>
>> I also tried to change plane = (/ 10., 30./) for 30 meter height but I
>> get error.
>>
>> Because now I am really interesting to know wind speed and direction in
>> 30 meter, 50 meter, and 100 meter height.
>> Is there anything still wrong with this script ?
>>
>> Thank you,
>> Soares
>>
>> On Mon, Nov 9, 2015 at 9:41 PM, Adam Phillips <asphilli at ucar.edu> wrote:
>>
>>> Hi Soares,
>>> The error message:
>>> fatal:["Execute.c":5900]:variable (time) is not in file (infile)
>>> is telling you exactly what the issue is. By examining your input WRF
>>> file you can see that a variable time is not present, but a variable names
>>> Times is. The error message is coming from this line:
>>> time = infile->time
>>>
>>> However, note that you do not need to exactly follow the example coding
>>> Amadou pointed you to. You do not necessarily need to read in time, or
>>> wind_speed and wind_direction. (Your file doesn't have those three
>>> variables anyway.) All you should be doing is reading in the winds at the
>>> level you are interested in (either U10/V10  or U/V), choose the grid point
>>> you are interested in, and pass the wind speed and direction to the
>>>  create_one_station_plot function.
>>>
>>> wrf_ll_to_ij might be useful to find the nearest coordinate indexes to a
>>> desired latitude and longitude:
>>> http://www.ncl.ucar.edu/Document/Functions/Built-in/wrf_ll_to_ij.shtml
>>>
>>> a list of all WRF functions available in NCL is also given here:
>>> http://www.ncl.ucar.edu/Document/Functions/wrf.shtml
>>>
>>> Hope that all helps. If after modifying your script as detailed above
>>> you still have questions about how to read in and subset your WRF data I
>>> highly advise you to look at the online documention including the WRF
>>> online NCL tutorial and the NCL website:
>>> http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/NCL_examples.htm
>>> http://www.ncl.ucar.edu/Applications/wrf.shtml
>>>
>>> Adam
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Sun, Nov 8, 2015 at 7:03 PM, isakhar sakhar isakhar <
>>> isakhar.inside13 at gmail.com> wrote:
>>>
>>>> Dear Mr. Adam and Mr.Amadou
>>>>
>>>> I just downloaded the file as you recommend and made some change
>>>> according to my configuration. But after running the simulation, I get
>>>> error says "fatal:["Execute.c":5900]:variable (time) is not in file (infile)
>>>> ".
>>>>
>>>> Now I don't have any station (weather station), just a computer for
>>>> running simulation only because I see there are 5 stations inside the
>>>> script.
>>>>
>>>> Here I attach my two files, one is my hodograph modification and one is
>>>> my ncdump file.
>>>> Please take a look of these files.
>>>>
>>>> Regards,
>>>> Soares
>>>>
>>>> On Fri, Nov 6, 2015 at 4:11 PM, Adam Phillips <asphilli at ucar.edu>
>>>> wrote:
>>>>
>>>>> Hi Soares,
>>>>> It looks to me like all you attached are functions. I do not see a
>>>>> script that calls the hodograph function for instance. You need to call
>>>>> hodograph from another NCL script, passing in the workstation, an array of
>>>>> the wind speed, an array of the direction, and a resource list.
>>>>>
>>>>> For an example of how to do this, refer to a ncl-talk question from a
>>>>> couple weeks back:
>>>>> http://mailman.ucar.edu/pipermail/ncl-talk/2015-October/004199.html
>>>>>
>>>>> And see the second attachment on that page:
>>>>>
>>>>> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151022/9bdf6ef5/attachment.obj
>>>>>
>>>>> Coincidentally, this script holds a function that creates a hodograph
>>>>> (named create_one_station_plot), and that function is called at the
>>>>> bottom of the main script.
>>>>>
>>>>> Note that you do not have to use the ncl-talk script to do what you
>>>>> want. This just provides an example where someone was creating hodographs
>>>>> by calling a function external to the main script.
>>>>>
>>>>> Finally, no, at present there are not any hodograph examples on the
>>>>> NCL website.
>>>>>
>>>>> Hope that helps. If not, or if you have any further questions, please
>>>>> respond to the ncl-talk email list.
>>>>> Adam
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Nov 6, 2015 at 12:07 AM, isakhar sakhar isakhar <
>>>>> isakhar.inside13 at gmail.com> wrote:
>>>>>
>>>>>> Dear NCL Talk Team
>>>>>>
>>>>>> I want to plot Hodograph by using 2 files in attahment but I did not
>>>>>> see anything, no plotting.
>>>>>>
>>>>>> I tried also to find hodograph in website "
>>>>>> https://www.ncl.ucar.edu/Applications/ " but I could not see it.
>>>>>>
>>>>>> Can someone help me how to plot wind speed and direction in
>>>>>> Hodographs?
>>>>>>
>>>>>> Thank you,
>>>>>> Soares
>>>>>>
>>>>>> _______________________________________________
>>>>>> ncl-talk mailing list
>>>>>> ncl-talk at ucar.edu
>>>>>> List instructions, subscriber options, unsubscribe:
>>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Adam Phillips
>>>>> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
>>>>> www.cgd.ucar.edu/staff/asphilli/   303-497-1726
>>>>>
>>>>> <http://www.cgd.ucar.edu/staff/asphilli>
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Adam Phillips
>>> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
>>> www.cgd.ucar.edu/staff/asphilli/   303-497-1726
>>>
>>> <http://www.cgd.ucar.edu/staff/asphilli>
>>>
>>
>>
>
>
> --
> Adam Phillips
> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
> www.cgd.ucar.edu/staff/asphilli/   303-497-1726
>
> <http://www.cgd.ucar.edu/staff/asphilli>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151119/10a84634/attachment.html 


More information about the ncl-talk mailing list