Skip to content

Commit

Permalink
rev
Browse files Browse the repository at this point in the history
  • Loading branch information
LenkaNovak committed Jun 23, 2023
1 parent b3304e0 commit 43cfcf1
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 18 deletions.
14 changes: 7 additions & 7 deletions .buildkite/longruns/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ steps:

- label: "Moist earth with slab surface - notmono + modular: bulk gray no_sponge idealinsol freq_dt_cpl"
key: "slabplanet"
command: "julia --color=yes --project=experiments/AMIP/modular/ experiments/AMIP/modular/coupler_driver_modular.jl --run_name default_modular_long --enable_threading true --coupled true --surface_scheme bulk --moist equil --vert_diff true --rad gray --energy_check true --anim true --mode_name slabplanet --t_end 10days --dt_save_to_sol 1days --dt_cpl 200 --dt 200secs --mono_surface false --h_elem 4 --precip_model 0M"
command: "julia --color=yes --project=experiments/AMIP/modular/ experiments/AMIP/modular/coupler_driver_modular.jl --run_name default_modular_long --enable_threading true --coupled true --moist equil --vert_diff true --rad gray --energy_check true --anim true --mode_name slabplanet --t_end 10days --dt_save_to_sol 1days --dt_cpl 200 --dt 200secs --mono_surface false --h_elem 4 --precip_model 0M"
artifact_paths: "experiments/AMIP/modular/output/slabplanet/default_modular_long_artifacts/total_energy*.png"
env:
BUILD_HISTORY_HANDLE: ""
Expand All @@ -66,7 +66,7 @@ steps:

- label: "MPI AMIP FINE: longrun"
key: "amip_longrun"
command: "mpiexec julia --color=yes --project=experiments/AMIP/modular/ experiments/AMIP/modular/coupler_driver_modular.jl --run_name target_amip_n64_longrun --enable_threading true --coupled true --surface_scheme monin_obukhov --moist equil --vert_diff true --rad gray --z_elem 50 --dz_top 3000 --dz_bottom 30 --h_elem 16 --kappa_4 1e16 --z_stretch false --rayleigh_sponge true --alpha_rayleigh_uh 0 --alpha_rayleigh_w 10 --dt_cpl 150 --dt 150secs --dt_rad 1hours --FLOAT_TYPE Float64 --energy_check false --mode_name amip --t_end 180days --dt_save_to_sol 10days --mono_surface false --precip_model 0M"
command: "mpiexec julia --color=yes --project=experiments/AMIP/modular/ experiments/AMIP/modular/coupler_driver_modular.jl --run_name target_amip_n64_longrun --enable_threading true --coupled true --moist equil --vert_diff true --rad gray --z_elem 50 --dz_top 3000 --dz_bottom 30 --h_elem 16 --kappa_4 1e16 --z_stretch false --rayleigh_sponge true --alpha_rayleigh_uh 0 --alpha_rayleigh_w 10 --dt_cpl 150 --dt 150secs --dt_rad 1hours --FLOAT_TYPE Float64 --energy_check false --mode_name amip --t_end 180days --dt_save_to_sol 10days --mono_surface false --precip_model 0M"
artifact_paths: "experiments/AMIP/modular/output/amip/target_amip_n64_longrun_artifacts/*"
env:
CLIMACORE_DISTRIBUTED: "MPI"
Expand All @@ -78,7 +78,7 @@ steps:
# MPI performance scaling (10 days)
- label: "MPI AMIP FINE: n64"
key: "mpi_amip_fine_n64"
command: "mpiexec julia --color=yes --project=experiments/AMIP/moist_mpi_earth/ experiments/AMIP/moist_mpi_earth/coupler_driver.jl --run_name target_amip_n64_shortrun --coupled true --surface_scheme monin_obukhov --moist equil --vert_diff true --rad gray --z_elem 50 --dz_top 3000 --dz_bottom 30 --h_elem 16 --kappa_4 1e16 --z_stretch false --rayleigh_sponge true --alpha_rayleigh_uh 0 --alpha_rayleigh_w 10 --dt_cpl 150 --dt 150secs --dt_rad 1hours --FLOAT_TYPE Float64 --energy_check false --mode_name amip --t_end 10days --dt_save_to_sol 100days --mono_surface false --precip_model 0M"
command: "mpiexec julia --color=yes --project=experiments/AMIP/moist_mpi_earth/ experiments/AMIP/moist_mpi_earth/coupler_driver.jl --run_name target_amip_n64_shortrun --coupled true --moist equil --vert_diff true --rad gray --z_elem 50 --dz_top 3000 --dz_bottom 30 --h_elem 16 --kappa_4 1e16 --z_stretch false --rayleigh_sponge true --alpha_rayleigh_uh 0 --alpha_rayleigh_w 10 --dt_cpl 150 --dt 150secs --dt_rad 1hours --FLOAT_TYPE Float64 --energy_check false --mode_name amip --t_end 10days --dt_save_to_sol 100days --mono_surface false --precip_model 0M"
artifact_paths: "experiments/AMIP/moist_mpi_earth/output/amip/target_amip_n64_shortrun_artifacts/*"
env:
CLIMACORE_DISTRIBUTED: "MPI"
Expand All @@ -90,7 +90,7 @@ steps:

- label: "MPI AMIP FINE: n32"
key: "mpi_amip_fine_n32"
command: "mpiexec julia --color=yes --project=experiments/AMIP/moist_mpi_earth/ experiments/AMIP/moist_mpi_earth/coupler_driver.jl --run_name target_amip_n32_shortrun --coupled true --surface_scheme monin_obukhov --moist equil --vert_diff true --rad gray --z_elem 50 --dz_top 3000 --dz_bottom 30 --h_elem 16 --kappa_4 1e16 --z_stretch false --rayleigh_sponge true --alpha_rayleigh_uh 0 --alpha_rayleigh_w 10 --dt_cpl 150 --dt 150secs --dt_rad 1hours --FLOAT_TYPE Float64 --energy_check false --mode_name amip --t_end 10days --dt_save_to_sol 100days --mono_surface false --precip_model 0M"
command: "mpiexec julia --color=yes --project=experiments/AMIP/moist_mpi_earth/ experiments/AMIP/moist_mpi_earth/coupler_driver.jl --run_name target_amip_n32_shortrun --coupled true --moist equil --vert_diff true --rad gray --z_elem 50 --dz_top 3000 --dz_bottom 30 --h_elem 16 --kappa_4 1e16 --z_stretch false --rayleigh_sponge true --alpha_rayleigh_uh 0 --alpha_rayleigh_w 10 --dt_cpl 150 --dt 150secs --dt_rad 1hours --FLOAT_TYPE Float64 --energy_check false --mode_name amip --t_end 10days --dt_save_to_sol 100days --mono_surface false --precip_model 0M"
artifact_paths: "experiments/AMIP/moist_mpi_earth/output/amip/target_amip_n32_shortrun_artifacts/*"
env:
CLIMACORE_DISTRIBUTED: "MPI"
Expand All @@ -102,7 +102,7 @@ steps:

- label: "MPI AMIP FINE: n8"
key: "mpi_amip_fine_n8"
command: "mpiexec julia --color=yes --project=experiments/AMIP/moist_mpi_earth/ experiments/AMIP/moist_mpi_earth/coupler_driver.jl --run_name target_amip_n8_shortrun --coupled true --surface_scheme monin_obukhov --moist equil --vert_diff true --rad gray --z_elem 50 --dz_top 3000 --dz_bottom 30 --h_elem 16 --kappa_4 1e16 --z_stretch false --rayleigh_sponge true --alpha_rayleigh_uh 0 --alpha_rayleigh_w 10 --dt_cpl 150 --dt 150secs --dt_rad 1hours --FLOAT_TYPE Float64 --energy_check false --mode_name amip --t_end 10days --dt_save_to_sol 100days --mono_surface false --precip_model 0M"
command: "mpiexec julia --color=yes --project=experiments/AMIP/moist_mpi_earth/ experiments/AMIP/moist_mpi_earth/coupler_driver.jl --run_name target_amip_n8_shortrun --coupled true --moist equil --vert_diff true --rad gray --z_elem 50 --dz_top 3000 --dz_bottom 30 --h_elem 16 --kappa_4 1e16 --z_stretch false --rayleigh_sponge true --alpha_rayleigh_uh 0 --alpha_rayleigh_w 10 --dt_cpl 150 --dt 150secs --dt_rad 1hours --FLOAT_TYPE Float64 --energy_check false --mode_name amip --t_end 10days --dt_save_to_sol 100days --mono_surface false --precip_model 0M"
artifact_paths: "experiments/AMIP/moist_mpi_earth/output/amip/target_amip_n8_shortrun_artifacts/*"
env:
CLIMACORE_DISTRIBUTED: "MPI"
Expand All @@ -114,7 +114,7 @@ steps:

- label: "MPI AMIP FINE: n2"
key: "mpi_amip_fine_n2"
command: "mpiexec julia --color=yes --project=experiments/AMIP/moist_mpi_earth/ experiments/AMIP/moist_mpi_earth/coupler_driver.jl --run_name target_amip_n2_shortrun --coupled true --surface_scheme monin_obukhov --moist equil --vert_diff true --rad gray --z_elem 50 --dz_top 3000 --dz_bottom 30 --h_elem 16 --kappa_4 1e16 --z_stretch false --rayleigh_sponge true --alpha_rayleigh_uh 0 --alpha_rayleigh_w 10 --dt_cpl 150 --dt 150secs --dt_rad 1hours --FLOAT_TYPE Float64 --energy_check false --mode_name amip --t_end 10days --dt_save_to_sol 100days --mono_surface false --precip_model 0M"
command: "mpiexec julia --color=yes --project=experiments/AMIP/moist_mpi_earth/ experiments/AMIP/moist_mpi_earth/coupler_driver.jl --run_name target_amip_n2_shortrun --coupled true --moist equil --vert_diff true --rad gray --z_elem 50 --dz_top 3000 --dz_bottom 30 --h_elem 16 --kappa_4 1e16 --z_stretch false --rayleigh_sponge true --alpha_rayleigh_uh 0 --alpha_rayleigh_w 10 --dt_cpl 150 --dt 150secs --dt_rad 1hours --FLOAT_TYPE Float64 --energy_check false --mode_name amip --t_end 10days --dt_save_to_sol 100days --mono_surface false --precip_model 0M"
artifact_paths: "experiments/AMIP/moist_mpi_earth/output/amip/target_amip_n2_shortrun_artifacts/*"
env:
CLIMACORE_DISTRIBUTED: "MPI"
Expand All @@ -126,7 +126,7 @@ steps:

- label: "Unthreaded AMIP FINE" # also reported by longruns with a flame graph
key: "unthreaded_amip_fine"
command: "julia --color=yes --project=experiments/AMIP/modular/ experiments/AMIP/modular/coupler_driver_modular.jl --run_name target_amip_n1_shortrun --enable_threading false --coupled true --surface_scheme monin_obukhov --moist equil --vert_diff true --rad gray --z_elem 50 --dz_top 3000 --dz_bottom 30 --h_elem 16 --kappa_4 1e16 --z_stretch false --rayleigh_sponge true --alpha_rayleigh_uh 0 --alpha_rayleigh_w 10 --dt_cpl 150 --dt 150secs --dt_rad 1hours --FLOAT_TYPE Float64 --energy_check false --mode_name amip --t_end 10days --dt_save_to_sol 100days --mono_surface false --precip_model 0M"
command: "julia --color=yes --project=experiments/AMIP/modular/ experiments/AMIP/modular/coupler_driver_modular.jl --run_name target_amip_n1_shortrun --enable_threading false --coupled true --moist equil --vert_diff true --rad gray --z_elem 50 --dz_top 3000 --dz_bottom 30 --h_elem 16 --kappa_4 1e16 --z_stretch false --rayleigh_sponge true --alpha_rayleigh_uh 0 --alpha_rayleigh_w 10 --dt_cpl 150 --dt 150secs --dt_rad 1hours --FLOAT_TYPE Float64 --energy_check false --mode_name amip --t_end 10days --dt_save_to_sol 100days --mono_surface false --precip_model 0M"
artifact_paths: "experiments/AMIP/modular/output/amip/target_amip_n1_shortrun_artifacts/*"
env:
BUILD_HISTORY_HANDLE: ""
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ steps:
slurm_mem: 20GB

- label: "AMIP - modular, Float32 test" # Issue #271
command: "julia --color=yes --project=experiments/AMIP/modular/ experiments/AMIP/modular/coupler_driver_modular.jl --run_name coarse_single_modular_ft32 --enable_threading true --coupled true --surface_setup PrescribedSurface --moist equil --vert_diff true --rad gray --energy_check false --mode_name amip --anim true --t_end 10days --dt_save_to_sol 100days --dt_cpl 200 --dt 200secs --mono_surface true --h_elem 6 --dt_save_restart 10days --precip_model 0M --job_id coarse_single_modular_ft32"
command: "julia --color=yes --project=experiments/AMIP/modular/ experiments/AMIP/modular/coupler_driver_modular.jl --run_name coarse_single_modular_ft32 --FLOAT_TYPE Float64 --enable_threading true --coupled true --surface_setup PrescribedSurface --moist equil --vert_diff true --rad gray --energy_check false --mode_name amip --anim true --t_end 10days --dt_save_to_sol 100days --dt_cpl 200 --dt 200secs --mono_surface true --h_elem 6 --dt_save_restart 10days --precip_model 0M --job_id coarse_single_modular_ft32"
artifact_paths: "experiments/AMIP/modular/output/amip/coarse_single_modular_ft32_artifacts/*"
agents:
slurm_ntasks: 1
Expand All @@ -238,7 +238,7 @@ steps:
# short high-res performance test
- label: "Unthreaded AMIP FINE" # also reported by longruns with a flame graph
key: "unthreaded_amip_fine"
command: "julia --color=yes --project=experiments/AMIP/modular/ experiments/AMIP/modular/coupler_driver_modular.jl --run_name target_amip_n1_shortrun --enable_threading false --coupled true --surface_setup PrescribedSurface --moist equil --vert_diff true --rad gray --z_elem 50 --dz_top 3000 --dz_bottom 30 --h_elem 16 --kappa_4 1e16 --z_stretch false --rayleigh_sponge true --alpha_rayleigh_uh 0 --alpha_rayleigh_w 10 --dt_cpl 150 --dt 150secs --dt_rad 1hours --FLOAT_TYPE Float64 --energy_check false --mode_name amip --t_end 0.01days --dt_save_to_sol 1days --mono_surface false --precip_model 0M --job_id target_amip_n1_shortrun"
command: "julia --color=yes --project=experiments/AMIP/modular/ experiments/AMIP/modular/coupler_driver_modular.jl --run_name target_amip_n1_shortrun --FLOAT_TYPE Float64 --enable_threading false --coupled true --surface_setup PrescribedSurface --moist equil --vert_diff true --rad gray --z_elem 50 --dz_top 3000 --dz_bottom 30 --h_elem 16 --kappa_4 1e16 --z_stretch false --rayleigh_sponge true --alpha_rayleigh_uh 0 --alpha_rayleigh_w 10 --dt_cpl 150 --dt 150secs --dt_rad 1hours --FLOAT_TYPE Float64 --energy_check false --mode_name amip --t_end 0.01days --dt_save_to_sol 1days --mono_surface false --precip_model 0M --job_id target_amip_n1_shortrun"
artifact_paths: "experiments/AMIP/modular/output/amip/target_amip_n1_shortrun_artifacts/*"
env:
BUILD_HISTORY_HANDLE: ""
Expand Down
8 changes: 4 additions & 4 deletions experiments/AMIP/modular/cli_options.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ function argparse_settings()
help = "Access land surface albedo information from data file"
arg_type = Bool
default = true
"--surface_setup"
help = "Surface flux scheme [`DefaultExchangeCoefficients` (default), `DefaultMoninObukhov`]"
arg_type = String
default = "PrescribedSurface"
"--coupled" # TODO - remove from Atmos
help = "Coupled simulation [`false` (default), `true`]"
arg_type = Bool
Expand Down Expand Up @@ -115,6 +111,10 @@ function argparse_settings()
help = "Vertical diffusion [`false` (default), `VerticalDiffusion`, `true` (defaults to `VerticalDiffusion`)]"
arg_type = String
default = "false"
"--surface_setup"
help = "Surface flux scheme [`DefaultExchangeCoefficients` (default), `DefaultMoninObukhov`]"
arg_type = String
default = "DefaultExchangeCoefficients"
"--surface_thermo_state_type"
help = "Surface thermo state type [`GCMSurfaceThermoState` (default), `PrescribedThermoState`]"
arg_type = String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,13 @@ function compute_atmos_turbulent_fluxes!(atmos_sim::ClimaAtmosSimulation, csf)

ClimaAtmos.SurfaceConditions.update_surface_conditions!(atmos_sim.integrator.u, new_p, atmos_sim.integrator.t)

p.sfc_conditions.ρ_flux_h_tot .= new_p.sfc_conditions.ρ_flux_h_tot
p.sfc_conditions.ρ_flux_q_tot .= new_p.sfc_conditions.ρ_flux_q_tot
p.sfc_conditions.ρ_flux_uₕ .= new_p.sfc_conditions.ρ_flux_uₕ
# p.sfc_conditions.ρ_flux_h_tot .= new_p.sfc_conditions.ρ_flux_h_tot
# p.sfc_conditions.ρ_flux_q_tot .= new_p.sfc_conditions.ρ_flux_q_tot
# p.sfc_conditions.ρ_flux_uₕ .= new_p.sfc_conditions.ρ_flux_uₕ
# p.sfc_conditions.ts .= new_p.sfc_conditions.ts
# p.sfc_conditions.buoyancy_flux .= new_p.sfc_conditions.buoyancy_flux
# p.sfc_conditions.obukhov_length .= new_p.sfc_conditions.obukhov_length

p.sfc_conditions .= new_p.sfc_conditions

end
4 changes: 2 additions & 2 deletions experiments/AMIP/modular/coupler_driver_modular.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ end
## modify parsed args for fast testing from REPL #hide
if isinteractive()
parsed_args["coupled"] = true #hide
parsed_args["surface_scheme"] = "monin_obukhov" #hide
parsed_args["surface_setup"] = "PrescribedSurface" #hide # necessary to stop Atmos from calculating its own surface fluxes
parsed_args["moist"] = "equil" #hide
parsed_args["vert_diff"] = true #hide
parsed_args["rad"] = "gray" #hide
Expand Down Expand Up @@ -390,7 +390,7 @@ parsed_args["ode_algo"] == "ARS343" ? step!(atmos_sim, Δt_cpl) : nothing
compute_combined_turbulent_fluxes!(cs.model_sims, cs.fields, turbulent_fluxes) # here computed using atmos functions
import_atmos_fields!(cs.fields, cs.model_sims, cs.boundary_space, turbulent_fluxes)
update_model_sims!(cs.model_sims, cs.fields, turbulent_fluxes)

dd=ddd
## reinitialize (TODO: avoid with interfaces)
reinit_model_sims!(cs.model_sims)

Expand Down

0 comments on commit 43cfcf1

Please sign in to comment.