- 积分
- 10656
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-10-10
- 最后登录
- 1970-1-1
|
发表于 2015-1-31 13:00:16
|
显示全部楼层
geopt和geopotential是位势,除以9.81就是位势高度,也就是z和height。以下是wrf_user_getvar的ncl代码:
if( any( variable .eq. (/"geopt","geopotential","z","height"/) ) ) then
; Height [=full geopotentail height / 9.81]
if(isfilevar(nc_file,"PH")) then
if ( time .eq. -1 ) then
if(ISFILE) then
var = nc_file->PH
PHB = nc_file->PHB
else
var = file_handle[:]->PH
PHB = file_handle[:]->PHB
end if
else
if(ISFILE) then
var = nc_file->PH(time,:,:,:)
PHB = nc_file->PHB(time,:,:,:)
else
var = file_handle[:]->PH(time,:,:,:)
PHB = file_handle[:]->PHB(time,:,:,:)
end if
end if
var = var + PHB
z = wrf_user_unstagger(var,var@stagger)
z@description = "Geopotential"
else
;; may be a met_em file - see if we can get GHT - data in met_em file is Height in M
if(isfilevar(nc_file,"GHT")) then
if ( time .eq. -1 ) then
if(ISFILE) then
z = nc_file->GHT
else
z = file_handle[:]->GHT
end if
else
if(ISFILE) then
z = nc_file->GHT(time,:,:,:)
else
z = file_handle[:]->GHT(time,:,:,:)
end if
end if
z = z * 9.81
z@description = "Geopotential"
z@units = "m2 s-2"
end if
end if
if( any( variable .eq. (/"z","height"/) ) ) then
z = z / 9.81
z@description = "Height"
z@units = "m"
end if
return(z)
end if
|
|