Index: /issm/trunk-jpl/src/m/contrib/defleurian/netCDF/export_netCDF.py
===================================================================
--- /issm/trunk-jpl/src/m/contrib/defleurian/netCDF/export_netCDF.py	(revision 25458)
+++ /issm/trunk-jpl/src/m/contrib/defleurian/netCDF/export_netCDF.py	(revision 25459)
@@ -3,4 +3,5 @@
 import time
 import collections
+from inspect import isclass, getmodule
 from os import path, remove
 
@@ -144,7 +145,7 @@
                 if ncvar is not None:
                     FillVar(ncvar, Var)
+            # empty fiel, do nothing
             elif md.__dict__[group].__dict__[field] is None:
                 print('field md.{}.{} is None'.format(group, field))
-            # do nothing
             # if it is a masked array
             elif type(md.__dict__[group].__dict__[field]) is np.ma.core.MaskedArray:
@@ -158,11 +159,10 @@
                     FillVar(ncvar, Var)
             # this is a multi layered group thta should not be an "else"
-            else:
-                NCgroup.__setattr__('classtype', str(group))
+            elif isclass(type(md.__dict__[group].__dict__[field])):
+                classtype = getmodule(type(md.__dict__[group])).__name__
+                NCgroup.__setattr__('classtype', classtype)
                 Subgroup = NCgroup.createGroup(str(field))
-                if str(group) == 'solidearth' and str(field) == 'settings':
-                    Subgroup.__setattr__('classtype', 'solidearthsettings')
-                else:
-                    Subgroup.__setattr__('classtype', str(field))
+                classtype = getmodule(type(md.__dict__[group].__dict__[field])).__name__
+                Subgroup.__setattr__('classtype', classtype)
                 subfields = dict.keys(md.__dict__[group].__dict__[field].__dict__)
                 for subfield in subfields:
@@ -175,4 +175,7 @@
                         if ncvar is not None:
                             FillVar(ncvar, Var)
+            else:
+                print("WARNING, md.{}.{} is not treated as it does not fall in one of the existing cases.".format(str(group), str(field)))
+
     NCData.close()
 
