Ignore:
Timestamp:
03/17/20 06:04:30 (5 years ago)
Author:
bdef
Message:

BUG: fix in NeffLim and py syntax

File:
1 edited

Legend:

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

    r24667 r24668  
    1919        self.coupling = 0
    2020        self.effective_pressure = float('NaN')
    21         self.effective_pressure_limit = 0
    22     #set defaults
     21        self.effective_pressure_limit = 0
     22        #set defaults
    2323        self.setdefaultparameters()
    2424        self.requested_outputs = []
     
    3333        string = "%s\n%s" % (string, fielddisplay(self, 'coupling', 'Coupling flag 0: uniform sheet (negative pressure ok, default), 1: ice pressure only, 2: water pressure assuming uniform sheet (no negative pressure), 3: use provided effective_pressure, 4: used coupled model (not implemented yet)'))
    3434        string = "%s\n%s" % (string, fielddisplay(self, 'effective_pressure', 'Effective Pressure for the forcing if not coupled [Pa]'))
    35         string = "%s\n%s" % (string, fielddisplay(self, 'effective_pressure_limit','Neff do not allow to fall below a certain limit: effective_pressure_limit*rho_ice*g*thickness (default 0)'))
     35        string = "%s\n%s" % (string, fielddisplay(self, 'effective_pressure_limit', 'Neff do not allow to fall below a certain limit: effective_pressure_limit * rho_ice * g * thickness (default 0)'))
    3636        string = "%s\n%s" % (string, fielddisplay(self, 'requested_outputs', 'additional outputs requested'))
    3737        return string
     
    5252    def setdefaultparameters(self):  # {{{
    5353        self.requested_outputs = ['default']
    54         self.effective_pressure_limit = 0
     54        self.effective_pressure_limit = 0
    5555        return self
    5656    #}}}
     
    7171        md = checkfield(md, 'fieldname', 'friction.p', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofelements])
    7272        md = checkfield(md, 'fieldname', 'friction.coupling', 'numel', [1], 'values', [0, 1, 2, 3, 4])
    73         md = checkfield(md, 'fieldname', 'friction.effective_pressure_limit','numel',[1],'>=',0)
     73        md = checkfield(md, 'fieldname', 'friction.effective_pressure_limit', 'numel', [1], '>=', 0)
    7474        if self.coupling == 3:
    7575            md = checkfield(md, 'fieldname', 'friction.effective_pressure', 'NaN', 1, 'Inf', 1, 'timeseries', 1)
     
    8686        WriteData(fid, prefix, 'object', self, 'fieldname', 'q', 'format', 'DoubleMat', 'mattype', 2)
    8787        WriteData(fid, prefix, 'class', 'friction', 'object', self, 'fieldname', 'coupling', 'format', 'Integer')
    88         WriteData(fid, prefix, 'object', self,'class','friction','fieldname','effective_pressure_limit','format','Double')
     88        WriteData(fid, prefix, 'object', self, 'class', 'friction', 'fieldname', 'effective_pressure_limit', 'format', 'Double')
    8989        if self.coupling == 3:
    9090            WriteData(fid, prefix, 'class', 'friction', 'object', self, 'fieldname', 'effective_pressure', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', md.constants.yts)
Note: See TracChangeset for help on using the changeset viewer.