Closed illorenzo7 closed 9 months ago
This looks good, but I have a quick question. Why is there duplicated code starting on line 760 (the same three lines are repeated), but then inside of the if statement, there is no duplication. Was the original duplication in error, or did it serve a purpose. Specifically, I'm talking about:
Call Integrate_in_radius(nsquared,norm)
norm = four_pi*norm/shell_volume
nsquared = nsquared/norm
Hmm, it looks like my original code had the duplication, which was a mistake on my part, as far as I can tell. I must have removed the duplicate block when I surrounded it by the if-statement. I don't think removing the duplicate block should affect anything.
Thanks @feathern ! Good catch, I forgot I put those debugging statements there.
For reference_type = 5, when the buoyancy frequency N^2 was rescaled, this was causing problems with division by 0. I guard against this now with if-statements.