Changeset 25374 for issm/trunk-jpl/src/m/classes/SMBpdd.py
- Timestamp:
- 08/11/20 17:32:58 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/m/classes/SMBpdd.py ¶
r24793 r25374 34 34 self.precipitations_presentday = float('NaN') 35 35 self.precipitations_lgm = float('NaN') 36 self.pddfac_snow = float('NaN') 37 self.pddfac_ice = float('NaN') 36 38 self.steps_per_step = 1 37 39 self.averaging = 0 … … 47 49 string = "%s\n%s" % (string, fielddisplay(self, 'isdelta18o', 'is temperature and precipitation delta18o parametrisation activated (0 or 1, default is 0)')) 48 50 string = "%s\n%s" % (string, fielddisplay(self, 'ismungsm', 'is temperature and precipitation mungsm parametrisation activated (0 or 1, default is 0)')) 51 string = "%s\n%s" % (string, fielddisplay(self, 'issetpddfac', 'is user passing in defined pdd factors (0 or 1, default is 0)')) 49 52 string = "%s\n%s" % (string, fielddisplay(self, 'desfac', 'desertification elevation factor (between 0 and 1, default is 0.5) [m]')) 50 53 string = "%s\n%s" % (string, fielddisplay(self, 's0p', 'should be set to elevation from precip source (between 0 and a few 1000s m, default is 0) [m]')) … … 73 76 string = "%s\n%s" % (string, fielddisplay(self, 'Tdiff', 'time interpolation parameter for temperature, 1D(year), required if mungsm is activated')) 74 77 string = "%s\n%s" % (string, fielddisplay(self, 'sealev', 'sea level [m], 1D(year), required if mungsm is activated')) 75 78 76 79 string = "%s\n%s" % (string, fielddisplay(self, 'steps_per_step', 'number of smb steps per time step')) 77 80 string = "%s\n%s" % (string, fielddisplay(self, 'averaging', 'averaging methods from short to long steps')) … … 101 104 self.precipitations_presentday = project3d(md, 'vector', self.precipitations_presentday, 'type', 'node') 102 105 self.precipitations_lgm = project3d(md, 'vector', self.precipitations_lgm, 'type', 'node') 103 106 107 if self.issetpddfac: 108 self.pddfac_snow = project3d(md, 'vector', self.pddfac_snow, 'type', 'node') 109 if self.issetpddfac: 110 self.pddfac_ice = project3d(md, 'vector', self.pddfac_ice, 'type', 'node') 104 111 self.s0p = project3d(md, 'vector', self.s0p, 'type', 'node') 105 112 self.s0t = project3d(md, 'vector', self.s0t, 'type', 'node') … … 130 137 self.rlaps = 6.5 131 138 self.rlapslgm = 6.5 139 self.issetpddfac = 0 132 140 133 141 return self … … 164 172 md = checkfield(md, 'fieldname', 'smb.sealev', 'NaN', 1, 'Inf', 1, 'size', [2, np.nan], 'singletimeseries', 1) 165 173 174 if self.issetpddfac: 175 md = checkfield(md, 'fieldname', 'smb.pddfac_snow', '>=', 0, 'NaN', 1, 'Inf', 1) 176 md = checkfield(md, 'fieldname', 'smb.pddfac_ice', '>=', 0, 'NaN', 1, 'Inf', 1) 177 166 178 md = checkfield(md, 'fieldname', 'smb.steps_per_step', '>=', 1, 'numel', [1]) 167 179 md = checkfield(md, 'fieldname', 'smb.averaging', 'numel', [1], 'values', [0, 1, 2]) … … 206 218 WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'Tdiff', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', md.constants.yts) 207 219 WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'sealev', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', 2, 'yts', md.constants.yts) 220 221 if self.issetpddfac: 222 WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'pddfac_snow', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', md.constants.yts) 223 WriteData(fid, prefix, 'object', self, 'class', 'smb', 'fieldname', 'pddfac_ice', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', md.constants.yts) 208 224 209 225 #process requested outputs
Note:
See TracChangeset
for help on using the changeset viewer.