http://www.ncl.ucar.edu/Document/Functions/Built-in/pres_hybrid_ccm.shtml
Please read the function description. Example 3.
At each grid point you will get the pressure at
each hybrid levels.
-- f you want to interpolate the constant pressure levels http://www.ncl.ucar.edu/Document/Functions/Built-in/vinth2p.shtml or http://www.ncl.ucar.edu/Document/Functions/Built-in/vinth2p.shtml These expect the hybri coefficients to be p = a[:]*p0 + b[:]*ps You will have to change your coefficients to match those expected by the function. A.R Ragi wrote: > > Dear NCL users.., > > I want to calculate the equation which is for converting ECHAM 31 levels > to pressure levels in hPa. > > 1 level is 1000hPa and 31 level is 10 hPa. > > > The equation written in model to calculate pressure levels is: > > > *P(lev) =a(lev)+b(lev)*Ps(time,lat,lon) > > a* and* b* are hybrid coefficient which is in the model output. > and *Ps *also in the model output. > > But *a and b *are one dimensional but Ps is three dimensional. > > *a(31), b(31) but Ps (30,192,96)* > > > > The error saying *P(lev) *is undefined. > > Means it is not calculating the equation. > > Is this because of matrix multiplication needed for this case? > > Thanks in advance. > */ > > Code:/* > > > begin > > echam_out = addfile("/....../test_2003.06.nc <http://test_2003.06.nc>","r") > > > A = echam_out->hyam(:) > B = echam_out->hybm(:) > Ps = echam_out->aps(:,:,:) > > > do k = 1,31 > > do j = 1,96 > > do i = 1,192 > > > P(k) = A(k)+B(k)* Ps(1,i,j) > > > asciiwrite("P.txt",P(1,1,k)) > > > end do > > end do > > end do > > end > > > > fatal:Undefined identifier: (P) is undefined, can't continue > fatal:Execute: Error occurred at or near line 46 in file Pvalues.ncl > > > > > > -- > ********************************************************************* > Thanks, > A.R.Ragi > M.Tech Atmospheric science > Department of Atmospheric science > Cochin University of Science and Technology > Email : ar.ragi@gmail.com <mailto:ar.ragi@gmail.com> > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > ncl-talk mailing list > List instructions, subscriber options, unsubscribe: > http://mailman.ucar.edu/mailman/listinfo/ncl-talk _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Tue Feb 23 07:11:04 2010
This archive was generated by hypermail 2.1.8 : Tue Feb 23 2010 - 08:26:41 MST