Re: Gaussian weights for Lin-Rood grid

From: Dennis Shea (shea AT XXXXXX)
Date: Sat Nov 18 2000 - 11:49:24 MST


Generating a "Gaussian grid with pole points" can be done using
"Gauss-Lobatto" (hereafter, G-L) quadrature. Joe Tribbia
provided me with the code necessary to generate G-L latitudes and weights
as function of a user specified number of latitudes [nlat]. The output
will be analogous to the current NCL function "gaus".

This new function (tentatively named, "gausLobat") will be included in the next
version (4.2.0.a014) of NCL. There will be another function (tentatively
named, "gausLobatWgt") that will generate G-L weights given a one-dimensional
array of G-L latitudes. This latter function is the type you requested.

EG: nlat = 8
     gl = gausLobat (nlat) ; gl(nlat,2)
     
sample output for nlat=8:

     gl(:,0) gl(:,1) sum[gl(:,1)]
     ------- ------ -------
   -90.00000 0.03571 0.03571
   -78.45661 0.21070 0.24642
   -53.25302 0.34112 0.58754
   -18.83693 0.41246 1.00000
    18.83693 0.41246 1.41246
    53.25302 0.34112 1.75358
    78.45661 0.21070 1.96429
    90.00000 0.03571 2.00000
    
EG: glat = gl(:,0) ; verify that gausLobatWgt will
                                  ; generate correct weights
     gw = gausLobatWgt (glat)
    
sample output:

       gw sum[gw]
     ------- -------
     0.03571 0.03571
     0.21070 0.24642
     0.34112 0.58754
     0.41246 1.00000
     0.41246 1.41246
     0.34112 1.75358
     0.21070 1.96429
     0.03571 2.00000

---
Unfortunately, the output for nlat=8 does not agree with the 
example numbers you provided. This leads me to believe that there
is some other quadrature being used to generate the gaussian
latitudes/weights included in your posting. If you can find
out what Lin-Rood are doing or, better, if you can get
their code [fortran or C] we can include it within NCL.
    

> So given a list of latitudes I need to come > up with the corresponding gaussian weights. Here's an example.... > > lat = -90, -64.2857142857143, -38.5714285714286, -12.8571428571429, > 12.8571428571429, 38.5714285714286, 64.2857142857143, 90 ; > > gw = 0.101228536290376, 0.222381034453374, 0.313706645877887, > 0.362683783378362, 0.362683783378362, 0.313706645877887, > 0.222381034453374, 0.101228536290376 ;



This archive was generated by hypermail 2b29 : Mon Nov 20 2000 - 11:08:02 MST