- 积分
- 2918
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2019-1-19
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2019-8-26 17:48:49
|
显示全部楼层
啊啊 感谢! 我刚尝试了一下 输出全是缺省值 请问大神是什么原因呢 脚本如下:
tc = wrf_user_getvar(a,"tc",it) ; T in C
rh = wrf_user_getvar(a,"rh",it) ; relative humidity
u = wrf_user_getvar(a,"ua",it) ; 3D U at mass points
v = wrf_user_getvar(a,"va",it) ; 3D V at mass points
p = wrf_user_getvar(a,"p",it)
z = wrf_user_getvar(a,"z",it)
x = wrf_user_getvar(a,"XLAT",it) ;[south_north | 141] x [west_east | 153]
y = wrf_user_getvar(a,"XLONG",it)
pressure = 700.
tk = wrf_user_intrp3d(tc,p,"h",pressure,0.,False)
z_p = wrf_user_intrp3d(z,p,"h",pressure,0.,False)
rh_p = wrf_user_intrp3d(rh,p,"h",pressure,0.,False)
u_p = wrf_user_intrp3d(u,p,"h",pressure,0.,False)
v_p = wrf_user_intrp3d(v,p,"h",pressure,0.,False)
tc_p = tk+273.166
copy_VarCoords(tk, tc_p)
;Return the advected variable only (opt=0)
advT_0 = advect_var(u_p,v_p,tc_p,0,"advection of temperature","K/s",0)
printVarSummary(advT_0)
; Return the advected variable and the longitudinal (dT/dx) and latitudinal (dT/dy) gradients
; of the scalar variable (opt=1). The returned variable is of type list containing three variable
advT_1 = advect_var(u_p,v_p,tc_p,0,"advection of temperature","K/s",1)
printVarSummary(advT_1) ; variable of type list: 3 items
; For clarity: explicitly extract the returned elements of the list variable. All meta data is present.
Tadv = advT_1[0] ; advected quantity
Tgrx = advT_1[1] ; longitudinal gradient
Tgry = advT_1[2] ; latitudinal gradient
printVarSummary(Tadv) ; advection of temperature
printVarSummary(Tgrx) ; longitudinal gradient
printVarSummary(Tgry) ; latitudinal gradient
然后各变量输出如下:
(0) Working on time: 2018-02-28_00:30:00
(0) advect_var: Warning: No named dimensions. Can not check grid order.
warning:gradsg: 1 2-dimensional input array(s) contained missing values. No interpolation performed on these arrays
Variable: advT_0
Type: float
Total Size: 86292 bytes
21573 values
Number of Dimensions: 2
Dimensions and sizes: [south_north | 141] x [west_east | 153]
Coordinates:
Number Of Attributes: 3
_FillValue : 9.96921e+36
long_name : advection of temperature
units : K/s
(0) advect_var: Warning: No named dimensions. Can not check grid order.
warning:gradsg: 1 2-dimensional input array(s) contained missing values. No interpolation performed on these arrays
Variable: advT_1
Type: list <fifo>
Total items: 3
Variable: Tadv
Type: float
Total Size: 86292 bytes
21573 values
Number of Dimensions: 2
Dimensions and sizes: [south_north | 141] x [west_east | 153]
Coordinates:
Number Of Attributes: 3
_FillValue : 9.96921e+36
long_name : advection of temperature
units : K/s
Variable: Tgrx
Type: float
Total Size: 86292 bytes
21573 values
Number of Dimensions: 2
Dimensions and sizes: [south_north | 141] x [west_east | 153]
Coordinates:
Number Of Attributes: 2
_FillValue : 9.96921e+36
long_name : longitudinal gradient
Variable: Tgry
Type: float
Total Size: 86292 bytes
21573 values
Number of Dimensions: 2
Dimensions and sizes: [south_north | 141] x [west_east | 153]
Coordinates:
Number Of Attributes: 2
_FillValue : 9.96921e+36
long_name : latitudinal gradient
还出现了一些warning,求大神解答疑惑!
|
|