Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
glwagner committed Oct 4, 2023
1 parent 7be7aaa commit d5a81f8
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
2 changes: 1 addition & 1 deletion validation/regional_polar_simulation/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.9.2"
manifest_format = "2.0"
project_hash = "45e4ea807dbc9ecd252e5ce907312f8871fa5cfe"
project_hash = "fda32ea3c9da6b6592f7c6fbac2392e743d9b44c"

[[deps.AbstractFFTs]]
deps = ["LinearAlgebra"]
Expand Down
1 change: 1 addition & 0 deletions validation/regional_polar_simulation/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[deps]
GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
MAT = "23992714-dd62-5051-b70f-ba57cb901cac"
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
Oceananigans = "9e8cae18-63c1-5223-a75c-80ca9d6e9a09"
Expand Down
36 changes: 34 additions & 2 deletions validation/regional_polar_simulation/initial_condition.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Oceananigans
using NCDatasets
using JLD2

# Initial condition
dir = "/storage2/alir/bsose_i122"
Expand All @@ -22,5 +24,35 @@ longitude = (0, 360)
Δφ = φ[end] - φ[end-1]
push!(φ, φ[end] + Δφ)

# Tᵢ = T_ds["THETA"][:, :, :, 1]
# Sᵢ = S_ds["SALT"][:, :, :, 1]
Nx = 6 * 360
Ny = length(φ) - 1
Nz = length(z) - 1

grid = LatitudeLongitudeGrid(CPU(); z,
latitude = φ,
longitude = (0, 360),
size = (Nx, Ny, Nz),
halo = (7, 7, 7),
topology = (Periodic, Bounded, Bounded))

grid = ImmersedBoundaryGrid(grid, GridFittedBottom(zb))

time = T_ds["time"][:]
T = T_ds["THETA"][:, :, :, 1]
S = S_ds["SALT"][:, :, :, 1]

ic_filename = "sose_grid_initial_conditions.jld2"
file = jldopen(ic_filename, "a+")

file["T"] = T
file["S"] = S
file["time"] = time

file["longitude"] = longitude
file["latitude"] = φ
file["z"] = z
file["bottom_height"] = zb

file["grid"] = grid

close(file)

0 comments on commit d5a81f8

Please sign in to comment.