Changeset 26744 for issm/trunk/src/m/classes/groundingline.py
- Timestamp:
- 12/22/21 10:39:44 (3 years ago)
- Location:
- issm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
- Property svn:mergeinfo changed
/issm/trunk-jpl merged: 25837-25866,25868-25993,25995-26330,26332-26733,26736-26739,26741
- Property svn:mergeinfo changed
-
issm/trunk/src
- Property svn:mergeinfo changed
-
issm/trunk/src/m/classes/groundingline.py
r25836 r26744 1 1 import numpy as np 2 from checkfield import checkfield 2 3 from fielddisplay import fielddisplay 3 from checkfield import checkfield 4 import MatlabFuncs as m 4 5 from WriteData import WriteData 5 import MatlabFuncs as m6 6 7 7 … … 19 19 self.melt_interpolation = '' 20 20 21 #set defaults21 # Set defaults 22 22 self.setdefaultparameters() 23 23 24 # }}}24 # }}} 25 25 26 26 def __repr__(self): # {{{ 27 string = ' grounding line migration parameters:' 28 29 string = "%s\n%s" % (string, fielddisplay(self, 'migration', 'type of grounding line migration: ''SoftMigration'', ''SubelementMigration'', ''AggressiveMigration'', ''Contact'', ''None''')) 30 string = "%s\n%s" % (string, fielddisplay(self, 'migration', 'type of friction interpolation on partially floating elements: ''SubelementFriction1'', ''SubelementFriction2'', ''NoFrictionOnPartiallyFloating''')) 31 string = "%s\n%s" % (string, fielddisplay(self, 'migration', 'type of melt interpolation on partially floating elements: ''SubelementMelt1'', ''SubelementMelt2'', ''NoMeltOnPartiallyFloating'', ''FullMeltOnPartiallyFloating''')) 32 return string 33 #}}} 27 s = ' grounding line migration parameters:\n' 28 s += '{}\n'.format(fielddisplay(self, 'migration', 'type of grounding line migration: \'SoftMigration\', \'SubelementMigration\', \'AggressiveMigration\', \'Contact\', \'None\'')) 29 s += '{}\n'.format(fielddisplay(self, 'migration', 'type of friction interpolation on partially floating elements: ''SubelementFriction1'', ''SubelementFriction2'', ''NoFrictionOnPartiallyFloating''')) 30 s += '{}\n'.format(fielddisplay(self, 'migration', 'type of melt interpolation on partially floating elements: \'SubelementMelt1\', \'SubelementMelt2\', \'NoMeltOnPartiallyFloating\', \'FullMeltOnPartiallyFloating\'')) 31 return s 32 # }}} 34 33 35 34 def setdefaultparameters(self): # {{{ 36 37 #Type of migration 35 # Type of migration 38 36 self.migration = 'SubelementMigration' 39 37 self.friction_interpolation = 'SubelementFriction1' … … 41 39 42 40 return self 43 # }}}41 # }}} 44 42 45 43 def checkconsistency(self, md, solution, analyses): # {{{ 46 47 44 md = checkfield(md, 'fieldname', 'groundingline.migration', 'values', ['None', 'SubelementMigration', 'AggressiveMigration', 'SoftMigration', 'Contact', 'GroundingOnly']) 48 45 md = checkfield(md, 'fieldname', 'groundingline.friction_interpolation', 'values', ['SubelementFriction1', 'SubelementFriction2', 'NoFrictionOnPartiallyFloating']) … … 53 50 md.checkmessage("requesting grounding line migration, but bathymetry is absent!") 54 51 pos = np.nonzero(md.mask.ocean_levelset > 0.)[0] 55 if any(np.abs(md.geometry.base[pos] - md.geometry.bed[pos]) > 10**-10):52 if any(np.abs(md.geometry.base[pos] - md.geometry.bed[pos]) > pow(10, -10)): 56 53 md.checkmessage("base not equal to bed on grounded ice!") 57 if any(md.geometry.bed - md.geometry.base > 10**-9):54 if any(md.geometry.bed - md.geometry.base > pow(10, -9)): 58 55 md.checkmessage("bed superior to base on floating ice!") 59 56
Note:
See TracChangeset
for help on using the changeset viewer.