Changeset 25969
- Timestamp:
- 02/03/21 12:51:18 (4 years ago)
- Location:
- issm/trunk-jpl/src/m/classes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/solidearth.m
r25956 r25969 17 17 partitionice = []; 18 18 partitionhydro = []; 19 end 20 methods (Static) 21 function self = loadobj(self) % {{{ 22 % This function is directly called by matlab when a model object is 23 % loaded. If the input is a struct it is an old version of this class and 24 % old fields must be recovered (make sure they are in the deprecated 25 % model properties) 26 27 if isstruct(self) 28 % 2021, Jan 10 29 if isfield(self,'sealevel') 30 self.initialsealevel = self.sealevel; 31 end 32 self = structtoobj(solidearth(),self); 33 34 end 35 end% }}} 19 36 end 20 37 methods … … 76 93 disp(sprintf(' solidearth inputs, forcings and settings:')); 77 94 78 fielddisplay(self,'initialsealevel','sea level at the start of computation )[m]');95 fielddisplay(self,'initialsealevel','sea level at the start of computation [m]'); 79 96 fielddisplay(self,'planetradius','planet radius [m]'); 80 97 fielddisplay(self,'transitions','indices into parts of the mesh that will be icecaps'); -
issm/trunk-jpl/src/m/classes/solidearth.py
r25962 r25969 41 41 raise Exception('solidearth constructor error message: zero or one argument only!') 42 42 #}}} 43 44 43 def __repr__(self): # {{{ 45 44 s = ' solidearthinputs, forcings and settings:\n' … … 60 59 return s 61 60 #}}} 62 63 61 def setdefaultparameters(self, planet): # {{{ 64 62 # Default output … … 78 76 self.planetradius = planetradius(planet) 79 77 #}}} 80 81 78 def checkconsistency(self, md, solution, analyses): # {{{ 82 79 if ('SealevelriseAnalysis' not in analyses) or (solution == 'TransientSolution' and not md.transient.isslc): … … 96 93 return md 97 94 #}}} 98 99 95 def defaultoutputs(self, md): #{{{ 100 96 return ['Sealevel'] 101 97 #}}} 102 103 98 def marshall(self, prefix, md, fid): #{{{ 104 99 WriteData(fid, prefix, 'object', self, 'fieldname', 'initialsealevel', 'mattype', 1, 'format', 'DoubleMat', 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', md.constants.yts) … … 136 131 WriteData(fid, prefix, 'data', outputs, 'name', 'md.solidearth.requested_outputs', 'format', 'StringArray') 137 132 #}}} 138 139 133 def extrude(self, md): #{{{ 140 134 self.initialsealevel = project3d(md, 'vector', self.initialsealevel, 'type', 'node')
Note:
See TracChangeset
for help on using the changeset viewer.