[ncl-talk] vfXArray and vfYArray

David Brown dbrown at ucar.edu
Wed Jun 21 14:08:46 MDT 2017


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot.000003.png
Type: image/png
Size: 374978 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170621/9501f4ef/attachment-0001.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot-mod.ncl
Type: application/octet-stream
Size: 2741 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170621/9501f4ef/attachment-0001.obj 


More information about the ncl-talk mailing list