Index: /issm/trunk-jpl/src/m/classes/stochasticforcing.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/stochasticforcing.py	(revision 26644)
+++ /issm/trunk-jpl/src/m/classes/stochasticforcing.py	(revision 26645)
@@ -60,23 +60,24 @@
         # Check that all fields agree with the corresponding md class
         checkdefaults = False
-        structstoch   = self.structstochforcing()
+        structstoch = self.structstochforcing()
+        print(type(structstoch))
         for field in self.fields:
-            ### Checks are temporarily commented out: need to debug why this does not work (18Nov2021) ###
+            # Checks are temporarily commented out: need to debug why this does not work (18Nov2021) #
             if 'SMB' in field:
-                mdname = structstoch['mdnames'][structstoch['fields']==field]
-                #if (type(md.smb) != mdname):
-                #    raise TypeError('md.smb does not agree with stochasticforcing field {}'.format(field))
+                mdname = structstoch[field]
+                if (type(md.smb).__name__ != mdname):
+                    raise TypeError('md.smb does not agree with stochasticforcing field {}'.format(mdname))
             if 'FrontalForcings' in field:
-                mdname = structstoch['mdnames'][structstoch['fields']==field]
-                #if (type(md.frontalforcings) != mdname):
-                #    raise TypeError('md.frontalforcings does not agree with stochasticforcing field {}'.format(field))
+                mdname = structstoch[field]
+                if (type(md.frontalforcings).__name__ != mdname):
+                    raise TypeError('md.frontalforcings does not agree with stochasticforcing field {}'.format(mdname))
             if 'Calving' in field:
-                mdname = structstoch['mdnames'][structstoch['fields']==field]
-                #if (type(md.calving) != mdname):
-                #    raise TypeError('md.calving does not agree with stochasticforcing field {}'.format(field))
+                mdname = structstoch[field]
+                if (type(md.calving).__name__ != mdname):
+                    raise TypeError('md.calving does not agree with stochasticforcing field {}'.format(mdname))
             if 'BasalforcingsFloatingice' in field:
-                mdname = structstoch['mdnames'][structstoch['fields']==field]
-                #if (type(md.basalforcings) != mdname):
-                #    raise TypeError('md.basalforcings does not agree with stochasticforcing field {}'.format(field))#Checking for specific dimensions
+                mdname = structstoch[field]
+                if (type(md.basalforcings).__name__ != mdname):
+                    raise TypeError('md.basalforcings does not agree with stochasticforcing field {}'.format(mdname))  #Checking for specific dimensions
             if not (field == 'SMBautoregression' or field == 'FrontalForcingsRignotAutoregression'):
                 checkdefaults = True   #field with non-specific dimensionality
@@ -91,5 +92,5 @@
         if ('FrontalForcingsRignotAutoregression' in self.fields):
             size_tot = size_tot - self.defaultdimension + md.frontalforcings.num_basins
-            indTFar  = self.fields.index('FrontalForcingsRignotAutoregression')
+            indTFar = self.fields.index('FrontalForcingsRignotAutoregression')
         if (indSMBar != -1 and indTFar != -1):
             covsum = self.covariance[np.sum(self.defaultdimensions[0:indSMBar]).astype(int):np.sum(self.defaultdimensions[0:indSMBar + 1]).astype(int), np.sum(self.defaultdimensions[0:indTFar]).astype(int):np.sum(self.defaultdimensions[0:indTFar + 1]).astype(int)]
@@ -152,27 +153,20 @@
     # }}}
 
-    def supportedstochforcings(self): # {{{
+    def supportedstochforcings(self):  # {{{
         """Defines list of fields supported by the class md.stochasticforcing
         """
         list1 = self.structstochforcing()
-        list1 = list1['fields']
-        return(list1) #}}}
+        list1 = list1.keys()
+        return list(list1)
+    #}}}
 
-    def structstochforcing(self): # {{{
+    def structstochforcing(self):  # {{{
         """Defines dictionary with list of fields
            supported and corresponding md names
         """
-        structure = dict({
-                    'fields':
-                        ['DefaultCalving',
-                        'FloatingMeltRate',
-                        'FrontalForcingsRignotAutoregression',
-                        'SMBautoregression'],
-
-                    'mdnames':
-                        ['calving',
-                        'basalforcings',
-                        'frontalforcingsrignotautoregression',
-                        'SMBautoregression']})
-        return(structure) # }}}
-
+        structure = {'DefaultCalving': 'calving',
+                     'FloatingMeltRate': 'basalforcings',
+                     'FrontalForcingsRignotAutoregression': 'frontalforcingsrignotautoregression',
+                     'SMBautoregression': 'SMBautoregression'}
+        return structure
+    # }}}
