NetCDF package news

54 views
Skip to first unread message

Fabian Gans

unread,
May 2, 2014, 8:58:18 AM5/2/14
to juli...@googlegroups.com
Hi all,

I just wanted to spread some news on the NetCDF package. Up to now some of the code using the package was quite slow.
This was because ncread returned arrays with a type inferred from the type of the NetCDF variable. This made it impossible for the julia compiler to guess the type of the returned array and operations on it were quite slow. I now added an ncread! function which takes an array as an argument where the data are supposed to be written to. This has two benefits, it avoids unnecessary memory allocation when reading data inside a for loop and constrains the return type of the read operation, because the function will always read to the type provided by the user so that the type remains predictable for the compiler.
This lead to substantial performance increases when changing some of my scripts to use the new function.

The changes are not submitted to METADATA yet, so feel free to checkout the latest github version and keep me informed about bugs you might find.

Thanks,

Fabian
Reply all
Reply to author
Forward
0 new messages