Skip to content

Commit 0248a4a

Browse files
committed
Fill NaNs in transport with zeros
This is necessary when computing streamfunctions so the resulting sums are not themselves contaminated with NaNs.
1 parent 30a2e99 commit 0248a4a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compass/ocean/tests/isomip_plus/streamfunction.py

+1
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@ def _interpolate_horizontal_transport_zlevel(ds, z, outFileName,
432432
zBot = dsIn.zInterfaceEdge.isel(nVertLevelsP1=inZIndex + 1)
433433
inTransportPerDepth = \
434434
dsIn.transportPerDepth.isel(nVertLevels=inZIndex)
435+
inTransportPerDepth = inTransportPerDepth.fillna(value=0.)
435436

436437
zt = numpy.minimum(zTop, z0)
437438
zb = numpy.maximum(zBot, z1)

0 commit comments

Comments
 (0)