Skip to content

Commit

Permalink
Merge pull request #2794 from CliMA/aj/defalt_hyperparams_1M
Browse files Browse the repository at this point in the history
Add a GPU longrun with 1M microphysics (aquaplanet grid mean)
  • Loading branch information
trontrytel authored Mar 18, 2024
2 parents 577e780 + d4d8f55 commit 8ae130a
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 10 deletions.
14 changes: 12 additions & 2 deletions .buildkite/longruns_gpu/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ steps:
slurm_time: 12:00:00
env:
JOB_NAME: "longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_diagedmf_0M"

- label: ":computer: aquaplanet equilmoist allsky radiation + diagnostic edmf + 0M microphysics"
command:
- srun julia --project=examples examples/hybrid/driver.jl --config_file $CONFIG_PATH/$$JOB_NAME.yml
Expand All @@ -173,7 +173,7 @@ steps:
slurm_time: 12:00:00
env:
JOB_NAME: "longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_0M_earth"

- label: ":computer: aquaplanet equilmoist clearsky radiation + 0M microphysics + earth topography (SLEVE)"
command:
- srun julia --project=examples examples/hybrid/driver.jl --config_file $CONFIG_PATH/$$JOB_NAME.yml
Expand All @@ -184,6 +184,16 @@ steps:
env:
JOB_NAME: "longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_0M_earth_sleve"

- label: ":umbrella: aquaplanet equilmoist clearsky radiation + 1M microphysics"
command:
- srun julia --project=examples examples/hybrid/driver.jl --config_file $CONFIG_PATH/$$JOB_NAME.yml
artifact_paths: "$$JOB_NAME/*"
agents:
slurm_gpus: 1
slurm_time: 6:00:00
env:
JOB_NAME: "longrun_aquaplanet_clearsky_1M"

- group: "DYAMOND"

steps:
Expand Down
18 changes: 18 additions & 0 deletions config/longrun_configs/longrun_aquaplanet_clearsky_1M.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
dt: "120secs"
t_end: "100days"
h_elem: 16
z_elem: 63
dz_bottom: 30.0
dz_top: 3000.0
z_max: 55000.0
rayleigh_sponge: true
moist: "equil"
precip_model: "1M"
surface_setup: "DefaultMoninObukhov"
vert_diff: "FriersonDiffusion"
implicit_diffusion: true
approximate_linear_solve_iters: 2
rad: "clearsky"
dt_rad: "6hours"
job_id: "longrun_aquaplanet_clearsky_1M"
toml: [toml/gpu_aquaplanet_clearsky_1M.toml]
6 changes: 4 additions & 2 deletions docs/src/equations.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,13 +385,15 @@ It is assummed that some fraction ``\alpha`` of snow is melted during the proces
### Stability and positivity

All source terms are individually limited such that they don't exceed the
available tracer specific humidity.
available tracer specific humidity divided by a coefficient ``a``.
```math
\mathcal{S}_{x \rightarrow y} = min(\mathcal{S}_{x \rightarrow y}, \frac{q_{x}}{dt})
\mathcal{S}_{x \rightarrow y} = min(\mathcal{S}_{x \rightarrow y}, \frac{q_{x}}{a \; dt})
```
This will not ensure positivity because the sum of all source terms,
combined with the advection tendency,
could still drive the solution to negative numbers.
It should however help mitigate some of the problems.
The source terms functions treat negative specific humidities as zeros,
so the simulations should be stable even with small negative numbers.

We do not apply hyperdiffusion for precipitation tracers.
6 changes: 3 additions & 3 deletions docs/src/longruns.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,16 @@ Aquaplanet with idealized insolation, clear-sky radiation, 0-moment microphysics
Earth topography. Use this job to test topography related features.
```
```
longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_1M
longrun_aquaplanet_clearsky_1M
Aquaplanet with idealized insolation, clear-sky radiation, 1-moment microphysics.
Use this job to test 1-moment microphysics related features.
```
```
longrun_hs_rhoe_equil_55km_nz63_0M_deepatmos
Held-Suarez equil-moist. Test with deep-atmosphere equations.
Use this job to test deep-atmosphere related features.
Held-Suarez equil-moist. Test with deep-atmosphere equations.
Use this job to test deep-atmosphere related features.
```
```
longrun_bw_rhoe_equil_highres_topography_earth
Expand Down
1 change: 1 addition & 0 deletions post_processing/ci_plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,7 @@ end
Aquaplanet1MPlots = Union{
Val{:sphere_aquaplanet_rhoe_equilmoist_allsky_gw_res},
Val{:gpu_aquaplanet_clearsky_1M},
Val{:longrun_aquaplanet_clearsky_1M},
}

function make_plots(::Aquaplanet1MPlots, output_paths::Vector{<:AbstractString})
Expand Down
2 changes: 1 addition & 1 deletion src/parameterized_tendencies/microphysics/precipitation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ function qₚ(ρqₚ::FT, ρ::FT) where {FT}
end

function limit(q::FT, dt::FT) where {FT}
return q / dt
return q / dt / 5
end

function compute_precipitation_cache!(Y, p, colidx, ::Microphysics1Moment, _)
Expand Down
3 changes: 1 addition & 2 deletions src/prognostic_equations/hyperdiffusion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,7 @@ NVTX.@annotate function apply_tracer_hyperdiffusion_tendency!(Yₜ, Y, p, t)
# TODO: Figure out why caching the duplicated tendencies in ᶜtemp_scalar
# triggers allocations.
for (ᶜρχₜ, ᶜ∇²χ, χ_name) in matching_subfields(Yₜ.c, ᶜ∇²specific_tracers)
ν₄_scalar =
ifelse(χ_name in (:q_rai, :q_sno), 0.1 * ν₄_scalar, ν₄_scalar)
ν₄_scalar = ifelse(χ_name in (:q_rai, :q_sno), 0 * ν₄_scalar, ν₄_scalar)
@. ᶜρχₜ -= ν₄_scalar * wdivₕ(Y.c.ρ * gradₕ(ᶜ∇²χ))
if !(χ_name in (:q_rai, :q_sno))
@. Yₜ.c.ρ -= ν₄_scalar * wdivₕ(Y.c.ρ * gradₕ(ᶜ∇²χ))
Expand Down

0 comments on commit 8ae130a

Please sign in to comment.