<p>I am not sure about your R code or your snippet of data.  However, you could do an ncdump on the file and direct the output to text to get it "from the horses mouth" so to speak. </p>

<p>In general, the lat/long export of the WRF grid will not have a linear pattern.  WRF uses a spatially projected grid, likely an equal area lambert method or something similar. The curvature of the Earth creates non-linear grid values in geographic coordinates, but the projected grid coordinates (which you can also export) are linear. See the example WRF domain below plotted in geographic coordinates.</p>

<p><a href="https://i.sstatic.net/Thha5.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Thha5.png" alt="enter image description here"></a>
<em>image credit: <a href="https://www.researchgate.net/publication/233409970_An_Improved_Dynamical_Downscaling_Method_with_GCM_Bias_Corrections_and_Its_Validation_with_30_Years_of_Climate_Simulations" rel="nofollow noreferrer">Zhongfeng Xu and Zong-Liang Yang</a></em></p>

CC BY-SA 4.0
2020-03-07T05:17:00.137Z
thank you very much for the response
sara
CC BY-SA 4.0
2020-03-07T03:41:04.990Z
2020-03-07T03:41:04.990Z
f.thorpe
<p>I am working by WRF-ouput files (wrfout_d01_2016-01-16_00:00:00).
I  extracted and printed latitude and longitude data from the "<code>wrfout_d01_2016-01-16_00:00:00</code>", using the R tool.</p>

<p>Does anyone know why latitude and longitude data do not have a particular order and are always increasing and decreasing in ascending order?</p>

<p>As shown, the latitude or longitude increased and decreased? and have no regular trend?</p>

<pre><code>[1] 12.82095 12.88860 12.95492 13.01984 13.08341 13.14562 13.20647 13.26591
13.32399 13.38069 13.43599 13.48991 13.54243 13.59355 13.64328 13.69160
 [17] 13.73850 13.78400 13.82807 13.87075 13.91199 13.95181 13.99023 14.02719
 [25] 14.06274 14.09683 14.12950 14.16074 14.19053 14.21889 14.24580 14.27127
 [33] 14.29530 14.31786 14.33900 14.35867 14.37688 14.39365 14.40897 14.42283
 [41] 14.43523 14.44618 14.45567 14.46369 14.47025 14.47537 14.47903 14.48121
 [49] 14.48193 14.48121 14.47903 14.47537 14.47025 14.46369 14.45567 14.44618
 [57] 14.43523 14.42283 14.40897 14.39365 14.37688 14.35867 14.33900 14.31786
 [65] 14.29530 14.27127 14.24580 14.21889 14.19053 14.16074 14.12950 14.09683
 [73] 14.06274 14.02719 13.99023 13.95181 13.91199 13.87075 13.82807 13.78400
 [81] 1**3.73850 13.69160 13.64328 13.59355 13.54243 13.48991 13.43599 13.38069
 [89] 13.32399 13.26591 13.20647 13.14562 13.08341 13.01984** 1**2.95492 12.88860
 [97] 12.82095** 1**3.19722 13.26527 13.33195 13.39727 13.46122 13.52379 13.58498**
</code></pre>

<meteorology><wrf><wrf-chem>
Longitudes and latitudes are not regular in WRF-out files
sara
# Longitudes and latitudes are not regular in WRF-out files

(Asked by: username_0 on 2020-03-06)

I am working by WRF-ouput files (wrfout\_d01\_2016-01-16\_00:00:00).
I extracted and printed latitude and longitude data from the "`wrfout_d01_2016-01-16_00:00:00`", using the R tool.

Does anyone know why latitude and longitude data do not have a particular order and are always increasing and decreasing in ascending order?

As shown, the latitude or longitude increased and decreased? and have no regular trend?

```
[1] 12.82095 12.88860 12.95492 13.01984 13.08341 13.14562 13.20647 13.26591
13.32399 13.38069 13.43599 13.48991 13.54243 13.59355 13.64328 13.69160
 [17] 13.73850 13.78400 13.82807 13.87075 13.91199 13.95181 13.99023 14.02719
 [25] 14.06274 14.09683 14.12950 14.16074 14.19053 14.21889 14.24580 14.27127
 [33] 14.29530 14.31786 14.33900 14.35867 14.37688 14.39365 14.40897 14.42283
 [41] 14.43523 14.44618 14.45567 14.46369 14.47025 14.47537 14.47903 14.48121
 [49] 14.48193 14.48121 14.47903 14.47537 14.47025 14.46369 14.45567 14.44618
 [57] 14.43523 14.42283 14.40897 14.39365 14.37688 14.35867 14.33900 14.31786
 [65] 14.29530 14.27127 14.24580 14.21889 14.19053 14.16074 14.12950 14.09683
 [73] 14.06274 14.02719 13.99023 13.95181 13.91199 13.87075 13.82807 13.78400
 [81] 1**3.73850 13.69160 13.64328 13.59355 13.54243 13.48991 13.43599 13.38069
 [89] 13.32399 13.26591 13.20647 13.14562 13.08341 13.01984** 1**2.95492 12.88860
 [97] 12.82095** 1**3.19722 13.26527 13.33195 13.39727 13.46122 13.52379 13.58498**

```

**Tags:** meteorology, wrf, wrf-chem


---

## 1 answers

### Answer by username_1 on 2020-03-07. Score: 4

I am not sure about your R code or your snippet of data. However, you could do an ncdump on the file and direct the output to text to get it "from the horses mouth" so to speak.

In general, the lat/long export of the WRF grid will not have a linear pattern. WRF uses a spatially projected grid, likely an equal area lambert method or something similar. The curvature of the Earth creates non-linear grid values in geographic coordinates, but the projected grid coordinates (which you can also export) are linear. See the example WRF domain below plotted in geographic coordinates.

[![enter image description here](https://i.sstatic.net/Thha5.png)](https://i.sstatic.net/Thha5.png)
*image credit: [Zhongfeng Xu and Zong-Liang Yang](https://www.researchgate.net/publication/233409970_An_Improved_Dynamical_Downscaling_Method_with_GCM_Bias_Corrections_and_Its_Validation_with_30_Years_of_Climate_Simulations)*

> **Comments:**
> **username_0**: thank you very much for the response  

---

