Undefined values returned by NclReturnValue

From: Li Dong <dongli_at_nyahnyahspammersnyahnyah>
Date: Tue Oct 29 2013 - 19:41:13 MDT

Dear NCL team,

After solve the linking problem for the EEMD codes, I tried to test it in NCL. I printed the result in the wrapper function before return, and it is correct. But when I printed it in NCL script, there are undefined values as:

CORRECT ONE (printed in wrapper function):
Mode 0:
            0.000000
            0.642792
            0.984796
            0.866018
            0.342024
           -0.342024
           -0.866018
           -0.984796
           -0.642792
            0.000000

WRONG ONE (printed in NCL script):
(0) -9.671524e+09
(1) 4.574539e-41
(2) -9.671574e+09
(3) 4.574539e-41
(4) -9.671623e+09
(5) 4.574539e-41
(6) -9.671672e+09
(7) 4.574539e-41
(8) 0
(9) 0.6427915

The return part of my wrapper function is:

    ng_size_t dimsizes_imf[2] = { nm, ns };

    return NclReturnValue(
            (void*)imf,
            2,
            dimsizes_imf,
            NULL,
            NCL_float,
            0
        );

In this case, nm = 4, ns = 10, and imf is “float **". Where is wrong? Thank you in advance!

Best regards,

Li
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Oct 29 19:41:28 2013

This archive was generated by hypermail 2.1.8 : Fri Nov 01 2013 - 08:58:14 MDT