Skip to content

Commit

Permalink
Update to Atmos v0.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nefrathenrici committed Feb 4, 2024
1 parent 7514bb9 commit 9f9117b
Show file tree
Hide file tree
Showing 15 changed files with 779 additions and 370 deletions.
4 changes: 1 addition & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"

[compat]
ClimaAtmos = "0.17"
ClimaComms = "0.5"
ClimaCore = "0.11"
ClimaAtmos = "0.20.0"
Distributions = "0.25"
EnsembleKalmanProcesses = "1"
JLD2 = "0.4"
Expand Down
610 changes: 268 additions & 342 deletions experiments/Manifest.toml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions experiments/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"

[extras]
CUDA_Runtime_jll = "76a88914-d11a-5bdc-97e0-2f5a05c973a2"
CUDA_Driver_jll = "4ee394cb-3365-5eb0-8335-949819d2adfc"
CUDA_Runtime_jll = "76a88914-d11a-5bdc-97e0-2f5a05c973a2"
MPIPreferences = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267"

[preferences.CUDA_Driver_jll]
compat = false

[preferences.CUDA_Runtime_jll]
version = "12.2"
local = "true"
version = "12.2"

[preferences.MPIPreferences]
_format = "1.0"
Expand Down
10 changes: 10 additions & 0 deletions experiments/common_env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Configure for Resnick HPCC
module load julia/1.10.0 cuda/12.2 ucx/1.14.1_cuda-12.2 openmpi/4.1.5_cuda-12.2 nsight-systems/2023.3.1
export OPENBLAS_NUM_THREADS=1
export OMPI_MCA_opal_warn_on_missing_libcuda=0
export JULIA_MAX_NUM_PRECOMPILE_FILES=100
export JULIA_CPU_TARGET="broadwell;skylake"
export JULIA_CUDA_MEMORY_POOL=none
export JULIA_MPI_HAS_CUDA="true"
export MPITRAMPOLINE_LIB=/groups/esm/software/MPIwrapper/ompi4.1.5_cuda-12.2/lib64/libmpiwrapper.so
export MPITRAMPOLINE_MPIEXEC=/groups/esm/software/MPIwrapper/ompi4.1.5_cuda-12.2/bin/mpiwrapperexec
4 changes: 2 additions & 2 deletions experiments/initialize.sbatch
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
experiment_id=$1

echo "Initializing calibration for experiment $experiment_id"
julia --project=experiments -e 'using Pkg; Pkg.instantiate(;verbose=true)'
julia --color=no --project=experiments -e 'using Pkg; Pkg.instantiate(;verbose=true)'

julia --project=experiments -e '
julia --color=no --project=experiments -e '
import CalibrateAtmos
CalibrateAtmos.initialize("'$experiment_id'")
'
Expand Down
2 changes: 1 addition & 1 deletion experiments/model_run.sbatch
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ member=$(printf "member_%03d" "$SLURM_ARRAY_TASK_ID")
output=output/$experiment_id/$format_i/$member/model_log.out

# Run the forward model
srun --output=$output julia --project=experiments -e "
srun --output=$output julia --color=no --project=experiments -e "
using ClimaComms
ClimaComms.init(ClimaComms.context())
import CalibrateAtmos
Expand Down
12 changes: 2 additions & 10 deletions experiments/pipeline.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
#!/bin/bash

# Configure for Resnick HPCC
module load julia/1.9.4 cuda/12.2 ucx/1.14.1_cuda-12.2 openmpi/4.1.5_cuda-12.2 nsight-systems/2023.3.1
export OPENBLAS_NUM_THREADS=1
export OMPI_MCA_opal_warn_on_missing_libcuda=0
export JULIA_MAX_NUM_PRECOMPILE_FILES=100
export JULIA_CPU_TARGET="broadwell;skylake"
export JULIA_CUDA_MEMORY_POOL=none
export JULIA_MPI_HAS_CUDA="true"
export MPITRAMPOLINE_LIB=/groups/esm/software/MPIwrapper/ompi4.1.5_cuda-12.2/lib64/libmpiwrapper.so
export MPITRAMPOLINE_MPIEXEC=/groups/esm/software/MPIwrapper/ompi4.1.5_cuda-12.2/bin/mpiwrapperexec
# Configure the environment
source experiments/common_env.sh

# Parse command line
experiment_id=${1?Error: no experiment ID given}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
dt: 500secs
t_end: 560days
ode_algo: ARS343
dt_save_to_disk: 50days
moist: equil
forcing: held_suarez
precip_model: 0M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
#SBATCH --cpus-per-task=8
#SBATCH --output="experiments/sphere_held_suarez_rhoe_equilmoist/truth_simulation/model_log.out"

module load julia/1.9.3 cuda/12.2 ucx/1.14.1_cuda-12.2 openmpi/4.1.5_cuda-12.2 hdf5/1.12.2-ompi415
export OMPI_MCA_opal_warn_on_missing_libcuda=0
export JULIA_NUM_PRECOMPILE_TASKS=8
export JULIA_CPU_TARGET='broadwell;skylake'
# Configure the environment
source experiments/common_env.sh

echo "Generating truth observations."

Expand All @@ -30,11 +28,9 @@ config = CA.AtmosConfig(config_dict)
simulation = CA.get_simulation(config)
CA.solve_atmos!(simulation)
ta = ncread(joinpath(output_dir, "ta_60.0d_average.nc"), "ta")
ta = ncread(joinpath(output_dir, "ta_60d_average.nc"), "ta")
include(joinpath(experiment_dir, "observation_map.jl"))
(; observation, variance) = process_member_data(ta; output_variance = true)
@show observation
@show variance
JLD2.save_object(joinpath(experiment_dir, "obs_mean.jld2"), observation)
JLD2.save_object(joinpath(experiment_dir, "obs_noise_cov.jld2"), variance)
'
Binary file modified experiments/sphere_held_suarez_rhoe_equilmoist/obs_mean.jld2
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function observation_map(iteration)
YAML.load_file(joinpath("experiments", experiment_id, "ekp_config.yml"))
output_dir = config["output_dir"]
ensemble_size = config["ensemble_size"]
model_output = "ta_60.0d_average.nc"
model_output = "ta_60d_average.nc"

dims = 1
G_ensemble = Array{Float64}(undef, dims..., ensemble_size)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Loading

0 comments on commit 9f9117b

Please sign in to comment.