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

snapshot...

parent 32cd80a1
No related branches found
No related tags found
No related merge requests found
......@@ -244,12 +244,16 @@ def create_file(match_dct, output_path, target_filepath, caliop_clavrx_params, a
nc4_vars = []
var_s = rg_exmpl.variables
for pidx, param in enumerate(amv_params):
v = var_s[param]
attr_s = v.ncattrs()
attr_s = []
dtype = 'f4'
if param in var_s:
v = var_s[param]
attr_s = v.ncattrs()
dtype = v.dtype
if '_FillValue' in attr_s:
var = rootgrp.createVariable(param, v.dtype, ['num_caliop_profs', 'max_num_amvs'], fill_value=v.getncattr('_FillValue'))
var = rootgrp.createVariable(param, dtype, ['num_caliop_profs', 'max_num_amvs'], fill_value=v.getncattr('_FillValue'))
else:
var = rootgrp.createVariable(param, v.dtype, ['num_caliop_profs', 'max_num_amvs'])
var = rootgrp.createVariable(param, dtype, ['num_caliop_profs', 'max_num_amvs'])
# copy attributes from example to new output variable of the same name
for attr in attr_s:
if attr != '_FillValue':
......
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