Skip to content
Snippets Groups Projects
Commit 937ae9bc authored by tomrink's avatar tomrink
Browse files

minor

parent db5a80f9
No related branches found
No related tags found
No related merge requests found
...@@ -1612,11 +1612,12 @@ def create_file_2(match_dct, filename, clvrx_params): ...@@ -1612,11 +1612,12 @@ def create_file_2(match_dct, filename, clvrx_params):
var_s = rg_exmpl.variables var_s = rg_exmpl.variables
for pidx, param in enumerate(clvrx_params): for pidx, param in enumerate(clvrx_params):
v = var_s[param] v = var_s[param]
var = rootgrp.createVariable(param, v.dtype, ['num_aeolus_profs', 'grd_y_len', 'grd_x_len']) var = rootgrp.createVariable(param, v.dtype, ['num_aeolus_profs', 'grd_y_len', 'grd_x_len'], fill_value=v.getncattr('_FillValue'))
# copy attributes from example to new output variable of the same name # copy attributes from example to new output variable of the same name
attr_s = v.ncattrs() attr_s = v.ncattrs()
for attr in attr_s: for attr in attr_s:
var.setncattr(attr, v.getncattr(attr)) if attr != '_FillValue':
var.setncattr(attr, v.getncattr(attr))
nc4_vars.append(var) nc4_vars.append(var)
# Write data to file --------------------- # Write data to file ---------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment