登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
- <span class="kn" style="box-sizing: border-box; color: rgb(0, 112, 32); font-weight: bold;">from</span> <span class="nn" style="box-sizing: border-box; color: rgb(14, 132, 181); font-weight: bold;">netCDF4</span> <span class="kn" style="box-sizing: border-box; color: rgb(0, 112, 32); font-weight: bold;">import</span> <span class="n" style="box-sizing: border-box;">Dataset</span>
- <span class="kn" style="box-sizing: border-box; color: rgb(0, 112, 32); font-weight: bold;">from</span> <span class="nn" style="box-sizing: border-box; color: rgb(14, 132, 181); font-weight: bold;">wrf</span> <span class="kn" style="box-sizing: border-box; color: rgb(0, 112, 32); font-weight: bold;">import</span> <span class="n" style="box-sizing: border-box;">getvar</span><span class="p" style="box-sizing: border-box;">,</span> <span class="n" style="box-sizing: border-box;">interplevel</span>
- <span class="n" style="box-sizing: border-box;">wrfin</span> <span class="o" style="box-sizing: border-box; color: rgb(102, 102, 102);">=</span> <span class="n" style="box-sizing: border-box;">Dataset</span><span class="p" style="box-sizing: border-box;">(</span><span class="s2" style="box-sizing: border-box; color: rgb(64, 112, 160);">"wrfout_d02_2010-06-13_21:00:00"</span><span class="p" style="box-sizing: border-box;">)</span>
- <span class="n" style="box-sizing: border-box;">pblh</span> <span class="o" style="box-sizing: border-box; color: rgb(102, 102, 102);">=</span> <span class="n" style="box-sizing: border-box;">getvar</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">wrfin</span><span class="p" style="box-sizing: border-box;">,</span> <span class="s2" style="box-sizing: border-box; color: rgb(64, 112, 160);">"PBLH"</span><span class="p" style="box-sizing: border-box;">)</span>
复制代码 输出结果全是0,大家知道为啥嘛,感谢- <xarray.DataArray 'PBLH' (south_north: 21, west_east: 18)>
- array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- 0., 0.],
- [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- 0., 0.],
- [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- 0., 0.],
- [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- 0., 0.],
- [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- 0., 0.],
- [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- 0., 0.],
- [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- 0., 0.],
- [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- 0., 0.],
- [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- 0., 0.],
- [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- 0., 0.],
- ...
- [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- 0., 0.],
- [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- 0., 0.],
- [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- 0., 0.],
- [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- 0., 0.],
- [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- 0., 0.],
- [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- 0., 0.],
- [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- 0., 0.],
- [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- 0., 0.],
- [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- 0., 0.],
- [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- 0., 0.]], dtype=float32)
- Coordinates:
- XLONG (south_north, west_east) float32 111.0 111.0 111.0 ... 111.6 111.6
- XLAT (south_north, west_east) float32 40.09 40.09 40.09 ... 40.63 40.63
- XTIME float32 0.0
- Time datetime64[ns] 2019-10-01
- Dimensions without coordinates: south_north, west_east
- Attributes:
- FieldType: 104
- MemoryOrder: XY
- description: PBL HEIGHT
- units: m
- stagger:
- coordinates: XLONG XLAT XTIME
- projection: LambertConformal(stand_lon=108.09700012207031, moad_cen_lat...
复制代码
|