Changeset 24240 for issm/trunk-jpl/src/m/classes/SMBforcing.m
- Timestamp:
- 10/17/19 06:03:43 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/m/classes/SMBforcing.m ¶
r23814 r24240 5 5 6 6 classdef SMBforcing 7 properties (SetAccess=public) 8 isclimatology = 0; 9 mass_balance = NaN; 10 requested_outputs = {}; 7 properties (SetAccess=public) 8 isclimatology = 0; 9 mass_balance = NaN; 10 steps_per_step = 1; 11 requested_outputs = {}; 11 12 end 12 13 methods … … 57 58 md = checkfield(md,'fieldname','smb.mass_balance','size',[md.mesh.numberofvertices 1],'NaN',1,'Inf',1); 58 59 end 60 md = checkfield(md,'fieldname','smb.steps_per_step','>=',1,'numel',[1]); 59 61 md = checkfield(md,'fieldname','smb.requested_outputs','stringrow',1); 60 62 md = checkfield(md,'fieldname','smb.isclimatology','values',[0 1]); 61 63 if (self.isclimatology) 62 64 md = checkfield(md,'fieldname', 'smb.mass_balance', 'size',[md.mesh.numberofvertices+1],... 63 'message',['mass_balance must have md.mesh.numberofvertices+1 rows in order to force a climatology']);65 'message',['mass_balance must have md.mesh.numberofvertices+1 rows in order to force a climatology']); 64 66 end 65 67 end % }}} … … 68 70 fielddisplay(self,'mass_balance','surface mass balance [m/yr ice eq]'); 69 71 fielddisplay(self,'isclimatology','repeat all forcings when past last forcing time (default false)'); 72 fielddisplay(self, 'steps_per_step', 'number of smb steps per time step'); 70 73 fielddisplay(self,'requested_outputs','additional outputs requested'); 71 74 end % }}} … … 77 80 WriteData(fid,prefix,'object',self,'class','smb','fieldname','mass_balance','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts); 78 81 %WriteData(fid,prefix,'object',self,'class','smb','fieldname','mass_balance','format','CompressedMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts); 79 82 WriteData(fid, prefix, 'object', self, 'fieldname', 'steps_per_step', 'format', 'Integer'); 83 80 84 %process requested outputs 81 85 outputs = self.requested_outputs; … … 90 94 end % }}} 91 95 function savemodeljs(self,fid,modelname) % {{{ 92 96 93 97 writejs1Darray(fid,[modelname '.smb.mass_balance'],self.mass_balance); 94 98 writejscellstring(fid,[modelname '.smb.requested_outputs'],self.requested_outputs);
Note:
See TracChangeset
for help on using the changeset viewer.