> M=2*N is the criteria of triangular truncation Gaussian grids, such as NCAR cam AGCM T31(48*96), T42(64*128) , T85(128*256). For same rhomboidal truncation number of Gaussian grids, latitude resolution is higher than trianguler, such as GFDL AGCM R15, R30
>
> Tn: grid_lon >= 3n + 1, grid_lat > (3n+1) / 2
> Rn: grid_lon >= 3n + 1, grid_lat > (5n+1) / 2 (n is truncation number)
> Model: Typical Grid:
> T42 128 x 64
> T63 192 x 96
> R30 96 x 80
> R42 128 x 108
>
> our model is rhomboidal truncation 42 (R42) resolation AGCM,
>I want to convert spherical harmonic coefficients to grid space
>by NCL, but I'm puzzled about 'shsgC' input array form. My spectral
>coefficients array is (2,43*43), I don't know how to turn it to
>(2,nlat,N), then get grid space (nlat,nlon) by NCL
>function 'shsgC'. (nlat=108,nlon=128).
---------------------------------------
I am not an expert on this but the following is an approach
that we use when getting spherical harmonic coefficients from
ECMWF [triangular truncation].
Hope this works.
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
nlat = 108 ; full array
mlon = 128
temp = new ( (/nlat,mlon/), "float") ; full array
a = new ( (/nlat,nlat/), "float") ; real coef
b = new ( (/nlat,nlat/), "float") ; imaginary coef
temp = 0.0 ; initilize
a = 0.0
b = 0.0
N = 43
N1 = N-1
f = addfile ("data.nc", "r") ; file with complec coef [CC]
a(0:N1,0:N1) = f->CC(0,:,:) ; subset of array only
b(0:N1,0:N1) = f->CC(1,:,:) ; all other a,b values=0.0
shsgc(a,b,temp) ; recreate the grid
;************************************************
; create default plot
;************************************************
wks = gsn_open_wks("ps","ce")
plot = gsn_csm_contour(wks,temp,False) ; create a default plot
end
_______________________________________________
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