Skip to content

Crash with cloud calculation - calc_qc #51

Description

@iancrossfield

When submitting
cld_out = case1.virga(cloud_species, directory, fsed=1,mh=metallicity, mmw = mean_molecular_weight)

The run crashed with a long trace, focused on virga.justdoit.calc_qc():

File /home/exolab/anaconda3/envs/picaso/lib/python3.12/site-packages/virga/justdoit.py:1005, in calc_qc(gas_name, supsat, t_layer, p_layer, r_atmos, r_cloud, q_below, mixl, dz_layer, gravity, mw_atmos, mfp, visc, rho_p, w_convect, fsed, b, eps, param, z_bot, z_layer, z_alpha, z_min, sig, mh, rmin, nrad, og_vfall, z_cld)
1001 qt_layer = 0.5*( q_below + qt_top )
1004 # Find total condensate mixing ratio
-> 1005 qc_layer = np.max( [0., qt_layer - qvs] )
1007 # --------------------------------------------------------------------
1008 # Find corresponding to <w_convect> using function vfall()
1009
1010 # range of particle radii to search (cm)
1011 rlo = 1.e-10

File /home/exolab/anaconda3/envs/picaso/lib/python3.12/site-packages/numpy/core/fromnumeric.py:2810, in max(a, axis, out, keepdims, initial, where)
2692 @array_function_dispatch(_max_dispatcher)
2693 @set_module('numpy')
2694 def max(a, axis=None, out=None, keepdims=np._NoValue, initial=np._NoValue,
2695 where=np._NoValue):
2696 """
2697 Return the maximum of an array or maximum along an axis.
2698
(...) 2808 5
2809 """
-> 2810 return _wrapreduction(a, np.maximum, 'max', axis, None, out,
2811 keepdims=keepdims, initial=initial, where=where)

File /home/exolab/anaconda3/envs/picaso/lib/python3.12/site-packages/numpy/core/fromnumeric.py:88, in _wrapreduction(obj, ufunc, method, axis, dtype, out, **kwargs)
85 else:
86 return reduction(axis=axis, out=out, **passkwargs)
---> 88 return ufunc.reduce(obj, axis, dtype, out, **passkwargs)

ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions