首次提交
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
# 生成全球网格
|
||||
|
||||
[返回示例目录](index.md)
|
||||
|
||||
以下保留原笔记本的代码和已保存输出;转换过程中未重新执行代码。
|
||||
|
||||
本教程演示如何在球面坐标系中生成全球网格。
|
||||
|
||||
```python
|
||||
import meshkernel
|
||||
import matplotlib.pyplot as plt
|
||||
```
|
||||
|
||||
```python
|
||||
mk = meshkernel.MeshKernel(projection=meshkernel.ProjectionType.SPHERICAL)
|
||||
mk.mesh2d_make_global(num_longitude_nodes=192, num_latitude_nodes=100)
|
||||
mesh2d = mk.mesh2d_get()
|
||||
```
|
||||
|
||||
绘制结果。
|
||||
|
||||
```python
|
||||
plt.close("all")
|
||||
figsize = (20, 10)
|
||||
mesh2d = mk.mesh2d_get()
|
||||
fig, ax = plt.subplots(figsize=figsize)
|
||||
mesh2d.plot_edges(ax, color="k")
|
||||
```
|
||||
|
||||

|
||||
Reference in New Issue
Block a user