Hi All:
I am trying to use vibeta to calculate the mean temperature
between two pressure levels. Attached is a example script
for a test.
Case 1 and 1a is the mean temperature of the whole column.
Case 2 and 2a is the mean temperature between surface and 800 hPa.
Case 3 is the mean temperature bw 1000. and 800 hPa.
Case 4 is the mean temperature bw 800 and 400 hPa.
There are big difference between case 1 and case 1a outputs, just by
changing the bottom pressure. Same is for case 2 and 2a.
I am just wondering why there are such big difference? Is the setting
right for case 3 and case 4?
The output is below.
Thanks,
Yinghui Liu
(0) case 1
(0) vint=255368
(0) vint=234.283
(0) case 1a
(0) vint=255368
(0) vint=254.605
(0) case 2
(0) vint=60833.5
(0) vint=202.778
(0) case 2a
(0) vint=60833.5
(0) vint=285.603
(0) case 3
(0) vint=56775
(0) vint=283.875
(0) case 4
(0) vint=107050
(0) vint=267.625
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" ; High Level
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" ; plot interfaces
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
;****************************************************************
begin
linlog = 1
; pressure (mb): bottom [near surface] to top
p = (/ 1000.,925.,850.,700.,600.,500., \
400.,300.,250.,200.,150.,100., \
70.,50.,30.,20.,10. /)
nlvl = dimsizes(p)
; temperatures (K) at each p level
x = (/ 292.,285.,283.,277.,270.,260., \
250.,235.,225.,215.,207.,207., \
213.,220.,225.,228.,230. /)
print("case 1")
psfc = 1013.
pbot = 1100.
ptop = 10.
vint = vibeta (p,x,linlog,psfc,pbot,ptop) ; units= K-mb
print("vint="+vint) ; vint ===> vint=255368 K-mb
vm = vint/9.81 ; mass weighted
vint = vint/(pbot-ptop) ; normalize (units=K)
print("vint="+vint) ; vint ===> 234.283 K
print("case 1a")
psfc = 1013.
pbot = 1013.
ptop = 10.
vint = vibeta (p,x,linlog,psfc,pbot,ptop) ; units= K-mb
print("vint="+vint) ; vint ===> vint=255368 K-mb
vm = vint/9.81 ; mass weighted
vint = vint/(pbot-ptop) ; normalize (units=K)
print("vint="+vint) ; vint ===> 234.283 K
print("case 2")
psfc = 1013.
pbot = 1100.
ptop = 800.
vint = vibeta (p,x,linlog,psfc,pbot,ptop) ; units= K-mb
print("vint="+vint) ; vint ===> vint=255368 K-mb
vm = vint/9.81 ; mass weighted
vint = vint/(pbot-ptop) ; normalize (units=K)
print("vint="+vint) ; vint ===> 234.283 K
print("case 2a")
psfc = 1013.
pbot = 1013.
ptop = 800.
vint = vibeta (p,x,linlog,psfc,pbot,ptop) ; units= K-mb
print("vint="+vint) ; vint ===> vint=255368 K-mb
vm = vint/9.81 ; mass weighted
vint = vint/(pbot-ptop) ; normalize (units=K)
print("vint="+vint) ; vint ===> 234.283 K
print("case 3")
psfc = 1000.
pbot = 1000.
ptop = 800.
vint = vibeta (p,x,linlog,psfc,pbot,ptop) ; units= K-mb
print("vint="+vint) ; vint ===> vint=255368 K-mb
vm = vint/9.81 ; mass weighted
vint = vint/(pbot-ptop) ; normalize (units=K)
print("vint="+vint) ; vint ===> 234.283 K
print("case 4")
psfc = 800.
pbot = 800.
ptop = 400.
vint = vibeta (p,x,linlog,psfc,pbot,ptop) ; units= K-mb
print("vint="+vint) ; vint ===> vint=255368 K-mb
vm = vint/9.81 ; mass weighted
vint = vint/(pbot-ptop) ; normalize (units=K)
print("vint="+vint) ; vint ===> 234.283 K
end
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Dec 17 2008 - 10:57:49 MST
This archive was generated by hypermail 2.2.0 : Wed Dec 24 2008 - 09:38:50 MST