Changeset 25588
- Timestamp:
- 09/21/20 10:21:06 (4 years ago)
- Location:
- issm/branches/trunk-larour-SLPS2020/src/m/contrib/larour
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/branches/trunk-larour-SLPS2020/src/m/contrib/larour/glacier_inventory.m
r24880 r25588 149 149 errornotfound=getfieldvalue(options,'errornotfound',1); 150 150 plotr=getfieldvalue(options,'plot',0); 151 plotr=1; 151 152 152 153 %The way we run this is through the O2 zones defined in boxes. We go through … … 203 204 switch i, 204 205 case 4, radius=40; 206 case 8, radius=60; 205 207 case 12, radius=25; 208 case 19, radius=60; 209 case 32, radius=60; 206 210 case 33, radius=5; 207 211 case 41, radius=75; 208 212 case 42, radius=45; 213 case 61, radius=66; 209 214 case 68, radius=10; 210 215 case 82, radius=30; -
issm/branches/trunk-larour-SLPS2020/src/m/contrib/larour/oceanmip.m
r25326 r25588 46 46 pos=find(diff(time)<0); 47 47 if isempty(pos), 48 pos=(length(time)-12*100+1):length(time); 48 %pos=(length(time)-12*100+1):length(time); 49 pos=1:length(time); 49 50 else 50 51 pos=[(pos+1):length(time)]; … … 75 76 zostogam(year)=mean(zostoga(i-11:i)); 76 77 end 78 %control against 2006: 79 zostogam=zostogam-zostogam(1); 77 80 self.zostoga{end+1}=zostogam; clear zostoga; 78 81 … … 109 112 disp(['interpolating model ' self.model{i} ' onto model mesh']); 110 113 114 %If we have 182 cells in long, trim by 1 on each side: 115 if size(self.pbo{i},1)==182, 116 self.pbo{i}=self.pbo{i}(2:181,:,:); 117 self.zos{i}=self.zos{i}(2:181,:,:); 118 self.long{i}=self.long{i}(2:181,:,:); 119 self.lat{i}=self.lat{i}(2:181,:,:); 120 end 121 122 111 123 %triangulation: 112 long=double(self.long{i}); long=long(:); 124 long=double(self.long{i}); long=long(:); 125 pos=find(long<0); long(pos)=long(pos)+360; 113 126 lat=double(self.lat{i}); lat=lat(:); 114 127 [newl,uniqpos]=unique([lat,long],'rows','stable'); … … 122 135 ind=find(areas<1e-8); index(ind,:)=[]; 123 136 137 %fix if we have orphans 138 [index long lat dummy newpos]=FixMesh(index,long,lat,1:length(long)); 139 124 140 time=self.time{i}; 125 141 %retrieve fields: … … 133 149 134 150 parfor j=1:length(time), 151 %for j=1:length(time), 135 152 if mod(j,10)==0, 136 153 s=sprintf(' progress: %.2g ',j/length(time)*100); … … 138 155 end 139 156 140 pbo=omip_pbo(:,:,j); pbo=pbo(:); pbo=pbo(uniqpos); 157 pbo=omip_pbo(:,:,j); pbo=pbo(:); pbo=pbo(uniqpos); 141 158 zos=omip_zos(:,:,j); zos=zos(:); zos=zos(uniqpos); 142 159 143 mesh_pbo(:,j)=InterpFromMeshToMesh2d(index,long,lat,pbo,meshlong,meshlat); 144 mesh_zos(:,j)=InterpFromMeshToMesh2d(index,long,lat,zos,meshlong,meshlat); 160 pboj= InterpFromMeshToMesh2d(index,long,lat,pbo(newpos),meshlong,meshlat); 161 pos=find(abs(pboj)>1e4); pboj(pos)=0; 162 mesh_pbo(:,j)=pboj; 163 164 zosj=InterpFromMeshToMesh2d(index,long,lat,zos(newpos),meshlong,meshlat); 165 pos=find(abs(zosj)>1e5); zosj(pos)=0; 166 mesh_zos(:,j)=zosj; 145 167 end 146 168 self.mesh_pbo{end+1}=mesh_pbo; … … 200 222 pbo=self.mesh_pbo{i}; pbo=pbo/1000; %in meters 201 223 end 202 time=self.time{i}; 203 array=[pbo;time]; 224 array=pbo; 204 225 break; 205 226 end
Note:
See TracChangeset
for help on using the changeset viewer.