Changeset 1267
- Timestamp:
- 07/08/09 20:06:22 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/public/geography2.m
r1223 r1267 121 121 end 122 122 123 124 %some final checks: 125 %check that no grid thinks it's on an ice shelf or ice sheet, and lies actually in the middle of the water. 126 gridsgrounded=find(~gridonwater); 127 lengthconnectivity=size(md.nodeconnectivity,2); 128 groundedcounters=md.nodeconnectivity(gridsgrounded,lengthconnectivity); 129 groundedconnectivity=md.nodeconnectivity(gridsgrounded,1:lengthconnectivity-1); 130 pos=find(groundedconnectivity); 131 groundedconnectivity(pos)=elementonwater(groundedconnectivity(pos)); 132 groundedsum=sum(groundedconnectivity,2); 133 errorflags=find(groundedsum==groundedcounters); 134 errorgrids=gridsgrounded(errorflags); 135 136 gridonwater(errorgrids)=1; 137 gridonicesheet(errorgrids)=0; 138 gridoniceshelf(errorgrids)=0; 139 123 140 %Return: 124 141 md.gridoniceshelf=gridoniceshelf;
Note:
See TracChangeset
for help on using the changeset viewer.