gnudatalanguage / gdl

GDL - GNU Data Language
GNU General Public License v2.0
276 stars 61 forks source link

Trouble with routine NCDF_VARPUT: Dimension bound exceeded. (NC_ERROR=-57) #1890

Open phubanks opened 3 weeks ago

phubanks commented 3 weeks ago

Hello,

I am having trouble running some IDL code under GDL (version 1.0.5) I am getting the following error under (GDL) ... meanwhile my code works fine with no errors under IDL

% NCDF_VARPUT: Dimension bound exceeded. (NC_ERROR=-57)

Any ideas? I cant find any online reference manuals for GDL that talk about NetCDF4 calls ?

Thank you

GillesDuvert commented 3 weeks ago

@phubanks thanks for reporting this. GDL should do exactly as IDL in all circumstances, so there is no GDL reference manual. IDL's documentation is, especially for older releases, quite easily available in electronic or print format (but see the use of "?" in HELP,/INFO) . (Of course in real life GDL does not actually cover all IDL's commands, and by far. And we have many options missing, not speaking of bugs, that should reported here.)

The error says that the start position + count of elements to be written would exceed the size of the destination NCDF variable. I wonder (IDL sometimes is very forgiving) if IDL just silently does not write the overbound part, when GDL is more, eh, strict.

Could you cook a simple example that can be reproduced and that gives this error?

Cheers

phubanks commented 3 weeks ago

thank you so much for your feedback. It was really helpful to hear from you so i really do appreciate it. I will investigate further on my end. But its helpful knowing EVERYTHING is the same between IDL and GDL ... i thought maybe i would need to tweak some of the syntax or call names. esp with NetCDF4 calls.

GillesDuvert commented 3 weeks ago

Despite the fact that GDL appears to works well and fast for simple (and not so simple) day to day use, the GDL project was started only with the humble task of being able to run existing, "historical" IDL code, mostly huge data reduction (in the broad sense) pipelines, should IDL disappear. So, if the pipeline works with IDL, it should with GDL, without any change. Of course, every time an historical pipeline is tested with GDL, we find missing commands and bugs, and here you are. And we have, due to the lack of hands, difficulties to implement more specialized functions and recent IDL features, of course. See the Foreword of the Wiki.

alaingdl commented 2 weeks ago

We do have a limited amount of tests devoted on NetCDF in the testsuite. Yes some really need to be re-write, but we are all quite busy ! Yes, most of them come from a very old time we were newcomers in the art of automatic tests.

We very welcome any snippet we can include in the testsuite. If you could reduce your problem in a few lines example, we will be happy to try it. (we do have 3 nc files in the testsuite)

Thanks

Alain