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

xiaoming Hu yuanfangcan at hotmail.com
Thu Apr 19 09:59:03 MDT 2018


Mary


 Thanks a lot for helping on this!

 Now I changed to  NCl 6.3.0 and used wrf_map_resources and added res at gsnAddCyclic = False

 But I still did not make the case of tfDoNDCOverlay not being set    to be consistent with  the case of tfDoNDCOverlay setting to True

 I attached 2 cleaned script

 with plot_geoHeight950mb_combine2episodes_with_ndc_overlay.ncl I got:

[cid:19b8c72a-97cf-4db6-96cc-5b8cad55ed90]

with plot_geoHeight950mb_combine2episodes_without_ndc_overlay.ncl, I got:

[cid:514ad212-3ce0-435d-ab13-d3d541ac062b]

The previous issue still exists, plus the map is gone. :)

See the difference between the 2 scripts:

< ;  res at tfDoNDCOverlay       = True
<   res at tfDoNDCOverlay       = False
---
>   res at tfDoNDCOverlay       = True
> ;  res at tfDoNDCOverlay       = False
134,140d132
<    u_950 at lat2d = lat2d
<    u_950 at lon2d = lon2d
<    v_950 at lat2d = lat2d
<    v_950 at lon2d = lon2d
<    geoHeight_950 at lat2d = lat2d
<    geoHeight_950 at lon2d = lon2d
<
146,147c138,139
< ;    plot                 = gsn_csm_vector_scalar_map(wks,u_950(:,n_cutoff:),v_950(:,n_cutoff:),geoHeight_950(:,n_cutoff:),res)
<     plot                 = gsn_csm_vector_scalar_map(wks,u_950,v_950,geoHeight_950,res)
---
>     plot                 = gsn_csm_vector_scalar_map(wks,u_950(:,n_cutoff:),v_950(:,n_cutoff:),geoHeight_950(:,n_cutoff:),res)
> ;    plot                 = gsn_csm_vector_scalar_map(wks,u_950,v_950,geoHeight_950,res)

Did I miss anything?


  I put the data (1.9G) at

 http://www.caps.ou.edu/micronet/HurricaneImpactonO3/WRFV3.9.1/YSU/wrfchem3.9.1_ERA2d_CONUS_NLCD_NEI2011_MEGAN_nudge2.2011082500/wrfout_d01_2011-08-08_12:00:00


Thanks a lot!

Xiaoming

________________________________
From: Mary Haley <haley at ucar.edu>
Sent: Wednesday, April 18, 2018 7:18:48 PM
To: xiaoming Hu
Cc: ncl-talk at ucar.edu; Xiaoming Hu
Subject: Re: [ncl-talk] difference between using res at tfDoNDCOverlay and @lat2d @lon2d when overlaying wind vectors

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<mailto: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<mailto: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/20180419/5b22b5d1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 239315 bytes
Desc: pastedImage.png
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180419/5b22b5d1/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 238265 bytes
Desc: pastedImage.png
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180419/5b22b5d1/attachment-0003.png>


More information about the ncl-talk mailing list