Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash: "ValueError: zero-size array to reduction operation fmax which has no identity" #11

Open
iancrossfield opened this issue Feb 9, 2023 · 0 comments

Comments

@iancrossfield
Copy link
Contributor

In a number of runs I've encountered the following error, which crashes the VULCAN run. Will try to diagnose.

...
Equilibrium calculation (Fastchem) finished.
S8_l_s not included in fastchem.
/home/exolab/vulcan/build_atm.py:533: RuntimeWarning: divide by zero encountered in double_scalars
  Hp[i] = kb*Tco[i]/(mu[i]/Navo*gz[i])
Input stellar spectrum from 2.0 to 700.0
Photodissociation threshold: 655.5
Using wavelength bins from 2.0 to 655.5
The stellar flux is interpolated onto uniform grid of 0.1 (<240.0 nm) and 2.0 (>=240.0 nm) and conserving 100.11 % energy.
/home/exolab/vulcan/op.py:2162: RuntimeWarning: invalid value encountered in multiply
  var.tau[j] += var.y[j,species.index(sp)] * atm.dz[j] * var.cross[sp] # only the j-th laye
Traceback (most recent call last):
  File "/home/exolab/vulcan/vulcan.py", line 177, in <module>
    solver.compute_flux(data_var, data_atm)
  File "/home/exolab/vulcan/op.py", line 2305, in compute_flux
    var.aflux_change = np.nanmax( np.abs(var.aflux-var.prev_aflux)[var.aflux>vulcan_cfg.flux_atol]/var.aflux[var.aflux>vulcan_cfg.flux_atol] )
  File "<__array_function__ internals>", line 180, in nanmax
  File "/home/exolab/anaconda3/lib/python3.9/site-packages/numpy/lib/nanfunctions.py", line 476, in nanmax
    res = np.fmax.reduce(a, axis=axis, out=out, **kwargs)
ValueError: zero-size array to reduction operation fmax which has no identity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant