Last change
on this file since 19759 was 19759, checked in by Eric.Larour, 9 years ago |
CHG: finished implementing all classes and modules needed to parameterize
test101 in javascript.
|
File size:
755 bytes
|
Rev | Line | |
---|
[19753] | 1 | //SMBforcing Class definition
|
---|
| 2 | //
|
---|
| 3 | // Usage:
|
---|
| 4 | // SMB=SMBforcing();
|
---|
| 5 |
|
---|
| 6 | function SMBforcing(){
|
---|
| 7 | //methods
|
---|
| 8 | this.setdefaultparameters = function(){// {{{
|
---|
| 9 | } // }}}
|
---|
| 10 | this.disp = function(){ // {{{
|
---|
| 11 | console.log(sprintf(' surface forcings parameters:'));
|
---|
| 12 | fielddisplay(this,'mass_balance','surface mass balance [m/yr ice eq]');
|
---|
| 13 | fielddisplay(this,'requested_outputs','additional outputs requested');
|
---|
| 14 | } // }}}
|
---|
[19759] | 15 | this.initialize = function(md) {// {{{
|
---|
| 16 |
|
---|
| 17 | if (self.mass_balance === NaN){
|
---|
| 18 | self.mass_balance=NewArrayFill(md.mesh.numberofvertices,0);
|
---|
| 19 | console.log(' no smb.mass_balance specified: values set as zero');
|
---|
| 20 | }
|
---|
| 21 |
|
---|
| 22 | } // }}}
|
---|
[19753] | 23 | //properties
|
---|
| 24 | this.mass_balance = NaN;
|
---|
| 25 | this.requested_outputs = [''];
|
---|
| 26 | this.setdefaultparameters();
|
---|
| 27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.