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

fix some cf issues

parent fde6cb37
No related branches found
No related tags found
No related merge requests found
......@@ -2054,7 +2054,6 @@ def create_bestfit_file(filename, match_dct, raob_dct, gfs_at_raob_dct, bf_dct,
alons = np.array(alons)
alats = np.array(alats)
print(max_num_alevels, max_num_amvs)
# Sample file to retrieve and copy variable attributes
#rg_exmpl = Dataset('/ships19/cloud/scratch/4TH_AMV_INTERCOMPARISON/FMWK2_AMV/GOES16_ABI_2KM_FD_2019293_0020_34_WINDS_AMV_EN-14CT.nc', 'r')
......@@ -2109,7 +2108,9 @@ def create_bestfit_file(filename, match_dct, raob_dct, gfs_at_raob_dct, bf_dct,
var = rootgrp.createVariable(param, v.dtype, ['time', 'num_raob_profs', 'max_num_amvs'])
# copy attributes from example to new output variable of the same name
for attr in attr_s:
if attr != '_FillValue':
if attr == '_FillValue' or attr == 'coordinates' or attr == 'grid_mapping' or attr == 'cell_methods':
continue
else:
var.setncattr(attr, v.getncattr(attr))
nc4_vars.append(var)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment