Skip to content
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

Fix issue when getting the deflate lelvel of the input netcdf file #285

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion tools/libfrencutils/mpp_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,12 @@ void mpp_set_deflation(int fid_in, int fid_out, int user_deflation, int user_shu
for (int vid_out = 0; vid_out < files[fid_out].nvar; ++vid_out) {
// if user has not specified options, look up and use settings in input file
if (user_deflation == -1 || user_shuffle == -1) {
mpp_get_varname(fid_in, vid_out, varname);
mpp_get_varname(fid_out, vid_out, varname);

// Don't attempt to the get the deflate level if the variable is not in the input file (i.e lat_bnds,
// lon_bnds)
if (mpp_var_exist(fid_in, varname) == 0) continue;

ceblanton marked this conversation as resolved.
Show resolved Hide resolved
vid_in = mpp_get_varid(fid_in, varname);

// Note: MPP variable IDs, such as vid_in above, are not the same as the netCDF variable ID
Expand Down
Loading