File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -691,14 +691,19 @@ def _compute_area_vol(self):
691691 mask = dsMesh .latCell < 0
692692
693693 if maxAllowedSeaIceThickness is not None :
694- mask = np .logical_and (mask ,
695- ds .iceThick <= maxAllowedSeaIceThickness )
694+ mask = np .logical_and (
695+ mask , ds .iceThick <= maxAllowedSeaIceThickness
696+ )
697+ dsForHemisphere = ds
696698 if os .path .exists (outFileNames [hemisphere ]):
697699 dsCache = xr .open_dataset (outFileNames [hemisphere ])
698700 timeMask = ds .startTime > dsCache .startTime .isel (Time = - 1 )
699- ds = ds .isel (Time = timeMask )
701+ timeMask = timeMask .compute ()
702+ dsForHemisphere = ds .isel (Time = timeMask )
700703
701- dsAreaSum = (ds .where (mask ) * dsMesh .areaCell ).sum ('nCells' )
704+ dsAreaSum = (
705+ dsForHemisphere .where (mask ) * dsMesh .areaCell
706+ ).sum ('nCells' )
702707 dsAreaSum = dsAreaSum .rename (
703708 {'iceConc' : 'iceArea' ,
704709 'iceThick' : 'iceVolume' ,
You can’t perform that action at this time.
0 commit comments