From 4632f7b4cf456f74986e7289a6fd34aff6124716 Mon Sep 17 00:00:00 2001 From: akshaysridhar Date: Mon, 8 Apr 2024 07:56:16 -0700 Subject: [PATCH] modified: src/cache/cache.jl modified: src/surface_conditions/surface_conditions.jl --- src/cache/cache.jl | 4 --- src/surface_conditions/surface_conditions.jl | 28 -------------------- 2 files changed, 32 deletions(-) diff --git a/src/cache/cache.jl b/src/cache/cache.jl index a31c75f0ef..afecafa220 100644 --- a/src/cache/cache.jl +++ b/src/cache/cache.jl @@ -209,10 +209,6 @@ function build_cache(Y, atmos, params, surface_setup, sim_info, aerosol_names) precomputing_arguments = (; atmos, core, params, sfc_setup, precomputed, scratch, dt, SG_quad) - # Coupler compatibility - isnothing(precomputing_arguments.sfc_setup) && - SurfaceConditions.set_dummy_surface_conditions!(precomputing_arguments) - set_precomputed_quantities!(Y, precomputing_arguments, FT(0)) radiation_args = diff --git a/src/surface_conditions/surface_conditions.jl b/src/surface_conditions/surface_conditions.jl index 0981f2628b..e5927eaa4b 100644 --- a/src/surface_conditions/surface_conditions.jl +++ b/src/surface_conditions/surface_conditions.jl @@ -65,34 +65,6 @@ surface_state( t, ) = wrapped_sfc_setup(sfc_local_geometry_values.coordinates, int_z_values, t) -# This is a hack for meeting the August 7th deadline. It is to ensure that the -# coupler will be able to construct an integrator before overwriting its surface -# conditions, but without throwing an error during the computation of -# precomputed quantities for diagnostic EDMF due to uninitialized surface -# conditions. -# TODO: Refactor the surface conditions API to avoid needing to do this. -function set_dummy_surface_conditions!(p) - (; params, atmos) = p - (; sfc_conditions) = p.precomputed - FT = eltype(params) - thermo_params = CAP.thermodynamics_params(params) - @. sfc_conditions.ustar = FT(0.2) - @. sfc_conditions.obukhov_length = FT(1e-4) - @. sfc_conditions.buoyancy_flux = FT(0) - if atmos.moisture_model isa DryModel - @. sfc_conditions.ts = TD.PhaseDry_ρT(thermo_params, FT(1), FT(300)) - else - @. sfc_conditions.ts = TD.PhaseNonEquil_ρTq( - thermo_params, - FT(1), - FT(300), - TD.PhasePartition(FT(0)), - ) - @. sfc_conditions.ρ_flux_q_tot = C3(FT(0)) - end - @. sfc_conditions.ρ_flux_h_tot = C3(FT(0)) -end - """ set_surface_conditions!(p, surface_conditions, surface_ts)