You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 11, 2021. It is now read-only.
When adding up np arrays, using np.sum results in subsurface_storage, surface_storage and et unable to be calculated because they have undefined values outside the mask.
This was fixed for me by changing np.sum to np.nansum. This has worked for myself and Jun Zhang.
Ex. below:
# total subsurface storage for this time step is the summation of substorage across all x/y/z slices
subsurface_storage[i, ...] = np.nansum(
calculate_subsurface_storage(mask, porosity, pressure, saturation, specific_storage, dx, dy, dz),
axis=(0, 1, 2)
)
The text was updated successfully, but these errors were encountered:
@aktriplett .. I was purposely avoiding a nansum because undefined values of pressure/saturation outside the mask should have no bearing on the subsurface storage calculations, and the code should be tolerant of those values. The results of the calculate_subsurface_storage function should not return any nans. If they are, then you've likely discovered a bug. Let me get in contact with you to get more details on this..
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When adding up np arrays, using np.sum results in subsurface_storage, surface_storage and et unable to be calculated because they have undefined values outside the mask.
This was fixed for me by changing np.sum to np.nansum. This has worked for myself and Jun Zhang.
Ex. below:
# total subsurface storage for this time step is the summation of substorage across all x/y/z slices
subsurface_storage[i, ...] = np.nansum(
calculate_subsurface_storage(mask, porosity, pressure, saturation, specific_storage, dx, dy, dz),
axis=(0, 1, 2)
)
The text was updated successfully, but these errors were encountered: