I am trying to use the function cz2ccm to compute the geopotential height.
Hi,
I understand from the documentation
(http://www.ncl.ucar.edu/Document/Functions/Built-in/cz2ccm.shtml) that
the arguments can be a multi-dimensional array, and the rightmost
dimensions must be:
- lat,lon for PHIS and PS and
- level, lat, and lon for Tv
When I use:
z2 = cz2ccm(ps,phis,tv,p0,hyam(::-1),hybm(::-1),hyai(::-1),hybi(::-1))
I get an error:
fatal:Number of dimensions in parameter (1) of (cz2ccm) is (3), (2)
dimensions were expected
fatal:Execute: Error occurred at or near line 75
I cannot figure out the problem. Any idea?
Thanks
Cecile
-----------------------------------
Script:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/ccm_func.ncl"
begin
nc = addfile("/project/ccr/hannay/CAPT/test/GPCI_UW_test1.nc", "r")
print("Compute Z")
phis = nc->PHIS ; read PHIS to memory
lat = nc->lat
lon = nc->lon
lev = nc->lev
ilev = nc->ilev
hyam = nc->hyam
hybm = nc->hybm
hyai = nc->hyai
hybi = nc->hybi
ps = nc->PS ; get sfc pres
tv = nc->T*(1.+0.61*nc->Q) ; calculate virtual temperature
p0 = 100000. ; get constant
; calculate z2 at all time steps
z2 = cz2ccm(ps,phis,tv,p0,hyam(::-1),hybm(::-1),hyai(::-1),hybi(::-1))
end
-- ++++++++++++++++++++++++++++++++++++++++++++ Cecile Hannay National Center for Atmospheric Research email: hannay_at_ucar.edu phone: 303-497-1327 web: http://www.cgd.ucar.edu/ccr/hannay CPT webpage: http://www.cgd.ucar.edu/ccr/CPT ++++++++++++++++++++++++++++++++++++++++++++ _______________________________________________ ncl-talk mailing list ncl-talk_at_ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Tue Nov 15 2005 - 14:11:32 MST
This archive was generated by hypermail 2.2.0 : Tue Nov 15 2005 - 16:48:27 MST