question about cz2ccm

From: <yihuiw_at_nyahnyahspammersnyahnyah>
Date: Mon, 8 Sep 2008 10:13:29 -0700 (PDT)

Hi,
I try to calculate geopotential height by using function cz2ccm but I have
some questions about it.
I used ERA40 data and there are four hybrid coefficients, hybrid A and B
coefficients at layer midpoints, and hybrid A and B coefficients at layer
interface. In the ncl documentation, it requires hyam and hybm, which are
one-dimensional array of hybrid coordinate coefficients for base pressures
(layer midpoints) ordered bottom-to-top, and hyai and hybi, which are
one-dimensional array of hybrid A and B coefficients (layer midpoints)
ordered bottom-to-top. All hybrid coefficients in ncl documentation need
to be at layer midpoints while two coefficients in ERA40 are at layer
interface. Do coefficients in ERA40 satisfy the requirements in ncl
documentation?
I used hybrid A and B coefficient at layer midpoints in ERA40 as hyam and
hybm, and hybrid A and B coefficient at layer interface as hyai and hybi.
But I am getting a segmentation fault error. Data is monthly mean in one
year with spatial resolution 128*256. Is it the problem of memory? How can
I get past it? I attached the script below.
Can I have the script of function cz2ccm because I am interested in how to
calculate geopotential height in ncl? Thank you so much.
All the best,
Yi-Hui

**************************************************************

load "/usr/lib/ncarg/ncarg/nclscripts/csm/contributed.ncl"
begin
f=addfile("U78614.nc","r")
qf=addfile("U78615.nc","r")
P0=100000
Rd=287
Rv=461

T=f->T_GDS4_HYBL_123(:,:,:,:)
Zs=f->Z_GDS4_HYBL_123(:,:,:)
Q=qf->Q_GDS4_HYBL_123(:,:,:,:)
lnps=f->LNSP_GDS4_HYBL_123(:,:,:)
ps=exp(lnps)
hyai=f->lv_HYBL_i4_a ;interface hybrid coefficient A
hybi=f->lv_HYBL_i4_b ;interface hybrid coefficient B
hyam=f->lv_HYBL3_a ;mid-layer hybrid coefficient A
hybm=f->lv_HYBL3_b ;mid-layer hybrid coefficient B

Tv=new((/12,60,128,256/),float)
Tv=T*(1+(Rv/Rd-1)*Q)
copy_VarCoords(T,Tv)
z2=cz2ccm(ps,Zs,Tv,P0,hyam(::-1),hybm(::-1),hyai(::-1),hybi(::-1))

end

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Sep 08 2008 - 11:13:29 MDT

This archive was generated by hypermail 2.2.0 : Mon Sep 08 2008 - 14:49:02 MDT