Changeset 26300 for issm/trunk-jpl/src/m/classes/SMBforcing.js
- Timestamp:
- 06/07/21 11:12:48 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/SMBforcing.js
r21065 r26300 12 12 console.log(sprintf(' surface forcings parameters:')); 13 13 fielddisplay(this,'mass_balance','surface mass balance [m/yr ice eq]'); 14 fielddisplay(this,'steps_per_step', 'number of smb steps per time step'); 14 15 fielddisplay(this,'requested_outputs','additional outputs requested'); 16 fielddisplay(this,'averaging','averaging methods from short to long steps'); 17 console.log(sprintf('%51s 0: Arithmetic (default)',' ')); 18 console.log(sprintf('%51s 1: Geometric',' ')); 19 console.log(sprintf('%51s 2: Harmonic',' ')); 15 20 } // }}} 16 21 this.defaultoutputs = function(){ // {{{ … … 33 38 } // }}} 34 39 this.checkconsistency = function(md,solution,analyses) { //{{{ 35 40 if (solution=='TransientSolution' && md.transient.issmb == 0) return; 36 41 if(ArrayAnyEqual(ArrayIsMember('MasstransportAnalysis',analyses),1)){ 37 42 checkfield(md,'fieldname','smb.mass_balance','timeseries',1,'NaN',1,'Inf',1); … … 40 45 checkfield(md,'fieldname','smb.mass_balance','size',[md.mesh.numberofvertices,1],'NaN',1,'Inf',1); 41 46 } 42 checkfield(md,'fieldname','smb.requested_outputs','stringrow',1); 43 47 checkfield(md,'fieldname','smb.steps_per_step','>=',1,'numel',[1]); 48 checkfield(md,'fieldname','smb.requested_outputs','stringrow',1); 49 checkfield(md,'fieldname','smb.averaging','numel',[1],'values',[0,1,2]); 44 50 } // }}} 45 51 this.marshall=function(md,prefix,fid) { //{{{ … … 49 55 WriteData(fid,prefix,'name','md.smb.model','data',1,'format','Integer'); 50 56 WriteData(fid,prefix,'object',this,'class','smb','fieldname','mass_balance','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts); 57 WriteData(fid,prefix,'object',this,'fieldname','steps_per_step','format','Integer'); 58 WriteData(fid,prefix,'object',this,'fieldname','averaging','format','Integer'); 51 59 52 60 //process requested outputs … … 66 74 //properties 67 75 // {{{ 68 this.mass_balance = NaN; 69 this.requested_outputs = []; 76 this.mass_balance = NaN; 77 this.requested_outputs = []; 78 this.steps_per_step = 1; 79 this.averaging = 0; 70 80 this.setdefaultparameters(); 71 81 // }}}
Note:
See TracChangeset
for help on using the changeset viewer.