Index: /issm/trunk-jpl/src/m/io/loadvars.py
===================================================================
--- /issm/trunk-jpl/src/m/io/loadvars.py	(revision 25590)
+++ /issm/trunk-jpl/src/m/io/loadvars.py	(revision 25591)
@@ -30,5 +30,5 @@
     filename = ''
     nvdict = {}
-    debug = True  #print messages if true
+    debug = False  #print messages if true
 
     if len(args) >= 1 and isinstance(args[0], str):
@@ -94,5 +94,5 @@
                 if debug:
                     print("===> {} is of class {}".format(mod, classtype[mod][0]))
-                if classtype[mod][0] == 'results' and 'Time' in NCFile.dimensions:  #Treating results
+                if classtype[mod][0] == 'results' and 'Time' in NCFile.dimensions:  #Treating results {{{
                     keylist = [key for key in curclass.groups]
                     # this is related to the old structure of NC files where every steps of results had its own group
@@ -133,5 +133,6 @@
                                 nvdict['md'].__dict__[classtree[mod][0]].__dict__[classtree[mod][1]] = [getattr(__import__(listtype), listtype)() for i in range(max(1, len(NCFile.dimensions['Time'])))]
                                 Tree = nvdict['md'].__dict__[classtree[mod][0]].__dict__[classtree[mod][1]][:]
-                elif classtype[mod][0] == 'list':  #Treating the old style of results
+                #}}}
+                elif classtype[mod][0] == 'list':  #Treating the old style of results {{{
                     keylist = [key for key in curclass.groups]
                     # this is related to the old structure of NC files where every steps of results had its own group
@@ -159,10 +160,11 @@
                     else:
                         print("WARNING: we don't get the expected format, there might be an issue somewhere")
-                elif classtype[mod][0] == 'massfluxatgate':  #this is for output definitions
+                # }}}
+                elif classtype[mod][0] == 'massfluxatgate':  #this is for output definitions {{{
                     defname = split('Output|[0-9]+', classtree[mod][1])[1] + 's'
                     defindex = int(findall('[0-9]+', classtree[mod][1])[0])
                     nvdict['md'].__dict__[classtree[mod][0]].__dict__[defname].append(getattr(classtype[mod][1], classtype[mod][0])())
                     Tree = nvdict['md'].__dict__[classtree[mod][0]].__dict__[defname][defindex - 1]
-
+                #}}}
                 else:
                     if debug:
@@ -207,9 +209,9 @@
                                 if incomplete:
                                     chosendim = varval.dimensions[0]
-                                    indexlist = np.arange(0, len(NCFile.dimensions[chosendim]))
+                                    timelist = np.arange(0, len(NCFile.dimensions[chosendim]))
                                     print('WARNING, {} is not present on every times, we chose {}({}) as the dimension to write it with'.format(var, chosendim, len(NCFile.dimensions[chosendim])))
                                 else:
-                                    indexlist = np.arange(0, len(NCFile.dimensions['Time']))
-                                for t in indexlist:
+                                    timelist = np.arange(0, len(NCFile.dimensions['Time']))
+                                for t in timelist:
                                     if vardim == 0:
                                         Tree[t].__dict__[str(var)] = varval[:].data
@@ -303,6 +305,15 @@
                         if attr == 'VARNAME':
                             attribute = 'name'
-                        if type(Tree) == list:
+                        if type(Tree) == list and NewFormat:
+                            if debug:
+                                print("printing with index 0")
+                            if listtype == 'dict':
+                                Tree[0][attribute] = str(listclass.getncattr(attr))
+                            else:
+                                Tree[0].__dict__[attribute] = str(listclass.getncattr(attr))
+                        elif type(Tree) == list:
                             t = int(indexlist[i])
+                            if debug:
+                                print("printing with index {]".format(t))
                             if listtype == 'dict':
                                 Tree[t][attribute] = str(listclass.getncattr(attr))
