-
Notifications
You must be signed in to change notification settings - Fork 6
Use Veros as another Ocean component in NumericalEarth.jl #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 250 commits
Commits
Show all changes
444 commits
Select commit
Hold shift + click to select a range
b3ab48b
remove equatorial single column
simone-silvestri d1c7450
remove manifest
simone-silvestri a1ede1f
revert
simone-silvestri 4015bf4
token
simone-silvestri 970ffeb
Revert "token"
simone-silvestri 4b4f64e
Merge remote-tracking branch 'origin/ss/zstar' into ss/omip-prototype
simone-silvestri e6ff0d4
changed JRA55
simone-silvestri ef45d0c
added Project
simone-silvestri d96c32b
merged
simone-silvestri ea3ee12
bugfix
simone-silvestri 9165bd2
Merge branch 'ss/omip-prototype' of github.com:CliMA/ClimaOcean.jl in…
simone-silvestri add5526
this should fix it
simone-silvestri 35e2df6
Merge remote-tracking branch 'origin/main' into ss/omip-prototype
simone-silvestri 92fda28
change sea ice
simone-silvestri ec70ca0
Merge remote-tracking branch 'origin/main' into ss/omip-prototype
simone-silvestri 469bcb1
consolidate sea ice temperature
simone-silvestri 736ac4c
adding the manifest
simone-silvestri 6db860a
adding Manifest
simone-silvestri 5e0997c
comment out for now
simone-silvestri 049dacd
go for it
simone-silvestri cf22586
Merge branch 'ss/omip-prototype' of github.com:CliMA/ClimaOcean.jl in…
simone-silvestri 17a2250
improve
simone-silvestri d024542
Merge remote-tracking branch 'origin/main' into ss/omip-prototype
simone-silvestri 7d6ce58
improving the performance
simone-silvestri 5e66a54
speed up
simone-silvestri 9063e3e
recorrect Oceananigans
simone-silvestri 4fb3526
Merge branch 'main' into ss/omip-prototype
simone-silvestri e7845a5
new Manifest
simone-silvestri fca5484
do not add Oceananigans
simone-silvestri 09d22a3
Update make.jl
simone-silvestri 3885668
one-degree-ompi for calibration
simone-silvestri 8bbc3b8
Merge branch 'ss/omip-prototype' of github.com:CliMA/ClimaOcean.jl in…
simone-silvestri 988ec77
update one degree
simone-silvestri 3419022
use the correct value
simone-silvestri b1430e2
remove this for the moment
simone-silvestri abced34
Merge branch 'ss/omip-prototype' of github.com:CliMA/ClimaOcean.jl in…
simone-silvestri 78de681
start with adapting
simone-silvestri 3772b2c
fill it in
simone-silvestri b5befcd
remove manifest
simone-silvestri 1a40428
remove vestigial code
simone-silvestri 0876b41
add a simulation
simone-silvestri dc79dc0
add an OceananigansSimulation
simone-silvestri adb8393
ok this works
simone-silvestri ff57090
add a forced simulation
simone-silvestri 2460b14
update
simone-silvestri b74450f
coupled
simone-silvestri 7792990
some corrections
simone-silvestri bf23df7
back to previous stuff
simone-silvestri 5b03a33
add veros
simone-silvestri 5843397
add the veros experiment
simone-silvestri cc6ca11
dt mom not dt tracer
simone-silvestri 267d985
Apply suggestion from @glwagner
simone-silvestri 8602684
Apply suggestion from @glwagner
simone-silvestri d45906b
Update assemble_net_fluxes.jl
simone-silvestri 29c70ca
Rename fill_up_net_fluxes! to fill_net_fluxes!
simone-silvestri c7ee9ad
Update ext/ClimaOceanPythonCallExt/ClimaOceanPythonCallExt.jl
simone-silvestri c7dbcb0
overload the set! function
simone-silvestri ac8d821
bugfix
simone-silvestri 2d0c16b
bugfix
simone-silvestri 2debe0e
bugfix
simone-silvestri b3c6c46
fixed it
simone-silvestri 8cfb21d
let's go
simone-silvestri 88e937c
add visualization
simone-silvestri 507e81c
Merge branch 'main' into ss/adapt-veros
simone-silvestri 3d99939
Merge branch 'main' into ss/adapt-veros
simone-silvestri da45c7e
Merge branch 'main' into ss/adapt-veros
simone-silvestri 8aa6b13
Merge branch 'main' into ss/adapt-veros
simone-silvestri 62a3cc8
Update TODO comment for fluxes BC in veros
simone-silvestri 90bf962
Merge branch 'main' into ss/adapt-veros
simone-silvestri 792fa31
ok let's go
simone-silvestri dec7ab4
this should work out
simone-silvestri 891d39d
try it out like this
simone-silvestri 171cb40
run only this example
simone-silvestri c6ea397
try adding this
simone-silvestri 31da63f
add pythoncall
simone-silvestri 6d84da9
fix
simone-silvestri 308d494
Merge branch 'main' into ss/adapt-veros
simone-silvestri af0b9be
Update ClimaOceanPythonCallExt to include CondaPkg
simone-silvestri 24d0d23
Merge branch 'main' into ss/adapt-veros
simone-silvestri accfb4a
Merge branch 'main' into ss/adapt-veros
simone-silvestri 61ff994
Merge remote-tracking branch 'origin/main' into ss/adapt-veros
simone-silvestri ca46e70
some changes
simone-silvestri fcb94d1
start restructuring
simone-silvestri d621218
start changing everything
simone-silvestri 584771f
move references
simone-silvestri 62e5331
some more changes
simone-silvestri 862b5f1
simplify
simone-silvestri ba0e4b1
continue changing
simone-silvestri 3c3c6f3
interpolate the states
simone-silvestri 90c5707
separate more stuff out
simone-silvestri b5a39d4
more changes
simone-silvestri 13dd0d0
add a `ComponentExchanger`
simone-silvestri 0d81dad
more changes
simone-silvestri 22fcc5f
more changes
simone-silvestri 235b40f
more chnages
simone-silvestri 0c69e9f
make sure imports are correct
simone-silvestri 5a18304
improving imports
simone-silvestri 8b913f5
more changes
simone-silvestri 9625acb
more changes
simone-silvestri 48f3788
more simplification and generalization
simone-silvestri ee12ed5
everything we need to import
simone-silvestri d94b101
more cleanup
simone-silvestri 9a5b230
one degree ocean simulation compiles
simone-silvestri 5897ac4
one dergee almost runs
simone-silvestri b94f586
include all relevant imports
simone-silvestri cbe8fb6
this should at least run the currect tests / examples
simone-silvestri 3e45169
the one degree runs
simone-silvestri 48fcda4
Merge remote-tracking branch 'origin/main' into ss/interpolate-all-st…
simone-silvestri b6731c0
fix CI
simone-silvestri e4b5389
another fix
simone-silvestri fa315d9
update stuff
simone-silvestri 017de06
clean up a bit
simone-silvestri 4da3147
another bugfix
simone-silvestri 9c2f44a
Update net fluxes + tutorial
simone-silvestri d537eda
changes
simone-silvestri 45b868b
fix FreezingLimitedSeaIceModel
glwagner f7efe13
fix jra55
glwagner 4ecce39
see if this works, then modify the tutorial
simone-silvestri 1181d23
Merge branch 'ss/interpolate-all-states' of github.com:CliMA/ClimaOce…
simone-silvestri d241ffa
new oceanigans in docs
simone-silvestri f5de100
fix slab ocean
simone-silvestri fae7edb
make slab_ocean a julia file
simone-silvestri 954a534
some fixes for speedy
simone-silvestri bd37d09
couple more fixes
simone-silvestri b013369
Apply suggestion from @simone-silvestri
simone-silvestri 476cbdf
update the slab_ocean.jl file
simone-silvestri 9bb8918
Merge branch 'ss/interpolate-all-states' of github.com:CliMA/ClimaOce…
simone-silvestri 597dffa
another fix
simone-silvestri 9103331
more slab ocean stuff
simone-silvestri c2674a6
some more fixes
simone-silvestri e7045d2
fix another test
simone-silvestri e1dc0c6
another doctest fix
simone-silvestri c06265b
go ahead
simone-silvestri 53796dc
more changes
simone-silvestri de00176
fix speedy tests
simone-silvestri 5d386fa
no need for this
simone-silvestri cc9f1e2
some disambiguation
simone-silvestri 751a29b
fix doctest
simone-silvestri 882d328
more changes
simone-silvestri ecbe429
Merge remote-tracking branch 'origin/main' into ss/interpolate-all-st…
simone-silvestri 9287999
more cleanup
simone-silvestri 6a30ac3
only an ocean
simone-silvestri 1b02089
add this fallback
simone-silvestri 95f53f6
also this works
simone-silvestri 4e605b2
change names
simone-silvestri c9e2cc2
disambiguate
simone-silvestri 5c27db8
some disambiguations
simone-silvestri c71b10a
very annoying doctest fix
simone-silvestri ce221fc
fix the slab ocean test
simone-silvestri 004f30f
another fix
simone-silvestri 4294c4a
clear depot once
simone-silvestri ea031ea
why is it not clearing?
simone-silvestri 657c253
force it to the correct depot
simone-silvestri 3577e74
remove the clear docs from pipeline
simone-silvestri 9f5e7b1
Merge branch 'ss/interpolate-all-states' into ss/adapt-veros
simone-silvestri 6b300a4
changes
simone-silvestri b940b2a
fix a bit the example
simone-silvestri ec67593
no double ticks
simone-silvestri bfe7729
add CondaPkg
simone-silvestri 2aa0fe9
embellish slab ocean example
simone-silvestri dc32759
gpuify the example
simone-silvestri db7ab5c
increase the resolution
simone-silvestri 6e19835
increase fontsize
simone-silvestri f8a8960
a better description
simone-silvestri 9588881
fix rendering of list
simone-silvestri 7e75f77
add correct branch
simone-silvestri 1008114
correct
simone-silvestri 9de5cfc
tripolar grid + readd examples
simone-silvestri c8a6a56
add commits
simone-silvestri cb1e5a3
try it like this
simone-silvestri 9711993
Merge branch 'main' into ss/interpolate-all-states
glwagner 9ddfb25
fix major basins
simone-silvestri 94c7ada
Merge branch 'ss/interpolate-all-states' of github.com:CliMA/ClimaOce…
simone-silvestri 5c6624e
Revert "fix major basins"
simone-silvestri 64a3482
improve slab ocean example
simone-silvestri 8f205d8
Merge branch 'ss/interpolate-all-states' into ss/adapt-veros
simone-silvestri a61f4f3
more changes
simone-silvestri 1f99aa7
Merge branch 'main' into ss/adapt-veros
simone-silvestri c3e5335
add this
simone-silvestri d5a7534
some renaming
simone-silvestri 2a83b7a
this should work now
simone-silvestri 50679ee
ok this works
simone-silvestri 7d7de3e
Merge branch 'main' into ss/adapt-veros
simone-silvestri 2295c90
reduce the output length
simone-silvestri 0d807aa
Merge branch 'ss/adapt-veros' of github.com:CliMA/ClimaOcean.jl into …
simone-silvestri 1b59c97
do not hide the python part
simone-silvestri 3b8a20a
plot temperature and salinity
simone-silvestri e2a10ab
fix a couple of bugs
simone-silvestri ca29a60
make the veros simulation
simone-silvestri 0003bc6
write forcing link
simone-silvestri ec1636e
make sure we have the correct output
simone-silvestri e98e5f8
import KernelOutput
simone-silvestri 92020e7
fix another bug
simone-silvestri c45366e
patch error signal
simone-silvestri 259f7dc
Merge branch 'main' into ss/adapt-veros
simone-silvestri 0b5d370
remove duplicate developers
simone-silvestri 92038d0
Merge branch 'ss/adapt-veros' of github.com:CliMA/ClimaOcean.jl into …
simone-silvestri e0f913f
remove duplicate ClimaOcean
simone-silvestri 22ef2f5
Delete ext/ClimaOceanVerosExt/flexible_veros_simulation.py
simone-silvestri 56311b0
change this timestep inside the timestepping function
simone-silvestri 6a3993b
bugfix
simone-silvestri 0cd2a29
this should be interior
simone-silvestri b791361
adapt
simone-silvestri 51363c4
Apply suggestion from @simone-silvestri
simone-silvestri 46e4497
download the data beforehand
simone-silvestri b5cc65b
Merge branch 'ss/adapt-veros' of github.com:CliMA/ClimaOcean.jl into …
simone-silvestri 6ca464e
uninformative errors
simone-silvestri 3fbd6cc
add back all the examples
simone-silvestri cc429e2
not sure what is going wrong with Distributed
simone-silvestri 0278b4d
do not make the quarter degree
simone-silvestri 9df72ec
Update docs/make.jl
simone-silvestri 5303b76
reinstate all examples
simone-silvestri 991f19c
Update veros_ocean_forced_simulation.jl
simone-silvestri 60c191f
try like this
simone-silvestri d9dcddf
Merge branch 'ss/adapt-veros' of github.com:CliMA/ClimaOcean.jl into …
simone-silvestri 8e57cea
generate the CPU examples on one CPU
simone-silvestri 7f22ceb
another bugfix
simone-silvestri a764433
bugfix again
simone-silvestri d22be0f
Update CPU example page reference for Veros simulation
simone-silvestri 6464960
remove slab sea ice
simone-silvestri 5d26ebe
Merge branch 'main' into ss/adapt-veros
simone-silvestri 649369d
fix examples
simone-silvestri 4798f40
update
simone-silvestri f944ba6
Merge branch 'main' into ss/adapt-veros
simone-silvestri 7eba40c
Adjust figure resolution for ocean simulation plot
simone-silvestri b05a913
Merge branch 'main' into ss/adapt-veros
simone-silvestri a2ad336
Merge branch 'main' into ss/adapt-veros
simone-silvestri 6a4e135
Merge branch 'main' into ss/adapt-veros
simone-silvestri 155d3a2
Merge branch 'main' into ss/adapt-veros
simone-silvestri f7fad12
Remove unnecessary comments in simulation script
simone-silvestri f6b4edf
Merge remote-tracking branch 'origin/main' into ss/adapt-veros
simone-silvestri 8a90fb2
replace everything with NumericalEarth
simone-silvestri 40cad6a
more coupling
simone-silvestri 5451529
add a very simple test
simone-silvestri 446360b
Merge branch 'ss/adapt-veros' of github.com:NumericalEarth/NumericalE…
simone-silvestri 565a53a
take the extension
simone-silvestri c895330
Merge remote-tracking branch 'origin/main' into ss/adapt-veros
simone-silvestri 896ebea
change
simone-silvestri 48f5468
remove OceanSeaIceModel
simone-silvestri 1ab8742
make sure eveything works
simone-silvestri a8f0b3a
fix docs
simone-silvestri bebc167
another bugfix
simone-silvestri a258a1a
another bugfix
simone-silvestri da11f16
Apply suggestion from @glwagner
simone-silvestri be5fb62
use fields
simone-silvestri 9a1358b
fix alignment
simone-silvestri 37be639
Merge branch 'main' into ss/adapt-veros
simone-silvestri 6fb1145
fix the veros example
simone-silvestri cd0e1b8
extend the exhange_grid
simone-silvestri bd98113
import method
simone-silvestri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,145 @@ | ||
| # # An Ocean Simulation at 4ᵒ Resolution Forced by JRA55 Reanalysis | ||
| # | ||
| # This example showcases the use of NumericalEarth's PythonCall extension to run a | ||
| # near-global ocean simulation at 4-degree resolution using the Veros ocean model. | ||
| # The ocean is forced by the JRA55 reanalysis data | ||
| # | ||
| # For this example, we need Oceananigans, NumericalEarth, Dates, CUDA, and | ||
| # CairoMakie to visualize the simulation. | ||
|
|
||
| using NumericalEarth | ||
| using PythonCall | ||
| using Oceananigans, Oceananigans.Units | ||
| using CairoMakie | ||
| using Printf | ||
|
|
||
| # We import the Veros 4 degree ocean simulation setup, which consists of a near-global ocean | ||
| # with a uniform resolution of 4 degrees in both latitude and longitude and a latitude range spanning | ||
| # from 80S to 80N. The setup is defined in the `veros.setups.global_4deg` module. | ||
|
|
||
| # Before importing the setup, we need to ensure that the Veros module is installed and loaded | ||
| # and that every output is removed to avoid conflicts. | ||
|
|
||
| VerosModule = Base.get_extension(NumericalEarth, :NumericalEarthVerosExt) | ||
|
|
||
| VerosModule.install_veros() | ||
| VerosModule.remove_outputs(:global_4deg) | ||
|
|
||
| # Actually loading and instantiating the Veros setup in the variable `ocean`. | ||
|
|
||
| ocean = VerosModule.VerosOceanSimulation("global_4deg", :GlobalFourDegreeSetup) | ||
|
|
||
| # The loaded Veros setup contains a `set_forcing` method which computes the fluxes as restoring from climatology. | ||
| # We replace it with a custom function that only computes the TKE forcing (which depends on the wind stresses | ||
| # that we set in NumericalEarth). This way our u, v, T, S forcings are not overwritten. | ||
| # The `set_forcing_tke_only` method defined below is modified from the `set_forcing` method defined in | ||
| # https://github.com/team-ocean/veros/blob/main/veros/setups/global_4deg/global_4deg.py | ||
|
|
||
| pyexec(""" | ||
| def set_forcing_tke_only(state): | ||
| from veros.core.operators import numpy as npx, update, at | ||
| from veros import KernelOutput | ||
|
|
||
| vs = state.variables | ||
| settings = state.settings | ||
|
|
||
| if settings.enable_tke: | ||
| vs.forc_tke_surface = update( | ||
| vs.forc_tke_surface, | ||
| at[1:-1, 1:-1], | ||
| npx.sqrt( | ||
| (0.5 * (vs.surface_taux[1:-1, 1:-1] + vs.surface_taux[:-2, 1:-1]) / settings.rho_0) ** 2 | ||
| + (0.5 * (vs.surface_tauy[1:-1, 1:-1] + vs.surface_tauy[1:-1, :-2]) / settings.rho_0) ** 2 | ||
| ) ** 1.5, | ||
| ) | ||
|
|
||
| return KernelOutput( | ||
| surface_taux=vs.surface_taux, | ||
| surface_tauy=vs.surface_tauy, | ||
| forc_tke_surface=vs.forc_tke_surface, | ||
| forc_temp_surface=vs.forc_temp_surface, | ||
| forc_salt_surface=vs.forc_salt_surface, | ||
| ) | ||
|
|
||
| ocean.set_forcing = set_forcing_tke_only | ||
| """, Main, (ocean=ocean.setup,)) | ||
|
|
||
| # We force the 4-degree setup with a prescribed atmosphere based on the JRA-55 reanalysis data. | ||
| # This includes 2-meter wind velocity, temperature, humidity, downwelling longwave and shortwave | ||
| # radiation, as well as freshwater fluxes. | ||
|
|
||
| atmos = JRA55PrescribedAtmosphere(; backend = JRA55NetCDFBackend(10)) | ||
|
|
||
| # The coupled ocean--atmosphere model. | ||
| # We use the default radiation model and we do not couple an ice model for simplicity. | ||
|
|
||
| radiation = Radiation() | ||
| coupled_model = OceanSeaIceModel(ocean, nothing; atmosphere=atmos, radiation) | ||
| simulation = Simulation(coupled_model; Δt = 1800, stop_time = 60days) | ||
|
|
||
| # We set up a progress callback that will print the current time, iteration, and maximum velocities | ||
| # every 10days. We also set up another callback that collects the surface prognostic variables | ||
| # into arrays for later visualization. | ||
|
|
||
| wall_time = Ref(time_ns()) | ||
|
|
||
| function progress(sim) | ||
| ocean = sim.model.ocean | ||
| umax = maximum(PyArray(ocean.setup.state.variables.u)) | ||
| vmax = maximum(PyArray(ocean.setup.state.variables.v)) | ||
| wmax = maximum(PyArray(ocean.setup.state.variables.w)) | ||
|
|
||
| step_time = 1e-9 * (time_ns() - wall_time[]) | ||
|
|
||
| msg1 = @sprintf("time: %s, iteration: %d, Δt: %s, ", prettytime(sim), iteration(sim), prettytime(sim.Δt)) | ||
| msg5 = @sprintf("maximum(u): (%.2f, %.2f, %.2f) m/s, ", umax, vmax, wmax) | ||
| msg6 = @sprintf("wall time: %s \n", prettytime(step_time)) | ||
|
|
||
| @info msg1 * msg5 * msg6 | ||
|
|
||
| wall_time[] = time_ns() | ||
|
|
||
| return nothing | ||
| end | ||
|
|
||
| u = [] | ||
| v = [] | ||
|
|
||
| function save_variables(sim) | ||
| push!(u, deepcopy(sim.model.interfaces.exchanger.ocean.state.u)) | ||
| push!(v, deepcopy(sim.model.interfaces.exchanger.ocean.state.v)) | ||
| end | ||
|
|
||
| add_callback!(simulation, progress, TimeInterval(10days)) | ||
| add_callback!(simulation, save_variables, IterationInterval(10)) | ||
|
|
||
| # Let's run the simulation! | ||
|
|
||
| run!(simulation) | ||
|
|
||
| iter = Observable(1) | ||
| ui = @lift(u[$iter]) | ||
| vi = @lift(v[$iter]) | ||
simone-silvestri marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Nt = length(u) | ||
|
|
||
| fig = Figure(resolution = (1000, 700)) | ||
| ax1 = Axis(fig[1, 1]; title = "Surface zonal velocity (m/s)", xlabel = "", ylabel = "Latitude") | ||
| ax2 = Axis(fig[2, 1]; title = "Surface meridional velocity (m/s)", xlabel = "", ylabel = "Latitude") | ||
|
|
||
| grid = coupled_model.interfaces.exchanger.grid | ||
|
|
||
| λ = λnodes(grid, Center()) | ||
| φ = φnodes(grid, Center()) | ||
|
|
||
| hm1 = heatmap!(ax1, λ, φ, ui, colormap = :bwr, colorrange = (-0.2, 0.2)) | ||
| hm2 = heatmap!(ax2, λ, φ, vi, colormap = :bwr, colorrange = (-0.2, 0.2)) | ||
|
|
||
| Colorbar(fig[1, 2], hm1) | ||
| Colorbar(fig[2, 2], hm2) | ||
|
|
||
| CairoMakie.record(fig, "veros_ocean_surface.mp4", 1:Nt, framerate = 8) do nn | ||
| iter[] = nn | ||
| end | ||
| nothing #hide | ||
|
|
||
| #  | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| module NumericalEarthVerosExt | ||
|
|
||
| using NumericalEarth | ||
| using CondaPkg | ||
| using PythonCall | ||
| using Oceananigans | ||
|
|
||
| include("veros_ocean_simulation.jl") | ||
| include("veros_state_exchanger.jl") | ||
|
|
||
| end # module NumericalEarthVerosExt |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Veros uses TKE as a prognostic variable for which it defines a boundary condition based on the wind stress.
This particular setup we are using has a
ocean.set_forcingmethod we need to overload.At the moment, the easiest way to do it, to avoid writing a long python setup and to avoid changing the flux computation to introduce extra tracers (which is something I would like to do in another PR) is to overload it from within python with the same method of the setup
https://github.com/team-ocean/veros/blob/f90669d73b2dec8ab8b04d5a7dc574f69510b6e8/veros/setups/global_4deg/global_4deg.py#L227-L274
pruning the extra computation of wind stress and heat flux.
I would like to change this by actually writing the veros setup in the example in python rather than having this fix, and add extra tracers to the flux computation, but I think we can do it in another PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would actually be interesting to write a GPU veros script and run it in the examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
veros should do this internally. That's what we do with CATKE.