Changeset 22854
- Timestamp:
- 06/20/18 17:39:41 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/m/classes/SMBd18opdd.m ¶
r22852 r22854 43 43 if(self.isd18opd),self.precipitations_presentday=project3d(md,'vector',self.precipitations_presentday,'type','node');end 44 44 if(self.istemperaturescaled==0),self.temperatures_reconstructed=project3d(md,'vector',self.temperatures_reconstructed,'type','node');end 45 if(self.isprecipscaled ),self.precipitations_reconstructed=project3d(md,'vector',self.precipitations_reconstructed,'type','node');end45 if(self.isprecipscaled==0),self.precipitations_reconstructed=project3d(md,'vector',self.precipitations_reconstructed,'type','node');end 46 46 if(self.issetpddfac), self.pddfac_snow=project3d(md,'vector',self.pddfac_snow,'type','node');end 47 47 if(self.issetpddfac), self.pddfac_ice=project3d(md,'vector',self.pddfac_ice,'type','node');end … … 90 90 md = checkfield(md,'fieldname','smb.rlapslgm','>=',0,'numel',1); 91 91 if(self.isd18opd==1) 92 lent=size(self.temperatures_presentday,2); 93 lenp=size(self.precipitations_presentday,2); 94 multt=ceil(lent/12)*12; 95 multp=ceil(lenp/12)*12; 96 md = checkfield(md,'fieldname','smb.temperatures_presentday','size',[md.mesh.numberofvertices+1 multt],'NaN',1,'Inf',1,'timeseries',1); 97 md = checkfield(md,'fieldname','smb.precipitations_presentday','size',[md.mesh.numberofvertices+1 multp],'NaN',1,'Inf',1,'timeseries',1); 92 md = checkfield(md,'fieldname','smb.temperatures_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1,'Inf',1,'timeseries',1); 93 md = checkfield(md,'fieldname','smb.precipitations_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1,'Inf',1,'timeseries',1); 94 %cross check that time stamp values are between 0 and 1: 95 i=find(self.temperatures_presentday(end,:)-self.precipitations_presentday(end,:)~=0); 96 if length(i), 97 error('Smb checkconsistency fail: timestamp (last row of matrix) for present day temp and precip must be equal!'); 98 end 99 j=find(self.temperatures_presentday(end,:)<0 | self.temperatures_presentday(end,:)>1); 100 if length(j), 101 error('Smb checkconsistency fail: timestamp (last row of matrix) for present day temp and precip must be between 0 and 1!'); 102 end 103 98 104 md = checkfield(md,'fieldname','smb.delta18o','NaN',1,'Inf',1,'size',[2,NaN],'singletimeseries',1); 99 105 md = checkfield(md,'fieldname','smb.dpermil','>=',0,'numel',1);
Note:
See TracChangeset
for help on using the changeset viewer.