[ncl-talk] vfXArray and vfYArray

David Brown dbrown at ucar.edu
Wed Jun 21 16:44:44 MDT 2017


Yes that's right unless you only want to plot with the native grid.
 -dave

On Wed, Jun 21, 2017 at 3:48 PM, Sheng-Hung Wang <wang.446 at osu.edu> wrote:
> Thanks for response.
>
> After all kind trials and errors. We kind of figure U10E and V10E with
>
> resstream at vfXArray               = lon2d
> resstream at vfYArray               = lat2d
> resstream at tfDoNDCOverlay     = False
> resstream at gsnAddCyclic           = False
>
> Is the only way working.
>
> So guess we need to calculate those earth-relative components 1st for the
> similar studies.
>
>
>
> On 6/21/2017 4:08 PM, David Brown wrote:
>>
>> The problem is that you are using grid-relative vector components.
>> These are only good when drawing in the native projection with no
>> mapping of the coordinates. In NCL terms, it means only when you set
>> tfDoNDCOverlay True.
>>
>> Fortunately your data file also contains the earth-relative components
>> that work when the data is mapped into a projection (even if the
>> projection produces the same map as the native grid).  You just need
>> to substitute U10E and V10E for U10M and V10M. I have created a
>> modified version of your script that draws the grid-relative and the
>> earth-relative data so you can clearly see the difference.
>>
>> I should note that often WRF files do not contain the earth-relative
>> components, but in many cases instead contain vector rotation
>> variables that you can apply to transform from grid-relative to
>> earth-relative components.
>>
>> The modified script produces three plots: first the native ("raw")
>> plot, then a grid-relative plot wrongly mapped into the projection,
>> and finally an earth-relative plot that should be correct (attached).
>> I chose to use curly vectors instead of streamlines because the
>> direction of flow is more obvious.
>>
>>
>>
>> On Fri, Jun 16, 2017 at 8:52 AM, Sheng-Hung Wang <wang.446 at osu.edu> wrote:
>>>
>>> Hi there
>>>
>>> This is Sheng-Hung from BPCRC at the OSU. We are trying to plot wind
>>> (U10M, V10M and SPD10M) from WRF model output.  The data files are
>>> extracted from wrfout files.
>>>
>>> As you can see in native model grids (plot_raw.png or plot_raw.ncgm)
>>> plot,
>>>
>>> The winds rotate in clockwise direction at Atlantic Ocean (upperright
>>> corner), and counter clockwise at east of Greenland (just above map
>>> center).
>>>
>>> However, after using vfXArray and vfYArray and plot on map (plot.png or
>>> plot.ncgm),
>>>
>>> The winds rotate in opposite directions.
>>>
>>> The winds over Pacific are still in an agreement (directions and
>>> patterns) with model native grids.
>>>
>>> I tried  NCL 6.4 6.3.x, running on Fedora, all produced same results.
>>>
>>> Is there a problem with vfXArray/vfYArray functions or did I something
>>> wrong in my script.
>>>
>>> You can find my script/data/plots in
>>>
>>> http://polarmet.osu.edu/datasets/proj_201706/
>>>
>>> Thanks
>>>
>>>
>>> Sheng-Hung
>>>
>>> ps. I also tested sfXArray/sfYArray on each individual variables. The
>>> plots are fine.
>>>
>>> --
>>> ========================================
>>>    Sheng-Hung Wang, PhD
>>>    Polar Meteorology Group
>>>    Byrd Polar and Climate Research Center
>>>    The Ohio State University
>>>    1090 Carmack Road, Columbus, Ohio 43210
>>>    Phone: (614) 292-1060
>>>    Fax:   (614) 292-4697
>>>    email: wang.446 at osu.edu
>>> ========================================
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> --
> ========================================
>  Sheng-Hung Wang, PhD
>  Polar Meteorology Group
>  Byrd Polar and Climate Research Center
>  The Ohio State University
>  1090 Carmack Road, Columbus, Ohio 43210
>  Phone: (614) 292-1060
>  Fax:   (614) 292-4697
>  email: wang.446 at osu.edu
> ========================================
>


More information about the ncl-talk mailing list