Skip to content

Commit 5f8bc43

Browse files
committed
style format with JuliaFormatter-v1.0.62
1 parent d1f6923 commit 5f8bc43

File tree

3 files changed

+72
-46
lines changed

3 files changed

+72
-46
lines changed

src/diagnostics/core_diagnostics.jl

Lines changed: 45 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,11 @@ function compute_hussfc!(
470470
cache.precomputed.sfc_conditions.ts,
471471
)
472472
else
473-
out .= TD.total_specific_humidity.(
474-
thermo_params,
475-
cache.precomputed.sfc_conditions.ts,
476-
)
473+
out .=
474+
TD.total_specific_humidity.(
475+
thermo_params,
476+
cache.precomputed.sfc_conditions.ts,
477+
)
477478
end
478479
end
479480

@@ -503,10 +504,11 @@ add_diagnostic_variable!(
503504
cache.precomputed.sfc_conditions.ts,
504505
)
505506
else
506-
out .= TD.air_temperature.(
507-
thermo_params,
508-
cache.precomputed.sfc_conditions.ts,
509-
)
507+
out .=
508+
TD.air_temperature.(
509+
thermo_params,
510+
cache.precomputed.sfc_conditions.ts,
511+
)
510512
end
511513
end,
512514
)
@@ -528,10 +530,11 @@ add_diagnostic_variable!(
528530
Fields.level(cache.precomputed.ᶜts, 1),
529531
)
530532
else
531-
out .= TD.air_temperature.(
532-
thermo_params,
533-
Fields.level(cache.precomputed.ᶜts, 1),
534-
)
533+
out .=
534+
TD.air_temperature.(
535+
thermo_params,
536+
Fields.level(cache.precomputed.ᶜts, 1),
537+
)
535538
end
536539
end,
537540
)
@@ -553,9 +556,10 @@ add_diagnostic_variable!(
553556
),
554557
)
555558
else
556-
out .= u_component.(
557-
Geometry.UVector.(Fields.level(cache.precomputed.ᶜu, 1)),
558-
)
559+
out .=
560+
u_component.(
561+
Geometry.UVector.(Fields.level(cache.precomputed.ᶜu, 1)),
562+
)
559563
end
560564
end,
561565
)
@@ -577,9 +581,10 @@ add_diagnostic_variable!(
577581
),
578582
)
579583
else
580-
out .= v_component.(
581-
Geometry.VVector.(Fields.level(cache.precomputed.ᶜu, 1)),
582-
)
584+
out .=
585+
v_component.(
586+
Geometry.VVector.(Fields.level(cache.precomputed.ᶜu, 1)),
587+
)
583588
end
584589
end,
585590
)
@@ -593,12 +598,16 @@ function compute_tau!(out, state, cache, component)
593598

594599
if isnothing(out)
595600
return getproperty(
596-
Geometry.UVVector.(adjoint.(ρ_flux_uₕ) .* surface_ct3_unit).components.data,
601+
Geometry.UVVector.(
602+
adjoint.(ρ_flux_uₕ) .* surface_ct3_unit
603+
).components.data,
597604
component,
598605
)
599606
else
600607
out .= getproperty(
601-
Geometry.UVVector.(adjoint.(ρ_flux_uₕ) .* surface_ct3_unit).components.data,
608+
Geometry.UVVector.(
609+
adjoint.(ρ_flux_uₕ) .* surface_ct3_unit
610+
).components.data,
602611
component,
603612
)
604613
end
@@ -1347,10 +1356,11 @@ function compute_husv!(
13471356
cache.precomputed.ᶜts,
13481357
)
13491358
else
1350-
out .= TD.vapor_specific_humidity.(
1351-
CAP.thermodynamics_params(cache.params),
1352-
cache.precomputed.ᶜts,
1353-
)
1359+
out .=
1360+
TD.vapor_specific_humidity.(
1361+
CAP.thermodynamics_params(cache.params),
1362+
cache.precomputed.ᶜts,
1363+
)
13541364
end
13551365
end
13561366

@@ -1482,14 +1492,15 @@ function compute_cape!(out, state, cache, time)
14821492
lazy.(TD.liquid_ice_pottemp.(thermo_params, surface_thermal_state))
14831493

14841494
# Create parcel thermodynamic states at each level based on energy & moisture at surface
1485-
parcel_ts_moist = lazy.(
1486-
TD.PhaseEquil_pθq.(
1487-
thermo_params,
1488-
cache.precomputed.ᶜp,
1489-
surface_θ_liq_ice,
1490-
surface_q,
1491-
),
1492-
)
1495+
parcel_ts_moist =
1496+
lazy.(
1497+
TD.PhaseEquil_pθq.(
1498+
thermo_params,
1499+
cache.precomputed.ᶜp,
1500+
surface_θ_liq_ice,
1501+
surface_q,
1502+
),
1503+
)
14931504

14941505
# Calculate virtual temperatures for parcel & environment
14951506
parcel_Tv = lazy.(TD.virtual_temperature.(thermo_params, parcel_ts_moist))
@@ -1503,7 +1514,8 @@ function compute_cape!(out, state, cache, time)
15031514
# restrict to tropospheric buoyancy (generously below 20km) TODO: integrate from LFC to LNB
15041515
FT = Spaces.undertype(axes(ᶜbuoyancy))
15051516
ᶜbuoyancy .=
1506-
ᶜbuoyancy .* ifelse.(
1517+
ᶜbuoyancy .*
1518+
ifelse.(
15071519
Fields.coordinate_field(state.c.ρ).z .< FT(20000.0),
15081520
FT(1.0),
15091521
FT(0.0),

src/initial_conditions/initial_conditions.jl

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -398,11 +398,12 @@ function overwrite_initial_conditions!(
398398
Y.c.ρ .= TD.air_density.(thermo_params, ᶜts)
399399
# Velocity is first assigned on cell-centers and then interpolated onto
400400
# cell faces.
401-
vel = Geometry.UVWVector.(
402-
SpaceVaryingInputs.SpaceVaryingInput(file_path, "u", center_space),
403-
SpaceVaryingInputs.SpaceVaryingInput(file_path, "v", center_space),
404-
SpaceVaryingInputs.SpaceVaryingInput(file_path, "w", center_space),
405-
)
401+
vel =
402+
Geometry.UVWVector.(
403+
SpaceVaryingInputs.SpaceVaryingInput(file_path, "u", center_space),
404+
SpaceVaryingInputs.SpaceVaryingInput(file_path, "v", center_space),
405+
SpaceVaryingInputs.SpaceVaryingInput(file_path, "w", center_space),
406+
)
406407
Y.c.uₕ .= C12.(Geometry.UVVector.(vel))
407408
Y.f.u₃ .= ᶠinterp.(C3.(Geometry.WVector.(vel)))
408409
e_kin = similar(ᶜT)
@@ -1270,12 +1271,12 @@ function (initial_condition::GCMDriven)(params)
12701271
return LocalState(;
12711272
params,
12721273
geometry = local_geometry,
1273-
thermo_state = ts = TD.PhaseEquil_ρTq(
1274+
thermo_state = ts = TD.PhaseEquil_ρTq(
12741275
thermo_params,
12751276
FT(ρ₀(z)),
12761277
FT(T(z)),
12771278
FT(q_tot(z)),
1278-
) ,
1279+
),
12791280
velocity = Geometry.UVVector(FT(u(z)), FT(v(z))),
12801281
turbconv_state = EDMFState(; tke = FT(0)),
12811282
)
@@ -1326,12 +1327,12 @@ function (initial_condition::InterpolatedColumnProfile)(params)
13261327
return LocalState(;
13271328
params,
13281329
geometry = local_geometry,
1329-
thermo_state = ts = TD.PhaseEquil_ρTq(
1330+
thermo_state = ts = TD.PhaseEquil_ρTq(
13301331
thermo_params,
13311332
FT(ρ₀(z)),
13321333
FT(T(z)),
13331334
FT(q_tot(z)),
1334-
) ,
1335+
),
13351336
velocity = Geometry.UVVector(FT(u(z)), FT(v(z))),
13361337
turbconv_state = EDMFState(; tke = FT(0)),
13371338
)

src/parameterized_tendencies/microphysics/microphysics_wrappers.jl

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -405,16 +405,29 @@ function compute_warm_precipitation_sources_2M!(
405405

406406
# auto-conversion (mass)
407407
@. Sᵖ = triangle_inequality_limiter(
408-
CM2.autoconversion(mp.sb.acnv, mp.sb.pdf_c, qₗ, qᵣ, ρ, ρ * nₗ).dq_rai_dt,
408+
CM2.autoconversion(
409+
mp.sb.acnv,
410+
mp.sb.pdf_c,
411+
qₗ,
412+
qᵣ,
413+
ρ,
414+
ρ * nₗ,
415+
).dq_rai_dt,
409416
limit(qₗ, dt, 5),
410417
)
411418
@. Sqₗᵖ -= Sᵖ
412419
@. Sqᵣᵖ += Sᵖ
413420

414421
# auto-conversion (number) and liquid self-collection
415422
@. Sᵖ = triangle_inequality_limiter(
416-
CM2.autoconversion(mp.sb.acnv, mp.sb.pdf_c, qₗ, qᵣ, ρ, ρ * nₗ).dN_liq_dt /
417-
ρ,
423+
CM2.autoconversion(
424+
mp.sb.acnv,
425+
mp.sb.pdf_c,
426+
qₗ,
427+
qᵣ,
428+
ρ,
429+
ρ * nₗ,
430+
).dN_liq_dt / ρ,
418431
limit(nₗ, dt, 10),
419432
)
420433
@. S₂ᵖ =
@@ -424,7 +437,7 @@ function compute_warm_precipitation_sources_2M!(
424437
)
425438
@. Snₗᵖ += Sᵖ
426439
@. Snₗᵖ += S₂ᵖ
427-
@. Snᵣᵖ -= 0.5*Sᵖ
440+
@. Snᵣᵖ -= 0.5 * Sᵖ
428441

429442
# rain self-collection and breakup
430443
@. Sᵖ =

0 commit comments

Comments
 (0)