From fa6cfd503dfb5f691d72783bd2c7b79c25a09231 Mon Sep 17 00:00:00 2001 From: Anna Jaruga Date: Thu, 11 Jun 2026 11:58:20 -0700 Subject: [PATCH 1/4] wip --- .buildkite/pipeline.yml | 1283 ----------------- .../implicit/manual_sparse_jacobian.jl | 110 +- src/utils/variable_manipulations.jl | 55 + 3 files changed, 106 insertions(+), 1342 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index fa601945309..868c6aa9771 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -39,345 +39,12 @@ steps: - wait - - group: "Reproducibility" - steps: - - label: ":green_book: Reproducibility: Test infrastructure" - retry: *retry_policy - command: "julia --color=yes --project=.buildkite test/unit_reproducibility_infra.jl" - - - group: "Radiation" - steps: - - label: ":sun_with_face: Radiation: Gray" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_column_ze63.yml - --config_file $CONFIG_PATH/single_column_radiative_equilibrium_gray.yml - --job_id single_column_radiative_equilibrium_gray - artifact_paths: "single_column_radiative_equilibrium_gray/output_active/*" - - - label: ":sun_with_face: Radiation: Clear-sky, no clouds, idealized water." - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_column_ze63.yml - --config_file $CONFIG_PATH/single_column_radiative_equilibrium_clearsky.yml - --job_id single_column_radiative_equilibrium_clearsky - artifact_paths: "single_column_radiative_equilibrium_clearsky/output_active/*" - - - label: ":sun_with_face: Radiation: Clear-sky, prognostic surface temperature (interactive slab)" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_column_ze63.yml - --config_file $CONFIG_PATH/single_column_radiative_equilibrium_clearsky_prognostic_surface_temp.yml - --job_id single_column_radiative_equilibrium_clearsky_prognostic_surface_temp - artifact_paths: "single_column_radiative_equilibrium_clearsky_prognostic_surface_temp/output_active/*" - - - label: ":sun_with_face: Radiation: All-sky, idealized clouds, time-varying insolation" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_column_ze63.yml - --config_file $CONFIG_PATH/single_column_radiative_equilibrium_allsky_idealized_clouds.yml - --job_id single_column_radiative_equilibrium_allsky_idealized_clouds - artifact_paths: "single_column_radiative_equilibrium_allsky_idealized_clouds/output_active/*" - - - group: "Microphysics" - steps: - - label: ":umbrella: Microphysics: 1-moment sanity check" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $CONFIG_PATH/single_column_precipitation_test.yml - --job_id single_column_precipitation_test - artifact_paths: "single_column_precipitation_test/output_active/*" - - - label: ":umbrella: Microphysics: 2-moment sanity check" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $CONFIG_PATH/single_column_precipitation_2M_test.yml - --job_id single_column_precipitation_2M_test - artifact_paths: "single_column_precipitation_2M_test/output_active/*" - - - group: "Gravity wave" - steps: - - label: ":wavy_dash: Non-orograpic gravity wave: 3D unit test" - retry: *retry_policy - command: "julia --color=yes --project=.buildkite test/parameterized_tendencies/gravity_wave/non_orographic_gravity_wave/test_nogw_3d.jl" - artifact_paths: "nonorographic_gravity_wave_test_3d/*" - agents: - slurm_mem: 20GB - - - label: ":wavy_dash: Non-orographic gravity wave: Test against MiMA output" - retry: *retry_policy - command: "julia --color=yes --project=.buildkite test/parameterized_tendencies/gravity_wave/non_orographic_gravity_wave/test_nogw_mima.jl" - artifact_paths: "nonorographic_gravity_wave_test_mima/*" - agents: - slurm_mem: 20GB - - - label: ":wavy_dash: Non-orographic gravity wave: Single column unit test" - retry: *retry_policy - command: "julia --color=yes --project=.buildkite test/parameterized_tendencies/gravity_wave/non_orographic_gravity_wave/test_nogw_single_column.jl" - artifact_paths: "nonorographic_gravity_wave_test_single_column/*" - - - label: ":wavy_dash: Orographic gravity wave: Base flux calculation unit test" - retry: *retry_policy - command: "julia --color=yes --project=.buildkite test/parameterized_tendencies/gravity_wave/orographic_gravity_wave/test_ogw_baseflux.jl" - artifact_paths: "orographic_gravity_wave_test_baseflux/*" - - - label: ":wavy_dash: Orographic gravity wave: 3D calculation unit test" - retry: *retry_policy - command: "julia --color=yes --project=.buildkite test/parameterized_tendencies/gravity_wave/orographic_gravity_wave/test_ogw_3d.jl" - artifact_paths: "orographic_gravity_wave_test_3d/*" - - - label: ":wavy_dash: Orographic gravity wave: Drag unit test" - retry: *retry_policy - command: "julia --color=yes --project=.buildkite test/parameterized_tendencies/gravity_wave/orographic_gravity_wave/test_ogw_computed_drag.jl" - artifact_paths: "orographic_gravity_wave_test_computed_drag/*" - - - label: ":wavy_dash: Orographic gravity wave: Regression test reproducing Garner 2005" - retry: *retry_policy - command: "julia --color=yes --project=.buildkite test/parameterized_tendencies/gravity_wave/orographic_gravity_wave/test_garner2005_reproduction.jl" - artifact_paths: "orographic_gravity_wave_test_garner2005/*" - - - group: "Diagnostic EDMF" - steps: - - label: ":ghost: Diagnostic EDMF: Smoke test" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $CONFIG_PATH/diagnostic_edmfx_test_box.yml - --job_id diagnostic_edmfx_test_box - artifact_paths: "diagnostic_edmfx_test_box/output_active/*" - agents: - slurm_mem: 20GB - - - label: ":ghost: Diagnostic EDMF: Stable nocturnal Arctic boundary layer (GABLS)" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_diagedmf_0M.yml - --config_file $CONFIG_PATH/diagnostic_edmfx_gabls_box.yml - --job_id diagnostic_edmfx_gabls_box - artifact_paths: "diagnostic_edmfx_gabls_box/output_active/*" - agents: - slurm_mem: 20GB - - - label: ":ghost: Diagnostic EDMF: Trade wind Cu shallow convection (BOMEX)" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_diagedmf_0M.yml - --config_file $CONFIG_PATH/diagnostic_edmfx_bomex_box.yml - --job_id diagnostic_edmfx_bomex_box - artifact_paths: "diagnostic_edmfx_bomex_box/output_active/*" - agents: - slurm_mem: 20GB - - - label: ":ghost: Diagnostic EDMF: Nocturnal Sc (DYCOMS-RF01)" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_diagedmf_0M.yml - --config_file $CONFIG_PATH/diagnostic_edmfx_dycoms_rf01_box.yml - --job_id diagnostic_edmfx_dycoms_rf01_box - artifact_paths: "diagnostic_edmfx_dycoms_rf01_box/output_active/*" - agents: - slurm_mem: 20GB - - - label: ":ghost: Diagnostic EDMF: Drizzling nocturnal Sc (DYCOMS-RF02)" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_diagedmf_1M.yml - --config_file $CONFIG_PATH/diagnostic_edmfx_dycoms_rf02_box.yml - --job_id diagnostic_edmfx_dycoms_rf02_box - artifact_paths: "diagnostic_edmfx_dycoms_rf02_box/output_active/*" - agents: - slurm_mem: 24GB - - - label: ":ghost: Diagnostic EDMF: Precipitating trade wind Cu (RICO)" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_diagedmf_1M.yml - --config_file $CONFIG_PATH/diagnostic_edmfx_rico_box.yml - --job_id diagnostic_edmfx_rico_box - artifact_paths: "diagnostic_edmfx_rico_box/output_active/*" - agents: - slurm_mem: 20GB - - - label: ":ghost: Diagnostic EDMF: Deep tropical convection (TRMM)" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_diagedmf_1M.yml - --config_file $CONFIG_PATH/diagnostic_edmfx_trmm_box.yml - --job_id diagnostic_edmfx_trmm_box - artifact_paths: "diagnostic_edmfx_trmm_box/output_active/*" - agents: - slurm_mem: 20GB - - - label: ":ghost: Diagnostic EDMF: Deep tropical convection (TRMM), stretched grid" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_diagedmf_0M.yml - --config_file $CONFIG_PATH/diagnostic_edmfx_trmm_stretched_box.yml - --job_id diagnostic_edmfx_trmm_stretched_box - artifact_paths: "diagnostic_edmfx_trmm_stretched_box/output_active/*" - agents: - slurm_mem: 20GB - - - label: ":ghost: Diagnostic EDMF: Deep tropical convection (TRMM), 0M" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_diagedmf_0M.yml - --config_file $CONFIG_PATH/diagnostic_edmfx_trmm_box_0M.yml - --job_id diagnostic_edmfx_trmm_box_0M - artifact_paths: "diagnostic_edmfx_trmm_box_0M/output_active/*" - agents: - slurm_mem: 20GB - - group: "Prognostic EDMF" steps: - - label: ":genie: Prognostic EDMF: Vertical advection test" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $CONFIG_PATH/prognostic_edmfx_adv_test_column.yml - --job_id prognostic_edmfx_adv_test_column - artifact_paths: "prognostic_edmfx_adv_test_column/output_active/*" - agents: - slurm_mem: 20GB - - - label: ":genie: Prognostic EDMF: Idealized plume" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_progedmf_0M.yml - --config_file $CONFIG_PATH/prognostic_edmfx_simpleplume_column.yml - --job_id prognostic_edmfx_simpleplume_column - artifact_paths: "prognostic_edmfx_simpleplume_column/output_active/*" - agents: - slurm_mem: 20GB - - - label: ":genie: Prognostic EDMF: Dry convective boundary layer (Soares)" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_progedmf_0M.yml - --config_file $CONFIG_PATH/prognostic_edmfx_soares_column.yml - --job_id prognostic_edmfx_soares_column - artifact_paths: "prognostic_edmfx_soares_column/output_active/*" - agents: - slurm_mem: 20GB - - - label: ":genie: Prognostic EDMF: Stable nocturnal Arctic boundary layer (GABLS)" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_progedmf_0M.yml - --config_file $CONFIG_PATH/prognostic_edmfx_gabls_column.yml - --job_id prognostic_edmfx_gabls_column - artifact_paths: "prognostic_edmfx_gabls_column/output_active/*" - agents: - slurm_mem: 20GB - - - label: ":genie: Prognostic EDMF: Trade wind Cu shallow convection (BOMEX), fixed TKE" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_progedmf_0M.yml - --config_file $CONFIG_PATH/prognostic_edmfx_bomex_fixtke_column.yml - --job_id prognostic_edmfx_bomex_fixtke_column - artifact_paths: "prognostic_edmfx_bomex_fixtke_column/output_active/*" - agents: - slurm_mem: 20GB - - - label: ":genie: Prognostic EDMF: Trade wind Cu shallow convection (BOMEX), prognostic TKE" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_progedmf_0M.yml - --config_file $CONFIG_PATH/prognostic_edmfx_bomex_column.yml - --job_id prognostic_edmfx_bomex_column - artifact_paths: "prognostic_edmfx_bomex_column/output_active/*" - agents: - slurm_mem: 20GB - - - label: ":genie: Prognostic EDMF: Trade wind Cu shallow convection (BOMEX), implicit SGS" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_progedmf_0M.yml - --config_file $CONFIG_PATH/prognostic_edmfx_bomex_implicit_column.yml - --job_id prognostic_edmfx_bomex_implicit_column - artifact_paths: "prognostic_edmfx_bomex_implicit_column/output_active/*" - agents: - slurm_mem: 20GB - - - label: ":genie: Prognostic EDMF: Nocturnal Sc (DYCOMS-RF01), explicit SGS" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_progedmf_0M.yml - --config_file $CONFIG_PATH/prognostic_edmfx_dycoms_rf01_column.yml - --job_id prognostic_edmfx_dycoms_rf01_column - artifact_paths: "prognostic_edmfx_dycoms_rf01_column/output_active/*" - agents: - slurm_mem: 20GB - - - label: ":genie: Prognostic EDMF: Reproducibility test for drizzling nocturnal Sc (DYCOMS-RF02)" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_progedmf_1M.yml - --config_file $CONFIG_PATH/prognostic_edmfx_dycoms_rf02_column.yml - --job_id prognostic_edmfx_dycoms_rf02_column - - julia --color=yes --project=.buildkite reproducibility_tests/test_reproducibility.jl - --job_id prognostic_edmfx_dycoms_rf02_column - --out_dir prognostic_edmfx_dycoms_rf02_column/output_active - artifact_paths: "prognostic_edmfx_dycoms_rf02_column/output_active/*" - agents: - slurm_mem: 20GB - slurm_constraint: icelake|cascadelake|skylake|epyc - - - label: ":genie: Prognostic EDMF: Reproducibility test for precipitating trade wind Cu (RICO)" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_progedmf_1M.yml - --config_file $CONFIG_PATH/prognostic_edmfx_rico_column.yml - --job_id prognostic_edmfx_rico_column - - julia --color=yes --project=.buildkite reproducibility_tests/test_reproducibility.jl - --job_id prognostic_edmfx_rico_column - --out_dir prognostic_edmfx_rico_column/output_active - artifact_paths: "prognostic_edmfx_rico_column/output_active/*" - agents: - slurm_mem: 30GB - slurm_constraint: icelake|cascadelake|skylake|epyc - - #- label: ":genie: Prognostic EDMF: Precipitating trade wind Cu (RICO), 2M" - # command: > - # julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - # --config_file $CONFIG_PATH/prognostic_edmfx_rico_column_2M.yml - # --job_id prognostic_edmfx_rico_column_2M - # artifact_paths: "prognostic_edmfx_rico_column_2M/output_active/*" - # agents: - # slurm_mem: 20GB - # soft_fail: true - # - label: ":genie: Prognostic EDMF: Reproducibility test for deep tropical convection (TRMM)" retry: *retry_policy command: > julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_progedmf_1M.yml --config_file $CONFIG_PATH/prognostic_edmfx_trmm_column.yml --job_id prognostic_edmfx_trmm_column @@ -389,851 +56,8 @@ steps: slurm_mem: 35GB slurm_constraint: icelake|cascadelake|skylake|epyc - - label: ":genie: Prognostic EDMF: Deep tropical convection (TRMM), 0M" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_progedmf_0M.yml - --config_file $CONFIG_PATH/prognostic_edmfx_trmm_column_0M.yml - --job_id prognostic_edmfx_trmm_column_0M - artifact_paths: "prognostic_edmfx_trmm_column_0M/output_active/*" - agents: - slurm_mem: 20GB - - - label: ":genie: Prognostic EDMF: GCM large-scale forcing (cfsite23), radiation" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_progedmf_0M.yml - --config_file $CONFIG_PATH/prognostic_edmfx_gcmdriven_column.yml - --job_id prognostic_edmfx_gcmdriven_column - artifact_paths: "prognostic_edmfx_gcmdriven_column/output_active/*" - agents: - slurm_mem: 20GB - - - label: ":genie: Prognostic EDMF: Time-varying ERA5 reanalysis forcing" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/diagnostics_column_progedmf_0M.yml - --config_file $CONFIG_PATH/prognostic_edmfx_tv_era5driven_column.yml - --job_id prognostic_edmfx_tv_era5driven_column - artifact_paths: "prognostic_edmfx_tv_era5driven_column/output_active/*" - agents: - slurm_mem: 12GB - - - label: ":genie: Prognostic EDMF: ERA5 monthly averaged diurnal forcing" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $CONFIG_PATH/prognostic_edmfx_diurnal_scm_imp.yml - --job_id prognostic_edmfx_diurnal_scm_imp - artifact_paths: "prognostic_edmfx_diurnal_scm_imp/output_active/*" - agents: - slurm_mem: 12GB - - - group: "Analytic Tests" - steps: - - label: ":crown: Analytic tests: No topography, 2D, Float64, GPU" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $CONFIG_PATH/plane_no_topography_float64_test.yml - --job_id gpu_plane_no_topography_float64_test - artifact_paths: - - "gpu_plane_no_topography_float64_test/output_active/*.pdf" - - "gpu_plane_no_topography_float64_test/output_active/*.yml" - - "gpu_plane_no_topography_float64_test/output_active/*.toml" - - "gpu_plane_no_topography_float64_test/output_active/*.dat" - env: - CLIMACOMMS_DEVICE: "CUDA" - agents: - slurm_gpus: 1 - - - label: ":crown: Analytic tests: Schar mountain wave, 2D, Float64, GPU" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $CONFIG_PATH/plane_schar_mountain_float64_test.yml - --job_id gpu_plane_schar_mountain_float64_test - artifact_paths: - - "gpu_plane_schar_mountain_float64_test/output_active/*.pdf" - - "gpu_plane_schar_mountain_float64_test/output_active/*.yml" - - "gpu_plane_schar_mountain_float64_test/output_active/*.toml" - - "gpu_plane_schar_mountain_float64_test/output_active/*.dat" - env: - CLIMACOMMS_DEVICE: "CUDA" - agents: - slurm_gpus: 1 - - - label: ":crown: Analytic tests: Schar mountain wave, 2D, Float32, GPU" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $CONFIG_PATH/plane_schar_mountain_float32_test.yml - --job_id gpu_plane_schar_mountain_float32_test - artifact_paths: - - "gpu_plane_schar_mountain_float32_test/output_active/*.pdf" - - "gpu_plane_schar_mountain_float32_test/output_active/*.yml" - - "gpu_plane_schar_mountain_float32_test/output_active/*.toml" - - "gpu_plane_schar_mountain_float32_test/output_active/*.dat" - env: - CLIMACOMMS_DEVICE: "CUDA" - agents: - slurm_gpus: 1 - - - group: "Conservation Tests" - steps: - - label: ":computer: Conservation tests: Dry baroclinic wave, no sources" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl --config_file $CONFIG_PATH/baroclinic_wave_conservation.yml - --job_id baroclinic_wave_conservation - artifact_paths: "baroclinic_wave_conservation/output_active/*" - - - label: ":computer: Conservation tests: Moist baroclinic wave, with sources, 0M" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl --config_file $CONFIG_PATH/baroclinic_wave_equil_conservation_source.yml - --job_id baroclinic_wave_equil_conservation_source - artifact_paths: "baroclinic_wave_equil_conservation_source/output_active/*" - agents: - slurm_mem: 16GB - # - #- label: ":computer: Conservation checks: Moist baroclinic wave, with sources 1M" - # command: > - # julia --color=yes --project=.buildkite .buildkite/ci_driver.jl --config_file $CONFIG_PATH/baroclinic_wave_nonequil_conservation_source.yml - # --job_id baroclinic_wave_nonequil_conservation_source - # artifact_paths: "baroclinic_wave_nonequil_conservation_source/output_active/*" - # agents: - # slurm_mem: 16GB - # soft_fail: true - - - group: "Non-spherical Examples" - steps: - - label: ":package: Non-spherical: Reproducibility test for single column hydrostatic balance, Float64" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze10.yml - --config_file $CONFIG_PATH/single_column_hydrostatic_balance_ft64.yml - --job_id single_column_hydrostatic_balance_ft64 - - julia --color=yes --project=.buildkite reproducibility_tests/test_reproducibility.jl - --job_id single_column_hydrostatic_balance_ft64 - --out_dir single_column_hydrostatic_balance_ft64/output_active - artifact_paths: "single_column_hydrostatic_balance_ft64/output_active/*" - agents: - slurm_constraint: icelake|cascadelake|skylake|epyc - - - label: ":package: Non-spherical: 2D plane, non-hydrostatic density current" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $CONFIG_PATH/plane_density_current_test.yml - --job_id plane_density_current_test - artifact_paths: "plane_density_current_test/output_active/*" - - - label: ":package: Non-spherical: 2D plane, non-hydrostatic density current, AMD LES SGS" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $CONFIG_PATH/plane_density_current_test_amd.yml - --job_id plane_density_current_test_amd - artifact_paths: "plane_density_current_test_amd/output_active/*" - - - label: ":package: Non-spherical: 3D box, hydrostatic balance" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $CONFIG_PATH/box_hydrostatic_balance.yml - --job_id box_hydrostatic_balance - artifact_paths: "box_hydrostatic_balance/output_active/*" - - - label: ":package: Non-spherical: 3D box, density current" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $CONFIG_PATH/box_density_current_test.yml - --job_id box_density_current_test - artifact_paths: "box_density_current_test/output_active/*" - - - label: ":package: Non-spherical: Reproducibility test for radiative convective equilibrium in a 3D box" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite runscripts/rcemipii_box_CRM_1M.jl - - julia --color=yes --project=.buildkite reproducibility_tests/test_reproducibility.jl - --job_id rcemipii_box_CRM_1M - --out_dir rcemipii_box_CRM_1M/output_active - artifact_paths: "rcemipii_box_CRM_1M/output_active/*" - - - group: "Dry Spherical Examples" - steps: - - label: ":cyclone: Dycore: Global hydrostatic balance, Float64" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $CONFIG_PATH/hydrostatic_balance_ft64.yml - --job_id hydrostatic_balance_ft64 - artifact_paths: "hydrostatic_balance_ft64/output_active/*" - agents: - slurm_mem: 20GB - - - label: ":cyclone: Dycore: Dry baroclinic wave, CPU part of a comparison test" - retry: *retry_policy - key: baroclinic_wave - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze10.yml - --config_file $CONFIG_PATH/baroclinic_wave.yml - --job_id baroclinic_wave - artifact_paths: "baroclinic_wave/output_active/*" - - - label: ":cyclone: Dycore: Dry baroclinic wave, GPU part of comparison test" - retry: *retry_policy - key: "baroclinic_wave_gpu" - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze10.yml - --config_file $CONFIG_PATH/baroclinic_wave.yml - --job_id baroclinic_wave_gpu - artifact_paths: "baroclinic_wave_gpu/output_active/*" - env: - CLIMACOMMS_DEVICE: "CUDA" - agents: - slurm_gpus: 1 - slurm_mem: 16GB - - - label: ":cyclone: Dycore: Compare CPU and GPU dry baroclinic wave performance" - retry: *retry_policy - command: > - tar xvf baroclinic_wave/output_active/hdf5_files.tar -C baroclinic_wave - - tar xvf baroclinic_wave_gpu/output_active/hdf5_files.tar -C baroclinic_wave_gpu - - julia --color=yes --project=.buildkite post_processing/compare_outputs.jl - --output_folder_1 baroclinic_wave - --output_folder_2 baroclinic_wave_gpu --t_end 10days - --compare_state false - depends_on: - - "baroclinic_wave" - - "baroclinic_wave_gpu" - - - label: ":cyclone: Dycore: Dry GCM benchmark, Held-Suarez forcing" - retry: *retry_policy - key: held_suarez - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze31.yml - --config_file $CONFIG_PATH/held_suarez.yml - --job_id held_suarez - artifact_paths: "held_suarez/output_active/*" - - - group: "Spherical Examples" - steps: - - label: ":large_blue_circle: Sphere: Reproducibility test for moist baroclinic wave, 0M" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze10.yml - --config_file $CONFIG_PATH/baroclinic_wave_equil.yml - --job_id baroclinic_wave_equil - - julia --color=yes --project=.buildkite reproducibility_tests/test_reproducibility.jl - --job_id baroclinic_wave_equil - --out_dir baroclinic_wave_equil/output_active - artifact_paths: "baroclinic_wave_equil/output_active/*" - agents: - slurm_constraint: icelake|cascadelake|skylake|epyc - - - label: ":large_blue_circle: Sphere: Reproducibility test for Held-Suarez forcing with moisture, 0M" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze31.yml - --config_file $CONFIG_PATH/held_suarez_equil.yml - --job_id held_suarez_equil - - julia --color=yes --project=.buildkite reproducibility_tests/test_reproducibility.jl - --job_id held_suarez_equil - --out_dir held_suarez_equil/output_active - artifact_paths: "held_suarez_equil/output_active/*" - agents: - slurm_constraint: icelake|cascadelake|skylake|epyc - - - label: ":large_blue_circle: Aquaplanet: No mass-flux (EDOnly EDMF)" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze31.yml - --config_file $CONFIG_PATH/edonly_edmfx_aquaplanet.yml - --job_id edonly_edmfx_aquaplanet - artifact_paths: "edonly_edmfx_aquaplanet/output_active/*" - agents: - slurm_mem: 20GB - - - label: ":large_blue_circle: Aquaplanet: Radiative convective equilibrium, diagnostic edmf" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze31.yml - --config_file $CONFIG_PATH/rcemipii_sphere_diagnostic_edmfx.yml - --job_id rcemipii_sphere_diagnostic_edmfx - artifact_paths: "rcemipii_sphere_diagnostic_edmfx/output_active/*" - agents: - slurm_mem: 20GB - - - label: ":large_blue_circle: Aquaplanet: Reproducibility test for allsky varying insolation, gravity wave (gfdl_restart)" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze31.yml - --config_file $CONFIG_PATH/aquaplanet_nonequil_allsky_gw_res_2M.yml - --job_id aquaplanet_nonequil_allsky_gw_res_2M - - julia --color=yes --project=.buildkite reproducibility_tests/test_reproducibility.jl - --job_id aquaplanet_nonequil_allsky_gw_res_2M - --out_dir aquaplanet_nonequil_allsky_gw_res_2M/output_active - artifact_paths: "aquaplanet_nonequil_allsky_gw_res_2M/output_active/*" - agents: - slurm_mem: 20GB - slurm_constraint: icelake|cascadelake|skylake|epyc - - - label: ":large_blue_circle: Aquaplanet: Reproducibility test for allsky varying insolation, gravity wave (raw_topo)" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze31.yml - --config_file $CONFIG_PATH/aquaplanet_equil_allsky_gw_raw.yml - --job_id aquaplanet_equil_allsky_gw_raw - - julia --color=yes --project=.buildkite reproducibility_tests/test_reproducibility.jl - --job_id aquaplanet_equil_allsky_gw_raw - --out_dir aquaplanet_equil_allsky_gw_raw/output_active - artifact_paths: "aquaplanet_equil_allsky_gw_raw/output_active/*" - agents: - slurm_mem: 20GB - slurm_constraint: icelake|cascadelake|skylake|epyc - - - label: ":large_blue_circle: Aquaplanet: Reproducibility test for diagnostic EDMF, clearsky" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze31.yml - --config_file $CONFIG_PATH/diagnostic_edmfx_aquaplanet.yml - --job_id diagnostic_edmfx_aquaplanet - - julia --color=yes --project=.buildkite reproducibility_tests/test_reproducibility.jl - --job_id diagnostic_edmfx_aquaplanet - --out_dir diagnostic_edmfx_aquaplanet/output_active - artifact_paths: "diagnostic_edmfx_aquaplanet/output_active/*" - agents: - slurm_mem: 20GB - slurm_constraint: icelake|cascadelake|skylake|epyc - - - label: ":large_blue_circle: Aquaplanet: Reproducibility test for prognostic EDMF, clearsky" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze31.yml - --config_file $CONFIG_PATH/prognostic_edmfx_aquaplanet.yml - --job_id prognostic_edmfx_aquaplanet - - julia --color=yes --project=.buildkite reproducibility_tests/test_reproducibility.jl - --job_id prognostic_edmfx_aquaplanet - --out_dir prognostic_edmfx_aquaplanet/output_active - artifact_paths: "prognostic_edmfx_aquaplanet/output_active/*" - agents: - slurm_mem: 20GB - slurm_constraint: icelake|cascadelake|skylake|epyc - - - label: ":large_blue_circle: Aquaplanet: Diagnostic EDMF, GPU" - retry: *retry_policy - key: "diagnostic_edmfx_aquaplanet_gpu" - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze31.yml - --config_file $CONFIG_PATH/diagnostic_edmfx_aquaplanet_gpu.yml - --job_id diagnostic_edmfx_aquaplanet_gpu - artifact_paths: "diagnostic_edmfx_aquaplanet_gpu/output_active/*" - env: - CLIMACOMMS_DEVICE: "CUDA" - agents: - slurm_gpus: 1 - slurm_mem: 20GB - - - label: ":large_blue_circle: Aquaplanet: Prognostic EDMF, GPU" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze31.yml - --config_file $CONFIG_PATH/prognostic_edmfx_aquaplanet_gpu.yml - --job_id prognostic_edmfx_aquaplanet_gpu - artifact_paths: "prognostic_edmfx_aquaplanet_gpu/output_active/*" - env: - CLIMACOMMS_DEVICE: "CUDA" - agents: - slurm_gpus: 1 - slurm_mem: 20GB - - - group: "Topography" - steps: - - label: ":mount_fuji: Topography: Idealized mountain (dcmip)" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze10.yml - --config_file $CONFIG_PATH/baroclinic_wave_topography_dcmip_rs.yml - --job_id baroclinic_wave_topography_dcmip_rs - artifact_paths: "baroclinic_wave_topography_dcmip_rs/output_active/*" - - - label: ":mount_fuji: Topography: Diagnostic Earth surface elevation spectra" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze10.yml - --config_file $CONFIG_PATH/baroclinic_wave_equil_earth.yml - --job_id baroclinic_wave_equil_earth - artifact_paths: "baroclinic_wave_equil_earth/output_active/*" - - - label: ":mount_fuji: Topography: Double mountain (Hughes2023)" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze10.yml - --config_file $CONFIG_PATH/baroclinic_wave_hughes2023.yml - --job_id baroclinic_wave_hughes2023 - artifact_paths: "baroclinic_wave_hughes2023/output_active/*" - - - group: "Restarting" - steps: - - label: ":computer: Restart: Basic correctness" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite test/restart.jl - agents: - slurm_mem: 16GB - - - label: ":computer: Restart: Basic correctness, GPU" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite test/restart.jl - env: - CLIMACOMMS_DEVICE: "CUDA" - agents: - slurm_gpus: 1 - slurm_mem: 16G - - - label: ":computer: Restart: Using manytests" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite test/restart.jl --manytests true - agents: - slurm_mem: 16GB - - - label: ":computer: Restart: Using manytests, GPU" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite test/restart.jl --manytests true - env: - CLIMACOMMS_DEVICE: "CUDA" - agents: - slurm_gpus: 1 - slurm_mem: 16G - - # This job occasionally times out. We add a soft file when the agent is - # lost because of timeout - - label: ":computer: Restart 2-process MPI" - command: > - srun julia --color=yes --project=.buildkite test/restart.jl - env: - CLIMACOMMS_CONTEXT: "MPI" - timeout_in_minutes: 30 - soft_fail: - - exit_status: -1 - - exit_status: 255 - agents: - slurm_ntasks: 2 - slurm_mem: 32G - - # This job occasionally times out. We add a soft file when the agent is - # lost because of timeout - - label: ":computer: Restart 2-process MPI, GPU" - command: > - srun julia --color=yes --project=.buildkite test/restart.jl - env: - CLIMACOMMS_CONTEXT: "MPI" - CLIMACOMMS_DEVICE: "CUDA" - timeout_in_minutes: 30 - soft_fail: - - exit_status: -1 - - exit_status: 255 - agents: - slurm_gpus_per_task: 1 - slurm_ntasks: 2 - slurm_mem: 32G - - - label: ":computer: Restart: Using AtmosSimulation" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite test/restart_AtmosSimulation.jl - agents: - slurm_mem: 16GB - - - label: ":computer: Restart: Using AtmosSimulation, GPU" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite test/restart_AtmosSimulation.jl - env: - CLIMACOMMS_DEVICE: "CUDA" - agents: - slurm_gpus: 1 - slurm_mem: 16G - - #- label: ":computer: Restart: Using AtmosSimulation manytests" - # command: > - # julia --color=yes --project=.buildkite test/restart_AtmosSimulation.jl --manytests true - # agents: - # slurm_mem: 16GB - # soft_fail: true - - #- label: ":computer: Restart: using AtmosSimulation manytests, GPU" - # command: > - # julia --color=yes --project=.buildkite test/restart_AtmosSimulation.jl --manytests true - # env: - # CLIMACOMMS_DEVICE: "CUDA" - # agents: - # slurm_gpus: 1 - # slurm_mem: 16G - # soft_fail: true - - - group: "MPI" - steps: - - label: ":metro: MPI: Prepare files for baroclininc wave restart test" - retry: *retry_policy - key: "mpi_baro_wave_make_restart" - command: > - srun julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $MPI_CONFIG_PATH/mpi_make_restart.yml - --job_id mpi_make_restart - artifact_paths: "mpi_make_restart/output_active/*" - env: - CLIMACOMMS_CONTEXT: "MPI" - agents: - slurm_ntasks: 2 - slurm_mem: 16G - - - label: ":metro: MPI: Test restart for baroclinic wave" - retry: *retry_policy - key: "restart_mpi_baro_wave" - depends_on: "mpi_baro_wave_make_restart" - command: > - tar xvf mpi_make_restart/output_active/hdf5_files.tar -C mpi_make_restart/output_active - - srun julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $MPI_CONFIG_PATH/restart_mpi_baroclinic_wave.yml - --job_id restart_mpi_baroclinic_wave - artifact_paths: "restart_mpi_baroclinic_wave/output_active/*" - env: - CLIMACOMMS_CONTEXT: "MPI" - agents: - slurm_ntasks: 2 - slurm_mem: 16G - timeout_in_minutes: 20 - #retry: - # automatic: true - - - label: ":metro: MPI: Aquaplanet equilmoist clearsky radiation" - retry: *retry_policy - command: > - srun julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $MPI_CONFIG_PATH/mpi_aquaplanet_equil_clearsky.yml - --job_id mpi_aquaplanet_equil_clearsky - artifact_paths: "mpi_aquaplanet_equil_clearsky/output_active/*" - env: - CLIMACOMMS_CONTEXT: "MPI" - agents: - slurm_ntasks: 2 - slurm_mem: 16GB - - - label: ":metro: MPI: Prepare for calling remap pipeline" - retry: *retry_policy - key: "prep_remap" - command: > - srun julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $MPI_CONFIG_PATH/prep_remap.yml - --job_id prep_remap - artifact_paths: "prep_remap/output_active/*" - env: - CLIMACOMMS_CONTEXT: "MPI" - agents: - slurm_ntasks: 2 - slurm_mem: 16G - - - label: ":metro: MPI: Test remap pipeline" - retry: *retry_policy - depends_on: "prep_remap" - command: > - tar xvf prep_remap/output_active/hdf5_files.tar -C prep_remap/output_active - - julia --color=yes --project=.buildkite post_processing/remap/remap_pipeline.jl - --data_dir prep_remap/output_active --out_dir remap_pipeline_output - artifact_paths: "remap_pipeline_output/*" - - - label: ":metro: MPI: Dry baroclinic wave on 2 GPUs" - retry: *retry_policy - key: "baroclinic_wave_2gpu" - command: - - mkdir -p baroclinic_wave_2gpu - # - > - # srun --cpu-bind=threads --cpus-per-task=4 - # nsys profile --delay 100 --trace=nvtx,cuda,mpi --output=baroclinic_wave_2gpu/output_active/report-%q{PMI_RANK} - # julia --threads=3 --color=yes --project=.buildkite .buildkite/ci_driver.jl - # --config_file ${CONFIG_PATH}/baroclinic_wave.yml - # --job_id baroclinic_wave_2gpu - - > - srun --cpu-bind=threads --cpus-per-task=4 - julia --threads=3 --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze10.yml - --config_file ${CONFIG_PATH}/baroclinic_wave.yml - --job_id baroclinic_wave_2gpu - artifact_paths: "baroclinic_wave_2gpu/output_active/*" - env: - CLIMACOMMS_CONTEXT: "MPI" - CLIMACOMMS_DEVICE: "CUDA" - agents: - slurm_gpus_per_task: 1 - slurm_cpus_per_task: 4 - slurm_ntasks: 2 - slurm_mem: 16GB - - - group: "Autodiff" - steps: - #- label: "Autodiff: Moist baroclinic wave, check conservation, sparse autodiff, Float64" - # command: > - # julia --color=yes --project=.buildkite .buildkite/ci_driver.jl --config_file $CONFIG_PATH/baroclinic_wave_equil_conservation_ft64_sparse_autodiff.yml - # --job_id baroclinic_wave_equil_conservation_ft64_sparse_autodiff - # artifact_paths: "baroclinic_wave_equil_conservation_ft64_sparse_autodiff/output_active/*" - # soft_fail: true - - - label: ":rocket: Autodiff: Baroclinic wave, dense autodiff" - retry: *retry_policy - key: baroclinic_wave_dense_autodiff - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze10.yml - --config_file $CONFIG_PATH/baroclinic_wave_dense_autodiff.yml - --job_id baroclinic_wave_dense_autodiff - artifact_paths: "baroclinic_wave_dense_autodiff/output_active/*" - - - label: ":rocket: Autodiff: Baroclinic wave, sparse autodiff" - retry: *retry_policy - key: baroclinic_wave_sparse_autodiff - command: > - julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze10.yml - --config_file $CONFIG_PATH/baroclinic_wave_sparse_autodiff.yml - --job_id baroclinic_wave_sparse_autodiff - artifact_paths: "baroclinic_wave_sparse_autodiff/output_active/*" - soft_fail: true - - # - label: "Prognostic EDMF GABLS in a column sparse autodiff" - # command: > - # julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - # --config_file $CONFIG_PATH/prognostic_edmfx_gabls_column_sparse_autodiff.yml - # --job_id prognostic_edmfx_gabls_column_sparse_autodiff - # artifact_paths: "prognostic_edmfx_gabls_column_sparse_autodiff/output_active/*" - # agents: - # slurm_mem: 20GB - - # - label: "Prognostic EDMF Bomex in a column sparse autodiff" - # command: > - # julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - # --config_file $CONFIG_PATH/prognostic_edmfx_bomex_column_sparse_autodiff.yml - # --job_id prognostic_edmfx_bomex_column_sparse_autodiff - # artifact_paths: "prognostic_edmfx_bomex_column_sparse_autodiff/output_active/*" - # agents: - # slurm_mem: 20GB - - - - # - label: "Prognostic EDMF aquaplanet dense autodiff, GPU" - # command: > - # julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - # --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze31.yml - # --config_file $CONFIG_PATH/prognostic_edmfx_aquaplanet_dense_autodiff.yml - # --job_id prognostic_edmfx_aquaplanet_dense_autodiff_gpu - # artifact_paths: "prognostic_edmfx_aquaplanet_dense_autodiff_gpu/output_active/*" - # env: - # CLIMACOMMS_DEVICE: "CUDA" - # agents: - # slurm_gpus: 1 - # slurm_mem: 20GB - - # - label: "Prognostic EDMF aquaplanet sparse autodiff, GPU" - # command: > - # julia --color=yes --project=.buildkite .buildkite/ci_driver.jl - # --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze31.yml - # --config_file $CONFIG_PATH/prognostic_edmfx_aquaplanet_sparse_autodiff.yml - # --job_id prognostic_edmfx_aquaplanet_sparse_autodiff_gpu - # artifact_paths: "prognostic_edmfx_aquaplanet_sparse_autodiff_gpu/output_active/*" - # env: - # CLIMACOMMS_DEVICE: "CUDA" - # agents: - # slurm_gpus: 1 - # slurm_mem: 20GB - - - group: "Timestep cost" - steps: - - label: ":alarm_clock: Timestep cost: Moist baroclinic wave" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite perf/benchmark_step.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze10.yml - --config_file $PERF_CONFIG_PATH/bm_baroclinic_wave_moist.yml - --job_id bm_baroclinic_wave_moist - artifact_paths: "bm_baroclinic_wave_moist/output_active/*" - - - label: ":alarm_clock: Timestep cost: Moist baroclinic wave, GPU" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite perf/benchmark_step.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze10.yml - --config_file $PERF_CONFIG_PATH/bm_baroclinic_wave_moist.yml - --job_id bm_baroclinic_wave_moist_gpu - artifact_paths: "bm_baroclinic_wave_moist_gpu/output_active/*" - env: - CLIMACOMMS_DEVICE: "CUDA" - CLIMA_NAME_CUDA_KERNELS_FROM_STACK_TRACE: "true" - agents: - slurm_mem: 16G - slurm_gpus: 1 - - - label: ":alarm_clock: Timestep cost: Default aquaplanet" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite perf/benchmark.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he16ze63.yml - --config_file $PERF_CONFIG_PATH/bm_default.yml - --job_id bm_default - agents: - slurm_mem: 24GB - - - label: ":alarm_clock: Timestep cost: Default aquaplanet, GPU" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite perf/benchmark.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he16ze63.yml - --config_file $PERF_CONFIG_PATH/bm_default.yml - --job_id bm_default_gpu - env: - CLIMACOMMS_DEVICE: "CUDA" - CLIMA_NAME_CUDA_KERNELS_FROM_STACK_TRACE: "true" - agents: - slurm_mem: 24GB - slurm_gpus: 1 - - - label: ":alarm_clock: Timestep cost: Aquaplanet, diagnostic EDMF, GPU" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite perf/benchmark.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze31.yml - --config_file $PERF_CONFIG_PATH/bm_aquaplanet_diagedmf.yml - --job_id bm_diag_edmf_gpu - env: - CLIMACOMMS_DEVICE: "CUDA" - CLIMA_NAME_CUDA_KERNELS_FROM_STACK_TRACE: "true" - agents: - slurm_mem: 24GB - slurm_gpus: 1 - - - label: ":alarm_clock: Timestep cost: Aquaplenet, prognostic EDMF, GPU" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite perf/benchmark.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze31.yml - --config_file $PERF_CONFIG_PATH/bm_aquaplanet_progedmf.yml - --job_id bm_prog_edmf_gpu - env: - CLIMACOMMS_DEVICE: "CUDA" - CLIMA_NAME_CUDA_KERNELS_FROM_STACK_TRACE: "true" - agents: - slurm_mem: 28GB - slurm_gpus: 1 - - group: "Allocations budget" steps: - - label: ":fire: Allocations budget: Moist baroclininc wave, GPU" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite perf/flame.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he6ze10.yml - --config_file $PERF_CONFIG_PATH/bm_baroclinic_wave_moist.yml - --job_id flame_baroclinic_wave_moist_gpu - artifact_paths: "flame_baroclinic_wave_moist_gpu/*" - env: - CLIMACOMMS_DEVICE: "CUDA" - agents: - slurm_mem: 48GB - slurm_gpus: 1 - gres: "gpu:p100:1" - - - label: ":fire: Allocations budget: Aquaplanet" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite perf/flame.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he16ze63.yml - --config_file $PERF_CONFIG_PATH/bm_default.yml - --job_id flame_default - artifact_paths: "flame_default/*" - agents: - slurm_mem: 24GB - - - label: ":fire: Allocations budget: 1 moment microphysics" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite perf/flame.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he16ze63.yml - --config_file $PERF_CONFIG_PATH/bm_default_1m.yml - --job_id flame_default_1m - artifact_paths: "flame_default_1m/*" - agents: - slurm_mem: 24GB - - - label: ":fire: Allocations budget: Diagnostics output" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite perf/flame.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he16ze63.yml - --config_file $PERF_CONFIG_PATH/bm_diagnostics.yml - --job_id flame_diagnostics - artifact_paths: "flame_diagnostics/*" - agents: - slurm_mem: 24GB - - - label: ":fire: Allocations budget: Aquaplanet, diagnostics edmf" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite perf/flame.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he16ze63.yml - --config_file $PERF_CONFIG_PATH/bm_aquaplanet_diagedmf.yml - --job_id flame_aquaplanet_diagedmf - artifact_paths: "flame_aquaplanet_diagedmf/*" - agents: - slurm_mem: 24GB - - - label: ":fire: Allocations budget: Aquaplanet, prognostic EDMF" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite perf/flame.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he16ze63.yml - --config_file $PERF_CONFIG_PATH/bm_aquaplanet_progedmf.yml - --job_id flame_aquaplanet_progedmf - artifact_paths: "flame_aquaplanet_progedmf/*" - agents: - slurm_mem: 32GB - - label: ":fire: Allocations budget: Aquaplanet, prognostic EDMF, 1M" retry: *retry_policy command: > @@ -1244,110 +68,3 @@ steps: artifact_paths: "flame_aquaplanet_progedmf_1m/*" agents: slurm_mem: 32GB - - # This job takes too long (a hour) so it is temporarily disabled - # - label: ":fire: Flame graph: prognostic edmf dense autodiff" - # command: > - # julia --color=yes --project=.buildkite perf/flame.jl - # --config_file $COMMON_CONFIG_PATH/numerics_sphere_he16ze63.yml - # --config_file $PERF_CONFIG_PATH/bm_aquaplanet_progedmf_dense_autodiff.yml - # --job_id flame_aquaplanet_progedmf_dense_autodiff - # artifact_paths: "flame_aquaplanet_progedmf_dense_autodiff/*" - # agents: - # slurm_mem: 32GB - - # - label: ":fire: Flame graph: prognostic edmf sparse autodiff" - # command: > - # julia --color=yes --project=.buildkite perf/flame.jl - # --config_file $COMMON_CONFIG_PATH/numerics_sphere_he16ze63.yml - # --config_file $PERF_CONFIG_PATH/bm_aquaplanet_progedmf_sparse_autodiff.yml - # --job_id flame_aquaplanet_progedmf_sparse_autodiff - # artifact_paths: "flame_aquaplanet_progedmf_sparse_autodiff/*" - # agents: - # slurm_mem: 32GB - - - label: ":fire: Allocations budget: Decay with height diffusion" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite perf/flame.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he16ze63.yml - --config_file $PERF_CONFIG_PATH/bm_diffusion.yml - --job_id flame_diffusion - artifact_paths: "flame_diffusion/*" - agents: - slurm_mem: 24GB - - - label: ":fire: Allocations budget: All callbacks" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite perf/flame.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he16ze63.yml - --config_file $PERF_CONFIG_PATH/bm_callbacks.yml - --job_id flame_callbacks - artifact_paths: "flame_callbacks/*" - agents: - slurm_mem: 24GB - - - label: ":fire: Allocations budget: Gravity waves" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite perf/flame.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he16ze63.yml - --config_file $PERF_CONFIG_PATH/bm_gravity_wave.yml - --job_id flame_gravity_wave - artifact_paths: "flame_gravity_wave/*" - agents: - slurm_mem: 24GB - - - group: "Checkbounds/Invalidations" - steps: - # TODO: we should somehow decouple this unit test from the perf env / scripts - # Checkbounds - - label: ":computer: Checkbounds" - retry: *retry_policy - command: > - julia --color=yes --check-bounds=yes --project=.buildkite perf/benchmark.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he16ze63.yml - --config_file $PERF_CONFIG_PATH/bm_default.yml - --job_id checkbounds - artifact_paths: "checkbounds/output_active/*" - agents: - slurm_mem: 20GB - - # Latency - - label: ":mag::rocket: Invalidations" - retry: *retry_policy - command: > - julia --color=yes --project=.buildkite perf/invalidations.jl - --config_file $COMMON_CONFIG_PATH/numerics_sphere_he16ze63.yml - --config_file $PERF_CONFIG_PATH/bm_default.yml - artifact_paths: "invalidations/*" - agents: - slurm_mem: 24GB - - - wait: ~ - continue_on_failure: true - - - label: ":robot_face: Print new rms tables" - retry: *retry_policy - command: "julia --color=yes --project=.buildkite reproducibility_tests/rms_summary.jl" - - - label: ":robot_face: Print new reference counter" - retry: *retry_policy - command: "julia --color=yes --project=.buildkite reproducibility_tests/print_new_ref_counter.jl" - - - label: ":bar_chart: Tabulate performance summary" - retry: *retry_policy - command: "julia --color=yes --project=.buildkite perf/tabulate_perf_summary.jl" - - # - label: ":chart_with_downwards_trend: build history" - # command: - # - build_history main - # artifact_paths: - # - "build_history.html" - - - wait - - - label: ":robot_face: Move main results" - retry: *retry_policy - command: "julia --color=yes --project=.buildkite reproducibility_tests/move_output.jl" diff --git a/src/prognostic_equations/implicit/manual_sparse_jacobian.jl b/src/prognostic_equations/implicit/manual_sparse_jacobian.jl index a55799bb674..43388ed6bb3 100644 --- a/src/prognostic_equations/implicit/manual_sparse_jacobian.jl +++ b/src/prognostic_equations/implicit/manual_sparse_jacobian.jl @@ -887,25 +887,15 @@ function update_jacobian!(alg::ManualSparseJacobian, cache, Y, p, dtγ, t) dtγ * DiagonalMatrixRow(1 / ᶜρʲs.:(1)) ⋅ ᶜdiffusion_h_matrix @. ∂ᶜq_totʲ_err_∂ᶜq_totʲ += dtγ * DiagonalMatrixRow(1 / ᶜρʲs.:(1)) ⋅ ᶜdiffusion_h_matrix - if p.atmos.microphysics_model isa Union{ - NonEquilibriumMicrophysics1M, - NonEquilibriumMicrophysics2M, - } - sgs_microphysics_tracers = ( - (@name(c.sgsʲs.:(1).q_lcl)), (@name(c.sgsʲs.:(1).q_icl)), - (@name(c.sgsʲs.:(1).q_rai)), (@name(c.sgsʲs.:(1).q_sno)), - (@name(c.sgsʲs.:(1).n_lcl)), (@name(c.sgsʲs.:(1).n_rai)), - ) - MatrixFields.unrolled_foreach( - sgs_microphysics_tracers, - ) do (χʲ_name) - MatrixFields.has_field(Y, χʲ_name) || return - ∂ᶜχʲ_err_∂ᶜχʲ = matrix[χʲ_name, χʲ_name] - @. ∂ᶜχʲ_err_∂ᶜχʲ += - dtγ * α_vert_diff_microphysics * - DiagonalMatrixRow(1 / ᶜρʲs.:(1)) ⋅ - ᶜdiffusion_h_matrix - end + # Auto-discovered SGS tracers (vert diffusion Jacobian) + MatrixFields.unrolled_foreach( + sgs_tracer_names(Y), + ) do χ_name + χʲ_name = get_sgsʲ_name(χ_name) + ∂ᶜχʲ_err_∂ᶜχʲ = matrix[χʲ_name, χʲ_name] + @. ∂ᶜχʲ_err_∂ᶜχʲ += + dtγ * α_vert_diff_tracer * DiagonalMatrixRow(1 / ᶜρʲs.:(1)) ⋅ + ᶜdiffusion_h_matrix end end # entrainment and detrainment (rates are treated explicitly) @@ -923,26 +913,17 @@ function update_jacobian!(alg::ManualSparseJacobian, cache, Y, p, dtγ, t) @. ∂ᶜq_totʲ_err_∂ᶜq_totʲ -= dtγ * DiagonalMatrixRow(ᶜentrʲ + ᶜturb_entrʲs.:(1)) @. ∂ᶜmseʲ_err_∂ᶜmseʲ -= - dtγ * DiagonalMatrixRow(ᶜentrʲ + ᶜturb_entrʲs.:(1)) - if p.atmos.microphysics_model isa Union{ - NonEquilibriumMicrophysics1M, - NonEquilibriumMicrophysics2M, - } - sgs_microphysics_tracers = ( - (@name(c.sgsʲs.:(1).q_lcl)), - (@name(c.sgsʲs.:(1).q_icl)), - (@name(c.sgsʲs.:(1).q_rai)), - (@name(c.sgsʲs.:(1).q_sno)), - ) - MatrixFields.unrolled_foreach( - sgs_microphysics_tracers, - ) do (qʲ_name) - MatrixFields.has_field(Y, qʲ_name) || return - - ∂ᶜqʲ_err_∂ᶜqʲ = matrix[qʲ_name, qʲ_name] - @. ∂ᶜqʲ_err_∂ᶜqʲ -= - dtγ * DiagonalMatrixRow(ᶜentrʲ + ᶜturb_entrʲs.:(1)) - end + dtγ * DiagonalMatrixRow(ᶜentrʲs.:(1) + ᶜturb_entrʲs.:(1)) + @. ∂ᶜρaʲ_err_∂ᶜρaʲ += + dtγ * DiagonalMatrixRow(ᶜentrʲs.:(1) - ᶜdetrʲs.:(1)) + # Auto-discovered SGS tracers (entrainment Jacobian) + MatrixFields.unrolled_foreach( + sgs_tracer_names(Y), + ) do χ_name + χʲ_name = get_sgsʲ_name(χ_name) + ∂ᶜχʲ_err_∂ᶜχʲ = matrix[χʲ_name, χʲ_name] + @. ∂ᶜχʲ_err_∂ᶜχʲ -= + dtγ * DiagonalMatrixRow(ᶜentrʲs.:(1) + ᶜturb_entrʲs.:(1)) end end @@ -1055,20 +1036,27 @@ function update_jacobian!(alg::ManualSparseJacobian, cache, Y, p, dtγ, t) ) / ᶠJ * (g³³(ᶠgⁱʲ)), ) - # grid-mean tracers - if p.atmos.microphysics_model isa Union{ - NonEquilibriumMicrophysics1M, - NonEquilibriumMicrophysics2M, - } - - microphysics_tracers = ( - (@name(c.ρq_lcl), @name(c.sgsʲs.:(1).q_lcl), @name(q_lcl)), - (@name(c.ρq_icl), @name(c.sgsʲs.:(1).q_icl), @name(q_icl)), - (@name(c.ρq_rai), @name(c.sgsʲs.:(1).q_rai), @name(q_rai)), - (@name(c.ρq_sno), @name(c.sgsʲs.:(1).q_sno), @name(q_sno)), - (@name(c.ρn_lcl), @name(c.sgsʲs.:(1).n_lcl), @name(n_lcl)), - (@name(c.ρn_rai), @name(c.sgsʲs.:(1).n_rai), @name(n_rai)), - ) + # grid-mean ∂/∂(rho*a) + ∂ᶜρe_tot_err_∂ᶜρa = + matrix[@name(c.ρe_tot), @name(c.sgsʲs.:(1).ρa)] + @. ∂ᶜρe_tot_err_∂ᶜρa = + dtγ * -(ᶜadvdivᵥ_matrix()) ⋅ DiagonalMatrixRow( + (ᶠu³ʲs.:(1) - ᶠu³) * + ᶠinterp((Y.c.sgsʲs.:(1).mse + ᶜKʲs.:(1) - ᶜh_tot)) / ᶠJ, + ) ⋅ ᶠinterp_matrix() ⋅ + DiagonalMatrixRow(ᶜJ) + + ∂ᶜρq_tot_err_∂ᶜρa = + matrix[@name(c.ρq_tot), @name(c.sgsʲs.:(1).ρa)] + @. ∂ᶜρq_tot_err_∂ᶜρa = + dtγ * -(ᶜadvdivᵥ_matrix()) ⋅ DiagonalMatrixRow( + (ᶠu³ʲs.:(1) - ᶠu³) * + ᶠinterp((Y.c.sgsʲs.:(1).q_tot - ᶜq_tot)) / ᶠJ, + ) ⋅ ᶠinterp_matrix() ⋅ + DiagonalMatrixRow(ᶜJ) + + # Auto-discovered SGS tracers (mass flux Jacobian) + if !isempty(sgs_tracer_names(Y)) # add updraft contributions # pull common subexpressions that don't depend on which @@ -1081,9 +1069,11 @@ function update_jacobian!(alg::ManualSparseJacobian, cache, Y, p, dtγ, t) ᶠtracer_upwind_matrix(ᶠu³ʲs.:(1)), ) MatrixFields.unrolled_foreach( - microphysics_tracers, - ) do (ρχ_name, χʲ_name, χ_name) - MatrixFields.has_field(Y, ρχ_name) || return + sgs_tracer_names(Y), + ) do χ_name + χʲ_name = get_sgsʲ_name(χ_name) + ρχ_name = get_c_ρχ_name(χ_name) + ᶜχʲ = MatrixFields.get_field(Y.c.sgsʲs.:(1), χ_name) ∂ᶜρχ_err_∂ᶜχʲ = matrix[ρχ_name, χʲ_name] @@ -1121,9 +1111,11 @@ function update_jacobian!(alg::ManualSparseJacobian, cache, Y, p, dtγ, t) ᶠtracer_upwind_matrix(ᶠu³⁰), ) MatrixFields.unrolled_foreach( - microphysics_tracers, - ) do (ρχ_name, χʲ_name, χ_name) - MatrixFields.has_field(Y, ρχ_name) || return + sgs_tracer_names(Y), + ) do χ_name + χʲ_name = get_sgsʲ_name(χ_name) + ρχ_name = get_c_ρχ_name(χ_name) + ᶜχʲ = MatrixFields.get_field(Y.c.sgsʲs.:(1), χ_name) ᶜχ⁰ = ᶜspecific_env_value(χ_name, Y, p) ∂ᶜρχ_err_∂ᶜχʲ = diff --git a/src/utils/variable_manipulations.jl b/src/utils/variable_manipulations.jl index 5a4c00432f2..5d63409995d 100644 --- a/src/utils/variable_manipulations.jl +++ b/src/utils/variable_manipulations.jl @@ -181,6 +181,61 @@ foreach_gs_tracer(f::F, Y_or_similar_values...) where {F} = end +""" + sgs_tracer_names(Y) + +Return a `Tuple` of `FieldName`s for all SGS (sub-grid scale) tracers +present in the first updraft of `Y`. Returns `()` when prognostic EDMF +is not active (i.e. when `Y.c` has no `sgsʲs` field). + +"Tracer" here means any scalar in `Y.c.sgsʲs.:(1)` that is **not** one +of the core EDMF variables `ρa`, `mse`, or `q_tot` (which receive +physics-specific treatment). +""" +@generated _is_sgs_tracer_name( + ::MatrixFields.FieldName{name_chain}, +) where {name_chain} = + length(name_chain) == 1 && + !(name_chain[1] in (:ρa, :mse, :q_tot)) + +sgs_tracer_names(Y) = + unrolled_filter( + _is_sgs_tracer_name, + MatrixFields.top_level_names(Y.c.sgsʲs.:(1)), + ) + + +""" + get_sgsʲ_name(χ_name::FieldName) + +Construct the full Jacobian matrix path name for an SGS tracer in updraft 1. +Maps e.g. `@name(q_lcl)` → `@name(c.sgsʲs.:(1).q_lcl)`. + +Used in the manual sparse Jacobian to index matrix blocks for auto-discovered +SGS tracers. Implemented as `@generated` to ensure the result is a +compile-time constant with zero runtime allocation. +""" +@generated get_sgsʲ_name(::MatrixFields.FieldName{names}) where {names} = + MatrixFields.FieldName(:c, :sgsʲs, 1, names...) + +""" + get_c_ρχ_name(χ_name::FieldName) + +Construct the full Jacobian matrix path name for a grid-scale density-weighted +tracer. Maps e.g. `@name(q_lcl)` → `@name(c.ρq_lcl)`. + +Composes `get_ρχ_name` (which gives `@name(ρq_lcl)`) with a `c.` prefix +for use in `matrix[name1, name2]` indexing. +""" +@generated function get_c_ρχ_name(::MatrixFields.FieldName{names}) where {names} + # For a single-level name like (:q_lcl,), produce @name(c.ρq_lcl) + ρ_name = Symbol(:ρ, names[1]) + MatrixFields.FieldName(:c, ρ_name, names[2:end]...) +end + +@generated get_c_name(::MatrixFields.FieldName{names}) where {names} = + MatrixFields.FieldName(:c, names...) + """ sgs_weight_function(a, a_half) From 013f64e0b6adbd41c1a58be7b238f9e2f0b60d8f Mon Sep 17 00:00:00 2001 From: Anna Jaruga Date: Thu, 11 Jun 2026 12:32:48 -0700 Subject: [PATCH 2/4] ... --- src/prognostic_equations/implicit/manual_sparse_jacobian.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/prognostic_equations/implicit/manual_sparse_jacobian.jl b/src/prognostic_equations/implicit/manual_sparse_jacobian.jl index 43388ed6bb3..a2340ef106a 100644 --- a/src/prognostic_equations/implicit/manual_sparse_jacobian.jl +++ b/src/prognostic_equations/implicit/manual_sparse_jacobian.jl @@ -894,7 +894,7 @@ function update_jacobian!(alg::ManualSparseJacobian, cache, Y, p, dtγ, t) χʲ_name = get_sgsʲ_name(χ_name) ∂ᶜχʲ_err_∂ᶜχʲ = matrix[χʲ_name, χʲ_name] @. ∂ᶜχʲ_err_∂ᶜχʲ += - dtγ * α_vert_diff_tracer * DiagonalMatrixRow(1 / ᶜρʲs.:(1)) ⋅ + dtγ * α_vert_diff_microphysics * DiagonalMatrixRow(1 / ᶜρʲs.:(1)) ⋅ ᶜdiffusion_h_matrix end end From 167b766117f9ef6571378cacca7313e5252fcb72 Mon Sep 17 00:00:00 2001 From: Anna Jaruga Date: Thu, 11 Jun 2026 12:46:31 -0700 Subject: [PATCH 3/4] ... --- src/prognostic_equations/implicit/manual_sparse_jacobian.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/prognostic_equations/implicit/manual_sparse_jacobian.jl b/src/prognostic_equations/implicit/manual_sparse_jacobian.jl index a2340ef106a..c10c04d7ee8 100644 --- a/src/prognostic_equations/implicit/manual_sparse_jacobian.jl +++ b/src/prognostic_equations/implicit/manual_sparse_jacobian.jl @@ -913,9 +913,9 @@ function update_jacobian!(alg::ManualSparseJacobian, cache, Y, p, dtγ, t) @. ∂ᶜq_totʲ_err_∂ᶜq_totʲ -= dtγ * DiagonalMatrixRow(ᶜentrʲ + ᶜturb_entrʲs.:(1)) @. ∂ᶜmseʲ_err_∂ᶜmseʲ -= - dtγ * DiagonalMatrixRow(ᶜentrʲs.:(1) + ᶜturb_entrʲs.:(1)) + dtγ * DiagonalMatrixRow(ᶜentrʲ + ᶜturb_entrʲs.:(1)) @. ∂ᶜρaʲ_err_∂ᶜρaʲ += - dtγ * DiagonalMatrixRow(ᶜentrʲs.:(1) - ᶜdetrʲs.:(1)) + dtγ * DiagonalMatrixRow(ᶜentrʲ - p.precomputed.ᶜdetrʲs.:(1)) # Auto-discovered SGS tracers (entrainment Jacobian) MatrixFields.unrolled_foreach( sgs_tracer_names(Y), @@ -923,7 +923,7 @@ function update_jacobian!(alg::ManualSparseJacobian, cache, Y, p, dtγ, t) χʲ_name = get_sgsʲ_name(χ_name) ∂ᶜχʲ_err_∂ᶜχʲ = matrix[χʲ_name, χʲ_name] @. ∂ᶜχʲ_err_∂ᶜχʲ -= - dtγ * DiagonalMatrixRow(ᶜentrʲs.:(1) + ᶜturb_entrʲs.:(1)) + dtγ * DiagonalMatrixRow(ᶜentrʲ + ᶜturb_entrʲs.:(1)) end end From 317b487f1f797b5caeba78bc9448307fd6e5bf4b Mon Sep 17 00:00:00 2001 From: Anna Jaruga Date: Thu, 11 Jun 2026 13:28:34 -0700 Subject: [PATCH 4/4] ... --- src/prognostic_equations/implicit/manual_sparse_jacobian.jl | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/prognostic_equations/implicit/manual_sparse_jacobian.jl b/src/prognostic_equations/implicit/manual_sparse_jacobian.jl index c10c04d7ee8..d0fa942f2e5 100644 --- a/src/prognostic_equations/implicit/manual_sparse_jacobian.jl +++ b/src/prognostic_equations/implicit/manual_sparse_jacobian.jl @@ -914,8 +914,6 @@ function update_jacobian!(alg::ManualSparseJacobian, cache, Y, p, dtγ, t) dtγ * DiagonalMatrixRow(ᶜentrʲ + ᶜturb_entrʲs.:(1)) @. ∂ᶜmseʲ_err_∂ᶜmseʲ -= dtγ * DiagonalMatrixRow(ᶜentrʲ + ᶜturb_entrʲs.:(1)) - @. ∂ᶜρaʲ_err_∂ᶜρaʲ += - dtγ * DiagonalMatrixRow(ᶜentrʲ - p.precomputed.ᶜdetrʲs.:(1)) # Auto-discovered SGS tracers (entrainment Jacobian) MatrixFields.unrolled_foreach( sgs_tracer_names(Y),