Skip to content

Commit c3d7e21

Browse files
Precompute interpolation indices + BarotropicPotentialForcing (#353)
* Some bugfixes * Clean up OS paper sim * Integrate barotropic pressure calculation into interpolate_atmosphere_state * Extract the data * Bugfix * Import KernelParameters * Trigger downloading JRA55 * Updates * Add Manifest and Project to one deg * Updates * Implement exchanger * Precompute interpolation * Add architecture to ocean_simulation * bugfix * Updates * Raise Oceananigans compat * Update to TimeInterpolator * Fix bug in computation of FractionalIndices plus uncomment interpolation step * Fix problem in runtests setup? * Update value test for jra55 * Better way to generate FractionalIndices array * Relax test tol a bit * Adapt BarotropicPotentialForcing * Pretty up ECCO tests * Increase compat for OrthogonalSphericalShellGrids to 0.2.2 * retry tests * Add a few files for generating tidal forcing * Bump version to 0.95.17 with bugfix * Typo in docstring * Add allowscalar for FractionalIndices array construction --------- Co-authored-by: Simone Silvestri <[email protected]>
1 parent 8822e85 commit c3d7e21

25 files changed

+3032
-237
lines changed

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,11 @@ docs/src/literated/
4747
*.ncu-rep
4848
*.sq
4949
*.sqlite
50+
51+
# NASA NAIF kernel files
52+
*.bsp
53+
*.bpc
54+
*.tf
55+
*.tls
56+
*.tpc
57+
*.txt

Project.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ JLD2 = "0.4, 0.5"
4242
KernelAbstractions = "0.9"
4343
MPI = "0.20"
4444
NCDatasets = "0.12, 0.13, 0.14"
45-
Oceananigans = "0.95.7 - 0.99"
45+
Oceananigans = "0.95.17 - 0.99"
4646
OffsetArrays = "1.14"
47-
OrthogonalSphericalShellGrids = "0.2.1"
47+
OrthogonalSphericalShellGrids = "0.2.2"
4848
Scratch = "1"
4949
SeawaterPolynomials = "0.3.4"
5050
StaticArrays = "1"

examples/single_column_os_papa_simulation.jl

+12-13
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,8 @@ lines!(axq, t_days, qa)
9797
current_figure()
9898

9999
# We continue constructing a simulation.
100-
# For the fluxes computation we use a `SkinTemperature` formulation that computes
101-
# the skin temperature from a balance between internal and external heat fluxes.
102-
103100
radiation = Radiation()
104-
coupled_model = OceanSeaIceModel(ocean; atmosphere, radiation)
101+
coupled_model = OceanSeaIceModel(ocean; atmosphere, radiation)
105102
simulation = Simulation(coupled_model, Δt=ocean.Δt, stop_time=30days)
106103

107104
wall_clock = Ref(time_ns())
@@ -136,20 +133,22 @@ function progress(sim)
136133
msg *= @sprintf(", e₀: %.2e m² s⁻²", first(interior(e, 1, 1, Nz)))
137134

138135
@info msg
136+
137+
return nothing
139138
end
140139

141140
simulation.callbacks[:progress] = Callback(progress, IterationInterval(100))
142141

143142
# Build flux outputs
144-
τx = coupled_model.interfaces.atmosphere_ocean_interface.fluxes.x_momentum
145-
τy = coupled_model.interfaces.atmosphere_ocean_interface.fluxes.y_momentum
146-
JT = coupled_model.interfaces.net_fluxes.ocean_surface.T
147-
Js = coupled_model.interfaces.net_fluxes.ocean_surface.S
148-
E = coupled_model.interfaces.atmosphere_ocean_interface.fluxes.water_vapor
149-
Qc = coupled_model.interfaces.atmosphere_ocean_interface.fluxes.sensible_heat
150-
Qv = coupled_model.interfaces.atmosphere_ocean_interface.fluxes.latent_heat
151-
ρₒ = coupled_model.interfaces.ocean_properties.reference_density
152-
cₚ = coupled_model.interfaces.ocean_properties.heat_capacity
143+
τx = simulation.model.interfaces.net_fluxes.ocean_surface.u
144+
τy = simulation.model.interfaces.net_fluxes.ocean_surface.v
145+
JT = simulation.model.interfaces.net_fluxes.ocean_surface.T
146+
Js = simulation.model.interfaces.net_fluxes.ocean_surface.S
147+
E = simulation.model.interfaces.atmosphere_ocean_interface.fluxes.water_vapor
148+
Qc = simulation.model.interfaces.atmosphere_ocean_interface.fluxes.sensible_heat
149+
Qv = simulation.model.interfaces.atmosphere_ocean_interface.fluxes.latent_heat
150+
ρₒ = simulation.model.interfaces.ocean_properties.reference_density
151+
cₚ = simulation.model.interfaces.ocean_properties.heat_capacity
153152

154153
Q = ρₒ * cₚ * JT
155154
ρτx = ρₒ * τx

0 commit comments

Comments
 (0)