-
Notifications
You must be signed in to change notification settings - Fork 191
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
Momentum dynamics validation on the CubedSphere #3306
Open
navidcy
wants to merge
179
commits into
main
Choose a base branch
from
ncc-glw/cubed-sphere-dynamics
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 177 commits
Commits
Show all changes
179 commits
Select commit
Hold shift + click to select a range
53f7fb5
first try for momentum dynamics on cubedsphere
navidcy c9aa1b3
some cleanup
navidcy 58e0145
second halo pass
simone-silvestri 5d964b2
change name
simone-silvestri b282ca3
weno momentum advection
navidcy 2bdf043
remove passes = 1:2 from fill_halo_regions!
navidcy dd35637
add second_fill_halo_pass
navidcy d8b83c5
fix second_halo_pass! call
navidcy b3f5e24
more verbose name
navidcy aeb39ed
Addded steady-state test case from PR #3302
siddharthabishnu 4b22581
fix momentum advection scheme
navidcy 7eec30c
add script to visualize vorticity
navidcy a1784b4
add vertical scheme in momentum advection
navidcy 4c6f9ee
Merge branch 'main' into ncc-glw/cubed-sphere-dynamics
glwagner c4ca9e9
Merge branch 'main' into ncc-glw/cubed-sphere-dynamics
navidcy cced0d3
visualize vorticity
navidcy 20ed9c4
code cleanup
navidcy 74cc1d3
Merge branch 'main' into ncc-glw/cubed-sphere-dynamics
navidcy 99c1e78
Fixed vorticity computation on cubed sphere panel corners
siddharthabishnu 4701920
second_fill_halo_regions_pass -> second_pass_of_fill_halo_regions
navidcy e5dd568
update vorticity calculation
navidcy d171972
add vorticity output
navidcy bb2e248
merge
navidcy 4292835
correct import
navidcy fde5e2e
back to previous
navidcy ad15c0e
plot movies
navidcy 746532f
Merge branch 'main' into ncc-glw/cubed-sphere-dynamics
navidcy ae15f9c
attempt to fill correctly the corner halo regions
navidcy 87a5d45
Merge branch 'ncc-glw/cubed-sphere-dynamics' of github.com:CliMA/Ocea…
navidcy 4646a5c
Commented out unnecessary lines of code
siddharthabishnu 0454188
Fixed lower limit of halo indices, compacted code
siddharthabishnu 581fdb9
Filled north-east corner halos
siddharthabishnu bb28847
Filled south-west corner halos
siddharthabishnu e6f0d68
Fixed a bug and filled more halos
siddharthabishnu e3cb76d
Filled remaining halos
siddharthabishnu 51a7d96
Set ζ values to NaN for non-essential halo indices
siddharthabishnu bb47cf8
Imported change from cubed-sphere-corner-vorticity
siddharthabishnu 8b962b3
don't use short-circuit but ensure operator presedence is taken care of
navidcy 9408a01
add return
navidcy 49ef46f
use solid-body rotation about NP + other tests
navidcy ff5f208
Merge branch 'main' into ncc-glw/cubed-sphere-dynamics
navidcy 689f769
bit of cleanup
navidcy bea55d6
fix docstrings + more verbose naming
navidcy ea1b27a
Filled halos in x direction of odd panel corners
siddharthabishnu 355587a
Merge branch 'ncc-glw/cubed-sphere-dynamics' of github.com:CliMA/Ocea…
siddharthabishnu cf3f03e
Filled halos in x direction of even panel corners
siddharthabishnu 1496f43
alignment
navidcy 5d669bb
remove duplicate
navidcy b7483e8
adds test u,v
navidcy e7ac069
Merge branch 'ncc-glw/cubed-sphere-dynamics' of github.com:CliMA/Ocea…
navidcy a6792f6
sid's changes
navidcy b481e98
Saved both vorticity and Coriolis parameter
siddharthabishnu ea9e71f
Fixed minor bug: missing "=" sign
siddharthabishnu a173d58
Overwrote vorticity computation
siddharthabishnu e07552a
Some cleanup
siddharthabishnu 21d8520
declutter a bit
navidcy ed2cd84
sw/nw -> se/ne
navidcy 66222dc
Merge branch 'main' into ncc-glw/cubed-sphere-dynamics
simone-silvestri b4afa0d
attempt to incorporate corner fixes in vorticity calc
navidcy 092f215
some more debugging to figure out what's wrong
navidcy 71ebad3
attempt to fix NE corners of odd panels
navidcy 77354c2
Comparison with MITgcm
siddharthabishnu 0c236de
Plot u, v and Δu, Δv w.r.t. MITgcm
siddharthabishnu 49f90a2
Understand relation between two cubed sphere grids
siddharthabishnu abb577f
Same grid -> closer MITgcm & Oceananigans outputs
siddharthabishnu 837067d
updates mitgcm comparison script
navidcy 9435af1
add comment about longitude values at the poles
navidcy b6d833d
Minor changes
siddharthabishnu 842189d
Merge branch 'ncc-glw/cubed-sphere-dynamics' of github.com:CliMA/Ocea…
siddharthabishnu d064b1f
Compared Azᶜᶜᵃ between MITgcm and Oceananigans
siddharthabishnu 75c3f28
fill velocity halos in update state
navidcy ac68144
Merge branch 'ncc-glw/cubed-sphere-dynamics' of github.com:CliMA/Ocea…
navidcy c1fe98d
Added a visualization script for the cubed sphere
siddharthabishnu f4b9896
Removed 4/3 factor in corner vorticity computation
siddharthabishnu 121e109
Added solid body rotation test case of MITgcm
siddharthabishnu b910398
Fixed velocity computations in corner halo regions
siddharthabishnu e25151d
Improved cubed sphere visualization script
siddharthabishnu 9e561b6
Enhanced solid body rotation test case of MITgcm
siddharthabishnu 0bc4142
Imported changes from ss-sb/implicit-free-surface
siddharthabishnu e358091
Fixed color range bug and renamed functions
siddharthabishnu 0c34873
Filled velocity halos in corner regions
siddharthabishnu 9b50474
Plotted the initial state of additional fields
siddharthabishnu 8bc5508
Commented out debugging code
siddharthabishnu dbcce8f
Refined vorticity computation script
siddharthabishnu f73dfd2
Observed NANs on halos, high ζ₀ on boundaries
siddharthabishnu 896fab0
δxᶠᵃᵃ --> δxᶠᶜᶜ and δyᵃᶠᵃ --> δyᶜᶠᶜ
siddharthabishnu 8479281
Simplified vorticity and removed halo fills
siddharthabishnu fddef06
Reinstated fill halos for the streamfunction
siddharthabishnu 6fe1308
Vorticity at interior points seems reasonable!
siddharthabishnu cd7e66c
Improved visualization and plotted initial ssh
siddharthabishnu 50d41be
Ran simulation and it still blows up!
siddharthabishnu b8481e6
Using smaller mesh, constant velocities to debug
siddharthabishnu ef01019
Considered the option of only one layer of halo
siddharthabishnu b58b12f
First Implementation of Rossby-Haurwitz Test Case
siddharthabishnu 605f18b
Commented out unnecessary lines, used simpler u, v
siddharthabishnu fb34b28
Fixed potential error in velocity halo fillings
siddharthabishnu 5c6b2c5
Fixed Δxᶠᶜᵃ and plotted relevant grid metrics
siddharthabishnu a15b0aa
Fixed metric Δxᶠᶜᵃ[0,Ny+1:Ny+Hy] for even panels
siddharthabishnu 3029997
Grid metric changes in Rossby-Haurwitz test case
siddharthabishnu 693e12d
Ran the Rossby-Haurwitz simulation
siddharthabishnu 0122a10
Reinstated 4/3 factor in ζ computation at corners
siddharthabishnu 3ee51f6
Added option to load cubed_sphere_32_grid.jld2
siddharthabishnu deb0d8b
Compared metrics Δxᶠᶜᵃ, Δyᶜᶠᵃ, Azᶠᶠᵃ with v0.82.0
siddharthabishnu 9d16534
Fixed a bug in overwriting grid metrics
siddharthabishnu 78da645
Overwrote additional grid metrics with v0.82.0
siddharthabishnu 8dd1417
Overwrote grid metrics from JMC's output file
siddharthabishnu 00cd2b8
First attempt at forward-backward time integrator
siddharthabishnu dac8db2
Plotted relative difference of grid metrics
siddharthabishnu f604c6c
Fixed a bug in cubed sphere visualization script
siddharthabishnu 3d5ea90
Customized Rossby-Haurwitz visualization options
siddharthabishnu 42436d7
Added simplified initial velocity for debugging
siddharthabishnu 769e357
FWB with AB2 for velocity FW for free surface
simone-silvestri 96e4241
Added tests to verify halo vorticity computation
siddharthabishnu 2c1e39a
replace "fill_velocity_halos" with simple code
jm-c 7935d43
Fixed bug associated with AB2-FB time integrator
siddharthabishnu 212fc16
Add Coriolis
jm-c dc6b4ac
Overwrote lat-lon values from JMC's output file
siddharthabishnu 50d4381
Added new test function for cubed sphere
siddharthabishnu 6a000e5
Updated Rossby-Haurwitz simulation script
siddharthabishnu 54ba43d
fix typo
jm-c f7cd926
tweaks fill_velocity_halos for high-order scheme
jm-c cff9e5e
fix previous commit for case Hx > 2
jm-c 4fbd188
Needed just for the hacked FB+AB2 to work
jm-c 1bba4ec
Deeper ocean + remove global-mean from initial Eta
jm-c 499ffd3
Changes to get consistent initial velocity
jm-c 35ec029
Same function to fill halos for u, v, grid metrics
siddharthabishnu bee9fcd
Disabled option to employ MITgcm's grid metrics
siddharthabishnu 8351eec
Refactored function and variable names
siddharthabishnu eb990ac
horizontal_closure = nothing for Rossby-Haurwitz
siddharthabishnu 4c32749
Fixed a major bug and cleaned up code
siddharthabishnu 9b50d93
Bickley jet simulation on the cubed sphere
siddharthabishnu 9c099ee
Minor modification
siddharthabishnu 187e631
Initial condition: f(λ,φ,z) instead of f(x,y,z)
siddharthabishnu bbede50
Merge branch 'main' into ncc-glw/cubed-sphere-dynamics
navidcy 391789a
Fixed bugs and enhanced Bickley jet test case
siddharthabishnu 16ba6e4
remove unneded DataDeps
navidcy 558d93f
nHalo -> Nhalo
navidcy d85a2d2
Clean code with better Bickley jet initialization
siddharthabishnu 6993302
Refined the script multi_region_cubed_sphere.jl
siddharthabishnu b478a1d
Merge branch 'main' into ncc-glw/cubed-sphere-dynamics
navidcy 3e19e8a
Renamed files and added information on Imaginocean
siddharthabishnu e4420c2
Added a function to plot fields on the sphere
siddharthabishnu 35d1a69
Enhanced Rossby-Haurwitz wave validation script
siddharthabishnu 010d4ab
Merge branch 'main' into ncc-glw/cubed-sphere-dynamics
navidcy 9897096
Enhanced Bickley jet validation script
siddharthabishnu 941260f
Improved cubed sphere visualization and bug fix
siddharthabishnu f86278e
Saved output to file, η w.r.t. surface, fixed bugs
siddharthabishnu 930b915
Default comparison of old and new metrics disabled
siddharthabishnu b05b709
Printed MITgcm grid metrics to jld2 file
siddharthabishnu 532df46
Inserted single EOL at the end of files
siddharthabishnu 9ec9f54
Exported Δxᶜᶜᵃ, Δyᶜᶜᵃ, Δxᶠᶠᵃ, Δyᶠᶠᵃ to jld2 file
siddharthabishnu 1f27841
Exported metrics of 4x4x1 cs grid to jld2 file
siddharthabishnu b9197c8
Made minor modifications suggested by Navid
siddharthabishnu 2f29cca
Merge remote-tracking branch 'origin/main' into cubed-sphere-dynamics
siddharthabishnu 01a1afc
Replace scripts with main branch equivalents
siddharthabishnu 5b8fc15
Redefine "view" to take ssh into consideration
siddharthabishnu 07fa4ef
Update validation scripts
siddharthabishnu 67e212d
Fix error in accessing size of a multiregion field
siddharthabishnu 5161be1
Loop only over interior z points to fill halos
siddharthabishnu 37e66e2
Fix major bug
siddharthabishnu 1b1ec0a
Fill cubed sphere velocity halos only once
siddharthabishnu f3d2a5d
add comment
navidcy 22d5a37
Apply suggestions from code review
navidcy c24a936
Print initial condition and Azᶠᶠᵃ to output file
siddharthabishnu 42c37cf
Apply suggestions from code review
navidcy 43e970a
Set g = 10, H = 1000, r = 6370e3 for Bickley jet
siddharthabishnu 2ea3bbd
Delete cs validation scripts no longer used
siddharthabishnu 1f99f74
Delete replace_horizontal_vector_halos!
siddharthabishnu 2406d2c
Revert modifications in validation/bickley_jet
siddharthabishnu 03bdefc
Refine cubed sphere Bickley jet validation script
siddharthabishnu 8c9ca4e
Further modify cubed sphere Bickley jet test case
siddharthabishnu cdd742d
Improve visualization of cs validation test cases
siddharthabishnu 0447313
Remove MITgcm data visualization functions
siddharthabishnu fa1868c
Refine Bickley jet validation script
siddharthabishnu 6868203
Compact multiple cubed sphere validation scripts
siddharthabishnu f66153b
Rename cs solid body rotation validation script
siddharthabishnu 204933f
Remove commented-out deprecated code
siddharthabishnu 5e1d5a9
Fix Rossby-Haurwitz wave initial streamfunction
siddharthabishnu 659b1b2
Compact cubed sphere validation scripts
siddharthabishnu 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 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 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 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 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 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 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 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 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 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 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 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 |
---|---|---|
|
@@ -24,7 +24,7 @@ const GriddedMultiRegionFieldTuple{N, T} = NTuple{N, T} where {N, T<:GriddedMult | |
const GriddedMultiRegionFieldNamedTuple{S, N} = NamedTuple{S, N} where {S, N<:GriddedMultiRegionFieldTuple} | ||
|
||
# Utils | ||
Base.size(f::GriddedMultiRegionField) = size(getregion(f.grid, 1)) | ||
Base.size(f::GriddedMultiRegionField) = size(getregion(f, 1)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice catch |
||
|
||
@inline isregional(f::GriddedMultiRegionField) = true | ||
@inline devices(f::GriddedMultiRegionField) = devices(f.grid) | ||
|
This file contains 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
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.
this reads like a hack..
also, what's "ssh" mentioned in the comment?
what if
size(data)[2] == 1
... then nothing needs to happen?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.
Yes, it is a temporary hack. I have outlined the issue arising in the absence of this hack in issue #3572 and created PR #3573 to resolve it. In the comment,
ssh
refers to fields like ssh defined on thexy
plane, for which the parent array takes the z-halo into consideration even though it does not exist. In case of a field like the meridional average of a scalar quantity which is defined on thexz
plane, the same issue arises without an equivalent hack.