Index: /issm/trunk-jpl/src/m/contrib/defleurian/netCDF/export_netCDF.py
===================================================================
--- /issm/trunk-jpl/src/m/contrib/defleurian/netCDF/export_netCDF.py	(revision 26062)
+++ /issm/trunk-jpl/src/m/contrib/defleurian/netCDF/export_netCDF.py	(revision 26063)
@@ -3,5 +3,5 @@
 import time
 import collections
-from inspect import isclass, getmodule
+from inspect import isclass
 from os import path, remove
 
@@ -47,4 +47,6 @@
     except AttributeError:  #no transient so just one timestep
         StepNum = 1
+    except TypeError:  #this isnot a result so no results in there
+        StepNum = 0
     TimeDim = NCData.createDimension('Time', StepNum)  # time is first
     DimDict = {len(TimeDim): 'Time'}
@@ -80,5 +82,9 @@
         NCgroup = NCData.createGroup(str(group))
         # In each group gather the fields of the class
-        fields = dict.keys(md.__dict__[group].__dict__)
+        try:
+            fields = dict.keys(md.__dict__[group].__dict__)
+        except AttributeError:
+            print("WARNING: md.{} as no fields, we skip it.".format(group))
+            continue
         # looping on fields in each group
         for field in fields:
@@ -220,4 +226,16 @@
                             if ncvar is not None:
                                 FillVar(ncvar, StackedVar)
+                elif type(md.__dict__[group].__dict__[field]).__name__ == 'dict':
+                    # designed for a dict in dummy but might be used elsewhere
+                    # there is no subgroup
+                    klass = type(md.__dict__[group]).__module__ + '.' + type(md.__dict__[group]).__name__
+                    NCgroup.__setattr__('classtype', klass)
+                    Var = md.__dict__[group].__dict__[field]
+                    Var = SqueezeVar(Var)
+                    if verbose > 4:
+                        print("=WW=creating var for {}.{}".format(group, field))
+                    DimDict, ncvar = CreateVar(NCData, Var, field, NCgroup, DimDict)
+                    if ncvar is not None:
+                        FillVar(ncvar, Var)
                 else:
                     klass = type(md.__dict__[group]).__module__ + '.' + type(md.__dict__[group]).__name__
@@ -258,5 +276,5 @@
     # grab dimension
     if val_type in [collections.OrderedDict, dict]:
-        val_shape = len(var)
+        val_shape = len(var.keys())
         val_dim = 2
     else:
@@ -304,5 +322,5 @@
             ncvar = Group.createVariable(str(field), nctype, dimensions=dimensions, zlib=True)
     # treating bool tables and dict as string tables
-    elif val_type in ['bool', collections.OrderedDict, dict]:
+    elif val_type in [collections.OrderedDict, dict, 'bool']:
         if val_shape in [(), (0,), 0]:
             ncvar = Group.createVariable(str(field), str, zlib=True)
@@ -310,5 +328,5 @@
             dimensions, DimDict = GetDim(NCData, val_shape, val_type, DimDict, val_dim)
             ncvar = Group.createVariable(str(field), str, dimensions=dimensions, zlib=True)
-        # Now dealing with numeric variables
+    # Now dealing with numeric variables
     elif val_type in [float, 'float64', np.float64, int, 'int64']:
         if val_shape in [(), (0,), 0] and not SupDim:
Index: /issm/trunk-jpl/src/m/io/loadvars.py
===================================================================
--- /issm/trunk-jpl/src/m/io/loadvars.py	(revision 26062)
+++ /issm/trunk-jpl/src/m/io/loadvars.py	(revision 26063)
@@ -88,10 +88,10 @@
             #==== First we create the model structure  {{{
             if debug:
-                print(' - Now treating classtype {}'.format(mod))
+                print(' ==== Now treating classtype {}'.format(mod))
             if np.size(classtree[mod]) > 1:
                 # this points to a subclass (results.TransientSolution for example)
                 curclass = NCFile.groups[classtree[mod][0]].groups[classtree[mod][1]]
                 if debug:
-                    print("===> {} is of class {}".format(mod, classtype[mod]))
+                    print("    ==> {} is of class {}".format(mod, classtype[mod]))
                 if classtype[mod][0] == 'results.solutionstep':  #Treating results {{{
                     keylist = [key for key in curclass.groups]
@@ -100,5 +100,4 @@
                     #here we have a more NC approach with time being a dimension
                     listtype = split(r'\.', classtype[mod][0])[0]
-                    print("listtype is {}".format(listtype))
                     if len(NCFile.dimensions['Time']) == 1:
                         nvdict['md'].__dict__[classtree[mod][0]].__dict__[classtree[mod][1]] = getattr(classtype[mod][1], listtype)()
@@ -126,9 +125,9 @@
                 else:
                     if debug:
-                        print("Using the default for md.{}.{}, is that right??".format(classtree[mod][0], classtree[mod][1]))
+                        print("    Using the default for md.{}.{}, is that right??".format(classtree[mod][0], classtree[mod][1]))
                     try:
                         modulename = split(r'\.', classtype[mod][0])[0]
                         if debug:
-                            print("trying to import {} from {}".format(classtype[mod][0], modulename))
+                            print("    trying to import {} from {}".format(classtype[mod][0], modulename))
                         nvdict['md'].__dict__[classtree[mod][0]].__dict__[classtree[mod][1]] = getattr(classtype[mod][1], modulename)()
                     except AttributeError:
@@ -141,5 +140,5 @@
                 Tree = nvdict['md'].__dict__[classtree[mod][0]]
             if debug:
-                print("for {} Tree is a {}".format(mod, Tree.__class__.__name__))
+                print("    for {} Tree is a {}".format(mod, Tree.__class__.__name__))
             # }}}
             #==== Then we populate it {{{
@@ -152,5 +151,5 @@
                 for var in listclass.variables:
                     if debug:
-                        print("treating var {}".format(var))
+                        print("    ==> treating var {}".format(var))
                     if var not in ['errlog', 'outlog']:
                         varval = listclass.variables[str(var)]
@@ -234,5 +233,5 @@
                             elif vardim == 2:
                                 #dealling with dict
-                                if varval.dtype == str:  #that is for toolkits wich needs to be ordered
+                                if varval.dtype == str:  #that is for dictionaries
                                     if any(varval[:, 0] == 'toolkit'):  #toolkit definition have to be first
                                         Tree.__dict__[str(var)] = OrderedDict([('toolkit', str(varval[np.where(varval[:, 0] == 'toolkit')[0][0], 1]))])
@@ -240,4 +239,8 @@
                                         strings2 = [str(arg[1]) for arg in varval if arg[0] != 'toolkits']
                                         Tree.__dict__[str(var)].update(list(zip(strings1, strings2)))
+                                    else:
+                                        strings1 = [str(arg[0]) for arg in varval]
+                                        strings2 = [str(arg[1]) for arg in varval]
+                                        Tree.__dict__[str(var)] = OrderedDict(list(zip(strings1, strings2)))
                                 else:
                                     if type(Tree) == list:
@@ -264,5 +267,5 @@
                 for attr in listclass.ncattrs():
                     if debug:
-                        print("treating attribute {}".format(attr))
+                        print("      ==> treating attribute {}".format(attr))
                     if attr != 'classtype':  #classtype is for treatment, don't get it back
                         attribute = str(attr).swapcase()  #there is a reason for swapcase, no sure what it isanymore
@@ -271,5 +274,5 @@
                         if type(Tree) == list and NewFormat:
                             if debug:
-                                print("printing with index 0")
+                                print("        printing with index 0")
                             if listtype == 'dict':
                                 Tree[0][attribute] = str(listclass.getncattr(attr))
@@ -279,5 +282,5 @@
                             t = int(indexlist[i])
                             if debug:
-                                print("printing with index {]".format(t))
+                                print("        printing with index {}".format(t))
                             if listtype == 'dict':
                                 Tree[t][attribute] = str(listclass.getncattr(attr))
