Skip to content

Commit 8e26abd

Browse files
Use zstar in examples (#573)
* Update one_degree_simulation.jl * Update one_degree_simulation.jl * try without implicit solver * Update Project.toml * Update near_global_ocean_simulation.jl * Update one_degree_simulation.jl * changes * try it in both * adding the correct zstar branch * added CUDA * Update pipeline.yml * revert CUDA * enforce using a specific branch * Delete Manifest.toml * Update Project.toml * enforce using Oceananigans#ss/fix-zstar-bc * drop geebrish * enforce using Oceananigans#ss/fix-zstar-bc * use julia v1.10.10 * precompile again * use julia v1.10.10 * first oceananigans; then develop * add CUDA * using CUDA + record from Makie not CUDA * Update one_degree_simulation.jl * some changes * add more stuff * improvements * improve * add an equatorial single column * possibly remove a bug? * Update atmosphere_sea_ice_fluxes.jl * Update atmosphere_sea_ice_fluxes.jl * adding the correct Manifest * remove equatorial single column * remove manifest * revert * token * Revert "token" This reverts commit 4015bf4. * code alignment * drop specific branch * drop specific branch * fix ExponentialCoordinate args * disambiguate ExponentialCoordinate * drop cuda compat * disambiguate ExponentialCoordinate --------- Co-authored-by: Navid C. Constantinou <[email protected]>
1 parent af11299 commit 8e26abd

File tree

7 files changed

+11
-8
lines changed

7 files changed

+11
-8
lines changed

.buildkite/examples_build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
env:
3-
JULIA_VERSION: "1.10.9"
3+
JULIA_VERSION: "1.10.10"
44
JULIA_MINOR_VERSION: "1.10"
55
TARTARUS_HOME: "/storage5/buildkite-agent"
66
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager
@@ -29,7 +29,7 @@ steps:
2929
- label: "Run documentation"
3030
key: "build_documentation"
3131
commands:
32-
- "$TARTARUS_HOME/julia-$JULIA_VERSION/bin/julia --color=yes -O0 --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'"
32+
- "$TARTARUS_HOME/julia-$JULIA_VERSION/bin/julia --color=yes -O0 --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate(); Pkg.precompile(; strict=true)'"
3333
- "$TARTARUS_HOME/julia-$JULIA_VERSION/bin/julia --color=yes -O0 --project=docs/ docs/make.jl"
3434
agents:
3535
queue: ClimaOcean-docs
@@ -38,10 +38,10 @@ steps:
3838
TMPDIR: "$TARTARUS_HOME/tmp"
3939
JULIA_DEPOT_PATH: "$TARTARUS_HOME/.julia-$BUILDKITE_BUILD_NUMBER"
4040
JULIA_DEBUG: "Documenter"
41-
# This environment variable is needed to avoid SSL verification errors when Downloads.jl
41+
# This environment variable is needed to avoid SSL verification errors when Downloads.jl
4242
# tries to download the bathymetry data. It should not be required so we need to fix our certificates
4343
# and remove this environment variable. ref: https://github.com/JuliaLang/Downloads.jl/issues/97
44-
JULIA_SSL_NO_VERIFY: "**"
44+
JULIA_SSL_NO_VERIFY: "**"
4545

4646
timeout_in_minutes: 1440
4747

examples/near_global_ocean_simulation.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Nz = 40
3838

3939
depth = 6000meters
4040
z = ExponentialCoordinate(Nz, -depth, 0)
41+
z = Oceananigans.Grids.MutableVerticalDiscretization(z)
4142

4243
grid = LatitudeLongitudeGrid(arch;
4344
size = (Nx, Ny, Nz),

examples/one_degree_simulation.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Nz = 40
2828

2929
depth = 4000meters
3030
z = ExponentialCoordinate(Nz, -depth, 0; scale = 0.85*depth)
31+
z = Oceananigans.Grids.MutableVerticalDiscretization(z)
3132
underlying_grid = TripolarGrid(arch; size = (Nx, Ny, Nz), halo = (5, 5, 4), z)
3233

3334
# Next, we build bathymetry on this grid, using interpolation passes to smooth the bathymetry.
@@ -51,7 +52,7 @@ grid = ImmersedBoundaryGrid(underlying_grid, GridFittedBottom(bottom_height);
5152
# parameterization. We also include some explicit horizontal diffusivity.
5253

5354
eddy_closure = Oceananigans.TurbulenceClosures.IsopycnalSkewSymmetricDiffusivity(κ_skew=2e3, κ_symmetric=2e3)
54-
vertical_mixing = Oceananigans.TurbulenceClosures.CATKEVerticalDiffusivity(minimum_tke=1e-6)
55+
vertical_mixing = ClimaOcean.OceanSimulations.default_ocean_closure()
5556
horizontal_viscosity = HorizontalScalarDiffusivity=4000)
5657

5758
# ### Ocean simulation

experiments/arctic_simulation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ arch = GPU()
1515

1616
depth = 2000meters
1717
Nz = 30
18-
z = ExponentialCoordinate(Nz, depth, 0; scale=depth/3)
18+
z = ExponentialCoordinate(Nz, -depth, 0; scale=depth/3)
1919
z = MutableVerticalDiscretization(z)
2020

2121
Nx = 180 # longitudinal direction -> 250 points is about 1.5ᵒ resolution

experiments/one_degree_calibration/one_degree_near_global_simulation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ using Oceananigans.TurbulenceClosures.CATKEVerticalDiffusivities:
1010

1111
#using ParameterEstimocean.Parameters: closure_with_parameters
1212
using JLD2
13+
using CUDA
1314

1415
const years = 365days
1516

@@ -147,4 +148,3 @@ simulation.Δt = 20minutes
147148
run!(simulation)
148149

149150
@info "Simulation took $(prettytime(simulation.run_wall_time))."
150-

experiments/one_degree_calibration/perfect_one_degree_model_calibration.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ using ParameterEstimocean.Utils: map_gpus_to_ranks!
99
using ParameterEstimocean.Observations: FieldTimeSeriesCollector
1010
using ParameterEstimocean.Parameters: closure_with_parameters
1111
using JLD2
12+
using CUDA
1213

1314
arch = GPU()
1415

src/OceanSeaIceModels/InterfaceComputations/interface_states.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function WaterMoleFraction(FT=Oceananigans.defaults.FloatType)
103103
magnesium = SalinityConstituent{FT}(24.31, 0.05),
104104
)
105105

106-
return SeawaterComposition(water_molar_mass, salinity_constituents)
106+
return WaterMoleFraction(water_molar_mass, salinity_constituents)
107107
end
108108

109109
@inline function compute_water_mole_fraction(wmf::WaterMoleFraction, S)

0 commit comments

Comments
 (0)