Ignore:
Timestamp:
02/27/15 08:31:27 (10 years ago)
Author:
Mathieu Morlighem
Message:

BUG: fixed calvinglevermann with spc levelset

File:
1 edited

Legend:

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

    r19048 r19167  
    1414
    1515        def __init__(self): # {{{
     16
    1617                self.stabilization = 0
     18                self.spclevelset   = float('NaN')
    1719                self.coeff         = float('NaN')
    1820                self.meltingrate   = float('NaN')
     
    2426        def __repr__(self): # {{{
    2527                string='   Calving Levermann parameters:'
     28                string="%s\n%s"%(string,fielddisplay(self,'spclevelset','levelset constraints (NaN means no constraint)'))
    2629                string="%s\n%s"%(string,fielddisplay(self,'stabilization','0: no, 1: artificial_diffusivity, 2: streamline upwinding'))
    2730                string="%s\n%s"%(string,fielddisplay(self,'coeff','proportionality coefficient in Levermann model'))
     
    3134                #}}}
    3235        def extrude(self,md): # {{{
     36                self.spclevelset=project3d(md,'vector',self.spclevelset,'type','node')
    3337                self.coeff=project3d(md,'vector',self.coeff,'type','node')
    3438                self.meltingrate=project3d(md,'vector',self.meltingrate,'type','node')
     
    4953                        return md
    5054
     55                md = checkfield(md,'fieldname','calving.spclevelset','timeseries',1)
    5156                md = checkfield(md,'fieldname','calving.stabilization','values',[0,1,2]);
    5257                md = checkfield(md,'fieldname','calving.coeff','size',[md.mesh.numberofvertices],'>',0)
     
    5863                WriteData(fid,'enum',CalvingLawEnum(),'data',CalvingLevermannEnum(),'format','Integer');
    5964                WriteData(fid,'enum',LevelsetStabilizationEnum(),'data',self.stabilization,'format','Integer');
     65                WriteData(fid,'enum',SpcLevelsetEnum(),'data',self.spclevelset,'format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1);
    6066                WriteData(fid,'enum',CalvinglevermannCoeffEnum(),'data',self.coeff,'format','DoubleMat','mattype',1)
    6167                WriteData(fid,'object',self,'fieldname','meltingrate','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'scale',1./yts)
Note: See TracChangeset for help on using the changeset viewer.