[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GEMPAK question on dcgrib2 and gribtonc



Steve,

At the U.W. here we have some tiny modifications to dcgrib2 and
gribtonc code that I am no longer sure about.  Included below are the
outputs of diff -c between the Unidata distributions (.clean
extension) and our code.  Do you happen to know which of these is
correct, i.e. is that '- inrow' needed?  Thanks for any help:

*** NAWIPS-5.8.1.clean/unidata/ldmbridge/dcgrib2/qlin.c Wed Feb 26 14:04:41 2003
--- NAWIPS-5.8.1/unidata/ldmbridge/dcgrib2/qlin.c       Tue Apr 12 14:38:55 2005
***************
*** 116,122 ****
                     ni,          /* number of output values to compute */
                     c);          /* precomputed interpolation coefficients */
              for (i=0; i < ni; i++) {
!                 double c1 = 1.0 - j*(nrows - 1.0)/(nj - 1.0);
                  double c2 = 1.0 - c1;
                  *outp = c1 * *outp + c2*row2[i];
                  outp++;
--- 116,122 ----
                     ni,          /* number of output values to compute */
                     c);          /* precomputed interpolation coefficients */
              for (i=0; i < ni; i++) {
!                 double c1 = 1.0 - (j*(nrows - 1.0)/(nj - 1.0) - inrow);
                  double c2 = 1.0 - c1;
                  *outp = c1 * *outp + c2*row2[i];
                  outp++;

and for quasi.c:
*** NAWIPS-5.8.1.clean/unidata/ldmbridge/gribtonc_src/quasi.c   Thu Jun 18 
09:53:45 1998
--- NAWIPS-5.8.1/unidata/ldmbridge/gribtonc_src/quasi.c Tue Apr 12 14:38:56 2005
***************
*** 192,198 ****
                   ni,          /* number of output values to compute */
                   c);          /* precomputed interpolation coefficients */
            for (i=0; i < ni; i++) {
!               double c1 = 1.0 - j*(nrows - 1.0)/(nj - 1.0);
                double c2 = 1.0 - c1;
                *outp = c1 * *outp + c2*row2[i];
                outp++;
--- 192,198 ----
                   ni,          /* number of output values to compute */
                   c);          /* precomputed interpolation coefficients */
            for (i=0; i < ni; i++) {
!               double c1 = 1.0 - (j*(nrows - 1.0)/(nj - 1.0) - inrow);
                double c2 = 1.0 - c1;
                *outp = c1 * *outp + c2*row2[i];
                outp++;

-- 
David Ovens              e-mail: address@hidden
Research Meteorologist    phone: (206) 685-8108
Dept of Atm. Sciences      plan: Real-time MM5 forecasting for the
Box 351640                        Pacific Northwest
University of Washington          http://www.atmos.washington.edu/mm5rt
Seattle, WA  98195               Weather Graphics and Loops
                                  http://www.atmos.washington.edu/~ovens/loops