Changeset 20690 for issm/trunk-jpl/src/m/classes/SMBpdd.py
- Timestamp:
- 06/03/16 10:05:11 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/SMBpdd.py
r19897 r20690 149 149 return md 150 150 #}}} 151 def marshall(self, md,fid): # {{{151 def marshall(self,prefix,md,fid): # {{{ 152 152 153 153 yts=365.0*24.0*3600.0 154 154 155 WriteData(fid, 'enum',SmbEnum(),'data',SMBpddEnum(),'format','Integer')155 WriteData(fid,prefix,'name','md.smb.model','data',SMBpddEnum(),'format','Integer') 156 156 157 WriteData(fid, 'object',self,'class','smb','fieldname','isdelta18o','format','Boolean')158 WriteData(fid, 'object',self,'class','smb','fieldname','ismungsm','format','Boolean')159 WriteData(fid, 'object',self,'class','smb','fieldname','desfac','format','Double')160 WriteData(fid, 'object',self,'class','smb','fieldname','s0p','format','DoubleMat','mattype',1);161 WriteData(fid, 'object',self,'class','smb','fieldname','s0t','format','DoubleMat','mattype',1);162 WriteData(fid, 'object',self,'class','smb','fieldname','rlaps','format','Double')163 WriteData(fid, 'object',self,'class','smb','fieldname','rlapslgm','format','Double')157 WriteData(fid,prefix,'object',self,'class','smb','fieldname','isdelta18o','format','Boolean') 158 WriteData(fid,prefix,'object',self,'class','smb','fieldname','ismungsm','format','Boolean') 159 WriteData(fid,prefix,'object',self,'class','smb','fieldname','desfac','format','Double') 160 WriteData(fid,prefix,'object',self,'class','smb','fieldname','s0p','format','DoubleMat','mattype',1); 161 WriteData(fid,prefix,'object',self,'class','smb','fieldname','s0t','format','DoubleMat','mattype',1); 162 WriteData(fid,prefix,'object',self,'class','smb','fieldname','rlaps','format','Double') 163 WriteData(fid,prefix,'object',self,'class','smb','fieldname','rlapslgm','format','Double') 164 164 165 165 if (self.isdelta18o==0 and self.ismungsm==0): 166 WriteData(fid, 'object',self,'class','smb','fieldname','monthlytemperatures','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1)167 WriteData(fid, 'object',self,'class','smb','fieldname','precipitation','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1)166 WriteData(fid,prefix,'object',self,'class','smb','fieldname','monthlytemperatures','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1) 167 WriteData(fid,prefix,'object',self,'class','smb','fieldname','precipitation','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1) 168 168 elif self.isdelta18o: 169 WriteData(fid, 'object',self,'class','smb','fieldname','temperatures_presentday','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1)170 WriteData(fid, 'object',self,'class','smb','fieldname','temperatures_lgm','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1)171 WriteData(fid, 'object',self,'class','smb','fieldname','precipitations_presentday','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1)172 WriteData(fid, 'object',self,'class','smb','fieldname','precipitations_lgm','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1)173 WriteData(fid, 'object',self,'class','smb','fieldname','delta18o_surface','format','DoubleMat','mattype',1,'timeserieslength',2)174 WriteData(fid, 'object',self,'class','smb','fieldname','delta18o','format','DoubleMat','mattype',1,'timeserieslength',2)175 WriteData(fid, 'object',self,'class','smb','fieldname','Tdiff','format','DoubleMat','mattype',1,'timeserieslength',2)176 WriteData(fid, 'object',self,'class','smb','fieldname','sealev','format','DoubleMat','mattype',1,'timeserieslength',2)169 WriteData(fid,prefix,'object',self,'class','smb','fieldname','temperatures_presentday','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1) 170 WriteData(fid,prefix,'object',self,'class','smb','fieldname','temperatures_lgm','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1) 171 WriteData(fid,prefix,'object',self,'class','smb','fieldname','precipitations_presentday','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1) 172 WriteData(fid,prefix,'object',self,'class','smb','fieldname','precipitations_lgm','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1) 173 WriteData(fid,prefix,'object',self,'class','smb','fieldname','delta18o_surface','format','DoubleMat','mattype',1,'timeserieslength',2) 174 WriteData(fid,prefix,'object',self,'class','smb','fieldname','delta18o','format','DoubleMat','mattype',1,'timeserieslength',2) 175 WriteData(fid,prefix,'object',self,'class','smb','fieldname','Tdiff','format','DoubleMat','mattype',1,'timeserieslength',2) 176 WriteData(fid,prefix,'object',self,'class','smb','fieldname','sealev','format','DoubleMat','mattype',1,'timeserieslength',2) 177 177 elif self.ismungsm: 178 WriteData(fid, 'object',self,'class','smb','fieldname','temperatures_presentday','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1)179 WriteData(fid, 'object',self,'class','smb','fieldname','temperatures_lgm','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1)180 WriteData(fid, 'object',self,'class','smb','fieldname','precipitations_presentday','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1)181 WriteData(fid, 'object',self,'class','smb','fieldname','precipitations_lgm','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1)182 WriteData(fid, 'object',self,'class','smb','fieldname','Pfac','format','DoubleMat','mattype',1,'timeserieslength',2)183 WriteData(fid, 'object',self,'class','smb','fieldname','Tdiff','format','DoubleMat','mattype',1,'timeserieslength',2)184 WriteData(fid, 'object',self,'class','smb','fieldname','sealev','format','DoubleMat','mattype',1,'timeserieslength',2)178 WriteData(fid,prefix,'object',self,'class','smb','fieldname','temperatures_presentday','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1) 179 WriteData(fid,prefix,'object',self,'class','smb','fieldname','temperatures_lgm','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1) 180 WriteData(fid,prefix,'object',self,'class','smb','fieldname','precipitations_presentday','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1) 181 WriteData(fid,prefix,'object',self,'class','smb','fieldname','precipitations_lgm','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1) 182 WriteData(fid,prefix,'object',self,'class','smb','fieldname','Pfac','format','DoubleMat','mattype',1,'timeserieslength',2) 183 WriteData(fid,prefix,'object',self,'class','smb','fieldname','Tdiff','format','DoubleMat','mattype',1,'timeserieslength',2) 184 WriteData(fid,prefix,'object',self,'class','smb','fieldname','sealev','format','DoubleMat','mattype',1,'timeserieslength',2) 185 185 186 186 #process requested outputs … … 190 190 outputscopy=outputs[0:max(0,indices[0]-1)]+self.defaultoutputs(md)+outputs[indices[0]+1:] 191 191 outputs =outputscopy 192 WriteData(fid, 'data',outputs,'enum',SmbRequestedOutputsEnum(),'format','StringArray')192 WriteData(fid,prefix,'data',outputs,'name','md.smb.requested_outputs','format','StringArray') 193 193 194 194 # }}}
Note:
See TracChangeset
for help on using the changeset viewer.