Changeset 26642


Ignore:
Timestamp:
11/18/21 08:51:52 (3 years ago)
Author:
vverjans
Message:

BUG: fixing call to methods in stochasticforcing.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/stochasticforcing.py

    r26641 r26642  
    6060        # Check that all fields agree with the corresponding md class
    6161        checkdefaults = False
    62         structstoch   = stochasticforcing.structstochforcing()
     62        structstoch   = self.structstochforcing()
    6363        for field in self.fields:
    6464            if 'SMB' in field:
     
    9797
    9898        md = checkfield(md, 'fieldname', 'stochasticforcing.isstochasticforcing', 'values', [0, 1])
    99         md = checkfield(md, 'fieldname', 'stochasticforcing.fields', 'numel', num_fields, 'cell', 1, 'values', stochasticforcing.supportedstochforcings())
     99        md = checkfield(md, 'fieldname', 'stochasticforcing.fields', 'numel', num_fields, 'cell', 1, 'values', self.supportedstochforcings())
    100100        #md = checkfield(md, 'fieldname', 'stochasticforcing.dimensions', 'NaN', 1, 'Inf', 1, '>', 0, 'size', [num_fields]) # specific dimension for each field; NOTE: As opposed to MATLAB implementation, pass list
    101101        md = checkfield(md, 'fieldname', 'stochasticforcing.covariance', 'NaN', 1, 'Inf', 1, 'size', [size_tot, size_tot])  # global covariance matrix
     
    151151    # }}}
    152152
    153     def supportedstochforcings(): # {{{
     153    def supportedstochforcings(self): # {{{
    154154        """Defines list of fields supported by the class md.stochasticforcing
    155155        """
    156         list1 = stochasticforcing.structstochforcing()
     156        list1 = self.structstochforcing()
    157157        list1 = list1['fields']
    158158        return(list1) #}}}
    159159
    160     def structstochforcing(): # {{{
     160    def structstochforcing(self): # {{{
    161161        """Defines dictionary with list of fields
    162162           supported and corresponding md names
Note: See TracChangeset for help on using the changeset viewer.