diff --git a/config/model_configs/diagnostic_edmfx_bomex_box.yml b/config/model_configs/diagnostic_edmfx_bomex_box.yml index 3d4a9dab018..bba7d2d108a 100644 --- a/config/model_configs/diagnostic_edmfx_bomex_box.yml +++ b/config/model_configs/diagnostic_edmfx_bomex_box.yml @@ -25,7 +25,7 @@ y_elem: 2 z_elem: 60 z_max: 3e3 z_stretch: false -dt: "200secs" +dt: "100secs" t_end: "6hours" dt_save_to_disk: "10mins" toml: [toml/diagnostic_edmfx_box.toml] diff --git a/config/model_configs/diagnostic_edmfx_dycoms_rf01_box.yml b/config/model_configs/diagnostic_edmfx_dycoms_rf01_box.yml index 30385a58af2..fcf0b810bbf 100644 --- a/config/model_configs/diagnostic_edmfx_dycoms_rf01_box.yml +++ b/config/model_configs/diagnostic_edmfx_dycoms_rf01_box.yml @@ -25,7 +25,7 @@ y_elem: 2 z_elem: 30 z_max: 1500 z_stretch: false -dt: 200secs +dt: 100secs t_end: 4hours dt_save_to_disk: 10mins toml: [toml/diagnostic_edmfx_box.toml] diff --git a/config/model_configs/diagnostic_edmfx_rico_box.yml b/config/model_configs/diagnostic_edmfx_rico_box.yml index dfa7ef529e4..b2ef54f68d3 100644 --- a/config/model_configs/diagnostic_edmfx_rico_box.yml +++ b/config/model_configs/diagnostic_edmfx_rico_box.yml @@ -25,7 +25,7 @@ y_elem: 2 z_elem: 100 z_max: 4e3 z_stretch: false -dt: 200secs +dt: 100secs t_end: 8hours dt_save_to_disk: 10mins toml: [toml/diagnostic_edmfx_trmm_box.toml] diff --git a/config/model_configs/diagnostic_edmfx_trmm_box.yml b/config/model_configs/diagnostic_edmfx_trmm_box.yml index b47e8b28640..403f1b90fe5 100644 --- a/config/model_configs/diagnostic_edmfx_trmm_box.yml +++ b/config/model_configs/diagnostic_edmfx_trmm_box.yml @@ -26,7 +26,7 @@ y_elem: 2 z_elem: 82 z_max: 16400 z_stretch: false -dt: 300secs +dt: 200secs t_end: 6hours dt_save_to_disk: 10mins FLOAT_TYPE: "Float64" diff --git a/src/cache/diagnostic_edmf_precomputed_quantities.jl b/src/cache/diagnostic_edmf_precomputed_quantities.jl index 664909f0682..11c7e422098 100644 --- a/src/cache/diagnostic_edmf_precomputed_quantities.jl +++ b/src/cache/diagnostic_edmf_precomputed_quantities.jl @@ -513,17 +513,16 @@ function set_diagnostic_edmf_precomputed_quantities_do_integral!(Y, p, t) p.atmos.edmfx_detr_model, ) - if i > 1 - @. detrʲ_prev_level = limit_entrainment( - detrʲ_prev_level, - draft_area(ρaʲ_prev_level, ρʲ_prev_level), - get_physical_w( - u³ʲ_prev_halflevel, - local_geometry_prev_halflevel, - ), - dz_prev_level, - ) - end + @. detrʲ_prev_level = max(detrʲ_prev_level, 0) + @. detrʲ_prev_level = limit_detrainment( + detrʲ_prev_level, + draft_area(ρaʲ_prev_level, ρʲ_prev_level), + get_physical_w( + u³ʲ_prev_halflevel, + local_geometry_prev_halflevel, + ), + dz_prev_level, + ) ρaʲu³ʲ_data = p.scratch.temp_data_level_2 ρaʲu³ʲ_datah_tot = ρaʲu³ʲ_dataq_tot = p.scratch.temp_data_level_3