-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add polar vortex intruder test (#77)
- Loading branch information
Showing
15 changed files
with
159 additions
and
56 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ brew "wget" | |
brew "node" | ||
brew "cfitsio" | ||
brew "gh" | ||
brew "boost" |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# configuration for polar vortex simulation | ||
|
||
macro(SET_IF_EMPTY _variable) | ||
if("${${_variable}}" STREQUAL "") | ||
set(${_variable} ${ARGN}) | ||
endif() | ||
endmacro() | ||
|
||
# athena variables | ||
set_if_empty(NUMBER_GHOST_CELLS 3) | ||
|
||
set(EOS shallow_xy) | ||
set(PNETCDF ON) | ||
set(MPI ON) |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Custom configurations | ||
|
||
- `PNETCDF (OFF)` : turn on pnetcdf output | ||
- `NETCDF (OFF)` : turn on netcdf output | ||
- `USER_MODS` : user module file |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
swxy_output.nc filter=lfs diff=lfs merge=lfs -text | ||
intruder_output.nc filter=lfs diff=lfs merge=lfs -text |
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
Git LFS file not shown
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
//! \file shallow_water.cpp | ||
//! \file shallow_xy.cpp | ||
// \brief shallow water test model | ||
|
||
// C/C++ | ||
|
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#! /usr/bin/env python3 | ||
from netCDF4 import Dataset | ||
from numpy import sum, sqrt | ||
import sys | ||
|
||
case1 = sys.argv[1] | ||
case2 = sys.argv[2] | ||
|
||
data1 = Dataset(case1, "r") | ||
var1 = data1["vort"][-1, :, :, :] | ||
|
||
data2 = Dataset(case2, "r") | ||
var2 = data2["vort"][-1, :, :, :] | ||
|
||
diff = sqrt(sum((var2 - var1) * (var2 - var1))) | ||
|
||
if diff < 1.0e-6: | ||
print("### polar vortex case passed. ###") | ||
else: | ||
raise ValueError("ERROR: polar vortex failed. L2-norm is %.2g" % diff) |
File renamed without changes.
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