Skip to content
Success

Changes

Summary

  1. Clubb organization part2 (#1304) (details)
Commit 7b5214a7a0382d3b5d2df0f7b8a8f11bd11f4bdb by noreply
Clubb organization part2 (#1304)

A number of fields were being calculated in `advance_clubb_core` (`wp2_zt` `wp3_on_wp2` `wp3_on_wp2_zt` `Skw_zm` `Skw_zt) then passed into other routines, however, all these fields depend on `wp2` and were not being updated after `wp2` was being updated by `calc_sfc_varnce`. This commit fixes that by moving where these fields are calculated - instead of computing in `advance_clubb_core` with the incoming `wp2`, we now calculate them "on-demand" where they are needed using the most recent value of `wp2`.

Using our default flag set, there are no numerical differences caused by this change set, only a few stats differences. There are real differences that occur when `l_upwind_xpyp_ta = .false.` (a clubb_config_flag value) or when `l_explicit_turbulent_adv_xpyp = .true.` (a parameter in model_flags.F90), but these are small differences and do not visually affect plots for our stable cases. Changing the order of the `advance_` routines would also cause this to be BIT_CHANGING, since that also affects the update path for `wp2` - now these values that got moved would be using the newest `wp2` instead of being "stale", also causing small (but real) differences.

* Calculating wp2_zt and wp3_on_wp2 where needed, rather than passing those values around through advance_clubb_core. This is BIT_CHANGING for a handful of stats only variables be default: wp3_on_wp2, wp3_on_wp2_zt, wp3_on_wp2_cfl_num, term_wprtp2_explicit, term_wprtpthlp_explicit, and term_wpthlp2_explicit. Some Skw_ variables when using lmm_stepping, and has actual differences (not just in stats output) when swapping the order of the advance routines

* Moving things around, this seems to all be BFB except for the Skw_ movements, which is BIT_CHANGING if the advance_ order changes

* Fixing python API

* Reverting some BFB changes
The file was modifiedclubb_python_api/f2py_fortran_wrappers/advance_helper_module_wrapper.F90 (diff)
The file was modifiedclubb_python_api/f2py_fortran_wrappers/advance_xm_wpxp_module_wrapper.F90 (diff)
The file was modifiedclubb_python_api/f2py_fortran_wrappers/advance_xp2_xpyp_module_wrapper.F90 (diff)
The file was modifiedclubb_python_api/tests/test_call_tree_advance_xp3.py (diff)
The file was modifiedclubb_python_api/tests/test_call_tree_stats_accumulate.py (diff)
The file was modifiedclubb_python_api/clubb_python/CLUBB_core/advance_xp3.py (diff)
The file was modifiedclubb_python_api/clubb_python/clubb_api.py (diff)
The file was modifiedclubb_python_api/f2py_fortran_wrappers/advance_wp2_wp3_module_wrapper.F90 (diff)
The file was modifiedclubb_python_api/tests/test_call_tree_advance_xp2_xpyp.py (diff)
The file was modifiedclubb_python_api/clubb_f2py.pyf (diff)
The file was modifiedsrc/CLUBB_core/stats_clubb_utilities.F90 (diff)
The file was modifiedsrc/CLUBB_core/advance_wp2_wp3_module.F90 (diff)
The file was modifiedclubb_python_api/clubb_python/CLUBB_core/stats_clubb_utilities.py (diff)
The file was modifiedclubb_jax/advance_clubb_core.py (diff)
The file was modifiedclubb_python_driver/advance_clubb_core.py (diff)
The file was modifiedclubb_python_api/clubb_python/CLUBB_core/advance_xm_wpxp.py (diff)
The file was modifiedclubb_python_api/f2py_fortran_wrappers/stats_clubb_utilities_wrapper.F90 (diff)
The file was modifiedclubb_python_api/clubb_python/CLUBB_core/advance_xp2_xpyp.py (diff)
The file was modifiedsrc/CLUBB_core/advance_helper_module.F90 (diff)
The file was modifiedsrc/CLUBB_core/advance_clubb_core_module.F90 (diff)
The file was modifiedsrc/G_unit_test_types/spurious_source_test.F90 (diff)
The file was modifiedclubb_python_api/tests/test_call_tree_advance_xm_wpxp.py (diff)
The file was modifiedclubb_python_api/clubb_python/CLUBB_core/advance_helper.py (diff)
The file was modifiedclubb_python_api/clubb_python/CLUBB_core/advance_wp2_wp3.py (diff)
The file was modifiedsrc/CLUBB_core/advance_xp2_xpyp_module.F90 (diff)
The file was modifiedsrc/CLUBB_core/advance_xm_wpxp_module.F90 (diff)
The file was modifiedclubb_python_api/tests/test_call_tree_advance_wp2_wp3.py (diff)
The file was modifiedsrc/CLUBB_core/advance_xp3_module.F90 (diff)