在官网找到这个,但是运行出错
Interpolate Relative Humidity to Boundary Layer Heights
 - from netCDF4 import Dataset
- from wrf import getvar, interplevel
- wrfin = Dataset("wrfout_d02_2010-06-13_21:00:00")
- rh = getvar(wrfin, "rh")
- height = getvar(wrfin, "height_agl")
- pblh = getvar(wrfin, "PBLH")
- rh_pblh = interplevel(rh, height, pblh)
错误:
Traceback (most recent call last):
File "222.py", line 7, in <module>
height = getvar(wrfin, "height_agl")
File "/python3.7/site-packages/wrf/routines.py", line 343, in getvar
raise ValueError("'%s' is not a valid variable name" % (varname))
ValueError: 'height_agl' is not a valid variable name
大家知道为什么嘛
|