From 9c96e0f9ffc41629fed4faabd7a2de6b68b6fa25 Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Sun, 19 Jun 2022 22:33:27 -0500
Subject: [PATCH] fix some cf issues

---
 modules/aeolus/aeolus_amv.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/aeolus/aeolus_amv.py b/modules/aeolus/aeolus_amv.py
index 05e2ff61..60b30138 100644
--- a/modules/aeolus/aeolus_amv.py
+++ b/modules/aeolus/aeolus_amv.py
@@ -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)
 
-- 
GitLab