diff --git a/modules/amv/caliop_clavrx_amv.py b/modules/amv/caliop_clavrx_amv.py
index b7b227d8407bab42008d4118941291b13158c4b6..74d312a9bac2a841b6c0164fb75aab5252cd83e6 100644
--- a/modules/amv/caliop_clavrx_amv.py
+++ b/modules/amv/caliop_clavrx_amv.py
@@ -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':