Changeset 19040 for issm/trunk-jpl/src/m/classes/seaice.m
- Timestamp:
- 01/26/15 18:40:38 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/seaice.m
r18503 r19040 14 14 end 15 15 methods 16 function obj= seaice(varargin) % {{{16 function self = seaice(varargin) % {{{ 17 17 switch nargin 18 18 case 0 19 obj=setdefaultparameters(obj);19 self=setdefaultparameters(self); 20 20 return; 21 21 otherwise … … 23 23 end 24 24 end % }}} 25 function md = checkconsistency( obj,md,solution,analyses) % {{{25 function md = checkconsistency(self,md,solution,analyses) % {{{ 26 26 if solution~=SeaiceSolutionEnum(), return; end 27 27 md = checkfield(md,'fieldname','seaice.min_concentration','NaN',1,'>=',0,'numel',1); … … 32 32 md = checkfield(md,'fieldname','seaice.coriolis_factor','size',[md.mesh.numberofelements 1],'NaN',1,'>=',0); 33 33 end % }}} 34 function obj = setdefaultparameters(obj) % {{{34 function self = setdefaultparameters(self) % {{{ 35 35 36 36 %Minimum ice concentration allowed in the simulation 37 obj.min_concentration=0.;37 self.min_concentration=0.; 38 38 39 39 %Minimum ice thickness allowed in the simulation 40 obj.min_thickness=0.;40 self.min_thickness=0.; 41 41 42 42 %Maxmimum ice thickness allowed in the simulation 43 obj.max_thickness=25.;43 self.max_thickness=25.; 44 44 45 45 end % }}} 46 function disp( obj) % {{{46 function disp(self) % {{{ 47 47 disp(sprintf(' seaice parameters:')); 48 fielddisplay( obj,'min_concentration','minimum ice concentration allowed in the simulation [no unit]');49 fielddisplay( obj,'min_thickness','minimum ice thickness allowed in the simulation [m]');50 fielddisplay( obj,'max_thickness','maximum ice thickness allowed in the simulation [m]');51 fielddisplay( obj,'spcvx','x-axis velocity constraint (NaN means no constraint) [m/s]');52 fielddisplay( obj,'spcvy','y-axis velocity constraint (NaN means no constraint) [m/s]');53 fielddisplay( obj,'coriolis_factor','factor applied to Coriolis forces (latitude dependent)');48 fielddisplay(self,'min_concentration','minimum ice concentration allowed in the simulation [no unit]'); 49 fielddisplay(self,'min_thickness','minimum ice thickness allowed in the simulation [m]'); 50 fielddisplay(self,'max_thickness','maximum ice thickness allowed in the simulation [m]'); 51 fielddisplay(self,'spcvx','x-axis velocity constraint (NaN means no constraint) [m/s]'); 52 fielddisplay(self,'spcvy','y-axis velocity constraint (NaN means no constraint) [m/s]'); 53 fielddisplay(self,'coriolis_factor','factor applied to Coriolis forces (latitude dependent)'); 54 54 end % }}} 55 function marshall( obj,md,fid) % {{{56 WriteData(fid,'object', obj,'fieldname','min_concentration','format','Double');57 WriteData(fid,'object', obj,'fieldname','min_thickness','format','Double');58 WriteData(fid,'object', obj,'fieldname','max_thickness','format','Double');59 WriteData(fid,'object', obj,'fieldname','spcvx','format','DoubleMat','mattype',1);60 WriteData(fid,'object', obj,'fieldname','spcvy','format','DoubleMat','mattype',1);61 WriteData(fid,'object', obj,'fieldname','coriolis_factor','format','DoubleMat','mattype',2);55 function marshall(self,md,fid) % {{{ 56 WriteData(fid,'object',self,'fieldname','min_concentration','format','Double'); 57 WriteData(fid,'object',self,'fieldname','min_thickness','format','Double'); 58 WriteData(fid,'object',self,'fieldname','max_thickness','format','Double'); 59 WriteData(fid,'object',self,'fieldname','spcvx','format','DoubleMat','mattype',1); 60 WriteData(fid,'object',self,'fieldname','spcvy','format','DoubleMat','mattype',1); 61 WriteData(fid,'object',self,'fieldname','coriolis_factor','format','DoubleMat','mattype',2); 62 62 end % }}} 63 63 end
Note:
See TracChangeset
for help on using the changeset viewer.