Re: reduced grid an pyNIO

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Fri, 14 Nov 2008 15:47:02 -0700

Hi Jim,

I would be interested to learn what you find out about the CDO
interpolation of reduced grids.

Regarding the expansion of spherical harmonic coefficients for high
order data, NCL includes a
double precision version of spherepack that I am told will handle T799.
If you download the NCL source you can find this version of
spherepack in the directory external/sphere3.1_dp

Yes, it would be nice to have a version of the PyNIO docs supplied
with the distribution.

On Nov 12, 2008, at 10:10 AM, James Boyle wrote:

> I had not been keeping very close tabs on the pyNIO development, I
> mainly used it as a kind of generic file reader in replacement of
> Hinsen's old netcdf.
> It is quite impressive, I was very surprised to get something back
> from a reduced grid ( it was originally a mistake).
> In any case, I compared the expanded data from the Climate Data
> Operators to the linear and cubic expansions of pyNIO.
> The CDO result is close to the cubic expansion but not exact. I
> looked at the surface heights since I know what this should look like.
> Taking the difference of cubic pynio - cdo, I get (units in meters):
> mean=-0.0043, max = 145.70, min=-132.12, std=4.34
> a plot of the difference show that the differences are at all
> points ( where thinning is used), indicting some small but definite
> disparity in the algorithms used.
> CDO provides no information on the procedures used - I had assumed
> it was gribex. I will now have to ask them for some details.
> On another note - How would you recommend expanding the spherical
> harmonic coefficients?
> I used to read the coefficients using pynio and expand using
> spherepack. However, these data are T799 and spherepack seems to
> break at about T500.
> I thrashed about quite a bit but could not get spherepack to work
> at T799.
> Thus I used the CDOs to convert from spherical harmonics to grid data.
> the discrepancy in the thinned grid shakes my confidence in CDO.
> On yet another note - it would be nice to have a pynio
> documentation (html, pdf) included in the distribution.
> --Jim
> On Nov 11, 2008, at 3:32 PM, David Brown wrote:
>> Hi Jim,
>> PyNIO automatically expands reduced (quasi-regular in GRIB-speak)
>> grids using (by default) a cubic interpolation algorithm.
>> The code is from the ECMWF GRIBEX package, and the specific
>> function is qu2reg3.F. You can examine the source at this URL:
>> http:// www.
>> qu2reg3.F.html
>> The NIO library modifies this code slightly in order to
>> dynamically allocate some work arrays from the calling C code and to
>> adjust the error handling.
>> There is a GRIB-specific file option ('ThinnedGridInterpolation')
>> that allows you to switch the interpolation mode between 'cubic'
>> and 'linear'. This just adjusts the qu2reg3 KCODE argument. Note
>> that if there are any missing values in the data, then the 'linear'
>> method is forced.
>> I would be interested to know how the values differ. Dave
>> Stepaniak, from the Data Support Services here at NCAR has done some
>> fairly rigorous testing of the ECMWF code and concluded that the
>> qu2reg3 'cubic' method was significantly more accurate than the
>> 'linear'
>> method and as good as another candidate method. That is why
>> 'cubic' is the default in PyNIO.
>> -dave
>> On Nov 11, 2008, at 3:51 PM, James Boyle wrote:
>>> I have a grid file from ECMWF. The CDO ( Climate Data operators)
>>> say that it contains a reduced gaussian grid.
>>> I can expand the grid using the CDOs to a full gaussian grid.
>>> when I read a variable using pyNIO from the expanded full
>>> gaussian grid file and the original 'reduced?' grid, both
>>> variables are on the full grid.
>>> but the values are not the same
>>> What does pyNIO do with variables on a reduced grid? I fully
>>> expected to get an error when I read a reduced grid file.
>>> --Jim
>>> _______________________________________________
>>> pyngl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://

pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Fri Nov 14 2008 - 15:47:02 MST

This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 09:25:48 MST