Changeset 14640
- Timestamp:
- 04/18/13 10:20:16 (12 years ago)
- Location:
- issm/trunk-jpl/src/m/classes
- Files:
-
- 58 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/m/classes/autodiff.py ¶
r13865 r14640 1 #module imports2 1 import numpy 3 2 from dependent import * … … 16 15 """ 17 16 18 #properties19 17 def __init__(self,*args): # {{{ 20 18 self.isautodiff = False … … 28 26 raise RuntimeError("constructor not supported") 29 27 # }}} 30 31 28 def __repr__(self): # {{{ 32 29 s =" automatic differentiation parameters:\n" … … 39 36 return s 40 37 # }}} 41 42 38 def setdefaultparameters(self): # {{{ 43 39 return self 44 40 # }}} 45 46 41 def checkconsistency(self,md,solution,analyses): # {{{ 47 42 … … 61 56 return md 62 57 # }}} 63 64 58 def marshall(self,fid): # {{{ 65 59 WriteData(fid,'object',self,'fieldname','isautodiff','format','Boolean') … … 194 188 return 195 189 # }}} 196 -
TabularUnified issm/trunk-jpl/src/m/classes/balancethickness.m ¶
r13020 r14640 36 36 disp(sprintf(' balance thickness solution parameters:')); 37 37 38 fielddisplay(obj,'spcthickness','thickness constraints (NaN means no constraint) ');39 fielddisplay(obj,'thickening_rate','ice thickening rate used in the mass conservation (dh/dt) ');38 fielddisplay(obj,'spcthickness','thickness constraints (NaN means no constraint) [m]'); 39 fielddisplay(obj,'thickening_rate','ice thickening rate used in the mass conservation (dh/dt) [m/yr]'); 40 40 fielddisplay(obj,'stabilization','0: None, 1: SU, 2: MacAyeal''s artificial diffusivity, 3:DG'); 41 41 -
TabularUnified issm/trunk-jpl/src/m/classes/balancethickness.py ¶
r14141 r14640 1 #module imports2 1 from fielddisplay import fielddisplay 3 2 from EnumDefinitions import * … … 13 12 """ 14 13 15 #properties 16 def __init__(self): 17 # {{{ Properties 14 def __init__(self): # {{{ 18 15 self.spcthickness = float('NaN') 19 16 self.thickening_rate = float('NaN') … … 24 21 25 22 #}}} 26 def __repr__(self): 27 # {{{ Display 23 def __repr__(self): # {{{ 28 24 29 25 string=' balance thickness solution parameters:' 30 26 31 string="%s\n%s"%(string,fielddisplay(self,'spcthickness','thickness constraints (NaN means no constraint) '))32 string="%s\n%s"%(string,fielddisplay(self,'thickening_rate','ice thickening rate used in the mass conservation (dh/dt) '))27 string="%s\n%s"%(string,fielddisplay(self,'spcthickness','thickness constraints (NaN means no constraint) [m]')) 28 string="%s\n%s"%(string,fielddisplay(self,'thickening_rate','ice thickening rate used in the mass conservation (dh/dt) [m/yr]')) 33 29 string="%s\n%s"%(string,fielddisplay(self,'stabilization',"0: None, 1: SU, 2: MacAyeal's artificial diffusivity, 3:DG")) 34 30 return string 35 31 #}}} 36 def setdefaultparameters(self): 37 # {{{setdefaultparameters 32 def setdefaultparameters(self): # {{{ 38 33 39 34 #Type of stabilization used … … 42 37 return self 43 38 #}}} 44 45 39 def checkconsistency(self,md,solution,analyses): # {{{ 46 40 #Early return … … 54 48 return md 55 49 # }}} 56 57 50 def marshall(self,fid): # {{{ 58 51 WriteData(fid,'object',self,'fieldname','spcthickness','format','DoubleMat','mattype',1) … … 60 53 WriteData(fid,'object',self,'fieldname','stabilization','format','Integer') 61 54 # }}} 62 -
TabularUnified issm/trunk-jpl/src/m/classes/bamggeom.py ¶
r13484 r14640 32 32 raise TypeError("bamggeom constructor error message: unknown type of constructor call") 33 33 # }}} 34 35 34 def __repr__(self): # {{{ 36 35 s ="class '%s' object '%s' = \n" % (type(self),'self') … … 45 44 return s 46 45 # }}} 47 -
TabularUnified issm/trunk-jpl/src/m/classes/bamgmesh.py ¶
r13436 r14640 40 40 raise TypeError("bamgmesh constructor error message: unknown type of constructor call") 41 41 # }}} 42 43 42 def __repr__(self): # {{{ 44 43 s ="class '%s' object '%s' = \n" % (type(self),'self') … … 61 60 return s 62 61 # }}} 63 -
TabularUnified issm/trunk-jpl/src/m/classes/basalforcings.m ¶
r13020 r14640 38 38 disp(sprintf(' basal forcings parameters:')); 39 39 40 fielddisplay(obj,'melting_rate','basal melting rate (positive if melting) ');41 fielddisplay(obj,'melting_rate_correction','additional melting applied when the grounding line retreats');40 fielddisplay(obj,'melting_rate','basal melting rate (positive if melting) [m/yr]'); 41 fielddisplay(obj,'melting_rate_correction','additional melting applied to compensate for dh/dt [m/yr]'); 42 42 fielddisplay(obj,'geothermalflux','geothermal heat flux [W/m^2]'); 43 43 -
TabularUnified issm/trunk-jpl/src/m/classes/basalforcings.py ¶
r14141 r14640 1 #module imports2 1 from fielddisplay import fielddisplay 3 2 from EnumDefinitions import * … … 13 12 """ 14 13 15 #properties 16 def __init__(self): 17 # {{{ Properties 14 def __init__(self): # {{{ 18 15 self.melting_rate = float('NaN') 19 16 self.melting_rate_correction = float('NaN') … … 24 21 25 22 #}}} 26 def __repr__(self): 27 # {{{ Display 23 def __repr__(self): # {{{ 28 24 string=" basal forcings parameters:" 29 25 30 string="%s\n%s"%(string,fielddisplay(self,"melting_rate","basal melting rate (positive if melting) "))31 string="%s\n%s"%(string,fielddisplay(self,"melting_rate_correction","additional melting applied when the grounding line retreats"))26 string="%s\n%s"%(string,fielddisplay(self,"melting_rate","basal melting rate (positive if melting) [m/yr]")) 27 string="%s\n%s"%(string,fielddisplay(self,"melting_rate_correction","additional melting applied to compensate for dh/dt [m/yr]")) 32 28 string="%s\n%s"%(string,fielddisplay(self,"geothermalflux","geothermal heat flux [W/m^2]")) 33 29 return string 34 30 #}}} 35 def setdefaultparameters(self): 36 # {{{setdefaultparameters 31 def setdefaultparameters(self): # {{{ 37 32 return self 38 33 #}}} 39 40 34 def checkconsistency(self,md,solution,analyses): # {{{ 41 35 … … 52 46 return md 53 47 # }}} 54 55 48 def marshall(self,fid): # {{{ 56 49 WriteData(fid,'object',self,'fieldname','melting_rate','format','DoubleMat','mattype',1) … … 58 51 WriteData(fid,'object',self,'fieldname','geothermalflux','format','DoubleMat','mattype',1) 59 52 # }}} 60 -
TabularUnified issm/trunk-jpl/src/m/classes/constants.m ¶
r12663 r14640 41 41 disp(sprintf(' constants parameters:')); 42 42 43 fielddisplay(obj,'g','gravitational acceleration ');44 fielddisplay(obj,'yts','number of seconds in a year ');45 fielddisplay(obj,'referencetemperature','reference temperature used in the enthalpy model ');43 fielddisplay(obj,'g','gravitational acceleration [m/s^2]'); 44 fielddisplay(obj,'yts','number of seconds in a year [s/yr]'); 45 fielddisplay(obj,'referencetemperature','reference temperature used in the enthalpy model [K]'); 46 46 47 47 end % }}} -
TabularUnified issm/trunk-jpl/src/m/classes/constants.py ¶
r14141 r14640 1 #module imports2 1 from fielddisplay import fielddisplay 3 2 from EnumDefinitions import * … … 13 12 """ 14 13 15 #properties 16 def __init__(self): 17 # {{{ Properties 14 def __init__(self): # {{{ 18 15 self.g = 0 19 16 self.yts = 0 … … 24 21 25 22 #}}} 26 def __repr__(self): 27 # {{{ Display 23 def __repr__(self): # {{{ 28 24 string=" constants parameters:" 29 25 30 string="%s\n%s"%(string,fielddisplay(self,"g","gravitational acceleration "))31 string="%s\n%s"%(string,fielddisplay(self,"yts","number of seconds in a year "))32 string="%s\n%s"%(string,fielddisplay(self,"referencetemperature","reference temperature used in the enthalpy model "))26 string="%s\n%s"%(string,fielddisplay(self,"g","gravitational acceleration [m/s^2]")) 27 string="%s\n%s"%(string,fielddisplay(self,"yts","number of seconds in a year [s/yr]")) 28 string="%s\n%s"%(string,fielddisplay(self,"referencetemperature","reference temperature used in the enthalpy model [K]")) 33 29 34 30 return string 35 31 #}}} 36 def setdefaultparameters(self): 37 # {{{setdefaultparameters 32 def setdefaultparameters(self): # {{{ 38 33 39 34 #acceleration due to gravity (m/s^2) … … 48 43 return self 49 44 #}}} 50 51 45 def checkconsistency(self,md,solution,analyses): # {{{ 52 46 … … 57 51 return md 58 52 # }}} 59 60 53 def marshall(self,fid): # {{{ 61 54 WriteData(fid,'object',self,'fieldname','g','format','Double') … … 63 56 WriteData(fid,'object',self,'fieldname','referencetemperature','format','Double') 64 57 # }}} 65 -
TabularUnified issm/trunk-jpl/src/m/classes/debug.py ¶
r14141 r14640 1 #module imports2 1 from fielddisplay import fielddisplay 3 2 from WriteData import * … … 11 10 """ 12 11 13 #properties 14 def __init__(self): 15 # {{{ Properties 12 def __init__(self): # {{{ 16 13 self.valgrind = False 17 14 self.gprof = False … … 22 19 23 20 #}}} 24 def __repr__(self): 25 # {{{ Display 21 def __repr__(self): # {{{ 26 22 string=" debug parameters:" 27 23 … … 31 27 return string 32 28 #}}} 33 34 def setdefaultparameters(self): 35 # {{{setdefaultparameters 29 def setdefaultparameters(self): # {{{ 36 30 return self 37 31 #}}} 38 39 32 def marshall(self,fid): # {{{ 40 33 WriteData(fid,'object',self,'fieldname','profiling','format','Boolean') 41 34 # }}} 42 -
TabularUnified issm/trunk-jpl/src/m/classes/dependent.py ¶
r13991 r14640 47 47 self.segments=MeshProfileIntersection(mesh.elements,mesh.x,mesh.y,self.exp) 48 48 # }}} 49 50 49 def __repr__(self): # {{{ 51 50 s =" dependent variable:\n" … … 62 61 return s 63 62 # }}} 64 65 63 def setdefaultparameters(self): # {{{ 66 64 #do nothing 67 65 return self 68 66 # }}} 69 70 67 def checkconsistency(self,md,solution,analyses): # {{{ 71 68 if strcmpi(self.name,'MassFlux'): … … 83 80 return md 84 81 # }}} 85 86 82 def typetoscalar(self): # {{{ 87 83 if strcmpi(self.type,'scalar'): … … 92 88 return scalar 93 89 # }}} 94 -
TabularUnified issm/trunk-jpl/src/m/classes/diagnostic.m ¶
r14531 r14640 122 122 disp(sprintf('\n %s','Convergence criteria:')); 123 123 fielddisplay(obj,'restol','mechanical equilibrium residual convergence criterion'); 124 fielddisplay(obj,'reltol','velocity relative convergence criterion, NaN ->not applied');125 fielddisplay(obj,'abstol','velocity absolute convergence criterion, NaN ->not applied');124 fielddisplay(obj,'reltol','velocity relative convergence criterion, NaN: not applied'); 125 fielddisplay(obj,'abstol','velocity absolute convergence criterion, NaN: not applied'); 126 126 fielddisplay(obj,'isnewton','0: Picard''s fixed point, 1: Newton''s method, 2: hybrid'); 127 127 fielddisplay(obj,'maxiter','maximum number of nonlinear iterations'); … … 129 129 130 130 disp(sprintf('\n %s','boundary conditions:')); 131 fielddisplay(obj,'spcvx','x-axis velocity constraint (NaN means no constraint) ');132 fielddisplay(obj,'spcvy','y-axis velocity constraint (NaN means no constraint) ');133 fielddisplay(obj,'spcvz','z-axis velocity constraint (NaN means no constraint) ');134 fielddisplay(obj,'icefront','segments on ice front list (last column 0 -> Air, 1-> Water, 2->Ice)');131 fielddisplay(obj,'spcvx','x-axis velocity constraint (NaN means no constraint) [m/yr]'); 132 fielddisplay(obj,'spcvy','y-axis velocity constraint (NaN means no constraint) [m/yr]'); 133 fielddisplay(obj,'spcvz','z-axis velocity constraint (NaN means no constraint) [m/yr]'); 134 fielddisplay(obj,'icefront','segments on ice front list (last column 0: Air, 1: Water, 2: Ice)'); 135 135 136 136 disp(sprintf('\n %s','Rift options:')); … … 146 146 fielddisplay(obj,'stokesreconditioning','multiplier for incompressibility equation. Only for Stokes model'); 147 147 fielddisplay(obj,'referential','local referential'); 148 fielddisplay(obj,'loadingforce','loading force applied on each point ');148 fielddisplay(obj,'loadingforce','loading force applied on each point [N/m^3]'); 149 149 fielddisplay(obj,'requested_outputs','additional outputs requested'); 150 150 -
TabularUnified issm/trunk-jpl/src/m/classes/diagnostic.py ¶
r14530 r14640 1 #module imports2 1 import numpy 3 2 import sys … … 16 15 """ 17 16 18 #properties 19 def __init__(self): 20 # {{{ Properties 17 def __init__(self): # {{{ 21 18 self.spcvx = float('NaN') 22 19 self.spcvy = float('NaN') … … 43 40 44 41 #}}} 45 def __repr__(self): 46 # {{{ Display 42 def __repr__(self): # {{{ 47 43 48 44 string=' Diagnostic solution parameters:' 49 45 string="%s\n%s"%(string,' Convergence criteria:') 50 51 46 string="%s\n%s"%(string,fielddisplay(self,'restol','mechanical equilibrium residual convergence criterion')) 52 string="%s\n%s"%(string,fielddisplay(self,'reltol','velocity relative convergence criterion, NaN ->not applied'))53 string="%s\n%s"%(string,fielddisplay(self,'abstol','velocity absolute convergence criterion, NaN ->not applied'))47 string="%s\n%s"%(string,fielddisplay(self,'reltol','velocity relative convergence criterion, NaN: not applied')) 48 string="%s\n%s"%(string,fielddisplay(self,'abstol','velocity absolute convergence criterion, NaN: not applied')) 54 49 string="%s\n%s"%(string,fielddisplay(self,'isnewton',"0: Picard's fixed point, 1: Newton's method, 2: hybrid")) 55 50 string="%s\n%s"%(string,fielddisplay(self,'maxiter','maximum number of nonlinear iterations')) … … 57 52 58 53 string="%s\n%s"%(string,'\n boundary conditions:') 59 60 string="%s\n%s"%(string,fielddisplay(self,'spcvx','x-axis velocity constraint (NaN means no constraint)')) 61 string="%s\n%s"%(string,fielddisplay(self,'spcvy','y-axis velocity constraint (NaN means no constraint)')) 62 string="%s\n%s"%(string,fielddisplay(self,'spcvz','z-axis velocity constraint (NaN means no constraint)')) 63 string="%s\n%s"%(string,fielddisplay(self,'icefront','segments on ice front list (last column 0-> Air, 1-> Water, 2->Ice')) 54 string="%s\n%s"%(string,fielddisplay(self,'spcvx','x-axis velocity constraint (NaN means no constraint) [m/yr]')) 55 string="%s\n%s"%(string,fielddisplay(self,'spcvy','y-axis velocity constraint (NaN means no constraint) [m/yr]')) 56 string="%s\n%s"%(string,fielddisplay(self,'spcvz','z-axis velocity constraint (NaN means no constraint) [m/yr]')) 57 string="%s\n%s"%(string,fielddisplay(self,'icefront','segments on ice front list (last column 0: Air, 1: Water, 2: Ice')) 64 58 65 59 string="%s\n%s"%(string,'\n Rift options:') … … 75 69 string="%s\n%s"%(string,fielddisplay(self,'stokesreconditioning','multiplier for incompressibility equation. Only for Stokes model')) 76 70 string="%s\n%s"%(string,fielddisplay(self,'referential','local referential')) 77 string="%s\n%s"%(string,fielddisplay(self,'loadingforce','loading force applied on each point '))71 string="%s\n%s"%(string,fielddisplay(self,'loadingforce','loading force applied on each point [N/m^3]')) 78 72 string="%s\n%s"%(string,fielddisplay(self,'requested_outputs','additional outputs requested')) 79 73 80 74 return string 81 75 #}}} 82 83 def setdefaultparameters(self): 84 # {{{setdefaultparameters 76 def setdefaultparameters(self): # {{{ 85 77 #maximum of non-linear iterations. 86 78 self.maxiter=100 … … 112 104 return self 113 105 #}}} 114 115 106 def checkconsistency(self,md,solution,analyses): # {{{ 116 107 … … 169 160 return md 170 161 # }}} 171 172 162 def marshall(self,fid): # {{{ 173 163 WriteData(fid,'object',self,'fieldname','spcvx','format','DoubleMat','mattype',1) … … 199 189 WriteData(fid,'data',data,'enum',DiagnosticIcefrontEnum(),'format','DoubleMat','mattype',3) 200 190 # }}} 201 -
TabularUnified issm/trunk-jpl/src/m/classes/flaim.py ¶
r13116 r14640 1 #module imports2 1 import numpy 3 2 from collections import OrderedDict … … 15 14 """ 16 15 17 #properties 18 def __init__(self): 19 # {{{ Properties 16 def __init__(self): # {{{ 20 17 self.targets = '' 21 18 self.tracks = '' … … 32 29 self.opt_niter = 30000 33 30 #}}} 34 def __repr__(self): 35 # {{{ Displa 31 def __repr__(self): # {{{ 36 32 string=' FLAIM - Flight Line Adaptation using Ice sheet Modeling:' 37 33 … … 61 57 return string 62 58 #}}} 63 64 59 def checkconsistency(self,md,solution,analyses): # {{{ 65 60 … … 76 71 return md 77 72 # }}} 78 -
TabularUnified issm/trunk-jpl/src/m/classes/flowequation.py ¶
r14141 r14640 1 #module imports2 1 import numpy 3 2 import copy … … 15 14 """ 16 15 17 #properties 18 def __init__(self): 19 # {{{ Properties 16 def __init__(self): # {{{ 20 17 21 18 self.ismacayealpattyn = 0 … … 33 30 34 31 #}}} 35 def __repr__(self): 36 # {{{ Display 32 def __repr__(self): # {{{ 37 33 string=' flow equation parameters:' 38 34 … … 48 44 return string 49 45 #}}} 50 51 def setdefaultparameters(self): 52 # {{{setdefaultparameters 46 def setdefaultparameters(self): # {{{ 53 47 return self 54 48 #}}} 55 56 49 def checkconsistency(self,md,solution,analyses): # {{{ 57 50 … … 80 73 return md 81 74 # }}} 82 83 75 def marshall(self,fid): # {{{ 84 76 WriteData(fid,'object',self,'fieldname','ismacayealpattyn','format','Boolean') … … 113 105 WriteData(fid,'data',data,'enum',FlowequationElementEquationEnum(),'format','DoubleMat','mattype',2) 114 106 # }}} 115 -
TabularUnified issm/trunk-jpl/src/m/classes/friction.py ¶
r14141 r14640 1 #module imports2 1 from fielddisplay import fielddisplay 3 2 from EnumDefinitions import * … … 13 12 """ 14 13 15 #properties 16 def __init__(self): 17 # {{{ Properties 14 def __init__(self): # {{{ 18 15 self.coefficient = float('NaN') 19 16 self.p = float('NaN') … … 24 21 25 22 #}}} 26 def __repr__(self): 27 # {{{ Display 23 def __repr__(self): # {{{ 28 24 string="Sigma= drag^2 * Neff ^r * u ^s, with Neff=rho_ice*g*thickness+rho_water*g*bed, r=q/p and s=1/p" 29 25 … … 33 29 return string 34 30 #}}} 35 36 def setdefaultparameters(self): 37 # {{{setdefaultparameters 31 def setdefaultparameters(self): # {{{ 38 32 return self 39 33 #}}} 40 41 34 def checkconsistency(self,md,solution,analyses): # {{{ 42 35 … … 51 44 return md 52 45 # }}} 53 54 46 def marshall(self,fid): # {{{ 55 47 WriteData(fid,'object',self,'fieldname','coefficient','format','DoubleMat','mattype',1) … … 57 49 WriteData(fid,'object',self,'fieldname','q','format','DoubleMat','mattype',2) 58 50 # }}} 59 -
TabularUnified issm/trunk-jpl/src/m/classes/geometry.m ¶
r13020 r14640 39 39 disp(sprintf(' geometry parameters:')); 40 40 41 fielddisplay(obj,'surface','surface elevation ');42 fielddisplay(obj,'thickness','ice thickness ');43 fielddisplay(obj,'bed','bed elevation ');44 fielddisplay(obj,'bathymetry','bathymetry elevation ');41 fielddisplay(obj,'surface','surface elevation [m]'); 42 fielddisplay(obj,'thickness','ice thickness [m]'); 43 fielddisplay(obj,'bed','bed elevation [m]'); 44 fielddisplay(obj,'bathymetry','bathymetry elevation [m]'); 45 45 fielddisplay(obj,'hydrostatic_ratio','coefficient for ice shelves'' thickness correction: hydrostatic_ratio H_obs+ (1-hydrostatic_ratio) H_hydro'); 46 46 -
TabularUnified issm/trunk-jpl/src/m/classes/geometry.py ¶
r14141 r14640 1 #module imports2 1 from fielddisplay import fielddisplay 3 2 from EnumDefinitions import * … … 13 12 """ 14 13 15 #properties 16 def __init__(self): 17 # {{{ Properties 14 def __init__(self): # {{{ 18 15 self.surface = float('NaN') 19 16 self.thickness = float('NaN') … … 26 23 27 24 #}}} 28 def __repr__(self): 29 # {{{ Display 25 def __repr__(self): # {{{ 30 26 31 27 string=" geometry parameters:" 32 33 string="%s\n%s"%(string,fielddisplay(self,'surface','surface elevation')) 34 string="%s\n%s"%(string,fielddisplay(self,'thickness','ice thickness')) 35 string="%s\n%s"%(string,fielddisplay(self,'bed','bed elevation')) 36 string="%s\n%s"%(string,fielddisplay(self,'bathymetry','bathymetry elevation')) 28 string="%s\n%s"%(string,fielddisplay(self,'surface','surface elevation [m]')) 29 string="%s\n%s"%(string,fielddisplay(self,'thickness','ice thickness [m]')) 30 string="%s\n%s"%(string,fielddisplay(self,'bed','bed elevation [m]')) 31 string="%s\n%s"%(string,fielddisplay(self,'bathymetry','bathymetry elevation [m]')) 37 32 string="%s\n%s"%(string,fielddisplay(self,'hydrostatic_ratio','coefficient for ice shelves'' thickness correction: hydrostatic_ratio H_obs+ (1-hydrostatic_ratio) H_hydro')) 38 33 return string 39 34 #}}} 40 41 def setdefaultparameters(self): 42 # {{{setdefaultparameters 35 def setdefaultparameters(self): # {{{ 43 36 return self 44 37 #}}} 45 46 38 def checkconsistency(self,md,solution,analyses): # {{{ 47 39 … … 56 48 return md 57 49 # }}} 58 59 50 def marshall(self,fid): # {{{ 60 51 WriteData(fid,'data',self.surface,'format','DoubleMat','mattype',1,'enum',SurfaceEnum()) … … 64 55 WriteData(fid,'object',self,'fieldname','hydrostatic_ratio','format','DoubleMat','mattype',1) 65 56 # }}} 66 -
TabularUnified issm/trunk-jpl/src/m/classes/groundingline.m ¶
r14605 r14640 1 % CONSTANTSclass definition1 %GROUNDINGLINE class definition 2 2 % 3 3 % Usage: … … 48 48 end % }}} 49 49 function disp(obj) % {{{ 50 disp(sprintf(' balance thickness solution parameters:')); 51 50 disp(sprintf(' grounding line migration parameters:')); 52 51 fielddisplay(obj,'migration','type of grounding line migration: ''SoftMigration'',''AgressiveMigration'' or ''None'''); 53 fielddisplay(obj,'melting_rate','melting rate applied when previously grounded parts start floating ');52 fielddisplay(obj,'melting_rate','melting rate applied when previously grounded parts start floating [m/yr]'); 54 53 55 54 end % }}} -
TabularUnified issm/trunk-jpl/src/m/classes/groundingline.py ¶
r14605 r14640 1 #module imports2 1 import numpy 3 2 from fielddisplay import fielddisplay … … 10 9 class groundingline(object): 11 10 """ 12 CONSTANTSclass definition11 GROUNDINGLINE class definition 13 12 14 13 Usage: … … 16 15 """ 17 16 18 #properties 19 def __init__(self): 20 # {{{ Properties 17 def __init__(self): # {{{ 21 18 self.migration='' 22 19 self.melting_rate=float('NaN') … … 26 23 27 24 #}}} 28 def __repr__(self): 29 # {{{ Display 30 string=' grounding line solution parameters:' 25 def __repr__(self): # {{{ 26 string=' grounding line migration parameters:' 31 27 32 28 string="%s\n%s"%(string,fielddisplay(self,'migration','type of grounding line migration: ''SoftMigration'',''AgressiveMigration'' or ''None''')) 33 string="%s\n%s"%(string,fielddisplay(self,'melting_rate','melting rate applied when previously grounded parts start floating '))29 string="%s\n%s"%(string,fielddisplay(self,'melting_rate','melting rate applied when previously grounded parts start floating [m/yr]')) 34 30 return string 35 31 #}}} 36 def setdefaultparameters(self): 37 # {{{setdefaultparameters 32 def setdefaultparameters(self): # {{{ 38 33 39 34 #Type of migration … … 45 40 return self 46 41 #}}} 47 48 42 def checkconsistency(self,md,solution,analyses): # {{{ 49 43 … … 62 56 return md 63 57 # }}} 64 65 58 def marshall(self,fid): # {{{ 66 59 WriteData(fid,'data',StringToEnum(self.migration)[0],'enum',GroundinglineMigrationEnum(),'format','Integer') 67 60 WriteData(fid,'object',self,'fieldname','melting_rate','format','Double') 68 61 # }}} 69 -
TabularUnified issm/trunk-jpl/src/m/classes/hydrologydc.m ¶
r14587 r14640 50 50 disp(sprintf(' hydrology Dual Porous Continuum Equivalent parameters:')); 51 51 52 fielddisplay(obj,'spcsediment_head','sediment water head constraints (NaN means no constraint , meters above MSL)');53 fielddisplay(obj,'sediment_compressibility','sediment compressibility (Pa -1)');54 fielddisplay(obj,'sediment_porosity','sediment (dimensionless)');55 fielddisplay(obj,'sediment_thickness','sediment thickness (meters)');56 fielddisplay(obj,'sediment_transmitivity','sediment transmitivity (m2 s-1)');57 fielddisplay(obj,'water_compressibility','water compressibility (Pa -1)');58 fielddisplay(obj,'water_density','water density (kg m 3)');52 fielddisplay(obj,'spcsediment_head','sediment water head constraints (NaN means no constraint) [m above MSL]'); 53 fielddisplay(obj,'sediment_compressibility','sediment compressibility [Pa^-1]'); 54 fielddisplay(obj,'sediment_porosity','sediment [dimensionless]'); 55 fielddisplay(obj,'sediment_thickness','sediment thickness [m]'); 56 fielddisplay(obj,'sediment_transmitivity','sediment transmitivity [m^2/s]'); 57 fielddisplay(obj,'water_compressibility','water compressibility [Pa^-1]'); 58 fielddisplay(obj,'water_density','water density [kg/m^3]'); 59 59 60 60 end % }}} -
TabularUnified issm/trunk-jpl/src/m/classes/hydrologyshreve.m ¶
r14618 r14640 48 48 disp(sprintf(' hydrologyshreve solution parameters:')); 49 49 50 fielddisplay(obj,'spcwatercolumn','water thickness constraints (NaN means no constraint) ');50 fielddisplay(obj,'spcwatercolumn','water thickness constraints (NaN means no constraint) [m]'); 51 51 fielddisplay(obj,'n','Manning roughness coefficient'); 52 52 fielddisplay(obj,'CR','tortuosity parameter'); -
TabularUnified issm/trunk-jpl/src/m/classes/hydrologyshreve.py ¶
r14562 r14640 1 #module imports2 1 from fielddisplay import fielddisplay 3 2 from EnumDefinitions import * … … 13 12 """ 14 13 15 #properties 16 def __init__(self): 17 # {{{ Properties 14 def __init__(self): # {{{ 18 15 self.spcwatercolumn = float('NaN') 19 16 self.n = 0 … … 28 25 29 26 #}}} 30 def __repr__(self): 31 # {{{ Display 27 def __repr__(self): # {{{ 32 28 33 29 string=' hydrologyshreve solution parameters:' 34 string="%s\n%s"%(string,fielddisplay(self,'spcwatercolumn','water thickness constraints (NaN means no constraint) '))30 string="%s\n%s"%(string,fielddisplay(self,'spcwatercolumn','water thickness constraints (NaN means no constraint) [m]')) 35 31 string="%s\n%s"%(string,fielddisplay(self,'n','Manning roughness coefficient')) 36 32 string="%s\n%s"%(string,fielddisplay(self,'CR','tortuosity parameter')) … … 41 37 return string 42 38 #}}} 43 44 def setdefaultparameters(self): 45 # {{{setdefaultparameters 39 def setdefaultparameters(self): # {{{ 46 40 47 41 #Parameters from Johnson's 2002 thesis, section 3.5.4 … … 57 51 return self 58 52 #}}} 59 60 53 def checkconsistency(self,md,solution,analyses): # {{{ 61 54 … … 69 62 return md 70 63 # }}} 71 72 64 def marshall(self,fid): # {{{ 73 65 WriteData(fid,'enum',HydrologyEnum(),'data',HydrologyshreveEnum(),'format','Integer'); … … 80 72 WriteData(fid,'object',self,'fieldname','stabilization','format','Double') 81 73 # }}} 82 -
TabularUnified issm/trunk-jpl/src/m/classes/independent.py ¶
r13865 r14640 30 30 self=options.AssignObjectFields(self) 31 31 # }}} 32 33 32 def __repr__(self): # {{{ 34 33 s =" independent variable:\n" … … 43 42 return s 44 43 # }}} 45 46 44 def setdefaultparameters(self): # {{{ 47 45 #do nothing 48 46 return self 49 47 # }}} 50 51 48 def checkconsistency(self,md,i,solution,analyses,driver): # {{{ 52 49 if not numpy.isnan(self.fos_forward_index): … … 65 62 return md 66 63 # }}} 67 68 64 def typetoscalar(self): # {{{ 69 65 if strcmpi(self.type,'scalar'): … … 74 70 return scalar 75 71 # }}} 76 -
TabularUnified issm/trunk-jpl/src/m/classes/initialization.m ¶
r14577 r14640 69 69 disp(sprintf(' initial field values:')); 70 70 71 fielddisplay(obj,'vx','x component of velocity ');72 fielddisplay(obj,'vy','y component of velocity ');73 fielddisplay(obj,'vz','z component of velocity ');74 fielddisplay(obj,'vel','velocity norm ');75 fielddisplay(obj,'pressure','pressure field ');76 fielddisplay(obj,'temperature','temperature in Kelvins');77 fielddisplay(obj,'surfacetemp','surface temperature in Kelvins');78 fielddisplay(obj,'basaltemp','basal temperature in Kelvins');71 fielddisplay(obj,'vx','x component of velocity [m/yr]'); 72 fielddisplay(obj,'vy','y component of velocity [m/yr]'); 73 fielddisplay(obj,'vz','z component of velocity [m/yr]'); 74 fielddisplay(obj,'vel','velocity norm [m/yr]'); 75 fielddisplay(obj,'pressure','pressure field [Pa]'); 76 fielddisplay(obj,'temperature','temperature [K]'); 77 fielddisplay(obj,'surfacetemp','surface temperature [K]'); 78 fielddisplay(obj,'basaltemp','basal temperature [K]'); 79 79 fielddisplay(obj,'waterfraction','fraction of water in the ice'); 80 fielddisplay(obj,'sediment_head','sediment water head of subglacial system (meters)');81 fielddisplay(obj,'watercolumn','thickness of subglacial water ');80 fielddisplay(obj,'sediment_head','sediment water head of subglacial system [m]'); 81 fielddisplay(obj,'watercolumn','thickness of subglacial water [m]'); 82 82 83 83 end % }}} -
TabularUnified issm/trunk-jpl/src/m/classes/initialization.py ¶
r14577 r14640 1 #module imports2 1 import numpy 3 2 from fielddisplay import fielddisplay … … 14 13 """ 15 14 16 #properties 17 def __init__(self): 18 # {{{ Properties 15 def __init__(self): # {{{ 19 16 20 17 self.vx = float('NaN') … … 29 26 self.watercolumn = float('NaN') 30 27 self.sediment_head = float('NaN') 31 self.water_pressure = float('NaN')32 28 33 29 #set defaults … … 35 31 36 32 #}}} 37 def __repr__(self): 38 # {{{ Display 33 def __repr__(self): # {{{ 39 34 string=' initial field values:' 40 35 41 string="%s\n%s"%(string,fielddisplay(self,'vx','x component of velocity '))42 string="%s\n%s"%(string,fielddisplay(self,'vy','y component of velocity '))43 string="%s\n%s"%(string,fielddisplay(self,'vz','z component of velocity '))44 string="%s\n%s"%(string,fielddisplay(self,'vel','velocity norm '))45 string="%s\n%s"%(string,fielddisplay(self,'pressure','pressure field'))46 string="%s\n%s"%(string,fielddisplay(self,'temperature','temperature in Kelvins'))47 string="%s\n%s"%(string,fielddisplay(self,'surfacetemp','surface temperature in Kelvins'))48 string="%s\n%s"%(string,fielddisplay(self,'basaltemp','basal temperature in Kelvins'))36 string="%s\n%s"%(string,fielddisplay(self,'vx','x component of velocity [m/yr]')) 37 string="%s\n%s"%(string,fielddisplay(self,'vy','y component of velocity [m/yr]')) 38 string="%s\n%s"%(string,fielddisplay(self,'vz','z component of velocity [m/yr]')) 39 string="%s\n%s"%(string,fielddisplay(self,'vel','velocity norm [m/yr]')) 40 string="%s\n%s"%(string,fielddisplay(self,'pressure','pressure [Pa]')) 41 string="%s\n%s"%(string,fielddisplay(self,'temperature','temperature [K]')) 42 string="%s\n%s"%(string,fielddisplay(self,'surfacetemp','surface temperature [K]')) 43 string="%s\n%s"%(string,fielddisplay(self,'basaltemp','basal temperature [K]')) 49 44 string="%s\n%s"%(string,fielddisplay(self,'waterfraction','fraction of water in the ice')) 50 string="%s\n%s"%(string,fielddisplay(self,'watercolumn','thickness of subglacial water')) 51 string="%s\n%s"%(string,fielddisplay(self,'sediment_head','sediment water head of subglacial system (meters)')) 52 string="%s\n%s"%(string,fielddisplay(self,'water_pressure','water pressure due to the sediment head (Pa)')) 45 string="%s\n%s"%(string,fielddisplay(self,'watercolumn','thickness of subglacial water [m]')) 46 string="%s\n%s"%(string,fielddisplay(self,'sediment_head','sediment water head of subglacial system [m]')) 53 47 54 48 return string 55 49 #}}} 56 57 def setdefaultparameters(self): 58 # {{{setdefaultparameters 50 def setdefaultparameters(self): # {{{ 59 51 return self 60 52 #}}} 61 62 53 def checkconsistency(self,md,solution,analyses): # {{{ 63 54 if DiagnosticHorizAnalysisEnum() in analyses: … … 86 77 return md 87 78 # }}} 88 89 79 def marshall(self,fid): # {{{ 90 80 WriteData(fid,'data',self.vx,'format','DoubleMat','mattype',1,'enum',VxEnum()) … … 97 87 WriteData(fid,'data',self.sediment_head,'format','DoubleMat','mattype',1,'enum',SedimentHeadEnum()) 98 88 # }}} 99 -
TabularUnified issm/trunk-jpl/src/m/classes/inversion.m ¶
r14170 r14640 134 134 disp(sprintf(' inversion parameters:')); 135 135 fielddisplay(obj,'iscontrol','is inversion activated?'); 136 fielddisplay(obj,'incomplete_adjoint',' do we assume linear viscosity?');137 fielddisplay(obj,'control_parameters',' parameter where inverse control is carried out;ex: {''FrictionCoefficient''}, or {''MaterialsRheologyBbar''}');136 fielddisplay(obj,'incomplete_adjoint','1: linear viscosity, 0: non-linear viscosity'); 137 fielddisplay(obj,'control_parameters','ex: {''FrictionCoefficient''}, or {''MaterialsRheologyBbar''}'); 138 138 fielddisplay(obj,'nsteps','number of optimization searches'); 139 139 fielddisplay(obj,'cost_functions','indicate the type of response for each optimization step'); … … 146 146 fielddisplay(obj,'max_parameters','absolute maximum acceptable value of the inversed parameter on each vertex'); 147 147 fielddisplay(obj,'gradient_only','stop control method solution at gradient'); 148 fielddisplay(obj,'vx_obs','observed velocity x component [m/ a]');149 fielddisplay(obj,'vy_obs','observed velocity y component [m/ a]');150 fielddisplay(obj,'vel_obs','observed velocity magnitude [m/ a]');148 fielddisplay(obj,'vx_obs','observed velocity x component [m/yr]'); 149 fielddisplay(obj,'vy_obs','observed velocity y component [m/yr]'); 150 fielddisplay(obj,'vel_obs','observed velocity magnitude [m/yr]'); 151 151 fielddisplay(obj,'thickness_obs','observed thickness [m]'); 152 152 disp('Available cost functions:'); -
TabularUnified issm/trunk-jpl/src/m/classes/inversion.py ¶
r14141 r14640 1 #module imports2 1 import numpy 3 2 import copy … … 16 15 """ 17 16 18 #properties 19 def __init__(self): 20 # {{{ Properties 17 def __init__(self): # {{{ 21 18 self.iscontrol = 0 22 19 self.tao = 0 … … 43 40 44 41 #}}} 45 def __repr__(self): 46 # {{{ Display 42 def __repr__(self): # {{{ 47 43 string=' inversion parameters:' 48 44 string="%s\n%s"%(string,fielddisplay(self,'iscontrol','is inversion activated?')) 49 string="%s\n%s"%(string,fielddisplay(self,'incomplete_adjoint',' do we assume linear viscosity?'))50 string="%s\n%s"%(string,fielddisplay(self,'control_parameters',' parameter where inverse control is carried out;ex: {''FrictionCoefficient''}, or {''MaterialsRheologyBbar''}'))45 string="%s\n%s"%(string,fielddisplay(self,'incomplete_adjoint','1: linear viscosity, 0: non-linear viscosity')) 46 string="%s\n%s"%(string,fielddisplay(self,'control_parameters','ex: {''FrictionCoefficient''}, or {''MaterialsRheologyBbar''}')) 51 47 string="%s\n%s"%(string,fielddisplay(self,'nsteps','number of optimization searches')) 52 48 string="%s\n%s"%(string,fielddisplay(self,'cost_functions','indicate the type of response for each optimization step')) … … 59 55 string="%s\n%s"%(string,fielddisplay(self,'max_parameters','absolute maximum acceptable value of the inversed parameter on each vertex')) 60 56 string="%s\n%s"%(string,fielddisplay(self,'gradient_only','stop control method solution at gradient')) 61 string="%s\n%s"%(string,fielddisplay(self,'vx_obs','observed velocity x component [m/ a]'))62 string="%s\n%s"%(string,fielddisplay(self,'vy_obs','observed velocity y component [m/ a]'))63 string="%s\n%s"%(string,fielddisplay(self,'vel_obs','observed velocity magnitude [m/ a]'))57 string="%s\n%s"%(string,fielddisplay(self,'vx_obs','observed velocity x component [m/yr]')) 58 string="%s\n%s"%(string,fielddisplay(self,'vy_obs','observed velocity y component [m/yr]')) 59 string="%s\n%s"%(string,fielddisplay(self,'vel_obs','observed velocity magnitude [m/yr]')) 64 60 string="%s\n%s"%(string,fielddisplay(self,'thickness_obs','observed thickness [m]')) 65 61 string="%s\n%s"%(string,'Available cost functions:') … … 75 71 return string 76 72 #}}} 77 78 73 def setdefaultparameters(self): # {{{ 79 74 … … 117 112 return self 118 113 #}}} 119 120 114 def checkconsistency(self,md,solution,analyses): # {{{ 121 115 … … 149 143 return md 150 144 # }}} 151 152 145 def marshall(self,fid): # {{{ 153 146 … … 194 187 WriteData(fid,'data',num_cost_functions,'enum',InversionNumCostFunctionsEnum(),'format','Integer') 195 188 # }}} 196 -
TabularUnified issm/trunk-jpl/src/m/classes/mask.py ¶
r14141 r14640 1 #module imports2 1 from fielddisplay import fielddisplay 3 2 from EnumDefinitions import * … … 13 12 """ 14 13 15 #properties 16 def __init__(self): 17 # {{{ Properties 14 def __init__(self): # {{{ 18 15 self.elementonfloatingice = float('NaN') 19 16 self.elementongroundedice = float('NaN') … … 27 24 28 25 #}}} 29 def __repr__(self): 30 # {{{ Display 26 def __repr__(self): # {{{ 31 27 string=" masks:" 32 28 … … 39 35 return string 40 36 #}}} 41 42 def setdefaultparameters(self): 43 # {{{setdefaultparameters 37 def setdefaultparameters(self): # {{{ 44 38 return self 45 39 #}}} 46 47 40 def checkconsistency(self,md,solution,analyses): # {{{ 48 41 … … 56 49 return md 57 50 # }}} 58 59 51 def marshall(self,fid): # {{{ 60 52 WriteData(fid,'object',self,'fieldname','elementonfloatingice','format','BooleanMat','mattype',2) … … 65 57 WriteData(fid,'object',self,'fieldname','vertexonwater','format','DoubleMat','mattype',1) 66 58 # }}} 67 -
TabularUnified issm/trunk-jpl/src/m/classes/matdamageice.py ¶
r13624 r14640 1 #module imports2 1 from fielddisplay import fielddisplay 3 2 from EnumDefinitions import * … … 37 36 38 37 # }}} 38 def __repr__(self): # {{{ 39 s =' Materials:\n' 39 40 41 s+="%s\n" % fielddisplay(self,"rho_ice","ice density [kg/m^3]") 42 s+="%s\n" % fielddisplay(self,"rho_water","ocean water density [kg/m^3]") 43 s+="%s\n" % fielddisplay(self,"rho_freshwater","fresh water density [kg/m^3]") 44 s+="%s\n" % fielddisplay(self,"mu_water","water viscosity [N s/m^2]") 45 s+="%s\n" % fielddisplay(self,"heatcapacity","heat capacity [J/kg/K]") 46 s+="%s\n" % fielddisplay(self,"thermalconductivity","ice thermal conductivity [W/m/K]") 47 s+="%s\n" % fielddisplay(self,"meltingpoint","melting point of ice at 1atm in K") 48 s+="%s\n" % fielddisplay(self,"latentheat","latent heat of fusion [J/m^3]") 49 s+="%s\n" % fielddisplay(self,"beta","rate of change of melting point with pressure [K/Pa]") 50 s+="%s\n" % fielddisplay(self,"mixed_layer_capacity","mixed layer capacity [W/kg/K]") 51 s+="%s\n" % fielddisplay(self,"thermal_exchange_velocity","thermal exchange velocity [m/s]") 52 s+="%s\n" % fielddisplay(self,"rheology_B","flow law parameter [Pa/s^(1/n)]") 53 s+="%s\n" % fielddisplay(self,"rheology_n","Glen's flow law exponent") 54 s+="%s\n" % fielddisplay(self,"rheology_Z","rheology multiplier") 55 s+="%s\n" % fielddisplay(self,"rheology_law","law for the temperature dependance of the rheology: 'None', 'Paterson' or 'Arrhenius'") 56 57 return s 58 # }}} 40 59 def setdefaultparameters(self): # {{{ 41 60 … … 77 96 self.rheology_law='Paterson' 78 97 # }}} 79 80 98 def checkconsistency(self,md,solution,analyses): # {{{ 81 99 md = checkfield(md,'materials.rho_ice','>',0) … … 90 108 return md 91 109 # }}} 92 93 def __repr__(self): # {{{94 s =' Materials:\n'95 96 s+="%s\n" % fielddisplay(self,"rho_ice","ice density [kg/m^3]")97 s+="%s\n" % fielddisplay(self,"rho_water","ocean water density [kg/m^3]")98 s+="%s\n" % fielddisplay(self,"rho_freshwater","fresh water density [kg/m^3]")99 s+="%s\n" % fielddisplay(self,"mu_water","water viscosity [N s/m^2]")100 s+="%s\n" % fielddisplay(self,"heatcapacity","heat capacity [J/kg/K]")101 s+="%s\n" % fielddisplay(self,"thermalconductivity","ice thermal conductivity [W/m/K]")102 s+="%s\n" % fielddisplay(self,"meltingpoint","melting point of ice at 1atm in K")103 s+="%s\n" % fielddisplay(self,"latentheat","latent heat of fusion [J/m^3]")104 s+="%s\n" % fielddisplay(self,"beta","rate of change of melting point with pressure [K/Pa]")105 s+="%s\n" % fielddisplay(self,"mixed_layer_capacity","mixed layer capacity [W/kg/K]")106 s+="%s\n" % fielddisplay(self,"thermal_exchange_velocity","thermal exchange velocity [m/s]")107 s+="%s\n" % fielddisplay(self,"rheology_B","flow law parameter [Pa/s^(1/n)]")108 s+="%s\n" % fielddisplay(self,"rheology_n","Glen's flow law exponent")109 s+="%s\n" % fielddisplay(self,"rheology_Z","rheology multiplier")110 s+="%s\n" % fielddisplay(self,"rheology_law","law for the temperature dependance of the rheology: 'None', 'Paterson' or 'Arrhenius'")111 112 return s113 # }}}114 115 110 def marshall(self,fid): # {{{ 116 111 WriteData(fid,'enum',MaterialsEnum(),'data',MatdamageiceEnum(),'format','Integer') … … 131 126 WriteData(fid,'data',StringToEnum(self.rheology_law)[0],'enum',MaterialsRheologyLawEnum(),'format','Integer') 132 127 # }}} 133 -
TabularUnified issm/trunk-jpl/src/m/classes/matice.py ¶
r14141 r14640 1 #module imports2 1 from fielddisplay import fielddisplay 3 2 from EnumDefinitions import * … … 14 13 """ 15 14 16 #properties 17 def __init__(self): 18 # {{{ Properties 15 def __init__(self): # {{{ 19 16 self.rho_ice = 0. 20 17 self.rho_water = 0. … … 34 31 self.setdefaultparameters() 35 32 #}}} 36 def __repr__(self): 37 # {{{ Display 33 def __repr__(self): # {{{ 38 34 string=" Materials:" 39 35 … … 55 51 return string 56 52 #}}} 57 def setdefaultparameters(self): 58 # {{{setdefaultparameters 53 def setdefaultparameters(self): # {{{ 59 54 #ice density (kg/m^3) 60 55 self.rho_ice=917. … … 95 90 return self 96 91 #}}} 97 98 92 def checkconsistency(self,md,solution,analyses): # {{{ 99 93 md = checkfield(md,'materials.rho_ice','>',0) … … 106 100 return md 107 101 # }}} 108 109 102 def marshall(self,fid): # {{{ 110 103 WriteData(fid,'enum',MaterialsEnum(),'data',MaticeEnum(),'format','Integer'); … … 124 117 WriteData(fid,'data',StringToEnum(self.rheology_law)[0],'enum',MaterialsRheologyLawEnum(),'format','Integer') 125 118 # }}} 126 -
TabularUnified issm/trunk-jpl/src/m/classes/mesh.m ¶
r14619 r14640 143 143 fielddisplay(obj,'numberofvertices2d','number of vertices'); 144 144 fielddisplay(obj,'elements2d','vertex indices of the mesh elements'); 145 fielddisplay(obj,'x2d','vertices x coordinate ');146 fielddisplay(obj,'y2d','vertices y coordinate ');145 fielddisplay(obj,'x2d','vertices x coordinate [m]'); 146 fielddisplay(obj,'y2d','vertices y coordinate [m]'); 147 147 148 148 disp(sprintf('\n Elements and vertices of the extruded 3d mesh:')); … … 153 153 fielddisplay(obj,'numberofvertices','number of vertices'); 154 154 fielddisplay(obj,'elements','vertex indices of the mesh elements'); 155 fielddisplay(obj,'x','vertices x coordinate ');156 fielddisplay(obj,'y','vertices y coordinate ');157 fielddisplay(obj,'z','vertices z coordinate ');155 fielddisplay(obj,'x','vertices x coordinate [m]'); 156 fielddisplay(obj,'y','vertices y coordinate [m]'); 157 fielddisplay(obj,'z','vertices z coordinate [m]'); 158 158 fielddisplay(obj,'edges','edges of the 2d mesh (vertex1 vertex2 element1 element2)'); 159 159 fielddisplay(obj,'numberofedges','number of edges of the 2d mesh'); 160 160 161 161 disp(sprintf('\n Properties:')); 162 fielddisplay(obj,'dimension','mesh dimension (2d or 3d)');162 fielddisplay(obj,'dimension','mesh dimension'); 163 163 fielddisplay(obj,'numberoflayers','number of extrusion layers'); 164 164 fielddisplay(obj,'vertexonbed','lower vertices flags list'); … … 183 183 184 184 disp(sprintf('\n Projection:')); 185 fielddisplay(obj,'lat','vertices latitude ');186 fielddisplay(obj,'long','vertices longitude ');185 fielddisplay(obj,'lat','vertices latitude [degrees]'); 186 fielddisplay(obj,'long','vertices longitude [degrees]'); 187 187 fielddisplay(obj,'hemisphere','Indicate hemisphere ''n'' or ''s'' '); 188 188 end % }}} -
TabularUnified issm/trunk-jpl/src/m/classes/mesh.py ¶
r14405 r14640 1 #module imports2 1 import numpy 3 2 from fielddisplay import fielddisplay … … 14 13 """ 15 14 16 #properties 17 def __init__(self): 18 # {{{ Properties 15 def __init__(self): # {{{ 19 16 self.x = float('NaN'); 20 17 self.y = float('NaN'); … … 61 58 62 59 #}}} 63 def __repr__(self): 64 # {{{ Display 60 def __repr__(self): # {{{ 65 61 string=" Mesh:" 66 62 … … 72 68 string="%s\n%s"%(string,fielddisplay(self,"numberofvertices2d","number of vertices")) 73 69 string="%s\n%s"%(string,fielddisplay(self,"elements2d","vertex indices of the mesh elements")) 74 string="%s\n%s"%(string,fielddisplay(self,"x2d","vertices x coordinate "))75 string="%s\n%s"%(string,fielddisplay(self,"y2d","vertices y coordinate "))70 string="%s\n%s"%(string,fielddisplay(self,"x2d","vertices x coordinate [m]")) 71 string="%s\n%s"%(string,fielddisplay(self,"y2d","vertices y coordinate [m]")) 76 72 77 73 string="%s\n%s"%(string,"\n\n Elements and vertices of the extruded 3d mesh:") … … 81 77 string="%s\n%s"%(string,fielddisplay(self,"numberofvertices","number of vertices")) 82 78 string="%s\n%s"%(string,fielddisplay(self,"elements","vertex indices of the mesh elements")) 83 string="%s\n%s"%(string,fielddisplay(self,"x","vertices x coordinate "))84 string="%s\n%s"%(string,fielddisplay(self,"y","vertices y coordinate "))85 string="%s\n%s"%(string,fielddisplay(self,"z","vertices z coordinate "))79 string="%s\n%s"%(string,fielddisplay(self,"x","vertices x coordinate [m]")) 80 string="%s\n%s"%(string,fielddisplay(self,"y","vertices y coordinate [m]")) 81 string="%s\n%s"%(string,fielddisplay(self,"z","vertices z coordinate [m]")) 86 82 string="%s\n%s"%(string,fielddisplay(self,"edges","edges of the 2d mesh (vertex1 vertex2 element1 element2)")) 87 83 string="%s\n%s"%(string,fielddisplay(self,"numberofedges","number of edges of the 2d mesh")) … … 110 106 111 107 string="%s%s"%(string,"\n\n Projection:") 112 string="%s\n%s"%(string,fielddisplay(self,"lat","vertices latitude "))113 string="%s\n%s"%(string,fielddisplay(self,"long","vertices longitude "))108 string="%s\n%s"%(string,fielddisplay(self,"lat","vertices latitude [degrees]")) 109 string="%s\n%s"%(string,fielddisplay(self,"long","vertices longitude [degrees]")) 114 110 string="%s\n%s"%(string,fielddisplay(self,"hemisphere","Indicate hemisphere 'n' or 's'")) 115 111 return string 116 112 #}}} 117 118 def setdefaultparameters(self): 119 # {{{setdefaultparameters 113 def setdefaultparameters(self): # {{{ 120 114 121 115 #the connectivity is the averaged number of nodes linked to a … … 128 122 return self 129 123 #}}} 130 131 124 def checkconsistency(self,md,solution,analyses): # {{{ 132 125 … … 177 170 return md 178 171 # }}} 179 180 172 def marshall(self,fid): # {{{ 181 173 WriteData(fid,'object',self,'fieldname','x','format','DoubleMat','mattype',1) … … 201 193 WriteData(fid,'object',self,'fieldname','numberofelements2d','format','Integer') 202 194 # }}} 203 -
TabularUnified issm/trunk-jpl/src/m/classes/miscellaneous.py ¶
r14141 r14640 1 #module imports2 1 from collections import OrderedDict 3 2 from fielddisplay import fielddisplay … … 14 13 """ 15 14 16 #properties 17 def __init__(self): 18 # {{{ Properties 15 def __init__(self): # {{{ 19 16 self.notes = '' 20 17 self.name = '' … … 25 22 26 23 #}}} 27 def __repr__(self): 28 # {{{ Display 24 def __repr__(self): # {{{ 29 25 string=' miscellaneous parameters:' 30 26 … … 34 30 return string 35 31 #}}} 36 37 def setdefaultparameters(self): 38 # {{{setdefaultparameters 32 def setdefaultparameters(self): # {{{ 39 33 return self 40 34 #}}} 41 42 35 def checkconsistency(self,md,solution,analyses): # {{{ 43 36 md = checkfield(md,'miscellaneous.name','empty',1) 44 37 return md 45 38 # }}} 46 47 39 def marshall(self,fid): # {{{ 48 40 WriteData(fid,'object',self,'fieldname','name','format','String') 49 41 # }}} 50 -
TabularUnified issm/trunk-jpl/src/m/classes/organizer.py ¶
r13955 r14640 63 63 self.trunkprefix=trunkprefix 64 64 #}}} 65 66 65 def __repr__(self): # {{{ 67 66 s ="" … … 75 74 s+="%s\n" % " step #%2i: '%s'",step['id'],step['string'] 76 75 #}}} 77 78 76 def load(self,string): # {{{ 79 77 … … 93 91 return md 94 92 #}}} 95 96 93 def loadmodel(self,string): # {{{ 97 94 … … 118 115 raise IOerror("Could not find '%s'" % path) 119 116 #}}} 120 121 117 def perform(self,string): # {{{ 122 118 … … 153 149 return bool 154 150 #}}} 155 156 151 def savemodel(self,md): # {{{ 157 152 … … 174 169 savevars(name,'md',md) 175 170 #}}} 176 -
TabularUnified issm/trunk-jpl/src/m/classes/pairoptions.py ¶
r14101 r14640 11 11 """ 12 12 13 def __init__(self,*arg): 13 def __init__(self,*arg): # {{{ 14 14 self.functionname = '' 15 15 self.list = OrderedDict() … … 26 26 self.buildlist(*arg) 27 27 # }}} 28 28 def __repr__(self): # {{{ 29 s=" functionname: '%s'\n" % self.functionname 30 if self.list: 31 s+=" list: (%ix%i)\n\n" % (len(self.list),2) 32 for item in self.list.iteritems(): 33 if isinstance(item[1],(str,unicode)): 34 s+=" field: %-10s value: '%s'\n" % (item[0],item[1]) 35 elif isinstance(item[1],(bool,int,long,float)): 36 s+=" field: %-10s value: %g\n" % (item[0],item[1]) 37 else: 38 s+=" field: %-10s value: %s\n" % (item[0],type(item[1])) 39 else: 40 s+=" list: empty\n" 41 return s 42 # }}} 29 43 def buildlist(self,*arg): # {{{ 30 44 """BUILDLIST - build list of objects from input""" … … 43 57 print "WARNING: option number %d is not a string and will be ignored." % (i+1) 44 58 # }}} 45 46 59 def addfield(self,field,value): # {{{ 47 60 """ADDFIELD - add a field to an options list""" … … 51 64 self.list[field] = value 52 65 # }}} 53 54 66 def addfielddefault(self,field,value): # {{{ 55 67 """ADDFIELDDEFAULT - add a field to an options list if it does not already exist""" … … 58 70 self.list[field] = value 59 71 # }}} 60 61 72 def AssignObjectFields(self,obj2): # {{{ 62 73 """ASSIGNOBJECTFIELDS - assign object fields from options""" … … 68 79 return obj2 69 80 # }}} 70 71 81 def changefieldvalue(self,field,newvalue): # {{{ 72 82 """CHANGEOPTIONVALUE - change the value of an option in an option list""" … … 74 84 self.list[field]=newvalue; 75 85 # }}} 76 77 # function obj = deleteduplicates(obj,warn) % {{{78 # %DELETEDUPLICATES - delete duplicates in an option list79 #80 # %track the first occurrence of each option81 # [dummy lines]=unique(obj.list(:,1),'first');82 # clear dummy83 #84 # %warn user if requested85 # if warn,86 # numoptions=size(obj.list,1);87 # for i=1:numoptions,88 # if ~ismember(i,lines),89 # disp(['WARNING: option ' obj.list{i,1} ' appeared more than once. Only its first occurrence will be kept'])90 # end91 # end92 # end93 #94 # %remove duplicates from the options list95 # obj.list=obj.list(lines,:);96 # end % }}}97 98 def __repr__(self): # {{{99 s=" functionname: '%s'\n" % self.functionname100 if self.list:101 s+=" list: (%ix%i)\n\n" % (len(self.list),2)102 for item in self.list.iteritems():103 if isinstance(item[1],(str,unicode)):104 s+=" field: %-10s value: '%s'\n" % (item[0],item[1])105 elif isinstance(item[1],(bool,int,long,float)):106 s+=" field: %-10s value: %g\n" % (item[0],item[1])107 else:108 s+=" field: %-10s value: %s\n" % (item[0],type(item[1]))109 else:110 s+=" list: empty\n"111 return s112 # }}}113 114 86 def exist(self,field): # {{{ 115 87 """EXIST - check if the option exist""" … … 127 99 return False 128 100 # }}} 129 130 #def fieldoccurrences(self,field): #{{{131 # '''132 # FIELDOCCURRENCES - get number of occurrence of a field133 # '''134 #135 # #check input136 # if not isinstance(field,(str,unicode)):137 # raise TypeError("fieldoccurrences error message: field should be a string")138 139 # #get number of occurrence140 # # ??141 # #return num142 # #% }}}143 144 101 def getfieldvalue(self,field,default=None): # {{{ 145 102 """ … … 174 131 return value 175 132 # }}} 176 177 133 def removefield(self,field,warn): # {{{ 178 134 """ … … 196 152 print "removefield info: option '%s' has been removed from the list of options." % field 197 153 # }}} 198 199 154 def marshall(self,fid,firstindex): # {{{ 200 155 … … 214 169 raise TypeError("Cannot marshall option '%s': format not supported yet." % name) 215 170 # }}} 216 -
TabularUnified issm/trunk-jpl/src/m/classes/planetmesh.m ¶
r13646 r14640 1 % MESH class definition1 %PLANETMESH class definition 2 2 % 3 3 % Usage: … … 17 17 numberofelements = 0; 18 18 numberofvertices = 0; 19 20 lat = NaN21 long = NaN22 19 23 20 vertexconnectivity = NaN … … 64 61 md = checkfield(md,'planetmesh.numberofelements','>',0); 65 62 md = checkfield(md,'planetmesh.numberofvertices','>',0); 66 %no checks for numberofedges lat long and hemisphere67 63 if (md.planetmesh.dimension==2), 68 64 md = checkfield(md,'planetmesh.average_vertex_connectivity','>=',9,'message','''planetmesh.average_vertex_connectivity'' should be at least 9 in 2d'); … … 92 88 fielddisplay(obj,'numberofelements','number of elements'); 93 89 fielddisplay(obj,'numberofvertices','number of vertices'); 94 fielddisplay(obj,'elements',' index into (x,y,z), coordinates of the vertices');95 fielddisplay(obj,'x','vertices x coordinate ');96 fielddisplay(obj,'y','vertices y coordinate ');97 fielddisplay(obj,'z','vertices z coordinate ');98 fielddisplay(obj,'r','vertices r coordinate ');99 fielddisplay(obj,'theta','vertices theta coordinate ');100 fielddisplay(obj,'phi','vertices phi coordinate ');90 fielddisplay(obj,'elements','vertex indices of the mesh elements'); 91 fielddisplay(obj,'x','vertices x coordinate [m]'); 92 fielddisplay(obj,'y','vertices y coordinate [m]'); 93 fielddisplay(obj,'z','vertices z coordinate [m]'); 94 fielddisplay(obj,'r','vertices r coordinate [m]'); 95 fielddisplay(obj,'theta','vertices theta coordinate [degrees]'); 96 fielddisplay(obj,'phi','vertices phi coordinate [degrees]'); 101 97 102 98 disp(sprintf('\n Properties:')); -
TabularUnified issm/trunk-jpl/src/m/classes/plotoptions.py ¶
r14480 r14640 10 10 ''' 11 11 12 def __init__(self,*arg): 12 def __init__(self,*arg):# {{{ 13 13 self.numberofplots = 0 14 14 self.figurenumber = 1 … … 16 16 17 17 self.buildlist(*arg) 18 18 #}}} 19 19 def __repr__(self): #{{{ 20 20 s="\n" -
TabularUnified issm/trunk-jpl/src/m/classes/private.py ¶
r13116 r14640 1 #module imports2 1 from collections import OrderedDict 3 2 from fielddisplay import fielddisplay … … 13 12 """ 14 13 15 #properties 16 def __init__(self): 17 # {{{ Properties 14 def __init__(self): # {{{ 18 15 self.isconsistent = True 19 16 self.runtimename = '' … … 25 22 26 23 #}}} 27 def __repr__(self): 28 # {{{ Display 24 def __repr__(self): # {{{ 29 25 string=' private parameters: do not change' 30 26 … … 35 31 return string 36 32 #}}} 37 38 def setdefaultparameters(self): 39 # {{{setdefaultparameters 33 def setdefaultparameters(self): # {{{ 40 34 return self 41 35 #}}} 42 43 36 def checkconsistency(self,md,solution,analyses): # {{{ 44 37 return md 45 38 # }}} 46 -
TabularUnified issm/trunk-jpl/src/m/classes/prognostic.m ¶
r13646 r14640 53 53 function disp(obj) % {{{ 54 54 disp(sprintf(' Prognostic solution parameters:')); 55 fielddisplay(obj,'spcthickness','thickness constraints (NaN means no constraint) ');56 fielddisplay(obj,'min_thickness','minimum ice thickness allowed ');55 fielddisplay(obj,'spcthickness','thickness constraints (NaN means no constraint) [m]'); 56 fielddisplay(obj,'min_thickness','minimum ice thickness allowed [m]'); 57 57 fielddisplay(obj,'hydrostatic_adjustment','adjustment of ice shelves surface and bed elevations: ''Incremental'' or ''Absolute'' '); 58 fielddisplay(obj,'stabilization','0 ->no, 1->artificial_diffusivity, 2->streamline upwinding, 3->discontinuous Galerkin');58 fielddisplay(obj,'stabilization','0: no, 1: artificial_diffusivity, 2: streamline upwinding, 3: discontinuous Galerkin'); 59 59 60 60 disp(sprintf('\n %s','Penalty options:')); -
TabularUnified issm/trunk-jpl/src/m/classes/prognostic.py ¶
r14141 r14640 1 #module imports2 1 from fielddisplay import fielddisplay 3 2 from EnumDefinitions import * … … 14 13 """ 15 14 16 #properties 17 def __init__(self): 18 # {{{ Properties 15 def __init__(self): # {{{ 19 16 self.spcthickness = float('NaN') 20 17 self.min_thickness = 0 … … 29 26 30 27 #}}} 31 def __repr__(self): 32 # {{{ Display 28 def __repr__(self): # {{{ 33 29 string=' Prognostic solution parameters:' 34 string="%s\n%s"%(string,fielddisplay(self,'spcthickness','thickness constraints (NaN means no constraint) '))35 string="%s\n%s"%(string,fielddisplay(self,'min_thickness','minimum ice thickness allowed '))30 string="%s\n%s"%(string,fielddisplay(self,'spcthickness','thickness constraints (NaN means no constraint) [m]')) 31 string="%s\n%s"%(string,fielddisplay(self,'min_thickness','minimum ice thickness allowed [m]')) 36 32 string="%s\n%s"%(string,fielddisplay(self,'hydrostatic_adjustment','adjustment of ice shelves surface and bed elevations: ''Incremental'' or ''Absolute'' ')) 37 string="%s\n%s"%(string,fielddisplay(self,'stabilization','0 ->no, 1->artificial_diffusivity, 2->streamline upwinding, 3->discontinuous Galerkin'))33 string="%s\n%s"%(string,fielddisplay(self,'stabilization','0: no, 1: artificial_diffusivity, 2: streamline upwinding, 3: discontinuous Galerkin')) 38 34 string="%s\n%s"%(string,fielddisplay(self,'requested_outputs','additional outputs requested')) 39 35 40 36 return string 41 37 #}}} 42 43 def setdefaultparameters(self): 44 # {{{setdefaultparameters 38 def setdefaultparameters(self): # {{{ 45 39 46 40 #Type of stabilization to use 0:nothing 1:artificial_diffusivity 3:Discontinuous Galerkin … … 58 52 return self 59 53 #}}} 60 61 54 def checkconsistency(self,md,solution,analyses): # {{{ 62 55 … … 74 67 return md 75 68 # }}} 76 77 69 def marshall(self,fid): # {{{ 78 70 WriteData(fid,'object',self,'fieldname','spcthickness','format','DoubleMat','mattype',1) … … 84 76 WriteData(fid,'object',self,'fieldname','requested_outputs','format','DoubleMat','mattype',3); 85 77 # }}} 86 -
TabularUnified issm/trunk-jpl/src/m/classes/qmu.py ¶
r13490 r14640 1 #module imports2 1 import numpy 3 2 from collections import OrderedDict … … 16 15 """ 17 16 18 #properties 19 def __init__(self): 20 # {{{ Properties 17 def __init__(self): # {{{ 21 18 self.isdakota = 0 22 19 self.variables = OrderedDict() … … 40 37 41 38 #}}} 42 43 def setdefaultparameters(self): 44 # {{{setdefaultparameters 39 def setdefaultparameters(self): # {{{ 45 40 return self 46 41 #}}} … … 156 151 WriteData(fid,'data',flag,'enum',QmuMassFluxSegmentsPresentEnum(),'format','Boolean'); 157 152 # }}} 158 -
TabularUnified issm/trunk-jpl/src/m/classes/radaroverlay.m ¶
r11869 r14640 26 26 27 27 fielddisplay(obj,'pwr','radar power image (matrix)'); 28 fielddisplay(obj,'x','corresponding x coordinates ');29 fielddisplay(obj,'y','corresponding y coordinates ');28 fielddisplay(obj,'x','corresponding x coordinates [m]'); 29 fielddisplay(obj,'y','corresponding y coordinates [m]'); 30 30 31 31 end % }}} -
TabularUnified issm/trunk-jpl/src/m/classes/radaroverlay.py ¶
r14141 r14640 1 #module imports2 1 from fielddisplay import fielddisplay 3 2 … … 10 9 """ 11 10 12 #properties 13 def __init__(self): 14 # {{{ Properties 11 def __init__(self): # {{{ 15 12 self.pwr = float('NaN') 16 13 self.x = float('NaN') … … 21 18 22 19 #}}} 23 def __repr__(self): 24 # {{{ Display 20 def __repr__(self): # {{{ 25 21 string=' radaroverlay parameters:' 26 22 string="%s\n%s"%(string,fielddisplay(self,'pwr','radar power image (matrix)')) 27 string="%s\n%s"%(string,fielddisplay(self,'x','corresponding x coordinates '))28 string="%s\n%s"%(string,fielddisplay(self,'y','corresponding y coordinates '))23 string="%s\n%s"%(string,fielddisplay(self,'x','corresponding x coordinates [m]')) 24 string="%s\n%s"%(string,fielddisplay(self,'y','corresponding y coordinates [m]')) 29 25 return string 30 26 #}}} 31 32 def setdefaultparameters(self): 33 # {{{setdefaultparameters 27 def setdefaultparameters(self): # {{{ 34 28 return self 35 29 #}}} 36 -
TabularUnified issm/trunk-jpl/src/m/classes/results.py ¶
r13966 r14640 17 17 pass 18 18 # }}} 19 20 19 def __repr__(self): # {{{ 21 20 s =" Model results:\n" … … 44 43 return s 45 44 # }}} 46 47 45 def setdefaultparameters(self): # {{{ 48 46 #do nothing 49 47 return self 50 48 # }}} 51 52 49 def checkconsistency(self,md,solution,analyses): # {{{ 53 50 return md 54 51 # }}} 55 56 52 def marshall(self,fid): # {{{ 57 53 pass 58 54 # }}} 59 -
TabularUnified issm/trunk-jpl/src/m/classes/rifts.py ¶
r14141 r14640 1 #module imports2 1 import numpy 3 2 from fielddisplay import fielddisplay … … 15 14 """ 16 15 17 #properties 18 def __init__(self): 19 # {{{ Properties 16 def __init__(self): # {{{ 20 17 self.riftstruct = [] 21 18 self.riftproperties = [] … … 25 22 26 23 #}}} 27 def __repr__(self): 28 # {{{ Display 24 def __repr__(self): # {{{ 29 25 string=' rifts parameters:' 30 26 … … 33 29 return string 34 30 #}}} 35 36 def setdefaultparameters(self): 37 # {{{setdefaultparameters 31 def setdefaultparameters(self): # {{{ 38 32 return self 39 33 #}}} 40 41 34 def checkconsistency(self,md,solution,analyses): # {{{ 42 35 if (not self.riftstruct) or numpy.any(isnans(self.riftstruct)): … … 61 54 return md 62 55 # }}} 63 64 56 def marshall(self,fid): # {{{ 65 57 … … 90 82 WriteData(fid,'data',data,'enum',RiftsRiftstructEnum(),'format','DoubleMat','mattype',3) 91 83 # }}} 92 -
TabularUnified issm/trunk-jpl/src/m/classes/settings.py ¶
r14215 r14640 1 #module imports2 1 from fielddisplay import fielddisplay 3 2 from EnumDefinitions import * … … 13 12 """ 14 13 15 #properties 16 def __init__(self): 17 # {{{ Properties 14 def __init__(self): # {{{ 18 15 self.io_gather = 0 19 16 self.lowmem = 0 … … 26 23 27 24 #}}} 28 def __repr__(self): 29 # {{{ Display 25 def __repr__(self): # {{{ 30 26 string=" general settings parameters:" 31 27 … … 37 33 return string 38 34 #}}} 39 40 def setdefaultparameters(self): 41 # {{{setdefaultparameters 35 def setdefaultparameters(self): # {{{ 42 36 43 37 #are we short in memory ? (0 faster but requires more memory) … … 61 55 return self 62 56 #}}} 63 64 57 def checkconsistency(self,md,solution,analyses): # {{{ 65 58 md = checkfield(md,'settings.io_gather','numel',[1],'values',[0,1]) … … 71 64 return md 72 65 # }}} 73 74 66 def marshall(self,fid): # {{{ 75 67 WriteData(fid,'object',self,'fieldname','io_gather','format','Boolean') … … 82 74 WriteData(fid,'enum',SettingsWaitonlockEnum(),'data',False,'format','Boolean'); 83 75 # }}} 84 -
TabularUnified issm/trunk-jpl/src/m/classes/steadystate.py ¶
r13023 r14640 1 #module imports2 1 import numpy 3 2 from fielddisplay import fielddisplay … … 14 13 """ 15 14 16 #properties 17 def __init__(self): 18 # {{{ Properties 15 def __init__(self): # {{{ 19 16 self.reltol = 0 20 17 self.maxiter = 0 … … 25 22 26 23 #}}} 27 def __repr__(self): 28 # {{{ Display 24 def __repr__(self): # {{{ 29 25 string=' steadystate solution parameters:' 30 26 string="%s\n%s"%(string,fielddisplay(self,'reltol','relative tolerance criterion')) … … 33 29 return string 34 30 #}}} 35 36 def setdefaultparameters(self): 37 # {{{setdefaultparameters 31 def setdefaultparameters(self): # {{{ 38 32 39 33 #maximum of steady state iterations … … 45 39 return self 46 40 #}}} 47 48 41 def checkconsistency(self,md,solution,analyses): # {{{ 49 42 … … 60 53 return md 61 54 # }}} 62 63 55 def marshall(self,fid): # {{{ 64 56 WriteData(fid,'object',self,'fieldname','reltol','format','Double') … … 66 58 WriteData(fid,'object',self,'fieldname','requested_outputs','format','DoubleMat','mattype',3) 67 59 # }}} 68 -
TabularUnified issm/trunk-jpl/src/m/classes/surfaceforcings.m ¶
r14175 r14640 74 74 fielddisplay(obj,'ispdd','is pdd activated (0 or 1, default is 0)'); 75 75 fielddisplay(obj,'isdelta18o','is temperature and precipitation delta18o parametrisation activated (0 or 1, default is 0)'); 76 fielddisplay(obj,'monthlytemperatures','monthly surface temperatures [K elvin], required if pdd is activated and delta18o not activated');76 fielddisplay(obj,'monthlytemperatures','monthly surface temperatures [K], required if pdd is activated and delta18o not activated'); 77 77 fielddisplay(obj,'precipitation','surface precipitation [m/yr water eq]'); 78 fielddisplay(obj,'temperatures_presentday','monthly present day surface temperatures [K elvin], required if pdd is activated and delta18o activated');79 fielddisplay(obj,'temperatures_lgm','monthly LGM surface temperatures [K elvin], required if pdd is activated and delta18o activated');78 fielddisplay(obj,'temperatures_presentday','monthly present day surface temperatures [K], required if pdd is activated and delta18o activated'); 79 fielddisplay(obj,'temperatures_lgm','monthly LGM surface temperatures [K], required if pdd is activated and delta18o activated'); 80 80 fielddisplay(obj,'precipitations_presentday','monthly surface precipitation [m/yr water eq], required if pdd is activated and delta18o activated'); 81 81 fielddisplay(obj,'delta18o','delta18o, required if pdd is activated and delta18o activated'); -
TabularUnified issm/trunk-jpl/src/m/classes/surfaceforcings.py ¶
r14198 r14640 1 #module imports2 1 from fielddisplay import fielddisplay 3 2 from EnumDefinitions import * … … 13 12 """ 14 13 15 #properties 16 def __init__(self): 17 # {{{ Properties 14 def __init__(self): # {{{ 18 15 self.precipitation = float('NaN') 19 16 self.mass_balance = float('NaN') … … 36 33 37 34 #}}} 38 def __repr__(self): 39 # {{{ Display 35 def __repr__(self): # {{{ 40 36 string=" surface forcings parameters:" 41 37 … … 44 40 string="%s\n%s"%(string,fielddisplay(self,'ispdd','is pdd activated (0 or 1, default is 0)')) 45 41 string="%s\n%s"%(string,fielddisplay(self,'isdelta18o','is temperature and precipitation delta18o parametrisation activated (0 or 1, default is 0)')) 46 string="%s\n%s"%(string,fielddisplay(self,'monthlytemperatures','monthly surface temperatures [K elvin], required if pdd is activated and delta18o not activated'))42 string="%s\n%s"%(string,fielddisplay(self,'monthlytemperatures','monthly surface temperatures [K], required if pdd is activated and delta18o not activated')) 47 43 string="%s\n%s"%(string,fielddisplay(self,'precipitation','surface precipitation [m/yr water eq]')) 48 string="%s\n%s"%(string,fielddisplay(self,'temperatures_presentday','monthly present day surface temperatures [K elvin], required if pdd is activated and delta18o activated'))49 string="%s\n%s"%(string,fielddisplay(self,'temperatures_lgm','monthly LGM surface temperatures [K elvin], required if pdd is activated and delta18o activated'))44 string="%s\n%s"%(string,fielddisplay(self,'temperatures_presentday','monthly present day surface temperatures [K], required if pdd is activated and delta18o activated')) 45 string="%s\n%s"%(string,fielddisplay(self,'temperatures_lgm','monthly LGM surface temperatures [K], required if pdd is activated and delta18o activated')) 50 46 string="%s\n%s"%(string,fielddisplay(self,'precipitations_presentday','monthly surface precipitation [m/yr water eq], required if pdd is activated and delta18o activated')) 51 47 string="%s\n%s"%(string,fielddisplay(self,'delta18o','delta18o, required if pdd is activated and delta18o activated')) … … 59 55 return string 60 56 #}}} 61 def setdefaultparameters(self): 62 # {{{setdefaultparameters 57 def setdefaultparameters(self): # {{{ 63 58 64 59 #pdd method not used in default mode … … 69 64 return self 70 65 #}}} 71 72 66 def checkconsistency(self,md,solution,analyses): # {{{ 73 67 … … 98 92 return md 99 93 # }}} 100 101 94 def marshall(self,fid): # {{{ 102 95 WriteData(fid,'object',self,'fieldname','precipitation','format','DoubleMat','mattype',1) … … 124 117 WriteData(fid,'object',self,'fieldname','b_neg','format','DoubleMat','mattype',1) 125 118 # }}} 126 -
TabularUnified issm/trunk-jpl/src/m/classes/taoinversion.m ¶
r14170 r14640 1 % INVERSION class definition1 %TAOINVERSION class definition 2 2 % 3 3 % Usage: … … 93 93 disp(sprintf(' taoinversion parameters:')); 94 94 fielddisplay(obj,'iscontrol','is inversion activated?'); 95 fielddisplay(obj,'incomplete_adjoint',' do we assume linear viscosity?');96 fielddisplay(obj,'control_parameters',' parameter where inverse control is carried out;ex: {''FrictionCoefficient''}, or {''MaterialsRheologyBbar''}');95 fielddisplay(obj,'incomplete_adjoint','1: linear viscosity, 0: non-linear viscosity'); 96 fielddisplay(obj,'control_parameters','ex: {''FrictionCoefficient''}, or {''MaterialsRheologyBbar''}'); 97 97 fielddisplay(obj,'nsteps','number of optimization searches'); 98 98 fielddisplay(obj,'cost_functions','indicate the type of response for each optimization step'); … … 100 100 fielddisplay(obj,'min_parameters','absolute minimum acceptable value of the inversed parameter on each vertex'); 101 101 fielddisplay(obj,'max_parameters','absolute maximum acceptable value of the inversed parameter on each vertex'); 102 fielddisplay(obj,'vx_obs','observed velocity x component [m/ a]');103 fielddisplay(obj,'vy_obs','observed velocity y component [m/ a]');104 fielddisplay(obj,'vel_obs','observed velocity magnitude [m/ a]');102 fielddisplay(obj,'vx_obs','observed velocity x component [m/yr]'); 103 fielddisplay(obj,'vy_obs','observed velocity y component [m/yr]'); 104 fielddisplay(obj,'vel_obs','observed velocity magnitude [m/yr]'); 105 105 fielddisplay(obj,'thickness_obs','observed thickness [m]'); 106 106 disp('Available cost functions:'); -
TabularUnified issm/trunk-jpl/src/m/classes/thermal.m ¶
r13401 r14640 57 57 disp(sprintf(' Thermal solution parameters:')); 58 58 59 fielddisplay(obj,'spctemperature','temperature constraints (NaN means no constraint) ');60 fielddisplay(obj,'stabilization','0 ->no, 1->artificial_diffusivity, 2->SUPG');59 fielddisplay(obj,'spctemperature','temperature constraints (NaN means no constraint) [K]'); 60 fielddisplay(obj,'stabilization','0: no, 1: artificial_diffusivity, 2: SUPG'); 61 61 fielddisplay(obj,'maxiter','maximum number of non linear iterations'); 62 62 fielddisplay(obj,'penalty_lock','stabilize unstable thermal constraints that keep zigzagging after n iteration (default is 0, no stabilization)'); -
TabularUnified issm/trunk-jpl/src/m/classes/thermal.py ¶
r14141 r14640 1 #module imports2 1 import numpy 3 2 from fielddisplay import fielddisplay … … 14 13 """ 15 14 16 #properties 17 def __init__(self): 18 # {{{ Properties 15 def __init__(self): # {{{ 19 16 self.spctemperature = float('NaN') 20 17 self.penalty_threshold = 0 … … 29 26 30 27 #}}} 31 def __repr__(self): 32 # {{{ Display 28 def __repr__(self): # {{{ 33 29 string=' Thermal solution parameters:' 34 string="%s\n%s"%(string,fielddisplay(self,'spctemperature','temperature constraints (NaN means no constraint) '))35 string="%s\n%s"%(string,fielddisplay(self,'stabilization','0 ->no, 1->artificial_diffusivity, 2->SUPG'))30 string="%s\n%s"%(string,fielddisplay(self,'spctemperature','temperature constraints (NaN means no constraint) [K]')) 31 string="%s\n%s"%(string,fielddisplay(self,'stabilization','0: no, 1: artificial_diffusivity, 2: SUPG')) 36 32 string="%s\n%s"%(string,fielddisplay(self,'maxiter','maximum number of non linear iterations')) 37 33 string="%s\n%s"%(string,fielddisplay(self,'penalty_lock','stabilize unstable thermal constraints that keep zigzagging after n iteration (default is 0, no stabilization)')) … … 40 36 return string 41 37 #}}} 42 43 def setdefaultparameters(self): 44 # {{{setdefaultparameters 38 def setdefaultparameters(self): # {{{ 45 39 46 40 #Number of unstable constraints acceptable … … 61 55 return self 62 56 #}}} 63 64 57 def checkconsistency(self,md,solution,analyses): # {{{ 65 58 … … 78 71 return md 79 72 # }}} 80 81 73 def marshall(self,fid): # {{{ 82 74 WriteData(fid,'object',self,'fieldname','spctemperature','format','DoubleMat','mattype',1) … … 88 80 WriteData(fid,'object',self,'fieldname','isenthalpy','format','Boolean') 89 81 # }}} 90 -
TabularUnified issm/trunk-jpl/src/m/classes/timestepping.m ¶
r14103 r14640 47 47 disp(sprintf(' timestepping parameters:')); 48 48 49 fielddisplay(obj,'start_time','simulation starting time [yr s]');50 fielddisplay(obj,'final_time','final time to stop the simulation [yr s]');51 fielddisplay(obj,'time_step','length of time steps [yr s]');49 fielddisplay(obj,'start_time','simulation starting time [yr]'); 50 fielddisplay(obj,'final_time','final time to stop the simulation [yr]'); 51 fielddisplay(obj,'time_step','length of time steps [yr]'); 52 52 fielddisplay(obj,'time_adapt','use cfl condition to define time step ? (0 or 1) '); 53 53 fielddisplay(obj,'cfl_coefficient','coefficient applied to cfl condition'); -
TabularUnified issm/trunk-jpl/src/m/classes/timestepping.py ¶
r14141 r14640 1 #module imports2 1 from fielddisplay import fielddisplay 3 2 from EnumDefinitions import * … … 13 12 """ 14 13 15 #properties 16 def __init__(self): 17 # {{{ Properties 14 def __init__(self): # {{{ 18 15 self.start_time = 0. 19 16 self.final_time = 0. … … 26 23 27 24 #}}} 28 def __repr__(self): 29 # {{{ Display 25 def __repr__(self): # {{{ 30 26 string=" timestepping parameters:" 31 string="%s\n%s"%(string,fielddisplay(self,"start_time","simulation starting time [yr s]"))32 string="%s\n%s"%(string,fielddisplay(self,"final_time","final time to stop the simulation [yr s]"))33 string="%s\n%s"%(string,fielddisplay(self,"time_step","length of time steps [yr s]"))27 string="%s\n%s"%(string,fielddisplay(self,"start_time","simulation starting time [yr]")) 28 string="%s\n%s"%(string,fielddisplay(self,"final_time","final time to stop the simulation [yr]")) 29 string="%s\n%s"%(string,fielddisplay(self,"time_step","length of time steps [yr]")) 34 30 string="%s\n%s"%(string,fielddisplay(self,"time_adapt","use cfl condition to define time step ? (0 or 1) ")) 35 31 string="%s\n%s"%(string,fielddisplay(self,"cfl_coefficient","coefficient applied to cfl condition")) 36 32 return string 37 33 #}}} 38 39 def setdefaultparameters(self): 40 # {{{setdefaultparameters 34 def setdefaultparameters(self): # {{{ 41 35 42 36 #time between 2 time steps … … 52 46 return self 53 47 #}}} 54 55 48 def checkconsistency(self,md,solution,analyses): # {{{ 56 49 … … 65 58 return md 66 59 # }}} 67 68 60 def marshall(self,fid): # {{{ 69 61 WriteData(fid,'object',self,'fieldname','start_time','format','Double') … … 73 65 WriteData(fid,'object',self,'fieldname','cfl_coefficient','format','Double') 74 66 # }}} 75 -
TabularUnified issm/trunk-jpl/src/m/classes/toolkits.py ¶
r14636 r14640 25 25 #The other properties are dynamic 26 26 # }}} 27 def __repr__(self): # {{{ 28 s ="List of toolkits options per analysis:\n\n" 29 for analysis in vars(self).iterkeys(): 30 s+="%s\n" % fielddisplay(self,analysis,'') 27 31 32 return s 33 # }}} 28 34 def addoptions(self,analysis,*args): # {{{ 29 35 # Usage example: … … 45 51 return self 46 52 # }}} 47 48 def __repr__(self): # {{{49 s ="List of toolkits options per analysis:\n\n"50 for analysis in vars(self).iterkeys():51 s+="%s\n" % fielddisplay(self,analysis,'')52 53 return s54 # }}}55 56 53 def checkconsistency(self,md,solution,analyses): # {{{ 57 54 for analysis in vars(self).iterkeys(): … … 61 58 return md 62 59 # }}} 63 64 60 def ToolkitsFile(self,filename): # {{{ 65 61 """ … … 106 102 fid.close() 107 103 # }}} 108 -
TabularUnified issm/trunk-jpl/src/m/classes/transient.py ¶
r14543 r14640 1 #module imports2 1 from fielddisplay import fielddisplay 3 2 from EnumDefinitions import * … … 13 12 """ 14 13 15 #properties 16 def __init__(self): 17 # {{{ Properties 14 def __init__(self): # {{{ 18 15 self.isprognostic = False 19 16 self.isdiagnostic = False … … 27 24 28 25 #}}} 29 def __repr__(self): 30 # {{{ Display 26 def __repr__(self): # {{{ 31 27 string=' transient solution parameters:' 32 28 string="%s\n%s"%(string,fielddisplay(self,'isprognostic','indicates if a prognostic solution is used in the transient')) … … 38 34 return string 39 35 #}}} 40 41 def setdefaultparameters(self): 42 # {{{setdefaultparameters 36 def setdefaultparameters(self): # {{{ 43 37 44 38 #full analysis: Diagnostic, Prognostic and Thermal but no groundingline migration for now … … 51 45 return self 52 46 #}}} 53 54 47 def checkconsistency(self,md,solution,analyses): # {{{ 55 48 … … 68 61 return md 69 62 # }}} 70 71 63 def marshall(self,fid): # {{{ 72 64 WriteData(fid,'object',self,'fieldname','isprognostic','format','Boolean') -
TabularUnified issm/trunk-jpl/src/m/classes/verbose.py ¶
r14558 r14640 72 72 raise TypeError("verbose supported field values are logicals only (True or False)") 73 73 # }}} 74 75 74 def __repr__(self): # {{{ 76 75 … … 89 88 return s 90 89 # }}} 91 92 90 def VerboseToBinary(self): # {{{ 93 91 … … 114 112 return binary 115 113 # }}} 116 117 114 def BinaryToVerbose(self,binary): # {{{ 118 115 … … 128 125 #ENDBIN2VERB 129 126 # }}} 130 131 127 def checkconsistency(self,md,solution,analyses): # {{{ 132 128 return md 133 129 # }}} 134 135 130 def marshall(self,fid): # {{{ 136 131 WriteData(fid,'data',self.VerboseToBinary(),'enum',VerboseEnum(),'format','Integer') 137 132 # }}} 138
Note:
See TracChangeset
for help on using the changeset viewer.