[ncl-talk] difference between using res at tfDoNDCOverlay and @lat2d @lon2d when overlaying wind vectors

Mary Haley haley at ucar.edu
Wed Apr 18 18:18:48 MDT 2018


Xiaoming,

You have an out-dated function call (WRF_map_c) that might possibly be the
source of the problem. This is a deprecated function and you should use
wrf_map_resources to set your WRF map projection instead:

http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_map_resources.shtml

I can't tell from your code why the two results are different, because it's
not clear to me if the only thing you are changing is whether or not
tfDoNDCOverlay is set.

If I'm understanding your email correctly, it sounds like the plot that is
created when tfDoNDCOverlay is set to True is the one that's correct.
However, I'm surprised it's working for you because:

[1] If you set tfDoNDCOverlay to True, you should NOT attach any
lat2d/lon2d attributes to your data variables.

[2] Also, if tfDoNDCOverlay is True, you must be using the EXACT map
projection that was defined on the file.  But, you are using WRF_map_c
which hasn't been updated in years, so this function could likely be giving
you wrong results. Also, you are setting:

  n_cutoff = 150
  res at mpLeftCornerLonF = lon2d(0,n_cutoff)
  res at mpLeftCornerLatF = lat2d(0,n_cutoff)

which looks to me like you are zooming in on the map, but you haven't also
zoomed in on the data in the same way, so again, I don't know how your
plots can be correct.

[3] For the case of tfDoNDCOverlay not being set, you may need to set
res at gsnAddCyclic = False to prevent a longitude cyclic point from being
added.

Please visit this WRF examples page, which has examples of plotting WRF
data with both tfDoNDCOverlay set and without it set:

http://www.ncl.ucar.edu/Applications/wrfgsn.shtml

I've attached two modified versions of your script. Since I don't have the
data, I am unable to test these scripts. But, hopefully they help show the
difference between these two scenarios.

If you continue to have problems with this, please post back to ncl-talk,
but include a clean, updated script if possible.

Good luck,

--Mary







On Tue, Apr 17, 2018 at 11:04 PM, xiaoming Hu <yuanfangcan at hotmail.com>
wrote:

> Hello
>
>
>  If I use res at tfDoNDCOverlay  I got the figure of
>
>
> But If I use @lat2d @lon2d without res at tfDoNDCOverlay  I got
>
>
> The wind vectors near the right edge in the left panel do not follow the
> pressure lines now.
>
>
> Any comments on overlaying wind vectors using res at tfDoNDCOverlay    or
> using @lat2d @lon2d without res at tfDoNDCOverlay ?
>
> I attached my ncl script
>
> Thanks
>
> Xiaoming
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180418/45ca193a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 662339 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180418/45ca193a/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 660617 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180418/45ca193a/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot_geoHeight950mb_combine2episodes_with_ndc_overlay.ncl
Type: application/octet-stream
Size: 7249 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180418/45ca193a/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot_geoHeight950mb_combine2episodes_without_ndc_overlay.ncl
Type: application/octet-stream
Size: 7602 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180418/45ca193a/attachment-0003.obj>


More information about the ncl-talk mailing list