<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Huseyin,<div><br></div><div>Without that information in the files, you're going to have to calculate the latitude and longitude values. Since you're using Python, you can use wrf-python which contains a xy_to_ll routine that converts grid points to latitude and longitude points, as long as you're using one of the standard WRF projections, which it looks like you are (<a href="https://wrf-python.readthedocs.io/en/latest/user_api/generated/wrf.xy_to_ll.html#wrf.xy_to_ll">https://wrf-python.readthedocs.io/en/latest/user_api/generated/wrf.xy_to_ll.html#wrf.xy_to_ll</a>)</div><div><br></div><div>Note that this will only work if you have the map projection global parameters still in your file. If not, there is an xy_to_ll_proj version where you can specify the parameters yourself. (<a href="https://wrf-python.readthedocs.io/en/latest/user_api/generated/wrf.ll_to_xy_proj.html#wrf.ll_to_xy_proj">https://wrf-python.readthedocs.io/en/latest/user_api/generated/wrf.ll_to_xy_proj.html#wrf.ll_to_xy_proj</a>). </div><div><br></div><div>Hope this helps,</div><div><br></div><div>Bill</div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Oct 29, 2018 at 7:17 AM Huseyin Ozdemir via pyngl-talk <<a href="mailto:pyngl-talk@ucar.edu">pyngl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everyone,<br>
<br>
I have a problem with reading wrf output file (Projection is Polar Stereographic); i want to compare wrf model output with observations at specific latitude-longitude coordinates, but output netcdf file has no latitude and longitude variables. <br>
<br>
I am using my python environment for reading this netcdf file, where PyNGL and PyNIO are already installed. As an example, temp variable in this output has attributes below:<br>
<br>
short T2 [ Time|1, south_north|150, west_east|150 ] <br>
FieldType : 104<br>
MemoryOrder : XY <br>
description : TEMP at 2 M<br>
units : K<br>
stagger : <br>
coordinates : XLONG XLAT XTIME<br>
add_offset : 273.8086<br>
scale_factor : -0.0005068767<br>
<br>
Here, T2 variable has “Time", “south_north" and “west_east” dimensions and “south_north" and "west _east" dimensions have both 150 grids. There is no XLAT and XLONG variables in the netcdf output, so how can i get the temperatures at any lat-lon points with just grid numbers? <br>
<br>
Thanks in advance,<br>
<br>
Huseyin<br>
<br>
_______________________________________________<br>
pyngl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/pyngl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/pyngl-talk</a><br>
</blockquote></div>