From d8bf3039a4d456c5b29eda43b6e8c12c5d8f1536 Mon Sep 17 00:00:00 2001 From: Zhaoyi Shen <11598433+szy21@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:57:15 -0700 Subject: [PATCH] use a higher model top --- config/model_configs/diagnostic_edmfx_aquaplanet.yml | 9 ++++++--- .../diagnostic_edmfx_aquaplanet_gpu.yml | 6 ++++-- config/model_configs/prognostic_edmfx_aquaplanet.yml | 10 +++++++--- .../single_column_hydrostatic_balance_ft64.yml | 3 ++- ...radiative_equilibrium_allsky_idealized_clouds.yml | 6 +++--- .../single_column_radiative_equilibrium_clearsky.yml | 6 +++--- ..._equilibrium_clearsky_prognostic_surface_temp.yml | 7 +++---- .../single_column_radiative_equilibrium_gray.yml | 6 +++--- ...oe_equilmoist_allsky_gw_raw_zonallyasymmetric.yml | 6 +++--- ...here_aquaplanet_rhoe_equilmoist_allsky_gw_res.yml | 8 ++++---- .../sphere_aquaplanet_rhoe_nonequilmoist_allsky.yml | 8 ++++---- ...re_held_suarez_rhoe_equilmoist_hightop_sponge.yml | 12 ++++++------ .../sphere_held_suarez_rhoe_hightop.yml | 8 +++++--- src/cache/tracer_cache.jl | 3 +++ toml/diagnostic_edmfx.toml | 3 +++ toml/prognostic_edmfx.toml | 3 +++ toml/sphere_held_suarez.toml | 6 ++++++ ...e_held_suarez_rhoe_equilmoist_hightop_sponge.toml | 6 ------ 18 files changed, 68 insertions(+), 48 deletions(-) create mode 100644 toml/sphere_held_suarez.toml delete mode 100644 toml/sphere_held_suarez_rhoe_equilmoist_hightop_sponge.toml diff --git a/config/model_configs/diagnostic_edmfx_aquaplanet.yml b/config/model_configs/diagnostic_edmfx_aquaplanet.yml index bbfb7c149a6..45f9791c1dd 100644 --- a/config/model_configs/diagnostic_edmfx_aquaplanet.yml +++ b/config/model_configs/diagnostic_edmfx_aquaplanet.yml @@ -1,3 +1,7 @@ +z_max: 75000.0 +z_elem: 31 +dz_bottom: 50.0 +rayleigh_sponge: true surface_setup: DefaultMoninObukhov rad: clearsky turbconv: diagnostic_edmfx @@ -13,9 +17,8 @@ edmfx_sgs_diffusive_flux: true moist: equil cloud_model: "quadrature_sgs" precip_model: 1M -dt: 100secs -t_end: 12hours -dt_save_state_to_disk: 12hours +dt: 120secs +t_end: 3hours regression_test: true toml: [toml/diagnostic_edmfx.toml] ode_algo: ARS343 diff --git a/config/model_configs/diagnostic_edmfx_aquaplanet_gpu.yml b/config/model_configs/diagnostic_edmfx_aquaplanet_gpu.yml index f311520ea3d..f02270058fb 100644 --- a/config/model_configs/diagnostic_edmfx_aquaplanet_gpu.yml +++ b/config/model_configs/diagnostic_edmfx_aquaplanet_gpu.yml @@ -1,3 +1,6 @@ +z_max: 75000.0 +z_elem: 31 +dz_bottom: 50.0 surface_setup: DefaultMoninObukhov rad: clearsky turbconv: diagnostic_edmfx @@ -13,8 +16,7 @@ edmfx_sgs_diffusive_flux: true moist: equil cloud_model: "quadrature_sgs" precip_model: 1M -dt: 100secs +dt: 120secs t_end: 12hours -dt_save_state_to_disk: 12hours toml: [toml/diagnostic_edmfx.toml] ode_algo: ARS343 diff --git a/config/model_configs/prognostic_edmfx_aquaplanet.yml b/config/model_configs/prognostic_edmfx_aquaplanet.yml index 55268833026..2c99228d592 100644 --- a/config/model_configs/prognostic_edmfx_aquaplanet.yml +++ b/config/model_configs/prognostic_edmfx_aquaplanet.yml @@ -1,3 +1,7 @@ +z_max: 75000.0 +z_elem: 31 +dz_bottom: 50.0 +rayleigh_sponge: true surface_setup: DefaultMoninObukhov rad: clearsky turbconv: prognostic_edmfx @@ -13,15 +17,15 @@ moist: equil cloud_model: "quadrature_sgs" precip_model: 1M dt: 10secs -t_end: 1hours +t_end: 1800secs dt_save_state_to_disk: 600secs toml: [toml/prognostic_edmfx.toml] output_default_diagnostics: false diagnostics: - short_name: [ts, ta, thetaa, ha, pfull, rhoa, ua, va, wa, hfes, hur, hus, cl, clw, cli, evspsbl, pr, rsd, rsu, rld, rlu] reduction_time: average - period: 1hours + period: 1800secs - short_name: [arup, waup, taup, thetaaup, haup, husup, hurup, clwup, cliup, waen, tke, lmix] reduction_time: average - period: 1hours + period: 1800secs ode_algo: ARS343 diff --git a/config/model_configs/single_column_hydrostatic_balance_ft64.yml b/config/model_configs/single_column_hydrostatic_balance_ft64.yml index 225a48d0600..9413a32114e 100644 --- a/config/model_configs/single_column_hydrostatic_balance_ft64.yml +++ b/config/model_configs/single_column_hydrostatic_balance_ft64.yml @@ -1,9 +1,10 @@ +z_max: 75000.0 +z_elem: 63 dz_bottom: 30.0 dt_save_state_to_disk: "5days" initial_condition: "IsothermalProfile" config: "column" hyperdiff: false -z_elem: 45 dt: "3hours" FLOAT_TYPE: "Float64" dt_save_to_sol: "3hours" diff --git a/config/model_configs/single_column_radiative_equilibrium_allsky_idealized_clouds.yml b/config/model_configs/single_column_radiative_equilibrium_allsky_idealized_clouds.yml index 10d5bc77b17..6eb27c4e967 100644 --- a/config/model_configs/single_column_radiative_equilibrium_allsky_idealized_clouds.yml +++ b/config/model_configs/single_column_radiative_equilibrium_allsky_idealized_clouds.yml @@ -1,16 +1,16 @@ +z_max: 75000.0 +z_elem: 63 +dz_bottom: 30.0 dt_save_state_to_disk: "100days" initial_condition: "IsothermalProfile" hyperdiff: false -z_elem: 63 dt: "3hours" dt_rad: "3hours" idealized_h2o: true t_end: "654days" idealized_clouds: true -dz_bottom: 30.0 config: "column" insolation: "timevarying" -z_max: 70000.0 dt_save_to_sol: "30hours" rad: "allskywithclear" diagnostics: diff --git a/config/model_configs/single_column_radiative_equilibrium_clearsky.yml b/config/model_configs/single_column_radiative_equilibrium_clearsky.yml index f8b197d8060..5a10c450c94 100644 --- a/config/model_configs/single_column_radiative_equilibrium_clearsky.yml +++ b/config/model_configs/single_column_radiative_equilibrium_clearsky.yml @@ -1,13 +1,13 @@ +z_max: 75000.0 +z_elem: 63 +dz_bottom: 30.0 dt_save_state_to_disk: "100days" initial_condition: "IsothermalProfile" hyperdiff: false -z_elem: 63 dt: "3hours" dt_rad: "3hours" idealized_h2o: true t_end: "654days" -dz_bottom: 30.0 config: "column" -z_max: 70000.0 dt_save_to_sol: "30hours" rad: "clearsky" diff --git a/config/model_configs/single_column_radiative_equilibrium_clearsky_prognostic_surface_temp.yml b/config/model_configs/single_column_radiative_equilibrium_clearsky_prognostic_surface_temp.yml index e49d6ec462f..97aa564b7b2 100644 --- a/config/model_configs/single_column_radiative_equilibrium_clearsky_prognostic_surface_temp.yml +++ b/config/model_configs/single_column_radiative_equilibrium_clearsky_prognostic_surface_temp.yml @@ -1,12 +1,11 @@ - +z_max: 75000.0 +z_elem: 63 +dz_bottom: 30.0 rad: "clearsky" idealized_h2o: true hyperdiff: false config: "column" initial_condition: "IsothermalProfile" -z_max: 70000 -z_elem: 63 -dz_bottom: 30 t_end: "654days" dt: "3hours" dt_rad: "3hours" diff --git a/config/model_configs/single_column_radiative_equilibrium_gray.yml b/config/model_configs/single_column_radiative_equilibrium_gray.yml index 02b096b8fa9..7e535965d1b 100644 --- a/config/model_configs/single_column_radiative_equilibrium_gray.yml +++ b/config/model_configs/single_column_radiative_equilibrium_gray.yml @@ -1,15 +1,15 @@ dt_save_state_to_disk: "3months" initial_condition: "IsothermalProfile" hyperdiff: false -# It seems radiative equilibrium needs a larger dz near the top -# to be stable, so we use a smaller z_elem +# It seems radiative equilibrium needs a lower top and a larger dz +# near the top (smaller z_elem) to be stable +z_max: 70000.0 z_elem: 50 dt: "3hours" dt_rad: "3hours" t_end: "654days" dz_bottom: 30.0 config: "column" -z_max: 70000.0 dt_save_to_sol: "30hours" rad: "gray" # [2, 2, 80] instead of [1, 1, 80] because Julia ranges are inclusive of the diff --git a/config/model_configs/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_raw_zonallyasymmetric.yml b/config/model_configs/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_raw_zonallyasymmetric.yml index 65097acad14..cd2b7a93e54 100644 --- a/config/model_configs/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_raw_zonallyasymmetric.yml +++ b/config/model_configs/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_raw_zonallyasymmetric.yml @@ -1,16 +1,16 @@ +z_max: 75000.0 +z_elem: 31 +dz_bottom: 50.0 rad: "allskywithclear" dt_save_state_to_disk: "1days" rayleigh_sponge: true orographic_gravity_wave: "raw_topo" -z_elem: 25 dt: "400secs" surface_setup: "DefaultMoninObukhov" t_end: "15hours" non_orographic_gravity_wave: true -dz_bottom: 300.0 vert_diff: true insolation: "timevarying" -z_max: 55000.0 precip_model: "0M" cloud_model: "grid_scale" surface_temperature: "ZonallyAsymmetric" diff --git a/config/model_configs/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_res.yml b/config/model_configs/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_res.yml index 3ced2aaf4f2..6bfe271b73e 100644 --- a/config/model_configs/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_res.yml +++ b/config/model_configs/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_res.yml @@ -1,6 +1,6 @@ -z_elem: 25 -z_max: 55000.0 -dz_bottom: 300.0 +z_max: 75000.0 +z_elem: 31 +dz_bottom: 50.0 dt: "400secs" t_end: "1days" dt_save_state_to_disk: "24hours" @@ -18,7 +18,7 @@ orographic_gravity_wave: "gfdl_restart" surface_setup: "DefaultMoninObukhov" prescribe_ozone: true prescribed_aerosols: ["CB1", "CB2", "SO4"] -toml: [toml/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_res.toml] +toml: [toml/sphere_held_suarez.toml] diagnostics: - short_name: [edt, evu, mmrso4, mmrbcpo, mmrbcpi, o3] reduction_time: average diff --git a/config/model_configs/sphere_aquaplanet_rhoe_nonequilmoist_allsky.yml b/config/model_configs/sphere_aquaplanet_rhoe_nonequilmoist_allsky.yml index 1fed54c9c3e..c5bb4fd7c08 100644 --- a/config/model_configs/sphere_aquaplanet_rhoe_nonequilmoist_allsky.yml +++ b/config/model_configs/sphere_aquaplanet_rhoe_nonequilmoist_allsky.yml @@ -1,6 +1,6 @@ -z_elem: 25 -z_max: 55000.0 -dz_bottom: 300.0 +z_max: 75000.0 +z_elem: 31 +dz_bottom: 50.0 dt: "400secs" t_end: "18hours" dt_save_state_to_disk: "18hours" @@ -14,4 +14,4 @@ rad: "allskywithclear" insolation: "timevarying" rayleigh_sponge: true surface_setup: "DefaultMoninObukhov" -toml: [toml/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_res.toml] +toml: [toml/sphere_held_suarez.toml] diff --git a/config/model_configs/sphere_held_suarez_rhoe_equilmoist_hightop_sponge.yml b/config/model_configs/sphere_held_suarez_rhoe_equilmoist_hightop_sponge.yml index 685851fb0a7..fcf5ebc21da 100644 --- a/config/model_configs/sphere_held_suarez_rhoe_equilmoist_hightop_sponge.yml +++ b/config/model_configs/sphere_held_suarez_rhoe_equilmoist_hightop_sponge.yml @@ -1,14 +1,14 @@ +z_max: 75000.0 +z_elem: 31 +dz_bottom: 50.0 dt_save_state_to_disk: "4days" -rayleigh_sponge: true -dt: "450secs" -z_elem: 25 +dt: "400secs" t_end: "4days" -dz_bottom: 300.0 vert_diff: true forcing: "held_suarez" -z_max: 55000.0 precip_model: "0M" regression_test: true +rayleigh_sponge: true viscous_sponge: true moist: "equil" -toml: [toml/sphere_held_suarez_rhoe_equilmoist_hightop_sponge.toml] +toml: [toml/sphere_held_suarez.toml] diff --git a/config/model_configs/sphere_held_suarez_rhoe_hightop.yml b/config/model_configs/sphere_held_suarez_rhoe_hightop.yml index 6e9f232f5b5..1913a3affea 100644 --- a/config/model_configs/sphere_held_suarez_rhoe_hightop.yml +++ b/config/model_configs/sphere_held_suarez_rhoe_hightop.yml @@ -1,8 +1,10 @@ -dz_bottom: 300.0 +z_max: 75000.0 +z_elem: 31 +dz_bottom: 50.0 dt_save_state_to_disk: "4days" t_end: "8days" forcing: "held_suarez" dt: "400secs" -z_elem: 25 deep_atmosphere: true -z_max: 55000.0 +rayleigh_sponge: true +toml: [toml/sphere_held_suarez.toml] diff --git a/src/cache/tracer_cache.jl b/src/cache/tracer_cache.jl index 4b57ab75890..e03d8d714dc 100644 --- a/src/cache/tracer_cache.jl +++ b/src/cache/tracer_cache.jl @@ -2,6 +2,7 @@ using ClimaUtilities.ClimaArtifacts import Dates: Year import ClimaUtilities.TimeVaryingInputs: TimeVaryingInput, LinearPeriodFillingInterpolation +import Interpolations as Intp function tracer_cache( Y, @@ -47,6 +48,7 @@ function tracer_cache( # time series of lon-lat-z data. prescribed_aerosol_names_as_symbols = Symbol.(prescribed_aerosol_names) target_space = axes(Y.c) + extrapolation_bc = (Intp.Periodic(), Intp.Flat(), Intp.Flat()) timevaryinginputs = [ TimeVaryingInput( joinpath( @@ -60,6 +62,7 @@ function tracer_cache( target_space; reference_date = start_date, regridder_type = :InterpolationsRegridder, + regridder_kwargs = (; extrapolation_bc), method = LinearPeriodFillingInterpolation(Year(1)), ) for name in prescribed_aerosol_names ] diff --git a/toml/diagnostic_edmfx.toml b/toml/diagnostic_edmfx.toml index 41c7c570941..4e415a01fb7 100644 --- a/toml/diagnostic_edmfx.toml +++ b/toml/diagnostic_edmfx.toml @@ -1,3 +1,6 @@ +[zd_rayleigh] +value = 50000.0 + [entr_inv_tau] value = 0.002 diff --git a/toml/prognostic_edmfx.toml b/toml/prognostic_edmfx.toml index 654a543e810..9ba0a563786 100644 --- a/toml/prognostic_edmfx.toml +++ b/toml/prognostic_edmfx.toml @@ -22,6 +22,9 @@ value = 0 [detr_coeff] value = 0 +[zd_rayleigh] +value = 50000.0 + [detr_buoy_coeff] value = 0 diff --git a/toml/sphere_held_suarez.toml b/toml/sphere_held_suarez.toml new file mode 100644 index 00000000000..46b16eedac7 --- /dev/null +++ b/toml/sphere_held_suarez.toml @@ -0,0 +1,6 @@ +[zd_viscous] +value = 50000.0 + +[zd_rayleigh] +value = 50000.0 + diff --git a/toml/sphere_held_suarez_rhoe_equilmoist_hightop_sponge.toml b/toml/sphere_held_suarez_rhoe_equilmoist_hightop_sponge.toml deleted file mode 100644 index cda298c6791..00000000000 --- a/toml/sphere_held_suarez_rhoe_equilmoist_hightop_sponge.toml +++ /dev/null @@ -1,6 +0,0 @@ -[zd_viscous] -value = 30000.0 - -[zd_rayleigh] -value = 30000.0 -