Changeset 19167 for issm/trunk-jpl/src/m/classes/calvinglevermann.py
- Timestamp:
- 02/27/15 08:31:27 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/calvinglevermann.py
r19048 r19167 14 14 15 15 def __init__(self): # {{{ 16 16 17 self.stabilization = 0 18 self.spclevelset = float('NaN') 17 19 self.coeff = float('NaN') 18 20 self.meltingrate = float('NaN') … … 24 26 def __repr__(self): # {{{ 25 27 string=' Calving Levermann parameters:' 28 string="%s\n%s"%(string,fielddisplay(self,'spclevelset','levelset constraints (NaN means no constraint)')) 26 29 string="%s\n%s"%(string,fielddisplay(self,'stabilization','0: no, 1: artificial_diffusivity, 2: streamline upwinding')) 27 30 string="%s\n%s"%(string,fielddisplay(self,'coeff','proportionality coefficient in Levermann model')) … … 31 34 #}}} 32 35 def extrude(self,md): # {{{ 36 self.spclevelset=project3d(md,'vector',self.spclevelset,'type','node') 33 37 self.coeff=project3d(md,'vector',self.coeff,'type','node') 34 38 self.meltingrate=project3d(md,'vector',self.meltingrate,'type','node') … … 49 53 return md 50 54 55 md = checkfield(md,'fieldname','calving.spclevelset','timeseries',1) 51 56 md = checkfield(md,'fieldname','calving.stabilization','values',[0,1,2]); 52 57 md = checkfield(md,'fieldname','calving.coeff','size',[md.mesh.numberofvertices],'>',0) … … 58 63 WriteData(fid,'enum',CalvingLawEnum(),'data',CalvingLevermannEnum(),'format','Integer'); 59 64 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); 60 66 WriteData(fid,'enum',CalvinglevermannCoeffEnum(),'data',self.coeff,'format','DoubleMat','mattype',1) 61 67 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.