BRe: [ncl-talk] Spherical harmonic routines problem

From: Dennis Shea (shea AT ucar.edu)
Date: Sat May 28 2005 - 13:32:23 MDT


> Does anyone use NCL functions rhomb_trunC or tri_trunc,
> maybe there are some problems with the functions. The
> following is my NCL code to deal with array tmp(108,128):
>
> begin
> temp = fspan(19,1000,128*108)
> tmp = onedtond(temp,(/108,128/))
> ab = shagC(tmp)
> abc = rhomb_trunC (ab,42)
> ; print(ab)
> bb = ab - abc
> bb = fabs(bb)
> print(sum(bb) )
> end
>
> The arrays 'ab' and 'abc' are same, the result 'bb' is 0.
==================================================================
Hello,

shagC is for Gaussian grids. All Gaussian grids we deal with have
the characteristic that the number of longitudes [M] is twice the size
of the number of latitudes [N]. ie M=2*N

Your example grid does not satisfy that criteria.
Is 108x128 a real world gaussian grid?

---
I wrote a simple script to test romb_trunc and tri_trunc.
Run the script. It seems to work ok.
---
Note: non-gaussian grids are assumed to have pole points.
So you would use shaeC and a grid might be shaped like
N=73 and M=144.
----


_______________________________________________ ncl-talk mailing list ncl-talk@ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Tue May 31 2005 - 08:13:59 MDT