Skip to content
Draft
Show file tree
Hide file tree
Changes from 139 commits
Commits
Show all changes
244 commits
Select commit Hold shift + click to select a range
ae5f0be
start modifying the data structure
simone-silvestri Jul 25, 2024
42be4e9
going on...
simone-silvestri Jul 25, 2024
1dab6e2
comment
simone-silvestri Jul 26, 2024
9d11295
add some changes
simone-silvestri Aug 1, 2024
27ebee4
Merge remote-tracking branch 'origin/main' into ss/metadata-for-every…
simone-silvestri Nov 8, 2024
7f4af88
in their folder
simone-silvestri Nov 8, 2024
8d9401e
modernize
simone-silvestri Nov 8, 2024
a7a3268
start changing stuff
simone-silvestri Nov 8, 2024
f8e7fe7
starting a bit
simone-silvestri Nov 8, 2024
6deb3b8
Merge remote-tracking branch 'origin/main' into ss/metadata-for-every…
simone-silvestri Dec 4, 2024
fdef030
let's go
simone-silvestri Dec 5, 2024
f4d63a1
correct alias
simone-silvestri Dec 5, 2024
a130e73
correct dates
simone-silvestri Dec 5, 2024
c90b7f9
Merge remote-tracking branch 'origin/main' into ss/metadata-for-every…
simone-silvestri Dec 23, 2024
08b377f
syntax
simone-silvestri Dec 23, 2024
2eb5556
Merge remote-tracking branch 'origin/main' into ss/metadata-for-every…
simone-silvestri Feb 12, 2025
ba4bce0
more updates
simone-silvestri Feb 12, 2025
68dfdb0
all this should work?
simone-silvestri Feb 12, 2025
f212e88
clear comments
simone-silvestri Feb 12, 2025
1a68d4e
vestigial code
simone-silvestri Feb 12, 2025
c318e54
works
simone-silvestri Feb 12, 2025
79b5935
veeery much simplified
simone-silvestri Feb 12, 2025
91e1169
this part is already done
simone-silvestri Feb 12, 2025
b6fb198
back to working
simone-silvestri Feb 12, 2025
e81bdfb
works
simone-silvestri Feb 12, 2025
afbd1cc
improve show method
simone-silvestri Feb 12, 2025
8599314
change names
simone-silvestri Feb 12, 2025
bb24633
go ahead
simone-silvestri Feb 12, 2025
4f05dbb
fix it
simone-silvestri Feb 12, 2025
fe6dc72
this should work
simone-silvestri Feb 12, 2025
787ebc9
add a new constructor
simone-silvestri Mar 11, 2025
7c519a1
set with ECCOMetadatum
simone-silvestri Mar 11, 2025
78a53cd
some changes
simone-silvestri Mar 11, 2025
1e71d67
improvement to UI
simone-silvestri Mar 11, 2025
4f7fdb2
change examples
simone-silvestri Mar 11, 2025
58662d2
we don't need this
simone-silvestri Mar 11, 2025
22c8d08
chnages
simone-silvestri Mar 11, 2025
79f37eb
export ui functions
simone-silvestri Mar 11, 2025
a98669f
last date
simone-silvestri Mar 11, 2025
5405ef3
vestigial dates
simone-silvestri Mar 11, 2025
b2ff520
change docstrings
simone-silvestri Mar 11, 2025
992b4d7
better like this
simone-silvestri Mar 11, 2025
e65b0ea
add native date range
simone-silvestri Mar 12, 2025
e7a0039
Merge branch 'main' into ss/distinguish-constructor
simone-silvestri Mar 13, 2025
40a9f24
change the url
simone-silvestri Mar 13, 2025
58d5c11
fix tests
simone-silvestri Mar 13, 2025
4fc2394
fixing the tests
simone-silvestri Mar 13, 2025
385a44a
fix tests
simone-silvestri Mar 13, 2025
54e5838
it's six dates not 5
simone-silvestri Mar 14, 2025
925981d
Merge branch 'main' into ss/distinguish-constructor
simone-silvestri Mar 14, 2025
62c2f46
Merge branch 'ss/distinguish-constructor' into ss/multi-year-JRA55
simone-silvestri Mar 14, 2025
fb35d78
this works
simone-silvestri Mar 15, 2025
65ca9ba
this works
simone-silvestri Mar 15, 2025
18504c5
this should work
simone-silvestri Mar 15, 2025
f35345c
done
simone-silvestri Mar 15, 2025
97c91fd
Merge branch 'main' into ss/distinguish-constructor
navidcy Mar 16, 2025
182cbfb
use directory over folder; fix some docstrings
navidcy Mar 16, 2025
a23c423
Merge branch 'main' into ss/distinguish-constructor
simone-silvestri Mar 17, 2025
f42a187
add an ECCOMetadatum
simone-silvestri Mar 17, 2025
0a6dd9f
Merge branch 'ss/distinguish-constructor' of github.com:CliMA/ClimaOc…
simone-silvestri Mar 17, 2025
790b5e6
spacing
simone-silvestri Mar 17, 2025
1649353
add a top level constant
simone-silvestri Mar 17, 2025
739bc46
correct directory
simone-silvestri Mar 17, 2025
6ef9d7c
add a default dowbload
simone-silvestri Mar 17, 2025
58c38c7
Merge branch 'ss/distinguish-constructor' into ss/multi-year-JRA55
simone-silvestri Mar 17, 2025
4e53f82
almost there
simone-silvestri Mar 17, 2025
29d15c8
Merge branch 'main' into ss/multi-year-JRA55
simone-silvestri Mar 21, 2025
418fa99
revert test ecco
simone-silvestri Mar 21, 2025
f8cd74b
Merge branch 'ss/multi-year-JRA55' of github.com:CliMA/ClimaOcean.jl …
simone-silvestri Mar 21, 2025
4761081
Merge branch 'main' into ss/multi-year-JRA55
simone-silvestri Mar 21, 2025
93c6b6f
bugfix
simone-silvestri Mar 21, 2025
0293afd
Merge branch 'ss/multi-year-JRA55' of github.com:CliMA/ClimaOcean.jl …
simone-silvestri Mar 21, 2025
cffb7e1
Merge remote-tracking branch 'origin/main' into ss/multi-year-JRA55
simone-silvestri Mar 28, 2025
1febc0e
Merge remote-tracking branch 'origin/main' into ss/multi-year-JRA55
simone-silvestri Mar 31, 2025
ce7cbd3
start changes
simone-silvestri Mar 31, 2025
fbfe5ce
this should work
simone-silvestri Mar 31, 2025
46940e7
bugfix
simone-silvestri Mar 31, 2025
473dbd7
some bugfixing
simone-silvestri Mar 31, 2025
3ccc9f7
this works
simone-silvestri Mar 31, 2025
a35bf04
this works!
simone-silvestri Mar 31, 2025
68b3ff3
add regularization
simone-silvestri Mar 31, 2025
5f53219
bugfix
simone-silvestri Mar 31, 2025
9209bbf
add sea-ice ocean stress
simone-silvestri Apr 1, 2025
62b4629
Merge branch 'main' into ss/multi-year-JRA55
simone-silvestri Apr 1, 2025
4d963ea
fix tests
simone-silvestri Apr 1, 2025
52c91d9
Merge branch 'ss/multi-year-JRA55' of github.com:CliMA/ClimaOcean.jl …
simone-silvestri Apr 1, 2025
1ee41af
bugfix
simone-silvestri Apr 1, 2025
1d58772
Update JRA55_field_time_series.jl
simone-silvestri Apr 1, 2025
0c020d0
Update JRA55_field_time_series.jl
simone-silvestri Apr 1, 2025
bafe3c7
simplify
simone-silvestri Apr 1, 2025
350b657
add the inmemory stuff
simone-silvestri Apr 1, 2025
4a49b40
start with this
simone-silvestri Apr 3, 2025
fea1854
default to inmemory
simone-silvestri Apr 3, 2025
4441567
Merge remote-tracking branch 'origin/ss/multi-year-JRA55' into ss/omi…
simone-silvestri Apr 3, 2025
7c4aa61
go!
simone-silvestri Apr 3, 2025
24f7d93
add a failsafe + a test
simone-silvestri Apr 3, 2025
d231995
some cleanup
simone-silvestri Apr 3, 2025
ca1980c
better to write last
simone-silvestri Apr 3, 2025
f448eeb
Merge remote-tracking branch 'origin/ss/multi-year-JRA55' into ss/omi…
simone-silvestri Apr 3, 2025
fed209b
Merge branch 'main' into ss/sea-ice-momentum-stress
simone-silvestri Apr 3, 2025
aeedd2f
last index
simone-silvestri Apr 3, 2025
f954c69
Merge branch 'ss/sea-ice-momentum-stress' of github.com:CliMA/ClimaOc…
simone-silvestri Apr 3, 2025
ddee7f0
add this
simone-silvestri Apr 3, 2025
daeb12f
add a clock
simone-silvestri Apr 3, 2025
629d582
add the arctic
simone-silvestri Apr 3, 2025
54165a0
Merge branch 'ss/sea-ice-momentum-stress' into ss/omip-prototype
simone-silvestri Apr 3, 2025
35fe01d
try it out
simone-silvestri Apr 3, 2025
5548a99
correct dates
simone-silvestri Apr 3, 2025
dfb8590
Update experiments/omip_prototype/quarter_degree_omip.jl
simone-silvestri Apr 4, 2025
a049dc1
Update experiments/omip_prototype/quarter_degree_omip.jl
simone-silvestri Apr 4, 2025
d1e6faf
add stuff
simone-silvestri Apr 4, 2025
7186256
Merge branch 'main' into ss/omip-prototype
simone-silvestri Apr 7, 2025
a6d758d
going sixth degree
simone-silvestri Apr 10, 2025
0b8624e
Merge branch 'ss/omip-prototype' of github.com:CliMA/ClimaOcean.jl in…
simone-silvestri Apr 10, 2025
f18a772
some changes
simone-silvestri Apr 10, 2025
6679bbd
synchronize the clocks for the moment
simone-silvestri Apr 10, 2025
50a7226
Merge branch 'main' into ss/omip-prototype
simone-silvestri Apr 10, 2025
7975dd4
Update test_jra55.jl
simone-silvestri Apr 10, 2025
77e440b
bugfix
simone-silvestri Apr 10, 2025
5e3c729
Merge branch 'ss/omip-prototype' of github.com:CliMA/ClimaOcean.jl in…
simone-silvestri Apr 10, 2025
b05fb83
improve it quickly for now
simone-silvestri Apr 10, 2025
501b3fa
continue
simone-silvestri Apr 10, 2025
f258e29
Merge branch 'ss/omip-prototype' of github.com:CliMA/ClimaOcean.jl in…
simone-silvestri Apr 10, 2025
5751899
another try...
simone-silvestri Apr 14, 2025
af67adc
bugfix for the salt flux
simone-silvestri Apr 24, 2025
d008026
Merge remote-tracking branch 'origin/main' into ss/omip-prototype
simone-silvestri Apr 30, 2025
83f97e9
try it out
simone-silvestri Apr 30, 2025
03e7f19
correction
simone-silvestri Apr 30, 2025
1e02dd9
Merge remote-tracking branch 'origin/main' into ss/omip-prototype
simone-silvestri May 14, 2025
1eedc44
correct
simone-silvestri May 14, 2025
202212c
update
simone-silvestri May 22, 2025
efa566c
Merge remote-tracking branch 'origin/main' into ss/omip-prototype
simone-silvestri May 22, 2025
0c8d8b1
go for it
simone-silvestri May 22, 2025
0f04d0f
Update src/SeaIceSimulations.jl
simone-silvestri May 22, 2025
e28b9a4
Update SeaIceSimulations.jl
simone-silvestri May 22, 2025
0e1d4ca
Merge branch 'ss/default-sea-ice' into ss/omip-prototype
simone-silvestri May 22, 2025
2eeed4c
some.. salinity
simone-silvestri May 22, 2025
b27ac12
Merge branch 'main' into ss/omip-prototype
simone-silvestri May 29, 2025
4d09283
Merge branch 'main' into ss/omip-prototype
simone-silvestri Jun 5, 2025
1507936
Merge remote-tracking branch 'origin/main' into ss/omip-prototype
simone-silvestri Jun 18, 2025
702fe64
update sea ice simulation
simone-silvestri Jun 18, 2025
9664584
try like this for the moment and let it go
simone-silvestri Jun 18, 2025
8392922
Merge remote-tracking branch 'origin/main' into ss/omip-prototype
simone-silvestri Jul 14, 2025
d28b611
added project
simone-silvestri Jul 14, 2025
4b763ee
Merge branch 'ss/omip-prototype' of github.com:CliMA/ClimaOcean.jl in…
simone-silvestri Jul 14, 2025
c306b0f
retry like this
simone-silvestri Jul 14, 2025
83331f8
Merge branch 'ss/omip-prototype' of github.com:CliMA/ClimaOcean.jl in…
simone-silvestri Jul 14, 2025
4857647
hmmm this was explicit
simone-silvestri Jul 14, 2025
668bc53
use a fixed dt
simone-silvestri Jul 14, 2025
dcce9e2
update to new syntax
simone-silvestri Jul 14, 2025
d5288c1
go like this
simone-silvestri Jul 14, 2025
1322148
add a one-degree to test it out
simone-silvestri Jul 14, 2025
2490da2
Update one_degree_simulation.jl
simone-silvestri Jul 15, 2025
c411c71
Update one_degree_simulation.jl
simone-silvestri Jul 15, 2025
f762205
try without implicit solver
simone-silvestri Jul 17, 2025
759c1ac
Update Project.toml
simone-silvestri Jul 17, 2025
01e9f05
Update near_global_ocean_simulation.jl
simone-silvestri Jul 17, 2025
e48a2b5
Update one_degree_simulation.jl
simone-silvestri Jul 17, 2025
0765874
changes
simone-silvestri Jul 17, 2025
808e6c9
try it in both
simone-silvestri Jul 17, 2025
88bd4e8
Merge branch 'ss/adapt-to-new-oceananigans' into ss/zstar
simone-silvestri Jul 17, 2025
7cacb1d
adding the correct zstar branch
simone-silvestri Jul 17, 2025
7cb8d6b
added CUDA
simone-silvestri Jul 17, 2025
469883a
Update pipeline.yml
simone-silvestri Jul 17, 2025
86d0bce
revert CUDA
simone-silvestri Jul 17, 2025
509d6b4
enforce using a specific branch
navidcy Jul 17, 2025
308c9e3
Delete Manifest.toml
navidcy Jul 17, 2025
06d895c
Update Project.toml
navidcy Jul 17, 2025
6397010
enforce using Oceananigans#ss/fix-zstar-bc
navidcy Jul 17, 2025
ea59ebb
drop geebrish
navidcy Jul 17, 2025
352a3ef
enforce using Oceananigans#ss/fix-zstar-bc
navidcy Jul 17, 2025
2beac0e
use julia v1.10.10
navidcy Jul 17, 2025
ea86989
precompile again
navidcy Jul 17, 2025
89af369
use julia v1.10.10
navidcy Jul 17, 2025
9e2482b
first oceananigans; then develop
navidcy Jul 17, 2025
9affa64
add CUDA
navidcy Jul 17, 2025
7717533
using CUDA + record from Makie not CUDA
navidcy Jul 17, 2025
6e0be09
Update one_degree_simulation.jl
simone-silvestri Jul 18, 2025
4488c2e
some changes
simone-silvestri Jul 18, 2025
26fde07
Merge branch 'ss/zstar' of github.com:CliMA/ClimaOcean.jl into ss/zstar
simone-silvestri Jul 18, 2025
a436bed
increase a bit
simone-silvestri Jul 18, 2025
5746652
add more stuff
simone-silvestri Jul 18, 2025
5127f05
improvements
simone-silvestri Jul 18, 2025
1037980
improve
simone-silvestri Jul 18, 2025
71c82f5
add an equatorial single column
simone-silvestri Jul 21, 2025
bc33d07
possibly remove a bug?
simone-silvestri Jul 21, 2025
ed0d210
Update atmosphere_sea_ice_fluxes.jl
simone-silvestri Jul 21, 2025
5b5b747
Update atmosphere_sea_ice_fluxes.jl
simone-silvestri Jul 21, 2025
28d3e4e
adding the correct Manifest
simone-silvestri Jul 21, 2025
00a2933
Merge branch 'ss/zstar' of github.com:CliMA/ClimaOcean.jl into ss/zstar
simone-silvestri Jul 21, 2025
d7ef440
update
simone-silvestri Jul 21, 2025
b0d1fd3
Merge branch 'main' into ss/zstar
navidcy Jul 22, 2025
860ff09
Merge branch 'main' into ss/zstar
simone-silvestri Jul 22, 2025
5637600
Merge branch 'ss/zstar' of github.com:CliMA/ClimaOcean.jl into ss/zstar
simone-silvestri Jul 22, 2025
b3ab48b
remove equatorial single column
simone-silvestri Jul 22, 2025
d1c7450
remove manifest
simone-silvestri Jul 22, 2025
a1ede1f
revert
simone-silvestri Jul 22, 2025
4015bf4
token
simone-silvestri Jul 22, 2025
970ffeb
Revert "token"
simone-silvestri Jul 22, 2025
4b4f64e
Merge remote-tracking branch 'origin/ss/zstar' into ss/omip-prototype
simone-silvestri Jul 22, 2025
e6ff0d4
changed JRA55
simone-silvestri Jul 22, 2025
ef45d0c
added Project
simone-silvestri Jul 22, 2025
d96c32b
merged
simone-silvestri Jul 22, 2025
ea3ee12
bugfix
simone-silvestri Jul 22, 2025
9165bd2
Merge branch 'ss/omip-prototype' of github.com:CliMA/ClimaOcean.jl in…
simone-silvestri Jul 22, 2025
add5526
this should fix it
simone-silvestri Jul 22, 2025
35e2df6
Merge remote-tracking branch 'origin/main' into ss/omip-prototype
simone-silvestri Jul 25, 2025
92fda28
change sea ice
simone-silvestri Jul 28, 2025
ec70ca0
Merge remote-tracking branch 'origin/main' into ss/omip-prototype
simone-silvestri Jul 29, 2025
469bcb1
consolidate sea ice temperature
simone-silvestri Jul 30, 2025
736ac4c
adding the manifest
simone-silvestri Jul 30, 2025
6db860a
adding Manifest
simone-silvestri Aug 1, 2025
5e0997c
comment out for now
simone-silvestri Aug 1, 2025
049dacd
go for it
simone-silvestri Aug 8, 2025
cf22586
Merge branch 'ss/omip-prototype' of github.com:CliMA/ClimaOcean.jl in…
simone-silvestri Aug 8, 2025
17a2250
improve
simone-silvestri Aug 8, 2025
d024542
Merge remote-tracking branch 'origin/main' into ss/omip-prototype
simone-silvestri Aug 8, 2025
7d6ce58
improving the performance
simone-silvestri Aug 18, 2025
5e66a54
speed up
simone-silvestri Aug 18, 2025
9063e3e
recorrect Oceananigans
simone-silvestri Aug 18, 2025
4fb3526
Merge branch 'main' into ss/omip-prototype
simone-silvestri Aug 18, 2025
e7845a5
new Manifest
simone-silvestri Aug 18, 2025
fca5484
do not add Oceananigans
simone-silvestri Aug 18, 2025
09d22a3
Update make.jl
simone-silvestri Aug 18, 2025
3885668
one-degree-ompi for calibration
simone-silvestri Aug 20, 2025
8bbc3b8
Merge branch 'ss/omip-prototype' of github.com:CliMA/ClimaOcean.jl in…
simone-silvestri Aug 20, 2025
988ec77
update one degree
simone-silvestri Aug 20, 2025
3419022
use the correct value
simone-silvestri Aug 20, 2025
b1430e2
remove this for the moment
simone-silvestri Aug 20, 2025
abced34
Merge branch 'ss/omip-prototype' of github.com:CliMA/ClimaOcean.jl in…
simone-silvestri Aug 20, 2025
cf2e735
Update make.jl
simone-silvestri Aug 21, 2025
d0b3bf9
reduced the timestep
simone-silvestri Aug 28, 2025
5f3452d
Merge branch 'ss/omip-prototype' of github.com:CliMA/ClimaOcean.jl in…
simone-silvestri Aug 28, 2025
f9613d8
enforce real minimum depth
simone-silvestri Aug 28, 2025
557ddc9
Merge branch 'main' into ss/omip-prototype
simone-silvestri Sep 19, 2025
3861dba
Merge branch 'main' into ss/omip-prototype
xkykai Sep 22, 2025
d126260
Merge branch 'main' into ss/omip-prototype
xkykai Sep 23, 2025
22d6f31
Merge branch 'main' into ss/omip-prototype
xkykai Sep 29, 2025
743fa84
Merge branch 'main' into ss/omip-prototype
simone-silvestri Sep 30, 2025
f3b1b97
merge commit
simone-silvestri Oct 3, 2025
c21aab6
Merge branch 'main' into ss/omip-prototype
taimoorsohail Oct 10, 2025
01af82e
Merge branch 'main' into ss/omip-prototype
navidcy Oct 10, 2025
91fae63
Merge branch 'main' into ss/omip-prototype
taimoorsohail Oct 13, 2025
2bf3999
Resolved merge conflict in Project.toml with [targets]
taimoorsohail Oct 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions experiments/omip_prototype/download_data.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using ClimaOcean
using ClimaOcean.JRA55
using ClimaOcean.DataWrangling: download_dataset

atmosphere = JRA55PrescribedAtmosphere(; dir="forcing_data/",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to encourage people not to set this variable because it makes setups less portable (eg data will be re-downloaded everywhere)

dataset=JRA55MultipleYears(),
backend=JRA55NetCDFBackend(10),
include_rivers_and_icebergs=true)
160 changes: 160 additions & 0 deletions experiments/omip_prototype/sixth_degree_omip.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
using ClimaOcean
using ClimaSeaIce
using Oceananigans
using Oceananigans.Grids
using Oceananigans.Units
using Oceananigans.OrthogonalSphericalShellGrids
using ClimaOcean.OceanSimulations
using ClimaOcean.ECCO
using ClimaOcean.JRA55
using ClimaOcean.DataWrangling
using ClimaSeaIce.SeaIceThermodynamics: IceWaterThermalEquilibrium
using Printf
using Dates
using CUDA

import Oceananigans.OutputWriters: checkpointer_address

function synch!(clock1::Clock, clock2)
# Synchronize the clocks
clock1.time = clock2.time
clock1.iteration = clock2.iteration
clock1.last_Δt = clock2.last_Δt
end

synch!(model1, model2) = synch!(model1.clock, model2.clock)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you need this please put it in a separate PR and get that merged, because people want to use stuff


arch = GPU()
r_faces = ClimaOcean.exponential_z_faces(; Nz=60, depth=6200)
z_faces = MutableVerticalDiscretization(r_faces)

Nx = 2160 # longitudinal direction
Ny = 1080 # meridional direction
Nz = length(r_faces) - 1

grid = TripolarGrid(arch;
size = (Nx, Ny, Nz),
z = z_faces,
halo = (7, 7, 7))

bottom_height = regrid_bathymetry(grid; minimum_depth=15, major_basins=1)
grid = ImmersedBoundaryGrid(grid, GridFittedBottom(bottom_height); active_cells_map=true)

#####
##### A Propgnostic Ocean model
#####

using Oceananigans.TurbulenceClosures: ExplicitTimeDiscretization
using Oceananigans.TurbulenceClosures.TKEBasedVerticalDiffusivities: CATKEVerticalDiffusivity, CATKEMixingLength, CATKEEquation

momentum_advection = WENOVectorInvariant()
tracer_advection = WENO(order=7)

free_surface = SplitExplicitFreeSurface(grid; substeps=70)

mixing_length = CATKEMixingLength(Cᵇ=0.01)
turbulent_kinetic_energy_equation = CATKEEquation(Cᵂϵ=1.0)

catke_closure = CATKEVerticalDiffusivity(ExplicitTimeDiscretization(); mixing_length, turbulent_kinetic_energy_equation)
closure = (catke_closure, VerticalScalarDiffusivity=1e-5, ν=1e-5))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simone-silvestri, why change CATKE defaults?

cc @taimoorsohail, @glwagner

Copy link
Member

@glwagner glwagner Jun 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also it's wrong to add an additional background diffusivity. CATKE already introduces a background diffusivity via the minimum_tke parameter.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise I guess it's ok to experiment with different parameter choices, if there are choices that work better we can make them default in Oceananigans.


ocean = ocean_simulation(grid; Δt=1minutes,
momentum_advection,
tracer_advection,
free_surface,
closure)

dataset = ECCO4Monthly()

set!(ocean.model, T=Metadatum(:temperature; dataset),
S=Metadatum(:salinity; dataset))

#####
##### A Prognostic Sea-ice model
#####

# Remember to pass the SSS as a bottom bc to the sea ice!
SSS = view(ocean.model.tracers.S.data, :, :, grid.Nz)
bottom_heat_boundary_condition = IceWaterThermalEquilibrium(SSS)

# Default sea-ice dynamics
sea_ice_dynamics = ClimaOcean.SeaIceSimulations.default_sea_ice_dynamics(grid; ocean)

sea_ice = sea_ice_simulation(grid; bottom_heat_boundary_condition,
dynamics = sea_ice_dynamics,
advection=WENO(order=7))

set!(sea_ice.model, h=Metadatum(:sea_ice_thickness; dataset),
=Metadatum(:sea_ice_concentration; dataset))

#####
##### A Prescribed Atmosphere model
#####

dir = "./forcing_data"
dataset = MultiYearJRA55()
backend = JRA55NetCDFBackend(40)

atmosphere = JRA55PrescribedAtmosphere(arch; dir, dataset, backend, include_rivers_and_icebergs=true)
radiation = Radiation()

#####
##### An ocean-sea ice coupled model
#####

omip = OceanSeaIceModel(ocean, sea_ice; atmosphere, radiation)
omip = Simulation(omip, Δt=20, stop_time=60days)

# Figure out the outputs....

checkpointer_address(::SeaIceModel) = "SeaIceModel"

ocean.output_writers[:checkpointer] = Checkpointer(ocean.model,
schedule = IterationInterval(10000),
prefix = "ocean_checkpoint",
overwrite_existing = true)

sea_ice.output_writers[:checkpointer] = Checkpointer(sea_ice.model,
schedule = IterationInterval(10000),
prefix = "sea_ice_checkpoint",
overwrite_existing = true)

wall_time = Ref(time_ns())

using Statistics

function progress(sim)
sea_ice = sim.model.sea_ice
ocean = sim.model.ocean
hmax = maximum(sea_ice.model.ice_thickness)
ℵmax = maximum(sea_ice.model.ice_concentration)
Tmax = maximum(sim.model.interfaces.atmosphere_sea_ice_interface.temperature)
Tmin = minimum(sim.model.interfaces.atmosphere_sea_ice_interface.temperature)
umax = maximum(ocean.model.velocities.u)
vmax = maximum(ocean.model.velocities.v)
wmax = maximum(ocean.model.velocities.w)

step_time = 1e-9 * (time_ns() - wall_time[])

msg1 = @sprintf("time: %s, iteration: %d, Δt: %s, ", prettytime(sim), iteration(sim), prettytime(sim.Δt))
msg2 = @sprintf("max(h): %.2e m, max(ℵ): %.2e ", hmax, ℵmax)
msg4 = @sprintf("extrema(T): (%.2f, %.2f) ᵒC, ", Tmax, Tmin)
msg5 = @sprintf("maximum(u): (%.2f, %.2f, %.2f) m/s, ", umax, vmax, wmax)
msg6 = @sprintf("wall time: %s \n", prettytime(step_time))

@info msg1 * msg2 * msg4 * msg5 * msg6

wall_time[] = time_ns()

return nothing
end

# And add it as a callback to the simulation.
add_callback!(omip, progress, IterationInterval(50))

run!(omip)

omip.Δt = 10minutes
omip.stop_time = 58 * 365days

run!(omip)
3 changes: 1 addition & 2 deletions src/DataWrangling/JRA55/JRA55_field_time_series.jl
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ function set!(fts::JRA55NetCDFFTSMultipleYears, backend=fts.backend)
LX, LY, LZ = location(fts)
i₁, i₂, j₁, j₂, TX = compute_bounding_indices(nothing, nothing, fts.grid, LX, LY, λc, φc)


if issorted(nn)
data = ds[name][i₁:i₂, j₁:j₂, nn]
else
Expand Down Expand Up @@ -458,7 +457,7 @@ function JRA55FieldTimeSeries(metadata::JRA55Metadata, architecture=CPU(), FT=Fl
ds = Dataset(filepath)
data = ds[shortname][i₁:i₂, j₁:j₂, time_indices_in_memory]
close(ds)

copyto!(interior(fts, :, :, 1, :), data)
fill_halo_regions!(fts)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,8 @@ end
@inbounds begin
Ts = surface_temperature[i, j, kᴺ]
Ts = convert_to_kelvin(sea_ice_properties.temperature_units, Ts)
ℵi = ice_concentration[i, j, 1]
ℵi = ice_concentration[i, j, kᴺ]

Qs = downwelling_radiation.Qs[i, j, 1]
Qℓ = downwelling_radiation.Qℓ[i, j, 1]
Qc = atmosphere_sea_ice_fluxes.sensible_heat[i, j, 1] # sensible or "conductive" heat flux
Expand Down
1 change: 1 addition & 0 deletions src/SeaIceSimulations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ using Oceananigans.Operators
using ClimaSeaIce
using ClimaSeaIce: SeaIceModel, SlabSeaIceThermodynamics, PhaseTransitions, ConductiveFlux
using ClimaSeaIce.SeaIceThermodynamics: IceWaterThermalEquilibrium
using ClimaSeaIce.Rheologies
using ClimaSeaIce.SeaIceDynamics: SplitExplicitSolver, SemiImplicitStress, SeaIceMomentumEquation, StressBalanceFreeDrift
using ClimaSeaIce.Rheologies: IceStrength, ElastoViscoPlasticRheology

Expand Down
1 change: 1 addition & 0 deletions test/test_jra55.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include("runtests_setup.jl")

using ClimaOcean.JRA55
using ClimaOcean.JRA55: download_JRA55_cache
using ClimaOcean.OceanSeaIceModels: PrescribedAtmosphere

Expand Down
Loading