-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nccopy -d 0 -c / a.nc b.nc not work #1936
Comments
Would it be possible for you to attach the file a.nc, so that I might duplicate your test as closely as possible? If that is not practical, just let me know and I'll create a file on my end. |
The issue appears to be in nccopy.c:1133, where |
@an-ttt A work-around would be to use |
Sigh! I wish that the intertwining of filters and chunking was less implicit that it is. |
Good to know It's in fixing, thanks. |
re: Issue Unidata#1936 The algorithm controlling interaction of -d 0 -F and -c / options is incorrect. The fix: 1. make -d 0 => no deflation 2. make -F properly use the filter specs to decide. Also added a test case to ncdump/tst_nccopy4.sh.
nccopy -d 0 -c / a.nc b.nc not work;
My File a.nc has deflation level 9 and chunks, I am going to make b.nc no compression and no chunks, but failed.
After I changed the codes in three place, then it worked, but I am not sure it's a good fix
//if(option_deflate_level >= 0 || hasfilterspecforvar(ofqn)) //ocontig = NC_CHUNKED; if (option_deflate_level > 0 || hasfilterspecforvar(ofqn)) ocontig = NC_CHUNKED; //
} else if(option_deflate_level == 0) { /* special case; force off */ shuffle_out = 0; //deflate_out = 0; deflate_out = 1; // deflate_level_out = 0; }
//if(shuffle_out != 0 || deflate_out != 0) // NC_CHECK(nc_def_var_deflate(ogrp, o_varid, shuffle_out, deflate_out, deflate_level_out)); if (shuffle_out != 0 || (deflate_out != 0 && deflate_level_out != 0)) NC_CHECK(nc_def_var_deflate(ogrp, o_varid, shuffle_out, deflate_out, deflate_level_out)); //
The text was updated successfully, but these errors were encountered: