Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
31 changes: 18 additions & 13 deletions bin/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,41 @@
from snek5000.clusters import Cluster

cluster = Cluster()
sub_dir = "november"
sub_dir = "test-abl-cli"
base_name_run = "hi"
sub_command = "launch"
# sub_command = "launch compile"
# sub_command = "launch release"; cluster.cmd_run = "echo"
# sub_command = "launch"
# sub_command = "launch compile"
# sub_command = "launch release"
sub_command = "debug"
cluster.cmd_run = "echo"
# sub_command = "debug"
# sub_command = "show box"
dry_run = False
dry_run = not False

for (
mesh_nb_nodes_walltime,
mesh_nb_nodes,
walltime,
filter_weight,
filter_cutoff,
filter_temporal,
sgs_model,
sgs_boundary,
z_wall,
z_rough,
) in itertools.product(
zip([111], [1] * 1, [f"{days}-00:00:00" for days in (7,) * 1]),
[0.05],
itertools.zip_longest([11, 21], [1], fillvalue=1),
["7-00:00:00"],
[0.05, 12],
[0.75],
# [0.], [1.],
[False],
["vreman", "constant", "shear_imp"],
["constant"], # "vreman"], "shear_imp"],
# "dynamic"],
[False],
[0.1],
[0.1],
):
mesh, nb_nodes, walltime = mesh_nb_nodes_walltime

mesh, nb_nodes = mesh_nb_nodes

name_run = (
f"{base_name_run}-{sgs_model}-ft{int(filter_temporal)}-sb{int(sgs_boundary)}"
Expand All @@ -44,11 +49,11 @@
continue

cmd = (
f"\n{sys.executable} ./simul.py "
f"\n{sys.executable} -m abl.cli "
f"-d {sub_dir} -m {mesh} -n {name_run} -o {nb_nodes} -w {walltime} "
f"-fw {filter_weight} -fc {filter_cutoff} -ft {filter_temporal} "
f"-s {sgs_model} -sb {sgs_boundary} "
f"-zw {z_wall} "
f"-zw {z_wall} -z0 {z_rough} "
f"{sub_command}"
)
if dry_run:
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[build-system]
requires = ["setuptools>=42.0.0", "wheel", "setuptools_scm[toml]>=3.4.2"]


[tool.setuptools_scm]
write_to = "src/abl/_version.py"
write_to_template = "__version__ = \"{version}\"\n"

[tool.pytest.ini_options]
addopts = "--instafail --cov=abl --cov=tests"
10 changes: 9 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ install_requires =
setup_requires =
setuptools_scm

[options.entry_points]
console_scripts =
abl = abl.cli:main

snek5000.solvers =
abl = abl.solver

[options.extras_require]
docs =
sphinx
Expand All @@ -35,6 +42,7 @@ docs =

tests =
pytest
pytest-instafail
pytest-xdist
nox

Expand All @@ -59,7 +67,7 @@ dev =
where=src

[options.package_data]
abl = templates/*.j2, bc/*, sgs/*, toolbox/*, *.usr, *.par, *.box, SIZE, Snakefile, etc/*.yml
abl = templates/*.j2, bc/*, sgs/*, toolbox/*, *.usr, SIZE, Snakefile, etc/*.yml

[flake8]
ignore = E501,W503,W505
Expand Down
42 changes: 0 additions & 42 deletions src/abl/SIZE

This file was deleted.

2 changes: 1 addition & 1 deletion src/abl/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ rule archive:
),
rest=[
"SESSION.NAME",
"params.xml",
"params_simul.xml",
"SIZE",
*iglob(f"rs6{CASE}0.f*"),
f"{CASE}.re2",
Expand Down
13 changes: 0 additions & 13 deletions src/abl/abl.box

This file was deleted.

59 changes: 0 additions & 59 deletions src/abl/abl.par

This file was deleted.

32 changes: 22 additions & 10 deletions src/abl/abl.usr
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,25 @@ c
implicit none

include 'SIZE'
include 'INPUT' ! uparam
include 'PARALLEL' ! GLLEL
include 'NEKUSE' ! ffx, ffy, ffz, ux, uz
include 'FLOWPHYS' ! fp_corio_on, fp_corio_freq, fp_u_geo

! argument list
integer ix,iy,iz,eg

! local variables
real U_GEO, f_corio

c e = gllel(eg)

U_GEO = uparam(3)
f_corio = uparam(4)

ffx = f_corio * uz
ffy = 0.0
ffz = -f_corio * (ux - U_GEO)
if (fp_corio_on) then
ffx = fp_corio_freq * uz
ffy = 0.0
ffz = -fp_corio_freq * (ux - fp_u_geo)
else
ffx = 0.0
ffy = 0.0
ffz = 0.0
endif

return
end
Expand Down Expand Up @@ -113,6 +114,7 @@ c> @callgraph
include 'GEOM' ! ym1
include 'INPUT' ! uparam
include 'WMLES' ! KAPPA, PI_, y0
include 'FLOWPHYS' ! fp_u_geo

integer ix,iy,iz,eg
real Ly
Expand All @@ -126,7 +128,7 @@ c uz = 0.0
temp = 0.0

c Geostrophic velocity
U_GEO = uparam(3)
U_GEO = fp_u_geo
c Get mesh lengths from userParam0{5,6,7}
XLEN = uparam(5)
YLEN = uparam(6)
Expand Down Expand Up @@ -320,6 +322,14 @@ c> @callgraph
implicit none

include 'SIZE'
include 'INPUT' ! param
include 'FLOWPHYS' ! fp_corio_on, fp_u_geo

if (.not. fp_corio_on) then
param(54) = -1 ! use >0 for const flowrate or <0 bulk vel
! flow direction is given by (1=x, 2=y, 3=z)
param(55) = fp_u_geo ! flowrate/bulk-velocity
endif

return
end
Expand All @@ -341,6 +351,7 @@ c> @{
call chkpt_register
call stat_register
call wmles_register
call fp_register

return
end subroutine
Expand All @@ -357,6 +368,7 @@ c> @{
call chkpt_init
call stat_init
call wmles_init
call fp_init

return
end subroutine
Expand Down
Loading