Skip to content

Commit 4058462

Browse files
Hallberg-NOAAmarshallward
authored andcommittedApr 30, 2024·
Refactoring density integrals for efficiency
Refactored 4 routines (int_density_generic_pcm, int_density_generic_ppm, int_spec_vol_generic_pcm and int_spec_vol_generic_plm) in density integrals for greater computational efficiency by doing fewer calls to the equation of state routines but calculating entire rows of densities at subgrid locations with each each call, replicating what was already being done int_density_dz_generic_plm. To accomplish this, a number of variables now use larger arrays than previously. The total computational cost of the non-Boussinesq pressure gradient force calculation was more than 50% greater with the previous code in some tests. All answers are bitwise identical.
1 parent 01b2ea9 commit 4058462

File tree

1 file changed

+716
-525
lines changed

1 file changed

+716
-525
lines changed
 

0 commit comments

Comments
 (0)
Please sign in to comment.